Commit Graph

14 Commits

Author SHA1 Message Date
Ludy
b37457b41d
Add: Configurable UI Language Support with Dynamic Filtering (#2846)
# 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

- [x] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [x] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md)
(if applicable)
- [x] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md)
(if applicable)
- [x] I have performed a self-review of my own code
- [x] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [x] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### 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)

- [x] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing)
for more details.
2025-02-03 10:52:34 +00:00
Ludy
b4b5a2419b
expand: check language properties (#2724)
# Description

Improvement in `check_language_properties.py`:

Added support for local Windows commands to check language properties
files with an updated script.
Added a new optional argument `--check-file` to specify a single file to
check, replacing the need to process all files in the directory.
Adjusted file path handling to better support Windows paths.

Update to `update-translations.yml`:

Added `workflow_dispatch` trigger to allow manual execution of the
workflow.

Documentation update in `HowToAddNewLanguage.md`:

Added instructions for running the language properties check locally on
Windows, including example commands.
These changes streamline the process of checking language properties
files and provide additional flexibility for local testing and manual
workflow triggering.

## Checklist

- [x] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [x] I have performed a self-review of my own code
- [ ] I have attached images of the change if it is UI based
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] If my code has heavily changed functionality I have updated
relevant docs on [Stirling-PDFs doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
- [x] My changes generate no new warnings
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)
2025-01-16 22:03:54 +00:00
Ludy
a5aac01b4d
fixed minor bugs in Markdown (#2152) 2024-11-03 07:20:10 +00:00
Ludy
ff519adebb
Add info translation (#1791)
* adds the note about adding new translation tags

* Update pull_request_template.md

---------

Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
2024-09-05 09:23:04 +01:00
Ludy
318076254d
Handling Untranslatable Strings (#1133) 2024-04-27 23:26:12 +01:00
Ludy
010426d488
Document (#803)
* Update HowToAddNewLanguage.md

* Update HowToUseOCR.md

* Update LocalRunGuide.md

* Update README.md

* Update LocalRunGuide.md

* Update README.md

---------

Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
2024-02-16 22:42:56 +00:00
sbplat
55d4fda01b refactor: normalize files 2024-02-11 11:47:00 -05:00
Peter Dave Hello
52fe4c6aa6 Specify code block language in Markdown for syntax highlighting 2024-01-10 19:17:09 +08:00
sbplat
3864e130cc misc: change all repo links from Frooodle to Stirling-Tools 2023-12-30 18:36:07 -05:00
Anthony Stirling
f6c4f08254 docs 2023-09-14 13:32:49 +01:00
Anthony Stirling
ed35a878a5 update readme 2023-05-12 20:35:17 +01:00
Anthony Stirling
57b12ffcc3
Update HowToAddNewLanguage.md 2023-02-05 21:40:25 +00:00
Anthony Stirling
4a95e001bb
Update HowToAddNewLanguage.md 2023-02-05 12:57:48 +00:00
Anthony Stirling
6662115d10
Lang setup (#35) 2023-02-05 12:54:48 +00:00