Giter VIP home page Giter VIP logo

Comments (4)

paintedbicycle avatar paintedbicycle commented on May 23, 2024

Hi @dotvhs yes, this is something I have been thinking about.

One of the things I was waiting on is coming up with a good syntax for choosing the locale and a smart way to implement it. But with your ticket open maybe I'll push on it again and implement something sooner.

Do you have any thoughts on how it should be implemented? Have you used any other tool for managing locales or have seen a convention we should follow?

In my experience with locales on websites, it's often something like this:

First, in my mind, the locale could either be set globally or locally. I'd like to keep things simple for now and so I think locally makes the most sense. So this would be per layer rather than the whole document. Agree? It means more typing, but also more control. I could perhaps do both, but I don't really want to build and maintain things people won't use.

Second, the syntax for choosing the locale if it's per layer. I think it makes sense for the designer to request the locale using the layer name and so I was thinking of adding it to either the beginning or the end:

i.e. commerce.productName/locale=de or locale=de/commerce.productName

With the locale at the start, it might be hard to read the layer name in your Sketch document on smaller screen sizes. So maybe the first one makes sense?

It also seems a bit long to do the whole locale= thing each time, but I'm worried that if I don't, and I want to add more options to the plugin in the future, it may be hard for me to know if it was the locale the person was setting or something else the person was trying to customize. But the shortest version could be something like:

commerce.productName/de/

How would you feel about that syntax?

Do you have any thoughts on what you expected to see?

  1. In your experience would you be doing the whole document in one locale or does per layer make sense?
  2. Does the syntax feel easy enough to accomplish or does it ruin your layer naming conventions or affect exporting, or any other issues?
  3. Any other thoughts?

from sketch-data-faker.

dotvhs avatar dotvhs commented on May 23, 2024

Thank you for your detailed answer. I agree with all your points.

Honestly, at first I had in mind locale as the first element, like de.commerce.productName, but I'm not sure if it won't clash with other settings. Perhaps |de at the end? Like commerce.productName|de.

  1. In my experience, I'm using single language in whole project, but adding on each text field does not sound like a lot of work, really.

  2. I did not notice ruining anything, it worked fine, however this might be too early for me to judge, I started using your plugin few days ago, I will report if I find anything.

  3. Not sure about it, perhaps... could use a bit better icon? :D I have nothing against current one, it suits project fine, but could be a bit more colorful. If you agree, I could design one for you.

from sketch-data-faker.

paintedbicycle avatar paintedbicycle commented on May 23, 2024

I was more meaning about this feature but thanks for confirming - I’ll see about implementing something and getting your thoughts! I’ll report back in a week or two

from sketch-data-faker.

paintedbicycle avatar paintedbicycle commented on May 23, 2024

Hi @dotvhs - version 0.4.0 introduces locales using the |xx suffix notation. Let me know what you think. You can see the full list of locales and instructions for use in the readme.

from sketch-data-faker.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.