Skip to content

Commit

Permalink
Use newLine not \n
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakShearman committed May 9, 2022
1 parent 7f9a16d commit 14c7e38
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,7 @@ public LanguageRepository(GitHub apiClient, ObjectMapper objectMapper, Jedis jed
this.jedis = jedis;
}

public Map<ServerType, Map<Language, Map<String, String>>> getLanguageKeys() {
return this.languageKeys;
}

@Scheduled(initialDelay = 0, fixedRate = 30, timeUnit = TimeUnit.SECONDS)
@Scheduled(initialDelay = 0, fixedRate = 1, timeUnit = TimeUnit.MINUTES)
protected void updateLanguages() throws IOException {
GHCommit latestCommit = this.repository.listCommits().toList().get(0);
String latestSha = latestCommit.getSHA1();
Expand Down Expand Up @@ -106,8 +102,8 @@ private Map<ServerType, Map<Language, Map<String, String>>> loadLanguages() thro
for (Map.Entry<Language, Map<String, String>> innerEntry : entry.getValue().entrySet()) {
LOGGER.info("{}: {} strings", innerEntry.getKey().toString().toLowerCase(Locale.ROOT), innerEntry.getValue().size());
}
LOGGER.info("-------------------");
}
LOGGER.info("-------------------");

return newLanguageKeys;
}
Expand All @@ -121,7 +117,7 @@ private Map<String, String> parseLanguage(Config config) {
languageKeys.put(key, value);
} else if (configValue.valueType() == ConfigValueType.LIST) {
List<String> value = (List<String>) configValue.unwrapped();
languageKeys.put(key, String.join("\n", value));
languageKeys.put(key, String.join("<newLine>", value));
} else {
LOGGER.error("Mismatched language key? " + configValue.origin() + " with value " + configValue);
}
Expand Down Expand Up @@ -176,4 +172,8 @@ public void cleanup() throws IOException {
Path tempPath = Path.of("tmp");
Files.delete(tempPath);
}

public Map<ServerType, Map<Language, Map<String, String>>> getLanguageKeys() {
return this.languageKeys;
}
}

0 comments on commit 14c7e38

Please sign in to comment.