Comments (13)
I started to work on it. Would provide a draft PR over the weekend. ๐
from falso.
Yes, the next step should be the third option using second entry points.
from falso.
Yes, but they will be imported from the main package
from falso.
I can check this.
from falso.
I saw PR related to this issue. That's very cool that we can use Google Translate to translate. But in terms of library API, how this will work taking into consideration that needs to be tree shakeable? ๐ค
import { locale } from '@ngneat/falso'
// Something like this?
locale('en')
or maybe we can generate per locale bundles? ๐ค
and the default @ngneat/falso
is English version
import { randomWord } from '@ngneat/falso/de'
randomWord()
or we can make everything that is not translateable to be imported from @ngneat/falso
and everything else that is translateble to be imported from @ngneat/falso/<locale>
I like more this third option
from falso.
@theryansmee do you think you can handle this?
from falso.
@NetanelBasal - Sorry I don't have any experience with this. It would probably be better suited for someone else.
from falso.
What would be the approach here. Using fileReplacements or ENV properties to replace default locale e.g. en.json
with de.json
and do builds for each locale?
Wouldnโt it be better for functions that need locales, to group them in own folder?
packages/falso/src/lib/abbreviation/index.ts
packages/falso/src/lib/abbreviation/en.json
packages/falso/src/lib/abbreviation/de.json
packages/falso/src/lib/abbreviation/<locale>.json
from falso.
We don't want it as a separate npm package. The goal is to import it as:
import { randName } from @ngneat/falso/locales/ru
from falso.
We don't want it as a separate npm package. The goal is to import it as:
Exactly, but each locale subfolder will be a completely different build ๐ค
from falso.
Main folder will be something like this
And each locale subfolder, something like this ๐ค
from falso.
yes
from falso.
Hi I am sorry but the only random value exported from locales seems to be "randomBird". Is this right?
from falso.
Related Issues (20)
- core/getRandomInRange accepts Min option greater than Max option
- randUuid returns the same id multiple times with the length parameter HOT 2
- Add uniqueness to certain random values HOT 7
- JSON files for Food and Sports not deployed HOT 1
- spec with randNumber failed randomly HOT 2
- randAvatar is not so random? HOT 1
- UUID and random dates doesnยดt respect the seed HOT 4
- Make falso instantiable HOT 1
- Falso attempts to import the built-in Node.js `crypto` module in the browser HOT 1
- `randFloat({ min: 0, max: 0 })` causes stack overflow HOT 2
- Can you add a CHANGELOG.md/releases? HOT 1
- 7.0.0: Incorrect `main` value in `package.json` HOT 2
- `randFloat` with equal min/max results in `RangeError: Maximum call stack size exceeded` HOT 6
- Non-uniform distribution of `randNumber` generation HOT 2
- Invalid 'main' field in '/Users/<projectDir>/node_modules/@ngneat/falso/i18n/de/package.json' of './index.cjs.js'.
- (love) Just to tell you how great your software is HOT 2
- Why can toCollection return a non-array? HOT 2
- Locale support, any ideas when that might be released? HOT 1
- randPhoneNumber will generate invalid US phone numbers HOT 1
- Schedule of the new features (PRs and locale basic structure)? HOT 3
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 falso.