Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add source push flags #195

Merged
merged 3 commits into from
Jul 17, 2023
Merged

Add source push flags #195

merged 3 commits into from
Jul 17, 2023

Conversation

kbairak
Copy link
Member

@kbairak kbairak commented Jul 4, 2023

Adds the following two cli flags and config options:

  • --replace-edited-strings
  • --keep-translations

Either the flag or the option must be set for each flag to be into effect.

Replace edited strings will not protect source strings (that share a key with a pre-existing source string) that have been edited. For example,

  1. Suppose we upload this file using the KEYVALUEJSON format

    {"1": "one"}
  2. Then we edit the source string in the Transifex editor to one -> One

  3. Then we try to push the following file:

    {"1": "ONE"}

Without the flag/option, Transifex will protect the edited version of the source string and nothing will change. If you want to discard all edits that have been done after the last push, you should use this flag/option

Keep translations will not discard translations when a source string (that shares a key with a pre-existing source string) changes. For example:

  1. Suppose we upload this file using the KEYVALUEJSON format

    {"1": "one"}
  2. Then we translate this to one -> ένα

  3. Then we try to push the following file:

    {"1": "ONE"}

Without the flag/option, Transifex will discard the previous translation. If you want to keep it, you should use this flag/option.

Important note: The "keep translations" functionality has not been deployed to the Transifex API yet. This PR should not be merged/released before then.

@kbairak kbairak changed the title Gluon 254 add source push flags Gluon-254: add source push flags Jul 4, 2023
Copy link
Contributor

@foteinigk foteinigk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look great and work as expected!👍

@kbairak kbairak changed the title Gluon-254: add source push flags Add source push flags Jul 10, 2023
@kbairak kbairak merged commit 05c3163 into devel Jul 17, 2023
@kbairak kbairak deleted the GLUON-254_add_source_push_flags branch July 17, 2023 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants