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

[Bug] Deed/UX translations and Legalcode translations must be distinct and fully represented #146

Closed
TimidRobot opened this issue Jun 29, 2021 · 0 comments · Fixed by #154
Assignees
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟨 priority: medium Not blocking but should be fixed soon 🏁 status: ready for work Ready for work

Comments

@TimidRobot
Copy link
Member

Description

The Deed & UX translations are separate from the legalcode translations, but the application currently only exposes translations based on legalcode.

Both the deeds view and the legalcode view use the same function (get_languages_and_links_for_legalcodes):
https://github.com/creativecommons/cc-licenses/blob/f42b78db9c89d52924714340f3952dc792dac7bc/licenses/views.py#L136-L167

Translation strings in cc-licenses-data:

  • legalcode/
    • .po and .mo internationalization and localization files for legalcodes
  • locale/
    • .po and .mo internationalization and localization files for deeds, contextual information, and user interfaces

Expectation

The interface (and generated files) should expose all of the deed translations

Additional context

@TimidRobot TimidRobot added 🟨 priority: medium Not blocking but should be fixed soon 🏁 status: ready for work Ready for work 🛠 goal: fix Bug fix 💻 aspect: code Concerns the software code in the repository labels Jun 29, 2021
@TimidRobot TimidRobot changed the title [Bug] <Replace this with actual title> [Bug] Deed/UX and Legalcode translations must be distinct Jun 29, 2021
@TimidRobot TimidRobot changed the title [Bug] Deed/UX and Legalcode translations must be distinct [Bug] Deed/UX translations and Legalcode translations must be distinct and fully represented Jun 29, 2021
TimidRobot added a commit that referenced this issue Jul 15, 2021
- `cc_licenses/settings/base.py`:
  - Add Aragonese to Django languages
  - Remove Language fallbacks that are unnecessary with
    `i18n.utils.cc_to_django_language_code()` update
- `licenses/apps.py`: added PO file scanning to build a list of
  translations that are 80% or more complete
  (`settings.LANGUAGES_TRANSLATED`)
- `licenses/views.py`
   - Add `get_languages_and_links_for_deeds_ux()` function so Deeds can
     use any language in `settings.LANGUAGES_TRANSLATED` (fixes #146)
   - Reorganize functions and sort `context` dictionary entries
- `i18n/__init__.py`:
  - Correct case in `DEFAULT_JURISDICTION_LANGUAGES` entries
  - Remove `DJANGO_LANGUAGE_CODES` entries that are no longer needed
    with `i18n.utils.cc_to_django_language_code()` was update
- `i18n/utils.py`:
  - Improve `cc_to_django_language_code()` to solve generic cases
    (ex.`_` => `-`).
@TimidRobot TimidRobot self-assigned this Jul 15, 2021
@TimidRobot TimidRobot mentioned this issue Jul 15, 2021
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟨 priority: medium Not blocking but should be fixed soon 🏁 status: ready for work Ready for work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant