From da365c12b4b7db482b8d534fb7e79ef19c656d90 Mon Sep 17 00:00:00 2001 From: Ludy Date: Sat, 14 Jun 2025 23:53:08 +0200 Subject: [PATCH] feat: add i18n support for team management UI and role table header (#3702) # Description of Changes - Replaced hardcoded strings in `team-details.html` and `teams.html` with internationalized message tags (e.g., `team.members`, `team.role`, etc.) - Introduced new message keys for team management across multiple `messages_*.properties` files - Added `text-overflow` styling to a shared CSS file (`modern-tables.css`) for reuse across admin pages - Removed the unused `adminUserSettings.roles` translation key and replaced it with the singular `adminUserSettings.role` where necessary These changes improve internationalization coverage in the team management views and prevent layout issues in tight table columns through shared styling. @Frooodle merge after #3701 --- ## 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) - [ ] 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) - [ ] 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. --- .../resources/static/css/modern-tables.css | 9 +- .../templates/accounts/team-details.html | 366 +++++++++--------- .../resources/templates/accounts/teams.html | 48 ++- scripts/ignore_translation.toml | 1 - .../main/resources/messages_ar_AR.properties | 15 +- .../main/resources/messages_az_AZ.properties | 15 +- .../main/resources/messages_bg_BG.properties | 15 +- .../main/resources/messages_bo_CN.properties | 15 +- .../main/resources/messages_ca_CA.properties | 15 +- .../main/resources/messages_cs_CZ.properties | 15 +- .../main/resources/messages_da_DK.properties | 15 +- .../main/resources/messages_de_DE.properties | 93 +++-- .../main/resources/messages_el_GR.properties | 15 +- .../main/resources/messages_en_GB.properties | 15 +- .../main/resources/messages_en_US.properties | 15 +- .../main/resources/messages_es_ES.properties | 15 +- .../main/resources/messages_eu_ES.properties | 15 +- .../main/resources/messages_fa_IR.properties | 15 +- .../main/resources/messages_fr_FR.properties | 15 +- .../main/resources/messages_ga_IE.properties | 15 +- .../main/resources/messages_hi_IN.properties | 15 +- .../main/resources/messages_hr_HR.properties | 15 +- .../main/resources/messages_hu_HU.properties | 29 +- .../main/resources/messages_id_ID.properties | 15 +- .../main/resources/messages_it_IT.properties | 15 +- .../main/resources/messages_ja_JP.properties | 15 +- .../main/resources/messages_ko_KR.properties | 15 +- .../main/resources/messages_ml_IN.properties | 15 +- .../main/resources/messages_ml_ML.properties | 15 +- .../main/resources/messages_nl_NL.properties | 15 +- .../main/resources/messages_no_NB.properties | 15 +- .../main/resources/messages_pl_PL.properties | 15 +- .../main/resources/messages_pt_BR.properties | 15 +- .../main/resources/messages_pt_PT.properties | 15 +- .../main/resources/messages_ro_RO.properties | 15 +- .../main/resources/messages_ru_RU.properties | 15 +- .../main/resources/messages_sk_SK.properties | 15 +- .../main/resources/messages_sl_SI.properties | 15 +- .../resources/messages_sr_LATN_RS.properties | 15 +- .../main/resources/messages_sv_SE.properties | 15 +- .../main/resources/messages_th_TH.properties | 15 +- .../main/resources/messages_tr_TR.properties | 15 +- .../main/resources/messages_uk_UA.properties | 15 +- .../main/resources/messages_vi_VN.properties | 15 +- .../main/resources/messages_zh_CN.properties | 29 +- .../main/resources/messages_zh_TW.properties | 15 +- .../resources/templates/adminSettings.html | 9 +- 47 files changed, 779 insertions(+), 390 deletions(-) diff --git a/proprietary/src/main/resources/static/css/modern-tables.css b/proprietary/src/main/resources/static/css/modern-tables.css index 66bdd2aaf..156c39fed 100644 --- a/proprietary/src/main/resources/static/css/modern-tables.css +++ b/proprietary/src/main/resources/static/css/modern-tables.css @@ -384,4 +384,11 @@ padding: 0.75rem 1rem; border-radius: 0.5rem; border: 1px solid - } \ No newline at end of file +} + +.text-overflow { + max-width: 100px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} \ No newline at end of file diff --git a/proprietary/src/main/resources/templates/accounts/team-details.html b/proprietary/src/main/resources/templates/accounts/team-details.html index 81154c42d..aff0c4150 100644 --- a/proprietary/src/main/resources/templates/accounts/team-details.html +++ b/proprietary/src/main/resources/templates/accounts/team-details.html @@ -1,196 +1,200 @@ - - - - - + - - -
-
- - -
-
-
-

- - group - - Team Name -

+ + + + + + + +
+
+ + +
+
+
+

+ + group + + Team Name +

+
+ +
+
+
+
Total Members:
+
1
+
- -
-
-
-
Total Members:
-
1
-
-
- - - -
Members
- -
- - - - - - - - - - - - - - - - - - - -
IDUsernameRoleLast RequestStatus
1usernameRole2023-01-01 12:00:00 - - person - Enabled - - - person_off - Disabled - -
-
- - -
- person_off -

This team has no members yet.

- -
- - -
- -
+ + + +
Members
+ +
+ + + + + + + + + + + + + + + + + + + +
#UsernameRoleLast RequestStatus
1usernameRole + 2023-01-01 12:00:00 + + person + Enabled + + + person_off + Disabled + +
+
+ + +
+ person_off +

This team has no members yet.

+ +
+ + +
+
- - - - - - - -
- + + +
+ + \ No newline at end of file diff --git a/proprietary/src/main/resources/templates/accounts/teams.html b/proprietary/src/main/resources/templates/accounts/teams.html index 4d7c9f6a5..509c3f727 100644 --- a/proprietary/src/main/resources/templates/accounts/teams.html +++ b/proprietary/src/main/resources/templates/accounts/teams.html @@ -1,15 +1,20 @@ - + + - + + +
- +
@@ -20,7 +25,7 @@ Team Management
- +
@@ -29,19 +34,18 @@ Back to Settings
- + - +
@@ -49,7 +53,8 @@ - + @@ -58,18 +63,20 @@ - +
Team Name Total MembersLast RequestLast Request Actions
+
- + search View
+ onsubmit="return confirmDeleteTeam()"> - @@ -80,7 +87,7 @@
- +