-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Fluent with Organizations and Groups #34
Comments
Would you post a link to your theme extension and its group/organization schemas? |
Here is a basic PR that might help as an example of adding organizations in with scheming and fluent. It does a little extra modification to some templates but the PR message helps explain. I agree, seeing your schema and extension would help troubleshoot what's causing the issue. |
Working with the PR mentioned |
I've dropped in my Scheming config files, if someone could take a look at them I'd appreciate it. I'm also seeing when I click on the "Datasets" button, the list of datasets shows only the English, but when I access the dataset page it shows the French: am I missing a snippet from the Scheming extension? |
Bump. I am also able to use fluent and scheming extensions to get some translations for groups and organizations. They save in the database and have the correct output and validator snippets to display the data. However, the expected translated values still do not display in many places. E.g. group.read, breadcrumbs, dataset.read, etc. It seems that CKAN uses the group and org definition of
I believe this is because the Group/Org title by default is not required. So CKAN uses There are pluggable places to override this, but discussing with the ckan devs, translatable things should be accomplished at the template/view layer: https://docs.ckan.org/en/2.9/contributing/architecture.html So we should not do this at the action level, we would be looking at the view level. Sadly, I cannot really find a place to do this easily in the view methods. Thus, you would have to have an extension that either extends the view functions, or (probably more accurately), just extends all of the templates to instead not access the |
These should be fixed in core the same way they were for datasets: add calls to get_translated in the right templates |
I've had success with configuring Fluent for Datasets, but for Organizations / Groups, I can configure Fluent to work so that the form fields are presented for the two languages, but the entered data doesn't seem to be stored and when viewing the list of Datasets, only the english is shown (but in the Dataset info, the changing the site language works as expected, for both the Dataset and Resource information)
I've attached some screenshots hoping there is a bit more info on configuring Fluent for use with Organizations / Groups (for the purposes of our system, we,ve just changed the strings to "Ministries" and "Categories" but only the text labels have changed, no code changes underneath)
1: text entered in “EN Titre” and “FR Titre” isn’t saved, isn’t shown when the “Edit” screen is visited again, and note that the text and Ministry name on the left is in English only (perhaps an artefact of the En and FR title text not being saved?
2: The list of Datasets (which have relabeled “Form Profiles”) is also only shown in English, even though the bilingual text shows on the “Form Profile” (dataset) page just fine. See two screenshots below:
Datasets list:
Individual dataset ("Form Profile") screen in French, but showing Organization profile in English:
the "Info Additionelle" section of the screen shows fine in French
...and also the Dataset ("Form Profile") dataset and resource metadata shown in English, working as expected:
so if there are aspects to configuring Fluent to work with Organizations and Groups that I'm not aware of, I'd appreciate it if someone could point me in the right direction. I'm not really skilled in Python development, so if there is custom coding required, I'll have to consult my colleagues to see who might be able to help out... any help would be appreciated.
The text was updated successfully, but these errors were encountered: