mirror of
				https://github.com/Frooodle/Stirling-PDF.git
				synced 2025-10-25 11:17:28 +02:00 
			
		
		
		
	Internationalize logout message (#3450)
# Description of Changes
Please provide a summary of the changes, including:
- **What was changed**  
- Controller now uses the `login.logoutMessage` i18n key instead of
hard-coded text.
- Added `login.logoutMessage` entry to `messages_de_DE.properties` and
`messages_en_GB.properties`.
- Updated `login.html` to resolve the logout message via
`th:text="#{…}"`.
- **Why the change was made**  
  - To support localization for logout feedback.
- To eliminate hard-coded strings from the view layer and rely on
message bundles.
before:

after:

---
## 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)
- [ ] 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)
- [x] 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.
			
			
This commit is contained in:
		
							parent
							
								
									4b86703082
								
							
						
					
					
						commit
						1377aa4f8d
					
				| @ -191,7 +191,7 @@ public class AccountWebController { | ||||
|         } | ||||
| 
 | ||||
|         if (request.getParameter("logout") != null) { | ||||
|             model.addAttribute("logoutMessage", "You have been logged out."); | ||||
|             model.addAttribute("logoutMessage", "login.logoutMessage"); | ||||
|         } | ||||
| 
 | ||||
|         return "login"; | ||||
|  | ||||
| @ -607,6 +607,7 @@ login.userIsDisabled=Benutzer ist deaktiviert, die Anmeldung ist mit diesem Benu | ||||
| login.alreadyLoggedIn=Sie sind bereits an | ||||
| login.alreadyLoggedIn2=Geräten angemeldet. Bitte melden Sie sich dort ab und versuchen es dann erneut. | ||||
| login.toManySessions=Sie haben zu viele aktive Sitzungen | ||||
| login.logoutMessage=Sie wurden erfolgreich abgemeldet. | ||||
| 
 | ||||
| #auto-redact | ||||
| autoRedact.title=Automatisch zensieren/schwärzen | ||||
|  | ||||
| @ -609,6 +609,7 @@ login.userIsDisabled=User is deactivated, login is currently blocked with this u | ||||
| login.alreadyLoggedIn=You are already logged in to | ||||
| login.alreadyLoggedIn2=devices. Please log out of the devices and try again. | ||||
| login.toManySessions=You have too many active sessions | ||||
| login.logoutMessage=You have been logged out. | ||||
| 
 | ||||
| #auto-redact | ||||
| autoRedact.title=Auto Redact | ||||
| @ -1432,7 +1433,7 @@ cookieBanner.preferencesModal.description.2=Stirling PDF cannot—and will never | ||||
| cookieBanner.preferencesModal.description.3=Your privacy and trust are at the core of what we do. | ||||
| cookieBanner.preferencesModal.necessary.title.1=Strictly Necessary Cookies | ||||
| cookieBanner.preferencesModal.necessary.title.2=Always Enabled | ||||
| cookieBanner.preferencesModal.necessary.description=These cookies are essential for the website to function properly. They enable core features like setting your privacy preferences, logging in, and filling out forms—which is why they can’t be turned off.  | ||||
| cookieBanner.preferencesModal.necessary.description=These cookies are essential for the website to function properly. They enable core features like setting your privacy preferences, logging in, and filling out forms—which is why they can’t be turned off. | ||||
| cookieBanner.preferencesModal.analytics.title=Analytics | ||||
| cookieBanner.preferencesModal.analytics.description=These cookies help us understand how our tools are being used, so we can focus on building the features our community values most. Rest assured—Stirling PDF cannot and will never track the content of the documents you work with. | ||||
| 
 | ||||
|  | ||||
| @ -112,7 +112,7 @@ | ||||
|             <div th:if="${error}" th:text="#{${error}}">OAuth2: Error Message</div> | ||||
|           </div> | ||||
|           <div class="text-danger text-center"> | ||||
|             <div th:if="${logoutMessage}" class="alert alert-success" th:text="${logoutMessage}"></div> | ||||
|             <div th:if="${logoutMessage}" class="alert alert-success" th:text="#{${logoutMessage}}"></div> | ||||
|             <div th:if="${messageType}" class="alert alert-success"> | ||||
|               <span th:text="#{${messageType}}">Default message if not found</span> | ||||
|             </div> | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user