You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.
Labels displayed in files like ckanext/dgu/theme/templates/package/edit_form.html: is there some sort of internationalisation mechanism in place for them?
The text was updated successfully, but these errors were encountered:
The approach you want to avoid is forking everything and directly changing the strings in the code and templates... That makes it a nightmare for future updates and others sharing your work.
I believe you should be able to adapt the general CKAN methods for extracting all the strings from the DGU templates and code (including ckan and all extensions).
Essentially you use babel to create a new .pot file (you'll create some configuration to tell it where the ckanext-dgu templates and code is, plus the other extensions). Then you use Transifex or other just babel and a text editor to create your language translation in a .po file (you can probably reuse many of the existing translations for the core CKAN if it is translated for your language). And then you compile the .po into a .mo which you can tell CKAN to use by default.
You'll probably find strings in the UI that are not translated and do not get extracted, because they come from the ckanext-dgu python code and have not had the wrapper applied to the string: _('some english text') In this case you'll have to change the code. There may also be some strings in javascript which will need a bit of special treatment too so that they are extracted.
We'd be very keen if you were able to contribute back your changes via a pull request, to make it easier for others to translate into other languages.
Labels displayed in files like ckanext/dgu/theme/templates/package/edit_form.html: is there some sort of internationalisation mechanism in place for them?
The text was updated successfully, but these errors were encountered: