CLI download: Plural translations are deleted

In my Android application project I download translations as follows:

$ crowdin download -v -i PROJECT_ID -T API_TOKEN

In the Polish translation I noticed that certain plurals are deleted:

These plurals are in use and present in the web interface:

Why are the strings deleted? Is this a bug?

Hi @tbsprs ,

For the string from your screenshot, you have translations for One and Other forms, which are being exported.

@Natalia The one and other forms are deleted as well as you can see from the Git diff screenshot above.

Dear @tbsprs , as we can see, in the mentioned project project you don’t have GitHub integration connected, could you please kindly tell us how you export content there? If we misunderstood something - feel free to correct

@Natalia I use the CLI tool to upload sources with the following command:

$ crowdin upload sources --verbose -i PROJECT_ID -T API_TOKEN

Here is the related Crowdin configuration.

Hi @tbsprs

I just did a dry-run via my database and can confirm that with the default Build&Download action the string from your screenshot is downloaded correctly, and all plural forms are preserved:

<plurals name="schedule_changes_dialog_number_of_sessions">
        <item quantity="one"><xliff:g example="1" id="count">%d</xliff:g> sesja</item>
        <item quantity="few"><xliff:g example="9" id="count">%d</xliff:g> sessions</item>
        <item quantity="many"><xliff:g example="9" id="count">%d</xliff:g> sessions</item>
        <item quantity="other"><xliff:g example="9" id="count">%d</xliff:g> sesji</item>
    </plurals>

But I’ve noticed in the configuration file you’ve kindly shared, that you have a skip parameter activated for both source files

skip_untranslated_strings: true

I guess this might be causing translation loss during export as from my end, I see that only 2/4 of the forms are translated.

@Dima Thank you for the explanation. I will check this locally later.

I realize that I stumbled about this earlier and hence filed a feature request to your team:

Dear @tbsprs , sure, you’re welcome to check everything on your side as was suggested

@Dima When I remove skip_untranslated_strings: true from the configuration then the plurals are downloaded as you described.

But at the same time untranslated strings will be downloaded in the source language (English) which is very inconvenient.

I repeat my feature request to introduce another configuration option for this scenario.

Hello @tbsprs

I can confirm that the feature request was registered, and we’re continuing to gather feedback about this possible feature. Still, it was the only time such a request was reported.

Due to the technical complexity of its realization and lack of popularity, it was put into the product backlog, and our team focused on more prioritized or mass-reported tasks.

As for this particular case, on the system level, we don’t have plans to change export logic.

In another conversation my colleague recommended API, and while I understand that you prefer CLI instead of API, API was designed to provide a more flexible experience than CLI, and some options are (and will) be available only in API.

Still, as for the right-now solution, I suggest you try developing a custom import-export module, so you will be able to remove some parts of not-needed content from the exported file. It may be not an all-in-one solution, but as a workaround, it should be sufficient: