Repository navigation
[Android] Crowdin CLI tool could not find pre-fetched source files #464
|
Describe the bug To Reproduce
I have this configured in my Crowdin project,
Expected behavior Environment:
Screenshots Additional context |
Replies: 26 comments
|
Hi @Afolayan! Just checked your configuration on a test project and can't reproduce this issue. File export pattern in Crowdin: Files structure after translations downloading: Could you please provide more details on how to reproduce this issue? Do you have a Language Mapping configured in your Crowdin project? |
|
Hi @andrii-bodnar thanks for looking into this. I tried removing The project is new and the translations folder ( Did you run any command before running |
|
The Before this command, I ran only the I will try adding the |
|
@Afolayan please also check the language mapping configuration in your Crowdin project settings. There might be some mappings that could affect the translations download |
|
@Afolayan thanks for the details provided! Also, I noticed the following options in your configuration file: Please make sure that your files are fully translated and approved. |
|
I removed all the extra config lines and was left with this: No luck. Just to be sure: |
|
Yes, it's correct. Could you please provide an example of the expected files and folder structure after the translations downloading? I mean which language codes are you expecting?
Please provide the CLI output |
|
@Afolayan could you please share your Crowdin project ID? |
|
Do you have the |
|
Yes I have Sharing the project ID? Isn't that a security issue? Can I send it to an email or somewhere much private? |
|
Sent. |
|
@Afolayan I still can't reproduce this issue. Do you use a single configuration file? Please provide the exact steps to reproduce and the full version of CLI configuration (without credentials) |
|
I have two config files: one to pull the sources, the other to download the translations Config to pull/download translations The folder structure for the android project goes like I hope this is sufficient. |
|
@Afolayan thanks for the details provided. Which config is used for the sources upload to Crowdin? Also, please provide a clear sequence of CLI runs using these configuration files. |
|
There's no config for uploading sources. We use the Crowdin-Figma plugin to populate the file on Crowdin. So the sequence of steps in the script only pulls the sources and the translations. |
|
The config at Config to pull/download translations: |
|
@Afolayan it looks like you're using the first configuration file instead of using the second file for translations download. |
|
I was able to reproduce this error by passing this file as a and this is expected for this config. |
|
Hi @andrii-bodnar, is there a single config I can use to download the sources and translations, instead of having two config files? Also, I converted my script from bash to kotlin sometimes in the past. I went back to the bash script and I was able to pull the source and translation files. Could this be responsible? The kotlin script does the same thing, just the change of language. |
|
@Afolayan if it's working with your bash script and not working with the Kotlin script then there is some bug in the Kotlin script - probably you're passing the wrong CLI configuration file to the second command (translations download). |
|
@Afolayan here is a working single config that will allow you to download source and translation files: "preserve_hierarchy": "true"
files: [
{
"source": "/feature/*/src/main/res/values/*.*",
"translation": "/feature/%file_name%/src/main/res/values-%osx_locale%/%original_file_name%",
"skip_untranslated_files": true,
"export_only_approved": true,
"excluded_target_languages": [
"ach"
]
},
]You don't need the It requires changes in the files structure in the Crowdin project (just create the folders in UI and move the file): And my CLI output: As you can see, I was able either to download the source and translations. |
|
Thanks a lot @andrii-bodnar for assisting with this. I removed the |
|
Hi @Afolayan! |













@Afolayan here is a working single config that will allow you to download source and translation files:
You don't need the
translation_replacehere. Just configure the right language mapping in your Crowdin project settings.It requires changes in the files structure in the Crowdin project (just create the folders in UI and move the file):
And my CLI output:
As you can se…