I had my project fully configured and working with 1 gettext source file (/locale/fr/LC_MESSAGES/django.po) and 4 translations languages with this setting :
Resulting file after translation export
/locale/%two_letters_code%/LC_MESSAGES/django.po
I use the Crowdin plugin for Pycharm and I could upload the source and download the translations, with this crowdin.yml :
It was working through the API / python crowdin-api-client as well when I did client.translations.download_project_translations(projectId), I could get a .zip with everything with the rights paths.
This morning I installed the “Compile Gettext .po files to .mo” to test it. It worked but I decide I wanted to keep the compilation from .po to .mo on the local side so I uninstalled the app.
But since then everything is broken, the Pycharm plugin do not recognize the paths/conf so refuse to list anything in the “Download” panel, and when I try the API I can see what’s the problem : In the .zip I get, there are only .mo files BUT they are not the compiled files, they are the .po files ! Just renamed.
So I think there is a bug in the post processing of the builds/exports due to to the installation/uninstallation of the app.
Crowdin team, could you please see if you can correct this problem on my project (id 715223) ? Or does anyone else here had this problem ? I did not find anything by searching this forum.
I do not see any unsuccessful calls in the logs from our side. I set a full rebuild for your project, so could you please try to build and export translations once more?
The calls are successful, but when I download (in bulk via the API, or just a single translation file via the webapp) I get .mo files (which are really .po files, renamed to .mo).
So I think there is a setting for a “pre export hook” to rename po to mo that was set somewhere by the app, and that stayed that way after uninstallation…
I tried changing the settings for the source file “Resulting file after translation export” but it does not seem to have any effect…
If I recreate manually the directories locally, the download panel from the Pycharm plugin show the .po translation files, but on download I have an error message that corresponds with what I see when I download manually / through the API :
The system may recognize your file differently if you just renamed it. Would you be so kind as to try adding the files (reupload) with a pre-defined file type?
It seems that a good night’s sleep has solved the problem !
Maybe a rule cached somewhere expired. In any case I know get (as expected) the .po files when I download in the webapp, via the API, and via the Pycharm plugin that now works.
So if anyone has the same problem later : If you install then uninstall the “Compile Gettext .po files to .mo” app, allow a good 24h to go back to the previous behavior.