Skip to content

[candidate_list] Translate site#10447

Open
driusan wants to merge 1 commit intoaces:mainfrom
driusan:TranslateCandidateListSite
Open

[candidate_list] Translate site#10447
driusan wants to merge 1 commit intoaces:mainfrom
driusan:TranslateCandidateListSite

Conversation

@driusan
Copy link
Copy Markdown
Collaborator

@driusan driusan commented Apr 14, 2026

This adds translations for "site" on the candidate_list page (both dropdown and data table) as an example of how to handle database translations.

The text domain of the table name (in the case of sites, the "psc" table) has the options that are translated. This can be placed in the project/locale/$lang/LC_MESSAGES/psc.po file and compiled with msgfmt -o psc.mo psc.po.

I tested this using the following .po for raisinbread's sites and Japanese (translations from Google Translate)

msgid ""
msgstr ""
"Project-Id-Version: LORIS 28\n"
"Report-Msgid-Bugs-To: https://github.com/aces/Loris/issues\n"
"POT-Creation-Date: 2025-04-08 14:37-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

msgid "Data Coordinating Center"
msgstr "データ調整センター"

msgid "Montreal"
msgstr "モントリオール"

msgid "Ottawa"
msgstr "オタワ"

msgid "Rome"
msgstr "ローマ"

This is not included in the PR, because the site names are LORIS install specific. I intend to send a different PR with a script to extract a .pot file from the database values for a table.

@github-actions github-actions bot added Language: PHP PR or issue that update PHP code Module: candidate_list PR or issue related to candidate_list module labels Apr 14, 2026
@driusan driusan added Multilingual Any tasks related to making LORIS multilingual and removed Language: PHP PR or issue that update PHP code Module: candidate_list PR or issue related to candidate_list module labels Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Multilingual Any tasks related to making LORIS multilingual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant