Comments (9)
Can you provide more information?
How does your complete sync command look like? have you set --update-values true ?
How does the cli output look like when using the --dry true flag?
from locize-cli.
command is just locize sync --language-folder-prefix 'public/locales/' --namespace translation --skip-delete true
U can test it by:
- create reference language file like {"key1": "key1 initial text", "key2": "key2 initial text"}
- sync it to locize with
locize sync --skip-delete true
- delete key2 from local reference file only
- update key1 value directly in locize to "key1 updated text"
- run
locize sync --skip-delete true
again - Key1 won't get the updated text from locize
With current behaviour the end result in local is {"key1": "key 1 initial text"} but it should be {"key1": "key1 updated text"}
from locize-cli.
cli version is [email protected]
from locize-cli.
Ahh, now I know what you mean.
local is master, but you skip the delete...
without the skip-delete it would delete that key from locize...
Why would you expect the key to be downloaded again locally?
This is like a conflict...
from locize-cli.
Ahh, now I know what you mean.
local is master, but you skip the delete...
without the skip-delete it would delete that key from locize...Why would you expect the key to be downloaded again locally?
This is like a conflict...
local is master for translation keys, locize is master translation values. Branch might be different so we don't want to delete extra keys from locize automatically.
key2 should not be downloaded again as it's extra but key1 translation value should be. I think for non-extra keys the behaviour should be always the same. I updated my original example to be bit more specific but here's example what happens if there are no extra keys in locize.
- create reference language file like {"key1": "key1 initial text", "key2": "key2 initial text"}
- sync it to locize with locize sync --skip-delete true
delete key2 from local reference file only- update key1 value directly in locize to "key1 updated text"
- run locize sync --skip-delete true again
- Key1 got the updated text from locize, end result locally {"key1": "key1 updated text", "key2": "key2 initial text"}
from locize-cli.
Thank you very much for all this information.
Can you try again with v7.6.1 ?
from locize-cli.
Thank you very much for all this information.
Can you try again with v7.6.1 ?
Seems to work thank you.
Noticed though that non ref languages get all the keys from locize (not just the onces local ref lang has defined) but with that we can live (and previous versions did that also).
The usecase here is that developers create the keys in code repository and people who translate use locize. The end product has all the translations embedded so the code and translations match.
from locize-cli.
Is this related to skip-delete
flag or was this behaviour there without this flag also. I am also facing something similar on version 7.0.3 but we don't use this skip-delete
from locize-cli.
@rishabh876 Can you update your cli version and try again? In case you have an issue, please open an new issue.
from locize-cli.
Related Issues (20)
- Sync returns a different result for "auto-publish" mode and without it HOT 8
- Locize cli doesn't read `.env` file HOT 2
- 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
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.