Comments (7)
Just tried to reproduce your second case:
this seems to work for me.
The last case without --compare-modification-time
behaves as intended, because "your local repository is the master":
In general the CLI will always compare with what is published. To see what is actually published, check your namespace: https://docs.locize.com/integration/api#fetch-namespace-resources
The logic of --compare-modification-time
is simple: it just compares the last-modified header of the published translations with the mtime of the local file. The newer datetime is the master namespace.
So when should --compare-modification-time
be used and when not?
-> Usually, the developers will only work locally, and only with the reference language. So, adding new keys or removing old keys would automatically be synchronized with locize, but existing value updates in locize would be synched back locally.
Often this is the default process. => in this case --compare-modification-time
is not necessary.
But it may be there is a mix in the process, so sometimes new keys gets added to locize directly sometimes only locally, etc... In this situation --compare-modification-time true
is favorable.
from locize-cli.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from locize-cli.
@adrai thank you for answer, could you take advice how to find modification time for locize translation. every sync values from locize rewrite of local translation values, it looks like remote changes always take precedence
from locize-cli.
Sorry, I don't understand your question. Can you please elaborate?
from locize-cli.
@adrai you mentioned
it just compares the last-modified header of the published translations with the mtime of the local file. The newer datetime is the master namespace.
I have abilty to get mtime
So, have any ability to get modiified time for locize translation version? Because every sync remote translation rewrite local changes and I want to compare mtime and modification time from header
from locize-cli.
Like said, the last-modified header of your published translations (https://docs.locize.com/integration/api#fetch-namespace-resources)
i.e. for the https://locize.com website the downloaded translations are: https://api.locize.app/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/production/en/landingpage
In the response header you'll find it:
from locize-cli.
Thanks, will compare these
from locize-cli.
Related Issues (20)
- 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
- 2 high severity vulnerabilities in xlsx HOT 2
- doesn't read variables from .locize? HOT 2
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.