Localization setup#43
Open
MLD-Rennes wants to merge 7 commits intoSHiLLySiT:developfrom
Open
Conversation
commit 33cfd50 Author: MLD-Rennes <[email protected]> Date: Thu Apr 24 21:56:04 2025 +0200 translate Roll section Tranlate the Roll section and the Roll event in the history. commit 92da153 Author: MLD-Rennes <[email protected]> Date: Thu Apr 24 21:02:04 2025 +0200 translate Oracle (end) Finish the translation of the oracles. commit a9ff6dc Author: MLD-Rennes <[email protected]> Date: Mon Apr 21 20:33:25 2025 +0200 translate Oracle (beginning) The oracle file is duplicated for each language. The script is loaded dynamically in the ironwriter.js file. commit 96c7651 Author: MLD-Rennes <[email protected]> Date: Mon Apr 21 16:44:49 2025 +0200 Translate header Translate the header and the related dialogs. commit ff8267e Author: MLD-Rennes <[email protected]> Date: Mon Apr 21 16:01:11 2025 +0200 Can choose the language. Add a variable to choose the language in the js file. commit b31b2e3 Author: MLD-Rennes <[email protected]> Date: Mon Apr 21 15:52:31 2025 +0200 Translate Inventory Menu Translate name of the inventory menu and name of the Quantity property. commit 1ca5027 Author: MLD-Rennes <[email protected]> Date: Mon Apr 21 15:29:18 2025 +0200 Translate Assets Menu Translate the name of the assets menu. commit ca9a3e7 Author: MLD-Rennes <[email protected]> Date: Mon Apr 21 15:24:22 2025 +0200 Translate bonds menu Translate the name of the bonds menu. commit 55155d1 Author: MLD-Rennes <[email protected]> Date: Mon Apr 21 14:07:02 2025 +0200 Translate progress Translation of progress options and progress menu on the page. commit 9ac89e4 Author: MLD-Rennes <[email protected]> Date: Mon Apr 21 13:45:06 2025 +0200 Translate character menu Translate the character menu and the default name character for a new session. commit 9a12117 Author: MLD-Rennes <[email protected]> Date: Mon Apr 21 13:26:55 2025 +0200 Translate debilities Translate the debility name tags and the debility name shown on the page. commit cc8551c Author: MLD-Rennes <[email protected]> Date: Mon Apr 21 13:05:26 2025 +0200 Correct Momentum Reset The momentum reset value is between 0 and 2. commit 9f5dcf6 Author: MLD-Rennes <[email protected]> Date: Mon Apr 21 13:00:59 2025 +0200 Translate Every Tags Translation of every tags in french. commit 83cbb73 Author: MLD-Rennes <[email protected]> Date: Mon Apr 21 12:52:06 2025 +0200 Correction of the spent experience The experience spent was not visible because the variable used capitalized word but the tag is in lower case. commit 4fb4073 Author: MLD-Rennes <[email protected]> Date: Mon Apr 21 12:49:17 2025 +0200 Translate tag Translation of tag in french. The tag is given in french and converted in english to be processed. commit d867aa7 Author: MLD-Rennes <[email protected]> Date: Mon Apr 21 12:34:05 2025 +0200 Translate Stat Menu Translation of the stat menu on the index page.
Undo correction that is invalid.
Fixed the change of momentum stats for any string used as debility
Added a property to select language in each translations objets to simplify the translation of a word. Added a translation for EN from a lowercase keyword to a camelCase name.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To implement localization support within the tool, it is suggested to incorporate a dedicated setup procedure primarily leveraging multiple functions invoked within the
handle_initroutine. These functions facilitate the translation of the user interface elements. A mapping object is employed to associate keywords from theindexconfiguration file with their corresponding translated strings. This object can be extended to support additional languages as needed. If a target language is not specified, the translation functions (translate_) default to returning the original string or perform no operation.Tag translation involves converting user-inputted keywords, provided in lowercase, to their corresponding English camelCase identifiers used for tag analysis (
edge,asset,removeAsset, etc.). This approach resolves discrepancies such as those observed withspentExperience, without altering the established variable naming conventions and with minimal effort.Oracle definitions are maintained in a separate JavaScript file, which is dynamically loaded as a script element into the main
indexfile upon initialization via theloadOracles()function, ensuring modularity and separation of concerns.The
momentumResetparameter is validated to ensure its value resides within the inclusive range of 0 to 2.