From ff519adebbc28d9617949556a1c8fd74883743ed Mon Sep 17 00:00:00 2001 From: Ludy Date: Thu, 5 Sep 2024 10:23:04 +0200 Subject: [PATCH] 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> --- .github/pull_request_template.md | 3 ++- HowToAddNewLanguage.md | 11 ++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 523e3b1a..fd762f6d 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -4,9 +4,10 @@ Please provide a summary of the changes, including relevant motivation and conte Closes #(issue_number) -## Checklist: +## Checklist - [ ] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] 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) diff --git a/HowToAddNewLanguage.md b/HowToAddNewLanguage.md index 73cad0e9..ed4208b9 100644 --- a/HowToAddNewLanguage.md +++ b/HowToAddNewLanguage.md @@ -1,7 +1,6 @@


Stirling-PDF

- # How to add new languages to Stirling-PDF Fork Stirling-PDF and make a new branch out of Main @@ -14,13 +13,14 @@ https://github.com/Stirling-Tools/Stirling-PDF/tree/main/src/main/resources/stat Any SVG flags are fine, i got most of mine from [here](https://flagicons.lipis.dev/) If your language isn't represented by a flag just find whichever closely matches it, such as for Arabic i chose Saudi Arabia - For example to add Polish you would add + ```html icon Polski ``` + The data-language-code is the code used to reference the file in the next step. Start by copying the existing english property file @@ -29,7 +29,6 @@ Start by copying the existing english property file Copy and rename it to messages_{your data-language-code here}.properties, in the polish example you would set the name to messages_pl_PL.properties - Then simply translate all property entries within that file and make a PR into main for others to use! If you do not have a java IDE i am happy to verify the changes worked once you raise PR (but won't be able to verify the translations themselves) @@ -48,4 +47,10 @@ ignore = [ ] ``` +## Add New Translation Tags + +- **Important**: If you add any new translation tags, they must first be added to the `messages_en_GB.properties` file. This ensures consistency across all language files. +- New translation tags **must be added** to the `messages_en_GB.properties` file to maintain a reference for other languages. +- After adding the new tags to `messages_en_GB.properties`, add and translate them in the respective language file (e.g., `messages_pl_PL.properties`). + Make sure to place the entry under the correct language section. This helps maintain the accuracy of translation progress statistics and ensures that the translation tool or scripts do not misinterpret the completion rate.