Problems downloading CSV files

My company has an account setup in Crowdin already with about 15 languages, with English being the base language. Each language has 5 CSV files contained within it, one for each component of our product. (i.e. one for our API, one for our client, etc.).

I’ve downloaded and installed the Android Studio plugin (GitHub - crowdin/android-studio-plugin: Integrate your Android project with Crowdin), which allows me to see all 15 languages in the “progress” tab, for example: German (100%, 96%). What I am trying to do now is download the appropriate CSV file so I can start to use those strings in the app. When I click the “download” tab, it says “No files found matching your configuration”. The CSV file I’m after is called “Company Mobile.csv”.

I’m new to Crowdin so it’s very possible that I’m not understanding what the plugin does or how to configure it properly.

Hi @gfox ,

Could you please tell us how your configuration file looks like? As shown in the documentation Source files and translations part

I’ve tried multiple different configurations, and the closest I can get to is being able to see my local strings.xml file in the Upload tab, but the download tab is still empty. Here’s my file (xxxx in just place of sensitive info)

project_id: xxxxx
api_token: xxxxxx
base_url: https://api.crowdin.com

files:
  - source: "app/src/main/res/values/strings.xml"
    translation: "app/src/main/res/values-%android_code%/%original_file_name%"
  - source: "ext/src/main/res/values/file.xml"
    translation: "ext/src/main/res/values-%android_code%/%original_file_name%"

Hi @gfox , could you please kindly try to add a slash at the beginning of each path? Like /app/src/main/res/values/strings.xml

I added the slashes and I still don’t see anything in the Download tab.

files:
  - source: "/app/src/main/res/values/strings.xml"
    translation: "/app/src/main/res/values-%android_code%/%original_file_name%"
  - source: "/ext/src/main/res/values/file.xml"
    translation: "/ext/src/main/res/values-%android_code%/%original_file_name%"

Here are some screenshots for reference. On the left is what I am seeing in Android Studio, the right is what I see in the Dashboard. All of the other languages look like the German example shown. (English is the base language)

Hello @gfox

It looks like your configuration is different than the sample one. You have 2 source paths but haven’t specified preserve_hierarchy: true (at least I don’t see it in your configuration file).

You must use preserve_hierarchy if your project contains multiple modules you want to localize with the same source file names.

I tried that, unfortunately it still doesn’t work.

project_id: xxx
api_token: xxx
base_url: https://api.crowdin.com

preserve_hierarchy: true

files:
  - source: "/app/src/main/res/values/strings.xml"
    translation: "/app/src/main/res/values-%android_code%/%original_file_name%"
  - source: "/ext/src/main/res/values/file.xml"
    translation: "/ext/src/main/res/values-%android_code%/%original_file_name%"

Could you please provide an example of what one of the file configurations would need to look like to download the CSV files I’ve shown in the screenshot above?

Also, what’s the approach for converting those CSV files to XML string resources - are there any tools that do that for us, or do we need to parse and convert them on our end?

@gfox

Thank you very much for the explanation, it really helped. Turns out, it’s more a workflow-fundamental question than studio-plugin-related.

I assume you’ve used another service or another workflow (perhaps, Google Sheets) with a table-based localization process.

As you may noticed, there’s no CSV mentioned here in the setup guide, because the plugin doesn’t use it.

The workflow is pretty straightforward, you just upload sources via the Plugin, do the translation, and then download this translation via the Plugin.

If you are using string-based projects, the list of bundles available for download is displayed in the Download tab.

If you still need to generate a multilingual CSV file from your source strings, you can refer to the bundles option:

Thanks for clarifying! On closer inspection it looks like our iOS team is utilizing Target File Bundles to download .xcstrings. It looks like I can do the same for Android .xml strings, so I will try to match their approach.