Ensure texts are marked for translation/internationalization#1394
Merged
robertatakenaka merged 9 commits intomainfrom Mar 11, 2026
Merged
Ensure texts are marked for translation/internationalization#1394robertatakenaka merged 9 commits intomainfrom
robertatakenaka merged 9 commits intomainfrom
Conversation
Co-authored-by: robertatakenaka <505143+robertatakenaka@users.noreply.github.com>
…models.py files Co-authored-by: robertatakenaka <505143+robertatakenaka@users.noreply.github.com>
Co-authored-by: robertatakenaka <505143+robertatakenaka@users.noreply.github.com>
…mplates) Co-authored-by: robertatakenaka <505143+robertatakenaka@users.noreply.github.com>
Co-authored-by: robertatakenaka <505143+robertatakenaka@users.noreply.github.com>
Co-authored-by: robertatakenaka <505143+robertatakenaka@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Ensure texts are marked for translation and internationalization
Ensure texts are marked for translation/internationalization
Mar 10, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR standardizes internationalization across the Django/Wagtail project by marking previously hardcoded UI strings for translation (Python _() and Django templates {% trans %}) and updating compiled locale catalogs for pt_BR, es, and en.
Changes:
- Wrapped Wagtail admin menu labels, model
verbose_name/help_text, and choice labels withgettext_lazy(_()). - Added
{% load i18n %}/{% trans %}in user-facing templates (error pages, search, user pages, SciELO.org pages). - Updated compiled translation catalogs (
django.mo) forenandes.
Reviewed changes
Copilot reviewed 23 out of 29 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| location/wagtail_hooks.py | Marks Wagtail snippet menu label for translation. |
| location/choices.py | Adds gettext_lazy and marks region labels for translation. |
| locale/es/LC_MESSAGES/django.mo | Updates compiled Spanish translations. |
| locale/en/LC_MESSAGES/django.mo | Updates compiled English translations. |
| journal/wagtail_hooks.py | Marks snippet menu labels for translation in the Journal admin area. |
| journal/models.py | Marks model verbose_name/verbose_name_plural for translation. |
| journal/choices.py | Marks OA status and currency choice labels for translation. |
| issue/models.py | Marks field help_text for translation. |
| institution/wagtail_hooks.py | Marks Wagtail ModelAdmin menu label for translation. |
| institution/models.py | Marks URL field label for translation. |
| doi/models.py | Marks M2M field verbose_name for translation. |
| core/wagtail_hooks.py | Marks Wagtail SnippetViewSetGroup menu label for translation. |
| core/users/models.py | Marks user name field verbose names for translation. |
| core/templates/users/user_form.html | Adds i18n tag library and translates submit button label. |
| core/templates/users/user_detail.html | Adds i18n tag library and translates page labels/buttons. |
| core/templates/search/search.html | Adds i18n tag library and translates search UI strings/pagination. |
| core/templates/home/scieloorg/tabs.html | Translates search input placeholder/aria-label. |
| core/templates/home/about_scielo_org_page.html | Translates search results and redirect UI strings. |
| core/templates/500.html | Translates 500 error page strings. |
| core/templates/404.html | Translates 404 error page strings. |
| core/templates/403.html | Translates 403 error page strings. |
| core/models.py | Marks VisualIdentityMixin URL label for translation. |
| core/home/models.py | Marks page verbose names/help_text/messages for translation. |
| book/models.py | Marks ISBN/DOI field labels for translation. |
| article/models.py | Marks publication date help_text strings for translation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
O que esse PR faz?
Marca textos que estavam hardcoded para tradução/internacionalização usando
_()em Python e{% trans %}em templates, e adiciona traduções para pt_BR, es e en.Python (
_()):wagtail_hooks.py— 7menu_labelsem_()em 4 apps (journal,core,institution,location)models.py— ~20 strings (verbose_name,help_text, field labels) em 9 appschoices.py—OA_STATUS,COINS(journal),regions(location)Templates (
{% trans %}):403.html,404.html,500.htmlsearch/search.html,users/user_form.html,users/user_detail.htmlhome/about_scielo_org_page.html,home/scieloorg/tabs.htmlLocale:
makemessages --allpara atualizar.pocom novos termos.mocompiladosOnde a revisão poderia começar?
journal/wagtail_hooks.pyejournal/choices.py— exemplificam o padrão aplicado nos demais arquivos.Como este poderia ser testado manualmente?
LANGUAGE_CODE = "en"e verificar que os menus do Wagtail admin exibem os labels em inglês (ex: "List of codes", "Indexed At Upload")/404e confirmar que o texto aparece traduzido conforme o idioma ativoesoupt-bre verificar que as páginas de erro, busca e formulários de usuário exibem textos traduzidosAlgum cenário de contexto que queira dar?
Exemplo de antes/depois:
Screenshots
N/A — mudanças apenas em marcação i18n, sem alteração visual no idioma padrão (pt-br).
Quais são tickets relevantes?
N/A
Referências
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.