I’m having some trouble with a CrowdIn workflow I’m trying to finalise for a mobile app project. The CrowdIn project that I’ve set up, is intended for providing localizations for an Android and iOS app.
I’ve recently put together a workflow that enables our Design Team to push source string changes through to CrowdIn using the Figma plugin. All strings that are uploaded are added to a Strings Vault file (
.csv
) in the Sources section of our project. This part works wonderfully. All required source strings end up in our CrowdIn project, including context, labels, etc. and can be translated into the target languages without issue.
In order to get our translation changes pushed through to our Android and iOS codebases, I have added the GitHub VCS integration to our CrowdIn project and have configured it to use the “Target file bundles mode” to enable me to export Android XML and iOS Strings format files and push them to the appropriate codebases. Again, this works great… Except for one thing (and I hope that I’m simply missing something obvious):
The “Resulting file pattern” field of the “Branch Configuration” for my Android target file bundle doesn’t seem to have a way for me to remove or omit the -en
from the end of the values-en
export directory. Android treats the values
directory as the default language, which in my case, is English (as is, our source language in our CrowdIn project).
Here’s a screenshot of where I got a bit stuck:
I’ve tried working with different placeholders, like %android_code%
, %two_letters_code%
, etc. with no success. The closest I managed to get was using %two_letters_code%
, but the -en
predicament remained.
I then tried overriding the “English” language in the project’s “Language Mapping” section (in “Settings” > “Languages”) to try and make the English language placeholder for %android_code%
return an empty value, but the Language Mapping UI wouldn’t let me do that. So I then tried the following:
Finally, using this rather hacky method, I managed to get the output that I required (and I’d imagine everyone(?) using Bundles via VCS integration for managing their localizations).
Long-winded post, though I want it to be easily searchable for those who are encountering the same issue. I spent more time than I’d have liked to, on finding this method of achieving the desired output.
Is there a better way to achieve this output, that I’ve completely missed? I’ve pored over countless CrowdIn articles, blogs, guides, forums, docs, code, third-party guides, videos, etc. and managed to turn up nothing that worked.