[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 |
Beta Was this translation helpful? Give feedback.
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? |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
The Before this command, I ran only the I will try adding the |
Beta Was this translation helpful? Give feedback.
-
@Afolayan please also check the language mapping configuration in your Crowdin project settings. There might be some mappings that could affect the translations download |
Beta Was this translation helpful? Give feedback.
-
I have a language mapping setup. This is the same as the one in config. |
Beta Was this translation helpful? Give feedback.
-
@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. |
Beta Was this translation helpful? Give feedback.
-
I removed all the extra config lines and was left with this:
No luck. Just to be sure: |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
I currently have the |
Beta Was this translation helpful? Give feedback.
-
@Afolayan could you please share your Crowdin project ID? |
Beta Was this translation helpful? Give feedback.
-
Do you have the |
Beta Was this translation helpful? Give feedback.
-
Yes I have
Sharing the project ID? Isn't that a security issue? Can I send it to an email or somewhere much private? |
Beta Was this translation helpful? Give feedback.
-
@Afolayan please use this form and mention the current issue link. |
Beta Was this translation helpful? Give feedback.
-
@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) |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
@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. |
Beta Was this translation helpful? Give feedback.
-
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.
|
Beta Was this translation helpful? Give feedback.
-
The config at Config to pull/download translations:
|
Beta Was this translation helpful? Give feedback.
-
@Afolayan it looks like you're using the first configuration file instead of using the second file for translations download. |
Beta Was this translation helpful? Give feedback.
-
I was able to reproduce this error by passing this file as a
and this is expected for this config. |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
@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). |
Beta Was this translation helpful? Give feedback.
-
@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. |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot @andrii-bodnar for assisting with this. I removed the |
Beta Was this translation helpful? Give feedback.
-
Hi @Afolayan! |
Beta Was this translation helpful? Give feedback.
@Afolayan here is a working single config that will allow you to download source and translation files:
You don't need the
translation_replace
here. 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…