## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

This is commit pack
This PR refactors and improves the language selection experience:
• Centralizes all language-related logic in LangSelector.ts &
LanguageModal.ts
	•	Redesigns the language selection UI for better UX across devices
	•	Adds new translations and supports more languages
Changes .w.
• Language selection is now handled entirely inside LangSelector.ts &
LanguageModal.ts
	•	Prevents background scrolling when open
	•	Highlights the current language at the top
	•	Always shows English second
	•	Shows browser language third (if different from current)
	•	All other languages are sorted alphabetically by English name
	•	Debug option is shown at the end when pressing D
	•	The language list is scrollable when it exceeds screen height
	
Supported Languages
["en", "ja", "fr", "bg", "nl", "ru", "ua", "de"]

Added Translation Keys
```
"lang": {
  "en": "English",
  "native": "English",
  "svg": "xx"
},
"map": {
  "map": "Map"
},
"game_starting_modal": {
  "title": "Game is Starting...",
  "desc": "Preparing for the lobby to start. Please wait."
},
"difficulty": {
  "difficulty": "Difficulty"
}
```

## Please put your Discord username so you can be contacted if a bug or
regression is found:
MLS Representative
- aotumuri 

Translation collaborator
- Nikola123 (He was a very big help from setting up the translation site
to adding the json. Thank you so much!)
I don't have permission from my collaborators to display their names
here, so I'll put the discord link here

https://discord.com/channels/1284581928254701718/1352553113612980224/1352553113612980224
- tryout33

Collaborators from other servers.
- CCC Group (This is not Culture Convenience Club. Think of it like a
server where developers of various games are playing.)
- People who fixed the UI and found bugs.
meow02952 (discord id) <- This person also gave me a code suggestion.
Thanks!
moon_spear (discord id)
ww_what_ww (discord id)
Azuna (he doesn't have discord account)
- People who corrected translations, etc.
_kyoyume_ (discord id)
_ultrasuper_ (discord id)
grueg (he doesn't have discord account)

# If I forgot to include your name, or if you’d like your name to be
added, please let me know via Gmail or Discord.

---------

Co-authored-by: Duwibi <86431918+Duwibi@users.noreply.github.com>
This commit is contained in:
Aotumuri
2025-04-02 20:37:36 -07:00
committed by GitHub
co-authored by Duwibi
parent f09801fe3e
commit 607e5b5ff0
23 changed files with 1574 additions and 459 deletions
+20 -3
View File
@@ -1,4 +1,10 @@
{
"lang": {
"en": "Japanese",
"native": "日本語",
"svg": "jp",
"lang_code": "ja"
},
"main": {
"join_discord": "Discordサーバーに参加!",
"create_lobby": "ロビーを作成",
@@ -42,6 +48,7 @@
"radial_boat": "ボートを送る(海にアクセスできる場合)。",
"radial_close": "メニューを閉じる。",
"info_title": "情報メニュー",
"info_enemy_panel": "他国情報パネル",
"info_enemy_desc": "選択プレイヤーの名前、資産、兵士数、裏切り者かどうかを表示。裏切り者とは、同盟を結んでいたプレイヤーを裏切り、攻撃したプレイヤーのことです。以下のアイコンは、以下のやりとりを表しています:",
"info_target": "ターゲットマークを付ける(攻撃協調用)。",
"info_alliance": "同盟を申し込む。同盟国は資源と兵力を共有できますが、互いに攻撃することはできません。",
@@ -94,6 +101,7 @@
"start": "ゲーム開始"
},
"map": {
"map": "マップ",
"world": "世界",
"europe": "ヨーロッパ",
"mena": "中東・北アフリカ",
@@ -109,6 +117,7 @@
"australia": "オーストラリア",
"iceland": "アイスランド",
"japan": "日本とその近隣",
"pangaea": "パンゲア",
"random": "ランダム"
},
"private_lobby": {
@@ -130,13 +139,12 @@
"enter_username": "ユーザー名を入力",
"not_string": "ユーザー名は文字列で入力してください。",
"too_short": "ユーザー名は{min}文字より長い必要があります。",
"too_long": "ユーザー名は{max}文字より短い必要があります",
"too_long": "ユーザー名は{max}文字より短い必要があります",
"invalid_chars": "ユーザー名には英字、数字、スペース、アンダースコア、および [角括弧] のみ使用できます。"
},
"host_modal": {
"title": "プライベートロビー",
"map": "マップ",
"difficulty": "難易度",
"mode": "モード",
"allow_alliances": "同盟を許可",
"options_title": "オプション",
"bots": "ボット数: ",
@@ -151,10 +159,19 @@
"waiting": "他のプレイヤーの参加を待っています...",
"start": "ゲーム開始"
},
"game_starting_modal": {
"title": "ゲーム開始中...",
"desc": "スタートのためにロビー準備中... ちょっとまってね!"
},
"difficulty": {
"difficulty": "難易度",
"Relaxed": "簡単",
"Balanced": "普通",
"Intense": "難しい",
"Impossible": "不可能"
},
"game_mode": {
"ffa": "バトルロワイヤル",
"teams": "チーム戦"
}
}