From 8bebe450d9b84c6d77698886fb49efc82486c3b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Laugks?= Date: Fri, 4 Oct 2024 15:44:59 +0200 Subject: [PATCH 1/2] Use HTML character entities --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 968ff49..66ce58b 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ The class XliffTranslationMessageSource implements the [MessageSource](https://d * Default locale is `en`. * The XLIFF files are stored in `src/main/resources/translations`. -#### Version >= 2.0.0 +#### Version >= 2.0.0 ```java import io.github.alaugks.spring.messagesource.xliff.XliffResourceMessageSource; @@ -70,7 +70,7 @@ public class MessageSourceConfig { } ``` -#### Version <= 1.3.0 +#### Version <= 1.3.0 ```java import de.alaugks.spring.XliffTranslationMessageSource; From 72b0cde52a2fd4eef81cbd959ec88baeccde064d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Laugks?= Date: Fri, 11 Oct 2024 11:19:28 +0200 Subject: [PATCH 2/2] Remove parts --- README.md | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/README.md b/README.md index 66ce58b..5105d2c 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,6 @@ implementation group: 'io.github.alaugks', name: 'spring-messagesource-xliff', v ## MessageSource Configuration -The class XliffTranslationMessageSource implements the [MessageSource](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/context/MessageSource.html) interface. - `builder(Locale defaultLocale, String locationPattern)` or
`builder(Locale defaultLocale, List locationPatterns)` (***required***) * Argument `Locale locale`: Defines the default locale. @@ -45,8 +43,6 @@ The class XliffTranslationMessageSource implements the [MessageSource](https://d * Default locale is `en`. * The XLIFF files are stored in `src/main/resources/translations`. -#### Version >= 2.0.0 - ```java import io.github.alaugks.spring.messagesource.xliff.XliffResourceMessageSource; import org.springframework.context.MessageSource; @@ -70,30 +66,6 @@ public class MessageSourceConfig { } ``` -#### Version <= 1.3.0 - -```java -import de.alaugks.spring.XliffTranslationMessageSource; -import org.springframework.context.MessageSource; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -import java.util.Locale; - -@Configuration -public class MessageSourceConfig { - - @Bean - public MessageSource messageSource() { - XliffTranslationMessageSource messageSource = new XliffTranslationMessageSource(); - messageSource.setDefaultLocale(Locale.forLanguageTag("en")); - messageSource.setBasenamePattern("translations/*"); - return messageSource; - } - -} -``` - ## XLIFF Files * Translations can be separated into different files (domains). The default domain is `messages`.