Skip to content

Commit

Permalink
avoid single line return
Browse files Browse the repository at this point in the history
  • Loading branch information
rymiel committed Jan 30, 2024
1 parent f481bbe commit 47951d7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions common/src/main/java/org/popcraft/bolt/lang/Translator.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ public static String translate(final String key, final Locale locale) {

private static String tryGetProperty(final String key, final Locale locale) {
final Properties properties = languages.get(locale);
if (properties == null) return null;
if (properties == null) {
return null;
}

return properties.getProperty(key);
}
Expand All @@ -80,7 +82,9 @@ public static void loadAllTranslations(final Path directory, final String prefer
try (final FileSystem fileSystem = FileSystems.newFileSystem(uri, Collections.emptyMap());
Stream<Path> files = Files.list(fileSystem.getPath("lang/"))) {
files.forEach(path -> {
if (!path.toString().endsWith(".properties")) return;
if (!path.toString().endsWith(".properties")) {
return;
}

final Locale locale = parseLocale(path.getFileName().toString().split("\\.", 2)[0]);
final Properties properties = loadTranslation(locale.toString());
Expand Down

0 comments on commit 47951d7

Please sign in to comment.