Skip to content

Commit

Permalink
Fix lang when the version is snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioZumbi12 committed Aug 19, 2024
1 parent b635fd3 commit 5cac94a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ private void loadLang() {
}

if (loadedlang.get("_lang.version") != null) {
int langv = Integer.parseInt(loadedlang.get("_lang.version").toString().replace(".", ""));
int langv = Integer.parseInt(loadedlang.get("_lang.version").toString().split("-")[0].replace(".", ""));
int rpv = Integer.parseInt(UChat.get().getPDF().getVersion().split("-")[0].replace(".", ""));
if (langv < rpv || langv == 0) {
UChat.get().getUCLogger().warning("Your lang file is outdated. Probally need strings updates!");
UChat.get().getUCLogger().warning("Your lang file is outdated. Probably need strings updates!");
UChat.get().getUCLogger().warning("Lang file version: " + loadedlang.get("_lang.version"));
loadedlang.put("_lang.version", UChat.get().getPDF().getVersion());
}
Expand Down

0 comments on commit 5cac94a

Please sign in to comment.