XCode .xcstrings limitations on Free tier?

I am using the <repo_root>/Localizable.xcstrings string catalog in my XCode iOS project. I gather getting Crowdin to process and update that single file containing all translations is not available in the Free tier?
I find that the only way I can make this work is to generate a new file in say <repo_root>/es/Localizable.xcstrings and then copy that back over the <repo_root>/Localizable.xcstrings where Xcode will use it.

Hi @divvytrip :waving_hand:

The good news is that this isn’t a Free tier limitation - the .xcstrings format is fully supported. The issue seems to be related to how your export configuration is set up.

To help you fix the configuration that’s forcing you to copy files manually, could you please confirm and share the following:
• Are you using the Crowdin CLI or a GitHub/GitLab integration?
• Please share the configuration block for your Localizable.xcstrings file - both the source path and the translation path.

Once we have this info, we’ll be able to check what’s going on!

1 Like

Hi,

I apologize for the formatting, but the message editor does not seem to have an option to format as “plain text” - so extra lines.

I tried making source and translation “the same” but I hit this error.

STARTING CROWDIN ACTION
UPLOAD SOURCES
:cross_mark: Configuration file is invalid. Check the following parameters in your configuration file:

  • The ‘translation’ parameter should contain at least one language placeholder (e.g. %locale%)

project_id_env: CROWDIN_PROJECT_ID

api_token_env: CROWDIN_TOKEN

files:

  • source: Localizable.xcstrings

translation: Localizable.xcstrings

multilingual: true

This is my current crowdin.yml configuration. Which works.
I use a python script to merge the translated file into the <repo_root>/Localizable.xcstrings

project_id_env: CROWDIN_PROJECT_ID

api_token_env: CROWDIN_TOKEN

files:

  • source: Localizable.xcstrings

translation: %locale%/Localizable.xcstrings

skip_untranslated_strings: true

To add more information, I am using GitHub integration with an Action that runs on Push.

Hi there! Just checked the project and can see that you have only one target language. Do you have issues with exporting it? or the issue is that you want to keep

translation: Localizable.xcstrings

As the export pattern, but the system won’t let you?

To directly answer your question, yes I wanted to keep

translation: Localizable.xcstrings

as the export pattern - even if I use multiple languages.
However, when I do that, I get the error

”The ‘translation’ parameter should contain at least one language placeholder (e.g. %locale%)”
So it seems Crowdin does not like source==translation

Crowdin would need to intelligently process the (JSON) file and insert/replace multiple translations rather than simply read that file and generate separate <language_code>/Localizable.xcstrings.

As an aside, Xcode however does that. When you build , Xcode will insert new ‘en’ language strings it finds but leaves any existing translations alone. Xcode alerts you to situations where ‘en’ strings are no longer present in the source code and offers the option to delete them and their translations from the Localizable.xcstrings

Hi ,

I am doing one translation at the moment.

Maybe I need to clarify. The file Xcode project file “Localizable.xcstrings” contains translations for ALL languages in a single file. That’s why it is both the “source” and the “translation”. But that doesn’t seem to work with CrowdIn which wants to generate a separate file with the translation for each language - or so it seems.

Andrew

Hi @divvytrip ,

Sorry for the confusion! Crowdin does support multilingual files :slightly_smiling_face:

Just try replacing multilingual: true with multilingual: 1 in your configuration file, and don’t forget to add a slash at the beginning of the translation path. Your config should look like this:

files:

  • source: Localizable.xcstrings
    translation: /Localizable.xcstrings
    multilingual: 1
1 Like

Thanks for your response. That is very helpful to know, if not that obvious :slight_smile: