Skip to content

MLS-PACK#355

Merged
evanpelle merged 26 commits into
openfrontio:mainfrom
Aotumuri:mls-pack
Apr 3, 2025
Merged

MLS-PACK#355
evanpelle merged 26 commits into
openfrontio:mainfrom
Aotumuri:mls-pack

Conversation

@Aotumuri

@Aotumuri Aotumuri commented Mar 27, 2025

Copy link
Copy Markdown
Member

Please complete the following:

  • I have added screenshots for all UI updates
  • I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced
  • 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

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.

@6uzm4n 6uzm4n mentioned this pull request Mar 27, 2025
@Aotumuri

Copy link
Copy Markdown
Member Author

DO NOT MERGE PLZ

@evanpelle

Copy link
Copy Markdown
Collaborator

DO NOT MERGE PLZ

lmk when it's ready

@Aotumuri

Copy link
Copy Markdown
Member Author

I can't debug because I can't use npm run dev.
I am looking for a way to use it again and I think it will be no longer a problem in a few days.

start:client
webpack serve --open --node-env development
sh: webpack: command not found

@Aotumuri

Copy link
Copy Markdown
Member Author

I don't think it is a problem now! Thanks for waiting.
@evanpelle

@Aotumuri

Copy link
Copy Markdown
Member Author
スクリーンショット 2025-03-28 9 27 52 Is this my fault? I'm getting an error in an unrelated area.

Comment thread src/client/index.html
@evanpelle

Copy link
Copy Markdown
Collaborator

Please add a summary in the description. I also updated the translation code, I put it in LangSelector.ts, so you'll need to put all language related code there.

@Aotumuri

Copy link
Copy Markdown
Member Author

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"
}

@Aotumuri Aotumuri requested a review from DiesselOne March 30, 2025 07:49
Comment thread src/client/HostLobbyModal.ts
Comment thread src/client/LangSelector.ts
Comment thread src/client/LangSelector.ts Outdated
Comment thread src/client/graphics/layers/BuildMenu.ts
@Aotumuri

Copy link
Copy Markdown
Member Author

I fixed all!
@evanpelle

Comment thread resources/lang/index.json Outdated
Comment thread src/client/LangSelector.ts Outdated
@Aotumuri

Copy link
Copy Markdown
Member Author

The following version of the MLS-pack has been merged
#355 (comment)

@Aotumuri Aotumuri requested a review from 6uzm4n March 31, 2025 13:19

@6uzm4n 6uzm4n left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good. I can't do a test run right now but I assume you've tested this through!

@Aotumuri

Aotumuri commented Apr 2, 2025

Copy link
Copy Markdown
Member Author

@evanpelle
ready for merge

@Aotumuri Aotumuri requested a review from evanpelle April 2, 2025 00:02
Comment thread src/client/SinglePlayerModal.ts Outdated
</label>
<label
for="instant-build"
for="host-modal-instant-build"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the wrong id, this should be singleplayer-modal-

and the HostLobbyModal should be host-modal-

@Aotumuri

Aotumuri commented Apr 3, 2025

Copy link
Copy Markdown
Member Author

I fixed all!
This PR is ready to merge!
@evanpelle

@evanpelle evanpelle merged commit 607e5b5 into openfrontio:main Apr 3, 2025
@Aotumuri Aotumuri deleted the mls-pack branch April 3, 2025 03:39
@Aotumuri Aotumuri linked an issue May 27, 2025 that may be closed by this pull request
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MLS

5 participants