Translate all out-of-game UI (start screen, lobbies, etc.) (#316)

This PR adds full translation support for all out-of-game UI elements,
including the start screen, public/private lobby modals, and other
pre-game interfaces.

All static text has been externalized to en.json and ja.json for future
language support.
If you find any spots that are not yet translated (missing from the
JSON), please let me know.
Thanks a lot!

This is a follow-up to PR
[#305](https://github.com/openfrontio/OpenFrontIO/pull/305).

---------

Co-authored-by: Cldprv <dubois.cnm@tutanota.com>
Co-authored-by: jacks0n <rosty.west89@gmail.com>
This commit is contained in:
Aotumuri
2025-03-25 09:12:04 +09:00
committed by GitHub
parent f188af6029
commit 9088adeb7a
14 changed files with 845 additions and 215 deletions
+4 -1
View File
@@ -25,6 +25,7 @@ export const MapDescription: Record<keyof typeof GameMapType, string> = {
export class MapDisplay extends LitElement {
@property({ type: String }) mapKey = "";
@property({ type: Boolean }) selected = false;
@property({ type: String }) translation: string = "";
static styles = css`
.option-card {
@@ -90,7 +91,9 @@ export class MapDisplay extends LitElement {
<p>${this.mapKey}</p>
</div>`}
<div class="option-card-title">
${MapDescription[this.mapKey as keyof typeof GameMapType]}
<!-- ${MapDescription[this.mapKey as keyof typeof GameMapType]}-->
${this.translation ||
MapDescription[this.mapKey as keyof typeof GameMapType]}
</div>
</div>
`;