Closed ElenaVandevska closed 2 years ago
Apart from compiling the translations file, you are also required to generate a new package with the translation you created and install this package on your instance.
Br Aitor
El 1 feb 2022, a las 11:35, ElenaVandevska @.***> escribió:
Hi, I wanted to add a translation for Macedonian directly on the instance of CKAN that we have.
I navigated to the ckanext-datarequests folder and I ran python setup.py init_catalog -l
there. Then I edited the mk/LC_MESSAGES/ckanext-datarequests.po file, and then I ran python setup.py compile_catalog, after which I got the following message: 97 of 97 messages (100%) translated in ckanext/datarequests/i18n/mk/LC_MESSAGES/ckanext-datarequests.po compiling catalog ckanext/datarequests/i18n/mk/LC_MESSAGES/ckanext-datarequests.po to ckanext/datarequests/i18n/mk/LC_MESSAGES/ckanext-datarequests.mo
I then ran sudo supervisorctl reload. When I navigate to anything related to the datarequests while having chosen Macedonian as a language, I don't get the translations, and it's defaulted back to English.
Any idea on how to proceed?
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you are subscribed to this thread.
Are you referring to creating a new extension and somehow including the translations in it?
Can you please elaborate more? Thank you for your answer.
You should run python setup.py install
with the virtual env of CKAN activated
So, I ran that command in this directory:
/usr/lib/ckan/default/src/ckan/src/ckanext-datarequests
since that's where the setup.py from datarequests is.
The installation was successful, and I got this message just like for the other languages as well:
creating build/bdist.linux-x86_64/egg/ckanext/datarequests/i18n/mk creating build/bdist.linux-x86_64/egg/ckanext/datarequests/i18n/mk/LC_MESSAGES copying build/lib.linux-x86_64-2.7/ckanext/datarequests/i18n/mk/LC_MESSAGES/ckanext-datarequests.mo -> build/bdist.linux-x86_64/egg/ckanext/datarequests/i18n/mk/LC_MESSAGES copying build/lib.linux-x86_64-2.7/ckanext/datarequests/i18n/mk/LC_MESSAGES/ckanext-datarequests.po -> build/bdist.linux-x86_64/egg/ckanext/datarequests/i18n/mk/LC_MESSAGES
Then I once again ran sudo supervisorctl reload
but the translations still aren't loaded. What am I doing wrong?
Maybe you have to remove the previous package before installing the new one…
El 1 feb 2022, a las 16:16, EleVan @.***> escribió:
So, I ran that command in this directory:
/usr/lib/ckan/default/src/ckan/src/ckanext-datarequests
since that's where the setup.py from datarequests is.
The installation was successful, and I got this message just like for the other languages as well:
creating build/bdist.linux-x86_64/egg/ckanext/datarequests/i18n/mk creating build/bdist.linux-x86_64/egg/ckanext/datarequests/i18n/mk/LC_MESSAGES copying build/lib.linux-x86_64-2.7/ckanext/datarequests/i18n/mk/LC_MESSAGES/ckanext-datarequests.mo -> build/bdist.linux-x86_64/egg/ckanext/datarequests/i18n/mk/LC_MESSAGES copying build/lib.linux-x86_64-2.7/ckanext/datarequests/i18n/mk/LC_MESSAGES/ckanext-datarequests.po -> build/bdist.linux-x86_64/egg/ckanext/datarequests/i18n/mk/LC_MESSAGES
Then I once again ran sudo supervisorctl reload but the translations still aren't loaded. What am I doing wrong?
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.
This issue was fixed with the patch release 2.9.5. Gonna close it.
Hi, I wanted to add a translation for Macedonian directly on the instance of CKAN that we have.
I navigated to the ckanext-datarequests folder and I ran
python setup.py init_catalog -l <YOUR_LOCALE>
there. Then I edited the _mk/LCMESSAGES/ckanext-datarequests.po file, and then I ranpython setup.py compile_catalog
, after which I got the following message:I then ran
sudo supervisorctl reload
. When I navigate to anything related to the datarequests while having chosen Macedonian as a language, I don't get the translations, and it's defaulted back to English.Any idea on how to proceed?