Skip to content

Commit

Permalink
Fix Localization problems by copying resource bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
dnl50 authored and Daniel Meier committed Feb 22, 2022
1 parent d62d84e commit f10b042
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
8 changes: 8 additions & 0 deletions web/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,11 @@ dependencies {
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")

}

// Copies each english properties resource bundle file into a file with the resource bundle's default name
tasks.processResources {
from("src/main/resources/") {
include("*_en.properties")
rename("(.*)_en.properties", "$1.properties")
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package dev.mieser.tsa.web.config;

import static java.util.Locale.ENGLISH;
import static java.util.Locale.GERMAN;

import java.util.List;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand All @@ -27,7 +24,6 @@ public void addFormatters(FormatterRegistry registry) {
@Bean
LocaleResolver localeResolver() {
var localeResolver = new AcceptHeaderLocaleResolver();
localeResolver.setSupportedLocales(List.of(ENGLISH, GERMAN));
localeResolver.setDefaultLocale(ENGLISH);

return localeResolver;
Expand Down
File renamed without changes.

0 comments on commit f10b042

Please sign in to comment.