Comments (4)
Thx for the quick response Jan!
There is some sorting of keys going on during sync as well, so I feel the safest bet is to avoid key names which may get duck-typed to something else during processing/transformations in locize. Haven't tried "true", "null" or "undefined", they might work fine, but I'm not overly tempted to take the chance.
"401" is arguably not necessarily a translator person friendly name anyways 😄
cheers
-magnus
from locize-cli.
from locize-cli.
Hey! Just had the very same issue with a very similar dictionary.
{
"en-US": {
"404": {
"link": "To homepage",
"text": "This page doesn't exist.",
"title": "Error 404"
},
"500": {
"link": "Reload page",
"text": "There was a server error.",
"title": "Server error"
}
}
I understand the reasoning you (@jamuhl) provided up there but it's kind of unexpected behavior for me. Are there actually any cases where you would want arrays in your dictionaries? Any way for me to prevent this from happening (besides not using numeric keys or adding an additional key)?
Thanks for your help! Best wishes
from locize-cli.
@peterhass the support for arrays is already existing in i18next https://www.i18next.com/translation-function/objects-and-arrays#arrays therefore we also provide support for that...
currently the only option to avoid this is indeed what you described already....but will discuss this in the team again...eventual someone comes up with a new idea to make this more "smart".
from locize-cli.
Related Issues (20)
- Locize sync alters my `.json` files HOT 2
- Ambiguous --compare-modification-time flag behavior HOT 7
- version contains strange undeletable namespaces HOT 1
- Mapping between CLI params and config options HOT 1
- Locize sync results in FetchError HOT 5
- TypeError: Cannot read properties of null (reading 'value') HOT 1
- install.ps1 automatic figuring out of download url version has broken HOT 2
- bug(install): binary install not working HOT 15
- Not downloading all translations HOT 2
- The sync command crashes with Error: Callback was already called HOT 1
- The download command fails with an error when using the android format HOT 4
- vulnerabilities on npm install HOT 2
- `locize format` removes comments from `fluent files` HOT 1
- Fluent's `Message References` is not being saved in Locize. HOT 1
- High severity vulnerabilities on npm install HOT 1
- Locize-cli timeouts on sync HOT 4
- Support overwriting HOT 4
- https-proxy-agent dependency error on fresh install HOT 1
- Sync command doesn't do what documentation says HOT 4
- Download command misses newly added namespaces for tenant projects 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 locize-cli.