Skip to content
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

Add: Configurable UI Language Support with Dynamic Filtering #2846

Merged
merged 2 commits into from
Feb 3, 2025

Conversation

Ludy87
Copy link
Contributor

@Ludy87 Ludy87 commented Feb 2, 2025

Description of Changes

Summary

  • Added support for configuring UI languages via settings.yml (languages field).
  • Modified LanguageService to respect the configured languages, while ensuring British English (en_GB) is always enabled.
  • Updated Thymeleaf templates to dynamically display only the allowed languages.
  • Improved logging and refactored some list-to-set conversions for better efficiency.

Why the Change?

  • Allows administrators to limit available UI languages instead of displaying all detected languages.
  • Provides better customization options and simplifies language management.

Challenges Encountered

  • Ensuring backwards compatibility: If languages is empty, all languages remain enabled.
  • Handling Set<String> instead of List<String> in LanguageService for optimized lookups.

Checklist

General

Documentation

UI Changes (if applicable)

  • Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR)

Testing (if applicable)

  • I have tested my changes locally. Refer to the Testing Guide for more details.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Feb 2, 2025
@github-actions github-actions bot added Java Pull requests that update Java code Front End Issues or pull requests related to front-end development Back End Issues related to back-end development Translation API API-related issues or pull requests labels Feb 2, 2025
@github-actions github-actions bot added the Documentation Improvements or additions to documentation label Feb 2, 2025
@Frooodle Frooodle merged commit b37457b into Stirling-Tools:main Feb 3, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API API-related issues or pull requests Back End Issues related to back-end development Documentation Improvements or additions to documentation enhancement New feature or request Front End Issues or pull requests related to front-end development Java Pull requests that update Java code size:L This PR changes 100-499 lines, ignoring generated files. Translation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants