Comments (3)
Closing this as wontfix for now, but open to reopening it once I know more about other data sources I add and if they need a formatting layer.
from sketch-data-faker.
Hi @ErikFontanel thank you and yes, I agree with you that those formats should match locale. I assumed Faker.js
would do that.
Now, I want to integrate this request, but I am going to hold off for a little bit until I can sort out some questions I have. I have several issues right now that hold me back from doing this.
These are:
- I think this ticket is better suited upstream (on the
Faker.js
project itself) as I am already askingFaker.js
to provide me their data in a specific locale. They do already have locale support built-in and are the ones supplying the data. So it's an issue on their end if they are not sending me the correctly formatted data. It seems silly to have to re-format their data in my project based on that locale.
In fact, there are some open tickets over there around locales:
https://github.com/Marak/faker.js/issues/753
https://github.com/Marak/faker.js/issues/486
https://github.com/Marak/faker.js/issues/752
https://github.com/Marak/faker.js/issues/747
https://github.com/Marak/faker.js/issues/598
- Adding extra dependencies. I don't want to get too far into dependencies in this project which add weight and maintenance. But on top of weight and maintenance, looking specifically the
numeral.js
project, it doesn't seem to be well supported any more (over 2 years since the last change and over a hundred open issues). Even if we find another project, the weight and maintenance issues remain. - It's also going to be messy to catch the data coming back from these plugins and supply it properly inside
Sketch Data Faker
. If they give us atime
, or acurrency
or atel
, we have to know what we are going to get and then use the correct formatter methods on the return data. While not hard, it's a lot of extra logic to maintain, especially combined with my next point: - Last, but perhaps most important - I am hoping to add other data sources in the near future to
Sketch Data Faker
. In these other data sources, there may be better formatting options, which could help here. But even if not, I wouldn't want us to go too far down the path of formatting logic until I can figure out a way to getSketch Data Faker
to use multiple data APIs. Then, if we need more formatting, we can apply it to everything, not justFaker
.
As to your second request - Default Locales
, I agree here too. In the original ticket (#5 (comment)), I thought about this. I think you're right and I'm going to open a new ticket to track it. You can see it here: #7
from sketch-data-faker.
Hey Paul,
Thanks for the thought out reply and concerns on maintainability, definitely something people can learn from :)
- Agreed, I was surprised myself these issues were not resolved in faker.js already. Considering
faker.js
seems pretty active, it's a fair bet to rely on the upstream to get this fixed. - True. I'm not experienced enough in the locale side of JS, but natively JS already supports quite some formatting functionality. Ie. Number.toLocaleString and Intl.NumberFormat. Perhaps that's a direction to explore. Although I'm sure that will be it's own can of worms haha.
- & 4. Gotcha. I'm surprised there has been such a lack of data supplier plugins since the release of Sketch 52, so it's assuring to read that you have this on your radar.
For now I think I'll just use some localised txt files as a fallback for stuff like the phone numbers.
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
- Localization support HOT 4
- 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.