phrase / phrase-cli

CLI for the Phrase API
https://developers.phrase.com
MIT License
42 stars 6 forks source link

Wrong .arb file locale format when using Phrase Pull #106

Closed MuTe33 closed 2 years ago

MuTe33 commented 2 years ago

Hey there!

we're trying to use the phrase CLI to schedule syncs with our Github repository.

It is a flutter project and we use .arb files as a source. However, when pulling new localizations via Phrase CLI (Version 2.4.11) all locales getting malformatted.

For exmaple de_DE is formatted to de_de which breaks the app obviously as the latter is not supported. Expected is that this locale is not changing. On the Phrase UI the translations are also defined as DE-de.

Any support is much appreciated!

Attached is a screenshot on how the formatting looks like after pulling.

de_arb_file

github-actions[bot] commented 2 years ago

Hi there,

Thanks for reaching out to us.

We have received your inquiry. We will get back to you as soon as possible.

Best, Domenica from the Phrase Technical Support Team

Comment by Domenica Barone

github-actions[bot] commented 2 years ago

Hello,

As you already already noticed, we currently export .arb files using the format de_de. This was request by some customers and we implemented it (we used to use the format de-DE matching our locale code convention).

However, since many other users reach out to us asking a different language code format for .arb files, we decided to switch back to the locale codes used in Phrase (de-DE). Our Engineering Team will work on this in one of the next sprints. We start a new sprint every other week and on average aim to fix issues within two sprints.

I will let you know as soon as the changes are live.

Best, Domenica from the Phrase Technical Support Team

Comment by Domenica

github-actions[bot] commented 2 years ago

Hi there,

The Engineering Team is asking for some clarification on this issue.

Locale code in Phrase: de-DE Locale code currently in arb export: de_de Locale code expected in arb export: de_DE

Can you please confirm that you wish to use the locale code from phrase and replace the dash with an underscore, i.e. de_DE?

Thank you very much in advance!

Best, Domenica from the Phrase Technical Support Team

Comment by Domenica

MuTe33 commented 2 years ago

Hi Domenica,

exactly, we expect locale code de_DE (lowercase letters, underscore, uppercase letters) when pulling from Phrase

github-actions[bot] commented 2 years ago

Hi,

Thanks for your response.

Our Engineering team has just deployed a fix that should solve your issue. Now .arb files should be exported with the following locale code format: de_DE.

If you should notice any further problems or have any other questions, please get in touch.

Have a nice day!

Best, Domenica from the Phrase Technical Support Team

Comment by Domenica