Skip to content

Commit

Permalink
Translate column selection menu entries on task list page
Browse files Browse the repository at this point in the history
  • Loading branch information
solth committed Nov 21, 2024
1 parent 8faef1c commit 059194b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
12 changes: 1 addition & 11 deletions Kitodo/src/main/java/org/kitodo/production/helper/Helper.java
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ private static void loadMessages() {
* @return translated String
*/
public static String getTranslation(String title, String... insertions) {
String pattern = getString(desiredLanguage(), title);
String pattern = getString(LocaleHelper.getCurrentLocale(), title);
String message = pattern;
try {
message = MessageFormat.format(pattern, (Object[]) insertions);
Expand Down Expand Up @@ -505,16 +505,6 @@ private static String appendUnusedInsertions(String message, String... insertion
return message;
}

private static Locale desiredLanguage() {
if (Objects.nonNull(FacesContext.getCurrentInstance())) {
Locale desiredLanguage = FacesContext.getCurrentInstance().getViewRoot().getLocale();
if (Objects.nonNull(desiredLanguage)) {
return desiredLanguage;
}
}
return Locale.ENGLISH;
}

/**
* Set activeMQReporting.
*
Expand Down
1 change: 1 addition & 0 deletions Kitodo/src/main/resources/messages/messages_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,7 @@ startIndexingAll=Komplette Indexierung starten
startIndexingRemaining=Indexierung vervollst\u00E4ndigen
startPage=Startseite
statisticalEvaluation=Statistische Auswertung
state=Status
stateOfVolume=Status der B\u00E4nde
status=Status
statusDone=Abgeschlossen
Expand Down
1 change: 1 addition & 0 deletions Kitodo/src/main/resources/messages/messages_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,7 @@ startIndexingAll=Start indexing for all
startIndexingRemaining=Start indexing for not indexed
startPage=Home page
statisticalEvaluation=Statistical evaluation
state=State
stateOfVolume=State of volumes
status=Status
statusDone=Completed
Expand Down
1 change: 1 addition & 0 deletions Kitodo/src/main/resources/messages/messages_es.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,7 @@ startIndexingAll=Iniciar la indexación completa
startIndexingRemaining=Indexación completa
startPage=Página de inicio
statisticalEvaluation=Análisis estadístico
state=Estado
stateOfVolume=Estado de los volúmenes
status=Estado
statusDone=Completado
Expand Down

0 comments on commit 059194b

Please sign in to comment.