mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 15:40:43 +00:00
607e5b5ff0
## 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>
169 lines
6.3 KiB
JSON
169 lines
6.3 KiB
JSON
{
|
|
"lang": {
|
|
"en": "debug",
|
|
"native": "debug",
|
|
"svg": "xx",
|
|
"lang_code": "debug"
|
|
},
|
|
"main": {
|
|
"join_discord": "main.join_discord",
|
|
"create_lobby": "main.create_lobby",
|
|
"join_lobby": "main.join_lobby",
|
|
"single_player": "main.single_player",
|
|
"instructions": "main.instructions",
|
|
"how_to_play": "main.how_to_play",
|
|
"wiki": "main.wiki"
|
|
},
|
|
"help_modal": {
|
|
"hotkeys": "help_modal.hotkeys",
|
|
"table_key": "help_modal.table_key",
|
|
"table_action": "help_modal.table_action",
|
|
"action_alt_view": "help_modal.action_alt_view",
|
|
"action_attack_altclick": "help_modal.action_attack_altclick",
|
|
"action_build": "help_modal.action_build",
|
|
"action_center": "help_modal.action_center",
|
|
"action_zoom": "help_modal.action_zoom",
|
|
"action_move_camera": "help_modal.action_move_camera",
|
|
"action_ratio_change": "help_modal.action_ratio_change",
|
|
"action_reset_gfx": "help_modal.action_reset_gfx",
|
|
"ui_section": "help_modal.ui_section",
|
|
"ui_leaderboard": "help_modal.ui_leaderboard",
|
|
"ui_leaderboard_desc": "help_modal.ui_leaderboard_desc",
|
|
"ui_control": "help_modal.ui_control",
|
|
"ui_control_desc": "help_modal.ui_control_desc",
|
|
"ui_pop": "help_modal.ui_pop",
|
|
"ui_gold": "help_modal.ui_gold",
|
|
"ui_troops_workers": "help_modal.ui_troops_workers",
|
|
"ui_attack_ratio": "help_modal.ui_attack_ratio",
|
|
"ui_options": "help_modal.ui_options",
|
|
"ui_options_desc": "help_modal.ui_options_desc",
|
|
"option_pause": "help_modal.option_pause",
|
|
"option_timer": "help_modal.option_timer",
|
|
"option_exit": "help_modal.option_exit",
|
|
"option_settings": "help_modal.option_settings",
|
|
"radial_title": "help_modal.radial_title",
|
|
"radial_desc": "help_modal.radial_desc",
|
|
"radial_build": "help_modal.radial_build",
|
|
"radial_info": "help_modal.radial_info",
|
|
"radial_boat": "help_modal.radial_boat",
|
|
"radial_close": "help_modal.radial_close",
|
|
"info_title": "help_modal.info_title",
|
|
"info_enemy_desc": "help_modal.info_enemy_desc",
|
|
"info_target": "help_modal.info_target",
|
|
"info_alliance": "help_modal.info_alliance",
|
|
"info_emoji": "help_modal.info_emoji",
|
|
"info_ally_panel": "help_modal.info_ally_panel",
|
|
"info_ally_desc": "help_modal.info_ally_desc",
|
|
"ally_betray": "help_modal.ally_betray",
|
|
"ally_donate": "help_modal.ally_donate",
|
|
"build_menu_title": "help_modal.build_menu_title",
|
|
"build_name": "help_modal.build_name",
|
|
"build_icon": "help_modal.build_icon",
|
|
"build_desc": "help_modal.build_desc",
|
|
"build_city": "help_modal.build_city",
|
|
"build_city_desc": "help_modal.build_city_desc",
|
|
"build_defense": "help_modal.build_defense",
|
|
"build_defense_desc": "help_modal.build_defense_desc",
|
|
"build_port": "help_modal.build_port",
|
|
"build_port_desc": "help_modal.build_port_desc",
|
|
"build_warship": "help_modal.build_warship",
|
|
"build_warship_desc": "help_modal.build_warship_desc",
|
|
"build_silo": "help_modal.build_silo",
|
|
"build_silo_desc": "help_modal.build_silo_desc",
|
|
"build_sam": "help_modal.build_sam",
|
|
"build_sam_desc": "help_modal.build_sam_desc",
|
|
"build_atom": "help_modal.build_atom",
|
|
"build_atom_desc": "help_modal.build_atom_desc",
|
|
"build_hydrogen": "help_modal.build_hydrogen",
|
|
"build_hydrogen_desc": "help_modal.build_hydrogen_desc",
|
|
"build_mirv": "help_modal.build_mirv",
|
|
"build_mirv_desc": "help_modal.build_mirv_desc",
|
|
"player_icons": "help_modal.player_icons",
|
|
"icon_desc": "help_modal.icon_desc",
|
|
"icon_crown": "help_modal.icon_crown",
|
|
"icon_traitor": "help_modal.icon_traitor",
|
|
"icon_ally": "help_modal.icon_ally",
|
|
"info_enemy_panel": "help_modal.info_enemy_panel"
|
|
},
|
|
"single_modal": {
|
|
"title": "single_modal.title",
|
|
"allow_alliances": "single_modal.allow_alliances",
|
|
"options_title": "single_modal.options_title",
|
|
"bots": "single_modal.bots",
|
|
"bots_disabled": "single_modal.bots_disabled",
|
|
"disable_nations": "single_modal.disable_nations",
|
|
"instant_build": "single_modal.instant_build",
|
|
"infinite_gold": "single_modal.infinite_gold",
|
|
"infinite_troops": "single_modal.infinite_troops",
|
|
"disable_nukes": "single_modal.disable_nukes",
|
|
"start": "single_modal.start"
|
|
},
|
|
"map": {
|
|
"map": "map.map",
|
|
"world": "map.world",
|
|
"europe": "map.europe",
|
|
"mena": "map.mena",
|
|
"northamerica": "map.northamerica",
|
|
"oceania": "map.oceania",
|
|
"blacksea": "map.blacksea",
|
|
"africa": "map.africa",
|
|
"asia": "map.asia",
|
|
"mars": "map.mars",
|
|
"southamerica": "map.southamerica",
|
|
"britannia": "map.britannia",
|
|
"gatewaytotheatlantic": "map.gatewaytotheatlantic",
|
|
"australia": "map.australia",
|
|
"random": "map.random",
|
|
"iceland": "map.iceland",
|
|
"pangaea": "map.pangaea"
|
|
},
|
|
"private_lobby": {
|
|
"title": "private_lobby.title",
|
|
"enter_id": "private_lobby.enter_id",
|
|
"player": "private_lobby.player",
|
|
"players": "private_lobby.players",
|
|
"join_lobby": "private_lobby.join_lobby",
|
|
"checking": "private_lobby.checking",
|
|
"not_found": "private_lobby.not_found",
|
|
"error": "private_lobby.error",
|
|
"joined_waiting": "private_lobby.joined_waiting"
|
|
},
|
|
"public_lobby": {
|
|
"join": "public_lobby.join",
|
|
"waiting": "public_lobby.waiting"
|
|
},
|
|
"username": {
|
|
"enter_username": "username.enter_username",
|
|
"not_string": "username.not_string",
|
|
"too_short": "username.too_short",
|
|
"too_long": "username.too_long",
|
|
"invalid_chars": "username.invalid_chars"
|
|
},
|
|
"host_modal": {
|
|
"title": "host_modal.title",
|
|
"options_title": "host_modal.options_title",
|
|
"bots": "host_modal.bots",
|
|
"bots_disabled": "host_modal.bots_disabled",
|
|
"disable_nations": "host_modal.disable_nations",
|
|
"instant_build": "host_modal.instant_build",
|
|
"infinite_gold": "host_modal.infinite_gold",
|
|
"infinite_troops": "host_modal.infinite_troops",
|
|
"disable_nukes": "host_modal.disable_nukes",
|
|
"player": "host_modal.player",
|
|
"players": "host_modal.players",
|
|
"waiting": "host_modal.waiting",
|
|
"start": "host_modal.start"
|
|
},
|
|
"game_starting_modal": {
|
|
"title": "game_starting_modal.title",
|
|
"desc": "game_starting_modal.desc"
|
|
},
|
|
"difficulty": {
|
|
"difficulty": "difficulty.difficulty",
|
|
"Relaxed": "difficulty.Relaxed",
|
|
"Balanced": "difficulty.Balanced",
|
|
"Intense": "difficulty.Intense",
|
|
"Impossible": "difficulty.Impossible"
|
|
}
|
|
}
|