Comments (4)
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?
- In your experience would you be doing the whole document in one locale or does per layer make sense?
- Does the syntax feel easy enough to accomplish or does it ruin your layer naming conventions or affect exporting, or any other issues?
- Any other thoughts?
from sketch-data-faker.
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
.
-
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.
-
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.
-
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.
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.
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)
- Auto feature (renaming layer) doesn't work with Symbols HOT 2
- Doesn't seem to work on Sketch 57.1 HOT 3
- Replace text using content instead of layer name HOT 3
- parameter option for count of words/sentences/paragraphs
- Customize manual options in the sketch data menu HOT 1
- Add image support HOT 1
- Concatenate Multiple Data HOT 3
- Where is the data coming from?
- Provide "Matching Data". i.e. add objects/grouped data
- List all Faker options HOT 6
- Add localised data formatting HOT 3
- Add support for default locale HOT 2
- Doesn’t work with library symbol overrides HOT 7
- Auto feature (renaming layer) doesn't work with Symbols HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sketch-data-faker.