-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat, perf, ci, style: Enhancements to Localization, Server Configuration, and Code Clarity #572
Open
MaverickTR
wants to merge
14
commits into
FuelLabs:main
Choose a base branch
from
MaverickTR:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Added Multi-Language Support: Implemented a mechanism to detect the system language using environment variables (LANG, LC_ALL) on Linux and Unix-based systems. On Windows, the chcp command is used. Supported languages include English, Turkish, Spanish, French, German, Chinese, and Japanese. Translation JSON File: Created a translations.json file containing translations for all supported languages. The JSON file includes keys for various messages used in the script. Translation Function: Added a translate function to fetch the appropriate translation from the JSON file based on the detected system language. The function uses jq to parse the JSON and retrieve the correct message. Integrated Translations in Script: Replaced hardcoded messages with calls to the translate function. Ensured that all user-facing messages are translated according to the system language. Example of Translated Messages: Messages such as "Connected to L1 chain", "Waiting for L1 chain deployment data", and "Starting Fuel node" are now dynamically translated. Improved User Experience: Users will now see messages in their system's language, enhancing usability and accessibility.
- Integrated system language detection to determine the appropriate language for messages. - Loaded translations from a JSON file based on the detected system language. - Replaced echo statements with a translate function to fetch and display messages in the appropriate language. - Added translations for English, Turkish, Chinese, Japanese, Spanish, German, and French.
…e server configuration - Introduced dynamic HOST variable in app.ts to allow flexible server host configuration. - Updated the server startup message to use the HOST environment variable. - Ensured the server starts on the specified host from the environment variable, defaulting to 'localhost' if not set. - Added HOST entries in the environment (.env) files.
…ation) Updated the BlockEntity class to use const for transaction mapping, ensuring values are not reassigned elsewhere in the code. This improves code reliability and maintainability by preventing unintended mutations.
Refactored the ChainEntity creation method to streamline the assignment of chainID and chainData. This improves readability by using clear variable names and structured data flow, enhancing code maintainability.
MaverickTR
requested review from
luizstacio,
pedronauck,
LuizAsFight,
helciofranco,
arthurgeron and
rodrigobranas
as code owners
September 21, 2024 02:54
MaverickTR
force-pushed
the
main
branch
2 times, most recently
from
September 21, 2024 03:58
28af502
to
5f3b961
Compare
MaverickTR
changed the title
Enhancements to Localization, Server Configuration, and Code Clarity
feat, perf, ci, style: Enhancements to Localization, Server Configuration, and Code Clarity
Sep 22, 2024
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.
This pull request introduces several enhancements across the project. It adds multi-language support for dynamic message display based on system language settings, improves server host configuration flexibility, and refactors code in several modules to enhance readability and maintainability. These changes aim to improve user experience, adaptability across different locales, and ensure cleaner code management.