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

The option --replace-breaks=false with file download does not work on comments for format "resx" (but does work for value) #170

Open
N7K4 opened this issue Nov 20, 2024 · 1 comment

Comments

@N7K4
Copy link

N7K4 commented Nov 20, 2024

lokalise CLI v2.6.8

I am using a RESX translation file on a Windows OS

lokalise2 \
    --token "${LOKALISE_API_TOKEN}" \
    --project-id "${LOKALISE_PROJECT_ID}" \
    file download \
    --format "${DEFAULT_L10N_FORMAT}" \
    --replace-breaks=false \
    --plural-format "${DEFAULT_L10N_PLURAL_FORMAT}" \
    --all-platforms \
    --unzip-to "${PATH_L10N_FOLDER}" \
    --original-filenames=false \
    --keep-zip

with the option --replace-breaks=false the value keeps it formats (TABs, NewLines) in the downloaded XML / Resx file.

An example entry in our resx file. With data.name as "key". The value has some new lines, same like comment.

...
<data name="DUMMY_HELLO_WORLD" xml:space="preserve">
    <value>hello world
    
Hello NewLine
    </value>
    <comment>
NET-0000
No-Screenshot

A dummy (test only).
    </comment>
</data
...

The upload does respect the TABs and NEWLINEs, so I can see the value and comment well formatted on WEB UI.

After a re-downlaod with file download and the use of --replace-breaks the value keeps formatted, BUT the comment is just a single line. Newlines will be just a kind of whitespace. So I will see a new line (in Windows \r\n) as two spaces.

We use the comment column for meta information.

  • 1 line: Jira issue link
  • 2 line: screenshot yes, no
  • 3 line: empty
  • 4 line: normale description / comment.
  • 5 line if needed, description of ordered placeholders, like "Hello {0}" to define 0: "whom to great".

sadly after download from lokalise via CLI, we loose our format in comment column and can not use our tests and other automation

@N7K4
Copy link
Author

N7K4 commented Nov 20, 2024

Same issue is still there in v3.0.1

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

No branches or pull requests

1 participant