mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-15 21:26:04 -05:00
Fixed #1059
This commit is contained in:
1 parent
e3bad0b1d3
commit
30168ee7b0
1 file changed
+5
@@ -25,6 +25,7 @@ import com.google.gson.JsonParser;
|
||||
import lombok.Getter;
|
||||
import lombok.SneakyThrows;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
@@ -69,6 +70,10 @@ public class MojangGameLanguageImpl extends BukkitGameLanguageImpl implements Ga
|
||||
if ("default".equalsIgnoreCase(languageCode)) {
|
||||
Locale locale = Locale.getDefault();
|
||||
languageCode = locale.getLanguage() + "_" + locale.getCountry();
|
||||
if (StringUtils.isEmpty(locale.getCountry())) {
|
||||
languageCode = locale.toLanguageTag();
|
||||
plugin.getLogger().info("Your system offer empty data about local country, we will fallback to system language default country, current language set to " + languageCode + ". If it incorrect, please edit it in config.yml.");
|
||||
}
|
||||
}
|
||||
languageCode = languageCode.replace("-", "_").toLowerCase(Locale.ROOT);
|
||||
lock.lock();
|
||||
|
||||
Reference in new issue
Block a user