GithubHelp home page GithubHelp logo

Comments (9)

adrai avatar adrai commented on May 27, 2024

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.

hixus avatar hixus commented on May 27, 2024

command is just locize sync --language-folder-prefix 'public/locales/' --namespace translation --skip-delete true

U can test it by:

  1. create reference language file like {"key1": "key1 initial text", "key2": "key2 initial text"}
  2. sync it to locize with locize sync --skip-delete true
  3. delete key2 from local reference file only
  4. update key1 value directly in locize to "key1 updated text"
  5. run locize sync --skip-delete true again
  6. 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.

hixus avatar hixus commented on May 27, 2024

cli version is [email protected]

from locize-cli.

adrai avatar adrai commented on May 27, 2024

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.

hixus avatar hixus commented on May 27, 2024

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.

  1. create reference language file like {"key1": "key1 initial text", "key2": "key2 initial text"}
  2. sync it to locize with locize sync --skip-delete true
  3. delete key2 from local reference file only
  4. update key1 value directly in locize to "key1 updated text"
  5. run locize sync --skip-delete true again
  6. Key1 got the updated text from locize, end result locally {"key1": "key1 updated text", "key2": "key2 initial text"}

from locize-cli.

adrai avatar adrai commented on May 27, 2024

Thank you very much for all this information.
Can you try again with v7.6.1 ?

from locize-cli.

hixus avatar hixus commented on May 27, 2024

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.

rishabh876 avatar rishabh876 commented on May 27, 2024

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.

adrai avatar adrai commented on May 27, 2024

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

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.