crowdin-cli-v1 icon indicating copy to clipboard operation
crowdin-cli-v1 copied to clipboard

Invalid android langauges codes

Open rosenpin opened this issue 6 years ago • 2 comments

This is my crowdin yml configuration:

project_identifier: ....
api_key: ...
base_path: ...

files:
  -
    source: '/app/src/main/res/values/strings.xml'
    translation: '/app/src/main/res/values-%android_code%/%original_file_name%'
    translate_attributes: '0'

This is my website configuration: image

After running java -jar crowdin-cli.jar download all the files are downloaded in the following format: image

But when trying to compile the project I get the following error:

- app/src/main/res/values-kab-rKAB: Error: Invalid resource directory name

It seems like some of the language codes are incorrect and cause compilation errors.

When I use the 2 letters code it works, but it causes me to loose some of the translation languages.

Is this a known error and is there a solution?

rosenpin avatar Jan 26 '19 14:01 rosenpin

Hi @rosenpin .

What is the expected name for app/src/main/res/values-kab-rKAB? You can use Languages mapping feature if you need non-standard names for language.

mamantoha avatar Jan 27 '19 11:01 mamantoha

I don't know what is the expected name, that's the name generated by the crowdin cli android language code.

I managed to fix it using languages mapping and overriding the default android language code for Kabyle language, but my point is that the default language code is wrong/invalid as android doesn't actually support it, causing a compilation error

rosenpin avatar Jan 28 '19 18:01 rosenpin