Skip to content
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

Locale selection #154

Merged
merged 9 commits into from
Jan 16, 2025
Merged

Locale selection #154

merged 9 commits into from
Jan 16, 2025

Conversation

dave-mills
Copy link
Member

This PR fixes #129 - Updates the translation management based on the revised data structure:

  1. The logic now focuses on locales as the primary data model, instead of XlsformTemplateLanguage. This gives us more flexibility, and clarifies the purpose of Locale within the data structure.

The workflow is as follows:

  1. On page 1 of "SurveyLanguages", the team selects their languages (and country).
  2. On page 2, they see the list of languages they have chosen. For each language, they see a table listing the Locales for that language.
  • The locales have a status based on the status of the language strings in the database:
    • 'Not Uploaded' = the locale has no translations for any forms yet.
    • 'Translations incomplete' = there are some language strings, but the Locale is missing some ones required by one or more of the team's forms. This should be shown when we have translations for 1 of the forms, but not the other. (This will also work for future systems where a team may have 3+ forms.)
    • 'Ready for Use' = all the language strings are available, and none of the ModuleVersions are marked as 'needs_update'.
    • 'Needs update' = one or more of the XlsformTemplates have been changed since the translations were added.

(The statuses are unchanged from the previous version, but the way they are calculated is changed because locales are now linked to moduleVersions instead of directly to templates.

  1. The teams must select exactly 1 locale for each of their languages. This way we prevent teams accidentally taking 2 translations for the same language (which is technically possible in ODK, but frowned upon and should never be needed).

  2. For a Locale, teams may:

    • Download any existing translations to review.
    • if the locale is not "default" and was created by the current team, they may directly edit the translations in Excel, and then upload them back into the platform.
    • Teams may not edit "default" Locales (as these come directly from the XLS form template), and may not edit Locales added by other teams, (to avoid the possibility of Team B messing up Team A's translations mid-survey). To get around this, teams may 'duplicate' any existing Locale for their own use.

(This does mean there will be some curation and management required to keep the list of Locales tidy over time, but I don't think it will be a lot of work and is probably something someone should be doing anyway...)

Things To Do

This PR focuses on the functionality. There are some key things we should do in future PRs to improve this:

  1. Add an Xlsform-level status to the modal popup.
    • Currently, when editing a Locale, you cannot see the status of the translations for each form. We should add that. (Screenshot e.g. below).
  2. Let users edit the 'description' of their teams' locales.
  3. Review / refine the visuals of the Survey Translations page.

@dave-mills
Copy link
Member Author

TODO item: add per-xlsform-status to Locale editing:
CleanShot 2025-01-16 at 11 24 50

@dave-mills dave-mills merged commit 5b01ea0 into dev Jan 16, 2025
@dave-mills dave-mills deleted the locale-selection branch January 23, 2025 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix language / locale selection process
1 participant