Skip to content

Commit

Permalink
sabi-68 Added Spanish, Italian, French as supported locales (#155)
Browse files Browse the repository at this point in the history
* fixes #sabi-113 (#152)

fixes sabi-113 HTTP.500 after login (returned users)

* fixes sabi-68 (#154)

Adding Spanish resource bundles
Patch-Management on Server Module
Added French, Italian as well
Added flags to the selection dialog
DisplayLanguage is set in it's own Locale.
  • Loading branch information
StefanSchubert committed Feb 25, 2024
1 parent 6833250 commit 2264116
Show file tree
Hide file tree
Showing 20 changed files with 729 additions and 26 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# History of changes (since 5/2022)

## Release 1.2.6

### Enhancements
* SABI-68: Spanish ressource bundles added
** THX to deepl I added French, Italian as well

### Technical Maintenance

* SABI-128 Additional TLS on Backend component (required by aquarium-IoT project)

## Release 1.2.5

### Bugfixes
Expand Down
4 changes: 2 additions & 2 deletions sabi-boundary/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2023 by Stefan Schubert under the MIT License (MIT).
~ Copyright (c) 2024 by Stefan Schubert under the MIT License (MIT).
~ See project LICENSE file for the detailed terms and conditions.
-->

Expand All @@ -12,7 +12,7 @@

<groupId>de.bluewhale</groupId>
<artifactId>sabi-boundary</artifactId>
<version>1.2.5</version>
<version>1.2.6</version>
<packaging>jar</packaging>
<description>
Contains the DTOs and Utility classes which will be used by the server and client module.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 by Stefan Schubert under the MIT License (MIT).
* Copyright (c) 2024 by Stefan Schubert under the MIT License (MIT).
* See project LICENSE file for the detailed terms and conditions.
*/

Expand All @@ -16,7 +16,10 @@
*/
public enum SupportedLocales {
German(Locale.GERMAN),
English(Locale.ENGLISH);
English(Locale.ENGLISH),
French(Locale.FRENCH),
Italian(Locale.ITALIAN),
Spanish(new Locale("es"));

private Locale locale;

Expand Down
16 changes: 8 additions & 8 deletions sabi-server/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2023 by Stefan Schubert under the MIT License (MIT).
~ Copyright (c) 2024 by Stefan Schubert under the MIT License (MIT).
~ See project LICENSE file for the detailed terms and conditions.
-->

Expand All @@ -19,7 +19,7 @@

<groupId>de.bluewhale</groupId>
<artifactId>sabi-server</artifactId>
<version>1.3.4</version>
<version>1.3.5</version>
<packaging>jar</packaging>
<description>Backend consistent of internal CRUD services which will be used by the REST service orchestration
</description>
Expand All @@ -40,20 +40,20 @@
</developers>

<properties>
<sabi.boundary.version>1.2.5</sabi.boundary.version>
<sabi.boundary.version>1.2.6</sabi.boundary.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>21</java.version>
<log4j2.version>2.20.0</log4j2.version>
<springdoc.openapiv2.version>2.3.0</springdoc.openapiv2.version>
<eclipselink.version>4.0.2</eclipselink.version>
<mapstruct.version>1.5.5.Final</mapstruct.version>
<micrometer.prometheus.version>1.12.1</micrometer.prometheus.version>
<spring.instrument.version>6.1.2</spring.instrument.version>
<micrometer.prometheus.version>1.12.3</micrometer.prometheus.version>
<spring.instrument.version>6.1.4</spring.instrument.version>
<lombok.version>1.18.30</lombok.version>
<owasp.plugin.version>9.0.7</owasp.plugin.version>
<owasp.plugin.version>9.0.9</owasp.plugin.version>
<passay.version>1.6.4</passay.version>
<mariadb.java.client.version>3.3.2</mariadb.java.client.version>
<mariadb.java.client.version>3.3.3</mariadb.java.client.version>
<h2.version>2.2.224</h2.version>
<!-- <h2.version>2.1.214</h2.version>-->
<dumbster.version>1.6</dumbster.version>
Expand All @@ -62,7 +62,7 @@
<jakarta.xml.bind.version>4.0.1</jakarta.xml.bind.version>
<jetbrains.annotation.version>24.1.0</jetbrains.annotation.version>
<versions.maven.plugin.version>2.16.2</versions.maven.plugin.version>
<maven-surefire-plugin.version>3.2.3</maven-surefire-plugin.version>
<maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#
# Copyright (c) 2022 por Stefan Schubert bajo la Licencia MIT (MIT).
# Ver el archivo LICENSE del proyecto para los t\u00E9rminos y condiciones detallados.
#

email.verify.failed.response.headline=\u00A1Fall\u00F3 la validaci\u00F3n de la cuenta!
email.verify.failed.response.txt=Tu cuenta sigue bloqueada. \u00BFHa copiado el enlace de validaci\u00F3n completo en su navegador? Int\u00E9ntalo de nuevo.
email.verify.successful.response.headline=\u00A1Bienvenido al proyecto SABI-IP!
email.verify.successful.response.txt=Su correo electr\u00F3nico ha sido validado. Ahora puede iniciar sesi\u00F3n a trav\u00E9s de \
<a href="https://sabi-project.net/login.html">https://sabi-project.net/login.html</a> con su cuenta. \
Gracias por apoyar la ciencia abierta con sabi.
email.verify.token.request.headline=\u00A1Bienvenido al proyecto SABI-IP!
email.verify.token.request.txt=Para activar tu cuenta y participar en el proyecto sabi \
necesitamos verificar su direcci\u00F3n de correo electr\u00F3nico. Para ello, por favor \
haga clic en el siguiente enlace o c\u00F3pielo y p\u00E9guelo en su navegador:
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#
# Copyright (c) 2022 par Stefan Schubert sous la licence MIT (MIT).
# Voir le fichier LICENSE du projet pour les termes et conditions d\u00E9taill\u00E9s.
#

email.verify.failed.response.headline=La validation du compte a \u00E9chou\u00E9 !
email.verify.failed.response.txt=Votre compte est toujours bloqu\u00E9. Avez-vous copi\u00E9 le lien de validation complet dans votre navigateur web ? Veuillez r\u00E9essayer.
email.verify.successful.response.headline=Bienvenue au projet SABI-IP !
email.verify.successful.response.txt=Votre email a \u00E9t\u00E9 valid\u00E9. Vous pouvez maintenant vous connecter via \
<a href="https://sabi-project.net/login.html">https://sabi-project.net/login.html</a> avec votre compte. \
Merci de soutenir la science ouverte avec sabi.
email.verify.token.request.headline=Bienvenue au projet SABI-IP !
email.verify.token.request.txt=Pour activer votre compte et participer au projet sabi, nous avons besoin de v\u00E9rifier votre adresse \u00E9lectronique. \
nous avons besoin de v\u00E9rifier votre adresse e-mail. Pour ce faire, veuillez cliquer sur le lien suivant ou copier-coller \
cliquer sur le lien suivant ou le copier-coller dans votre navigateur :
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#
# Copyright (c) 2024 by Stefan Schubert under the MIT License (MIT).
# See project LICENSE file for the detailed terms and conditions.
#

email.verify.failed.response.headline=Convalida dell'account fallita!
email.verify.failed.response.txt=Il tuo account \u00E8 ancora bloccato. Avete copiato il link di convalida completo nel vostro browser? Riprova.
email.verify.successful.response.headline=Benvenuto nel progetto SABI-IP!
email.verify.successful.response.txt=La tua email \u00E8 stata convalidata. Ora puoi accedere tramite \
<a href="https://sabi-project.net/login.html">https://sabi-project.net/login.html</a> con il tuo account. \
Grazie per aver sostenuto la scienza aperta con sabi.
email.verify.token.request.headline=Benvenuto nel progetto SABI-IP!
email.verify.token.request.txt=Per attivare il tuo account e partecipare al progetto sabi \
abbiamo bisogno di verificare il tuo indirizzo e-mail. Per fare ci\u00F2, per favore \
cliccare sul seguente link o copiarlo e incollarlo nel browser:
4 changes: 2 additions & 2 deletions sabi-webclient/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<groupId>de.bluewhale</groupId>
<artifactId>sabi-webclient</artifactId>
<version>1.2.5</version>
<version>1.2.6</version>
<packaging>jar</packaging>
<name>sabi-webclient</name>
<description>A JSF based webclient for sabi.</description>
Expand Down Expand Up @@ -59,7 +59,7 @@
<jakarta.cdi.version>4.0.1</jakarta.cdi.version>
<micrometer.prometheus.version>1.12.3</micrometer.prometheus.version>
<joinfaces.version>5.2.2</joinfaces.version>
<sabi.boundary.version>1.2.5</sabi.boundary.version>
<sabi.boundary.version>1.2.6</sabi.boundary.version>
<passay.version>1.6.4</passay.version>
<owasp.plugin.version>9.0.9</owasp.plugin.version>
<lombok.version>1.18.30</lombok.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,16 @@ public Boolean getHasMeasurementReminders() {
return !measurementReminderTos.isEmpty();
}

/**
* Used as Workaround to create dynamic images resources
* @return
*/
public String getFlagResource(Locale c) {
return "images:icons8-flag-" + c.getLanguage() + "-48.png";
}



public String save() {
if (selectedLocale != null) {
// Already stored
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 by Stefan Schubert under the MIT License (MIT).
* Copyright (c) 2024 by Stefan Schubert under the MIT License (MIT).
* See project LICENSE file for the detailed terms and conditions.
*/

Expand Down Expand Up @@ -45,7 +45,7 @@ public Locale getEnsuredSupportedLocale(String language) {


/**
* Uses to distinguish users decimal seperator, depending on provided locale, which will be the sessions locale settings
* Uses to distinguish users decimal separator, depending on provided locale, which will be the sessions locale settings
* in most cases. However you may request other punctuation than sessions locale through the locale parameter.
*
* @param forLocale
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
Every Picture used in Sabi needs to register here with the origin and license.
So that we are able to give information on that in doubt of any copyright issue.

| Filename | Origin | License info | Remark |
|------------|----------|----------------|--------|
| RiffStefan2.png | Sabi Authors Private Stock | Free usage within Sabi | Used for the splash screen |
| icons8-crab-64.png | https://icons8.com/icon/9232/crab-filled/ | Creative Commons Attribution-NoDervis 3.0 Unported. | Got permission from Elena and confirmation about the credits link. |
| ByeBye.png | Sabi Authors Private Stock | Free usage within Sabi | Used in LogOff Page |
| Clibanarius.JPG | Sabi Authors Private Stock | Free usage within Sabi | Used as template for ByeBye.jpg and maybe in error pages. |
| pathfinder.jpg | Sabi Authors Private Stock | Free usage within Sabi | Used in Impressum page. |
| Filename | Origin | License info | Remark |
|--------------------|----------|-----------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| RiffStefan2.png | Sabi Authors Private Stock | Free usage within Sabi | Used for the splash screen |
| icons8-crab-64.png | https://icons8.com/icon/9232/crab-filled/ | Creative Commons Attribution-NoDervis 3.0 Unported. | Got permission from Elena and confirmation about the credits link. |
| icons8-flags-* | https://icons8.com/icon/set/flags/family-hand-drawn-2 | Free download version 48pt | Used in User Profile Page for language selection. Original filenames have been slightly modified to ease programmatic selection. Icons8 mentioned and linked from Apps credit page. |
| ByeBye.png | Sabi Authors Private Stock | Free usage within Sabi | Used in LogOff Page |
| Clibanarius.JPG | Sabi Authors Private Stock | Free usage within Sabi | Used as template for ByeBye.jpg and maybe in error pages. |
| pathfinder.jpg | Sabi Authors Private Stock | Free usage within Sabi | Used in Impressum page. |

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2023 by Stefan Schubert under the MIT License (MIT).
- Copyright (c) 2024 by Stefan Schubert under the MIT License (MIT).
- See project LICENSE file for the detailed terms and conditions.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
Expand Down Expand Up @@ -42,13 +42,23 @@
<p:outputLabel for="localeselection" value="#{msg['userprofile.localechoice.l']}"/>
<p:selectOneMenu id="localeselection"
value="#{userProfileView.selectedLocale}"
widgetVar="n">
widgetVar="n" var="c">
<pe:convertLocale/>
<f:selectItems value="#{userProfileView.supportedLocales}"
var="n"
itemValue="#{n.locale}"
itemLabel="#{n.locale.getDisplayName()}"
itemLabel="#{n.locale.getDisplayLanguage(n.locale)}"
/>

<p:column>
<img src="#{resource[userProfileView.getFlagResource(c)]}"
alt="#{c.getLanguage()}-Lang Flag"
width="24px" height="24px"/>
</p:column>
<p:column>
<h:outputText value="#{c.getDisplayLanguage(c)}"/>
</p:column>

</p:selectOneMenu>

<p:commandButton id="updateLocale"
Expand Down
Loading

0 comments on commit 2264116

Please sign in to comment.