Localization¶
Children¶
MythicRod ships English (en_US) and Japanese (ja_JP) out of the box.
Every other language is community-driven through Crowdin and arrives in
the repository as l10n PRs.
Source of truth¶
| File | Role |
|---|---|
mythicrod-paper/src/main/resources/lang/en_US.yml |
Source. All other locales mirror this key tree. |
mythicrod-paper/src/main/resources/lang/ja_JP.yml |
Bundled Japanese. |
mythicrod-paper/src/main/resources/lang/<locale>.yml |
Downloaded by crowdin.yml. |
The BundledLocaleParityTest JUnit test fails the build if any bundled
locale drops or adds keys against en_US.yml, or if %placeholder% tokens
differ between locales. Crowdin-managed locales are not checked because
they may be partially translated.
Repository config¶
crowdin.yml maps the source file to its translation path and lists all
locale aliases:
files:
- source: /mythicrod-paper/src/main/resources/lang/en_US.yml
translation: /mythicrod-paper/src/main/resources/lang/%locale_with_underscore%.yml
type: yaml
update_option: update_as_unapproved
languages_mapping:
locale_with_underscore:
ja: ja_JP
de: de_DE
...
update_as_unapproved means Crowdin marks pulled source updates as
unapproved so translators have a chance to review them.
GitHub Actions workflows¶
| Workflow | Trigger | What it does |
|---|---|---|
.github/workflows/crowdin.yml |
push to master, weekly cron, manual |
Uploads the latest en_US.yml to Crowdin and opens a PR on l10n_master when translations change. |
.github/workflows/crowdin-seed.yml |
manual only | One-shot. Uploads bundled ja_JP.yml into Crowdin so it appears in the project. |
Both workflows are no-ops unless the Crowdin project is configured. They read these GitHub config values:
| Name | Type | Used for |
|---|---|---|
CROWDIN_PROJECT_ID |
Repository variable | Crowdin numeric project id. |
CROWDIN_PERSONAL_TOKEN |
Repository secret | Crowdin user API token. |
GITHUB_TOKEN |
Repository token | Branch + PR creation. Provided by GitHub Actions. |
Set the variable + secret at Settings → Secrets and variables → Actions before tagging a release.
How to add a new bundled locale¶
- Copy
en_US.ymlto the new file (for examplede_DE.yml). - Translate value strings only. Keep keys, MiniMessage tags, and
%placeholder%tokens identical toen_US.yml. - Add the new locale to
BundledLocaleParityTest.BUNDLED_TARGETS. - Update
crowdin.yml'slanguages_mappingif the Crowdin code differs from the underscore form. - Run
./gradlew :mythicrod-paper:test. The parity test catches drift. - Open a PR. Once merged on
master, the Crowdin workflow uploads the updated source. To seed the existing translations into Crowdin in one shot, trigger theCrowdin seed translationsworkflow manually.
Why a locale might not appear in Crowdin¶
Crowdin only sees what is uploaded. The scheduled crowdin.yml workflow
uploads the source file (en_US.yml). It does not upload existing
translations. If a freshly added bundled locale (for example ja_JP.yml)
is not visible in Crowdin yet:
- Confirm
CROWDIN_PROJECT_IDandCROWDIN_PERSONAL_TOKENexist. - Run
Crowdin seed translationsfrom the Actions tab. This setsupload_translations: truefor a single run and brings the bundled files into the Crowdin project. - After it finishes, the language appears in the Crowdin dashboard with its existing strings marked as imported but unapproved.
Runtime behaviour¶
config.yml'slanguage.defaultselects the server-wide locale.- Players can override it through
/mythicrod gui-> Language or/mythicrod config language <locale>(admin) and a per-player override is persisted viaPlayerDataService. LanguageManager.getAvailableLanguages()enumerates every file present inplugins/MythicRod/lang/plus the bundled jar entries. Brigadier autocomplete only suggests those.- Missing keys fall back to the source locale, then to the literal key name, so a half-translated file never silently shows blank text.
Style guide for translators¶
- Keep MiniMessage tags exactly as in the source.
- Keep
%placeholder%tokens. Reorder them inside the sentence to match the target language naturally. - Do not translate product names (
MythicRod,Nexo,Paper,Folia,Bukkit). - Command names and permission nodes stay in English.
- Keep messages short and direct. The plugin sends a lot of chat lines during a catch.