Skip to content

Commit

Permalink
fix: error on getting lang file from inaccessible Crowdin distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
Fix3dll committed Nov 29, 2023
1 parent c85ffe2 commit 002f7ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,6 @@ private static void registerRemoteRequests() {
if (SkyblockAddons.getInstance().getConfigValues().getLanguage() != Language.ENGLISH) {
remoteRequests.add(new LocalizedStringsRequest(SkyblockAddons.getInstance().getConfigValues().getLanguage()));
}
// TODO fork and update data repo
remoteRequests.add(new ContainersRequest());
remoteRequests.add(new CompactorItemsRequest());
remoteRequests.add(new SeaCreaturesRequest());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ public class LocalizedStringsRequest extends RemoteFileRequest<JsonObject> {
public LocalizedStringsRequest(@NonNull Language language) {
//TODO: Fix this so it runs after getting language manifest
super(String.format(
"https://distributions.crowdin.net/d7578b29286a48bcaf7fec87zgb/content/main/src/main/resources/lang/%s.json",
language.getPath()),
new JSONResponseHandler<>(JsonObject.class),
!(language == Language.ENGLISH || language == Language.RUSSIAN), true);
"https://distributions.crowdin.net/d7578b29286a48bcaf7fec87zgb/content/main/src/main/resources/lang/%s.json"
, language.getPath()
)
, new JSONResponseHandler<>(JsonObject.class)
, false //!(language == Language.ENGLISH || language == Language.RUSSIAN)
, true
);
}

@Override
Expand Down

0 comments on commit 002f7ec

Please sign in to comment.