mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 15:00:43 +00:00
1c6aa2bfc3
## Description: This pull request improves the logic for matching language codes to supported languages. Now, the function tries to find the most specific language by splitting the input code with “-” or “_”, and searching from the longest combination to the shortest. If no direct match is found, it searches for all supported language codes that start with the same base (first two letters) and chooses the most specific one. If nothing matches, it defaults to English. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I have read and accepted the CLA aggreement (only required once). ## Please put your Discord username so you can be contacted if a bug or regression is found: aorumuri