Use method in Locales class for text truncation

This commit is contained in:
William278 committed 2023-03-25 14:24:30 +00:00
1 parent 34fdb88d5c
commit 121d93ab44
4 files changed
+4 -10

No files matched your search

@@ -41,9 +41,6 @@ public class Locales {
* @return An {@link Optional} containing the locale corresponding to the id, if it exists
*/
public Optional<String> getRawLocale(@NotNull String localeId) {
if (!rawLocales.containsKey(localeId)) { // debug
return Optional.of(localeId + " (missing locale)"); // debug
} // debug
return Optional.ofNullable(rawLocales.get(localeId)).map(StringEscapeUtils::unescapeJava);
}