GithubHelp home page GithubHelp logo

Comments (7)

adrai avatar adrai commented on July 23, 2024

Just tried to reproduce your second case:
image
this seems to work for me.


The last case without --compare-modification-time behaves as intended, because "your local repository is the master":
image


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.

stale avatar stale commented on July 23, 2024

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.

ravecat avatar ravecat commented on July 23, 2024

@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.

adrai avatar adrai commented on July 23, 2024

Sorry, I don't understand your question. Can you please elaborate?

from locize-cli.

ravecat avatar ravecat commented on July 23, 2024

@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

Screen Shot 2022-07-08 at 11 46 14

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.

adrai avatar adrai commented on July 23, 2024

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:
image

from locize-cli.

ravecat avatar ravecat commented on July 23, 2024

Thanks, will compare these

from locize-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.