Skip to content

Conversation

@dr-rompecabezas
Copy link
Collaborator

This PR enhances our internationalization workflow and fixes an error.

  • Fixed the duplicate string error for the word "species" by adding context for the singular and plural versions in the translation files with msgctxt "singular" and msgctxt "plural".
  • Updated references to the source code (done automatically by Django).
  • Added compilemessages to Docker's entrypoint shell script to ensure translations are always compiled.
  • Added compilemessages to CI to enhance our workflow.
  • Improved the documentation to clarify the steps required during development to mark the strings for translation, generate the translation files, compile the translation messages, and troubleshoot.

- Added msgctxt to fix duplicate string error for "species" (singular, plural)
- Edited metadata
- Removed legacy translation strings
- Added translations for the new entries
- Added Docker configuration for translations and troubleshooting steps
Copy link
Collaborator Author

@dr-rompecabezas dr-rompecabezas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juanpac96 and @Cheva998
I appreciate your help reviewing the translations I added.
Thanks.

# Urban Tree Observatory
# Copyright (C) 2025 Legut
# This file is distributed under the same license as the Urban Tree Observatory package.
# Sebastián Duque <sduquet998@gmail.com>, 2025.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juanpac96 please review the legal metadata here.

@Cheva998 you're credited differently in the 'en' and 'es' files. In one you have the email address and the other you don't. Let me know your preference, or edit it yourself.

#: apps/places/models.py:15
#: apps/places/models/spatial.py:13
msgid "country boundary"
msgstr "límites del país"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I consistently translated "boundary" as "límites".

For context, this refers to the field that holds the MultiPolygon geography.

@dr-rompecabezas dr-rompecabezas requested a review from Copilot May 1, 2025 12:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the internationalization workflow by fixing duplicate translation string errors and improving translation processes.

  • Fixed duplicate translation string error by adding context for singular and plural forms.
  • Updated the Docker entrypoint script and the CI workflow to include translation message compilation.
  • Improved documentation for translation extraction, compilation, and troubleshooting.

Reviewed Changes

Copilot reviewed 2 out of 5 changed files in this pull request and generated no comments.

File Description
docs/i18n-strategy-guide.md Added Docker configuration, detailed translation workflow instructions, and troubleshooting tips.
.github/workflows/ci.yml Integrated translation message compilation into the CI workflow.
Files not reviewed (3)
  • backend/docker-entrypoint.sh: Language not supported
  • backend/locale/en/LC_MESSAGES/django.po: Language not supported
  • backend/locale/es/LC_MESSAGES/django.po: Language not supported

Copy link
Collaborator

@juanpac96 juanpac96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is ready to be merged. I approve it.

@juanpac96 juanpac96 merged commit cc135ce into OmdenaAI:main May 1, 2025
2 checks passed
@dr-rompecabezas dr-rompecabezas deleted the i18n-enhancements branch May 1, 2025 22:44
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.

2 participants