[RFE]configuration Options And Consistent Usage Of Numeric Localization
[RFE] Configuration Options and Consistent Usage of Numeric Localization
Enhancement Type
Improvement to Existing Feature
Brief Description of Enhancement
Different languages use different symbols to make large numbers more readable and separate decimals. The usage in MekHQ (and possibly MegaMek and MegaMekLab) is inconsistent, using either the system setting (Linux $LANG and $LC_NUMERIC), the MegaMek Language Client Setting, or neither of them. This inconsistency affects the display of numbers in various parts of the application, making it difficult for users to understand and work with numbers in different languages.
Current State of Numeric Localization in MekHQ
The current state of numeric localization in MekHQ is a mix of different approaches, leading to inconsistent display of numbers. The following screenshots from a Windows 10 with German localization illustrate this issue:
Command Center Tab
In the Command Center Tab, the Net Worth uses a dot (.) for grouping of thousands, while the Cargo Summary uses a dot (.) as the decimal separator.
Purchase Unit Window
In the "Purchase Unit" Window, the grouping separator in the table is affected by the Language set in the MegaMek Client Setting, but not in the "Cost:" of the selected Unit.
Use Cases or Rationale
The inconsistent display of numbers in MekHQ affects the following use cases:
- Consistent Display of Numbers: Users expect to see numbers displayed consistently across the application, regardless of the language setting. The current inconsistency makes it difficult for users to understand and work with numbers.
- Option to Configure Localization of Numbers: Users should have the option to configure the localization of numbers independently of the selected language. This would allow users to choose the display format that suits their needs.
Proposed Solution
To address the inconsistent display of numbers in MekHQ, the following solution is proposed:
- Introduce a new configuration option: Add a new configuration option to allow users to choose the display format for numbers, including the grouping separator and decimal separator.
- Use the system setting (Linux $LANG and $LC_NUMERIC): Use the system setting (Linux $LANG and $LC_NUMERIC) as the default display format for numbers.
- Allow users to override the system setting: Allow users to override the system setting and choose a different display format for numbers.
- Consistent display of numbers: Ensure that numbers are displayed consistently across the application, regardless of the language setting.
Benefits of the Proposed Solution
The proposed solution would provide the following benefits:
- Improved user experience: Users would have a consistent and predictable display of numbers, making it easier for them to understand and work with numbers.
- Increased flexibility: Users would have the option to choose the display format for numbers, allowing them to tailor the application to their needs.
- Reduced: The proposed solution would reduce confusion and errors caused by the inconsistent display of numbers.
Conclusion
The inconsistent display of numbers in MekHQ is a significant issue that affects the user experience. The proposed solution would address this issue by introducing a new configuration option, using the system setting as the default display format, and allowing users to override the system setting. This would provide a consistent and predictable display of numbers, making it easier for users to understand and work with numbers.
Future Work
Future work would involve implementing the proposed solution and testing it to ensure that it meets the requirements and expectations of users. This would involve:
- Implementing the new configuration option: Add a new configuration option to allow users to choose the display format for numbers.
- Using the system setting as the default display format: Use the system setting (Linux $LANG and $LC_NUMERIC) as the default display format for numbers.
- Allowing users to override the system setting: Allow users to override the system setting and choose a different display format for numbers.
- Testing the solution: Test the solution to ensure that it meets the requirements and expectations of users.
MekHQ Suite Version
0.50.05 Shapshot
Final Verification
- [x] I confirm this request hasn't already been submitted (checked the tracker)
- [x] I've discussed or asked about this enhancement on MegaMek Discord
- [x] I’m opening this on the correct repo (MegaMek, MegaMekLab, or MekHQ)
[RFE] Configuration Options and Consistent Usage of Numeric Localization: Q&A
Introduction
In our previous article, we discussed the inconsistent display of numbers in MekHQ and proposed a solution to address this issue. In this article, we will answer some frequently asked questions (FAQs) related to the proposed solution.
Q: Why is the display of numbers inconsistent in MekHQ?
A: The display of numbers in MekHQ is inconsistent because the application uses different approaches to display numbers, depending on the context. In some cases, the application uses the system setting (Linux $LANG and $LC_NUMERIC), while in other cases, it uses the MegaMek Language Client Setting. This inconsistency makes it difficult for users to understand and work with numbers.
Q: What is the proposed solution to address the inconsistent display of numbers?
A: The proposed solution involves introducing a new configuration option to allow users to choose the display format for numbers, including the grouping separator and decimal separator. The system setting (Linux $LANG and $LC_NUMERIC) would be used as the default display format for numbers, and users would have the option to override the system setting and choose a different display format.
Q: How would the proposed solution affect the display of numbers in MekHQ?
A: The proposed solution would ensure that numbers are displayed consistently across the application, regardless of the language setting. Users would have the option to choose the display format for numbers, allowing them to tailor the application to their needs.
Q: Would the proposed solution affect the performance of MekHQ?
A: The proposed solution would not affect the performance of MekHQ. The new configuration option would be implemented in a way that does not impact the performance of the application.
Q: How would users access the new configuration option?
A: Users would access the new configuration option through the MekHQ settings menu. The option would be clearly labeled and easy to find.
Q: Would the proposed solution be backward compatible with existing MekHQ installations?
A: Yes, the proposed solution would be backward compatible with existing MekHQ installations. Users would be able to continue using the application as they do now, with the added option to choose the display format for numbers.
Q: How would the proposed solution be tested and validated?
A: The proposed solution would be tested and validated through a series of tests, including:
- Unit tests: The new configuration option would be tested in isolation to ensure that it works as expected.
- Integration tests: The new configuration option would be tested in conjunction with other parts of the application to ensure that it works as expected in different scenarios.
- User acceptance testing: Users would be asked to test the new configuration option and provide feedback on its usability and effectiveness.
Q: What is the estimated timeline for implementing the proposed solution?
A: The estimated timeline for implementing the proposed solution is several weeks. The exact timeline would depend on the complexity of the implementation and the availability of resources.
Q: Who would be responsible for implementing the proposed solution?
A: The proposed solution would be implemented by the MekHQ development team. The team would work closely with users and other stakeholders to ensure that the solution meets the requirements and expectations of users.
Conclusion
The proposed solution to address the inconsistent display of numbers inHQ would provide a consistent and predictable display of numbers, making it easier for users to understand and work with numbers. The solution would be implemented in a way that does not impact the performance of the application and would be backward compatible with existing MekHQ installations.