Skip to content

Commit 83547e6

Browse files
committed
Correction color, fix text manager bug
1 parent 56c7439 commit 83547e6

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/main/java/org/maxgamer/quickshop/util/language/text/TextManager.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class TextManager implements Reloadable {
3636
private final Distribution distribution;
3737
// <File <Locale, Section>>
3838
private final TextMapper mapper = new TextMapper();
39-
private final static String CROWDIN_LANGUAGE_FILE = "/master/crowdin/%locale%/messages.json";
39+
private final static String CROWDIN_LANGUAGE_FILE = "/master/crowdin/lang/%locale%/messages.json";
4040
public final List<PostProcessor> postProcessors = new ArrayList<>();
4141

4242

@@ -109,6 +109,7 @@ public void load() {
109109
return;
110110
}
111111
Util.debugLog("Loading translation for locale: " + crowdinCode + " (" + minecraftCode + ")");
112+
mapper.deployBundled(crowdinFile,loadBundled(crowdinFile));
112113
JsonConfiguration configuration = getDistributionConfiguration(crowdinFile, crowdinCode);
113114
// Loading override text (allow user modification the translation)
114115
JsonConfiguration override = getOverrideConfiguration(crowdinFile, minecraftCode);
@@ -124,8 +125,6 @@ public void load() {
124125
} catch (Exception e) {
125126
// Translation syntax error or other exceptions
126127
plugin.getLogger().log(Level.WARNING, "Couldn't update the translation for locale " + crowdinCode + ".", e);
127-
} finally {
128-
mapper.deployBundled(crowdinFile,loadBundled(crowdinFile));
129128
}
130129
}));
131130

src/main/java/org/maxgamer/quickshop/util/language/text/TextMapper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ public void removeBundled(@NotNull String distributionPath){
7676
*/
7777
public @Nullable JsonConfiguration getBundled(@NotNull String distributionPath){
7878
return this.bundledFile2ContentMapping.get(distributionPath);
79+
7980
}
8081
/**
8182
* Getting locales data under specific distribution data

src/main/resources/lang/messages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
"lock": "&eSwitch the shop's lock status",
180180
"taxaccount": "&eSet the tax account that shop using",
181181
"toggledisplay": "&eToggle the shop display item status",
182-
"purge": "&aStart the shop purge task in background"
182+
"purge": "&eStart the shop purge task in background"
183183
},
184184
"disabled": "&cThis command is disabled: &e{0}",
185185
"feature-not-enabled": "This feature is not enabled in the config file."

0 commit comments

Comments
 (0)