does not load the language file it
Peppe-73 opened this issue ยท 13 comments
Preliminaries:
- Shopkeepers version:
<2.15.1>
- Spigot version:
<1.18.2>
It does not load the file of the Italian language, how do I fix it !!! thank you
[18:49:30 WARN]: [Shopkeepers] Could not find language file 'language-language-it.yml'!
Does your "/Shopkeepers/lang/" folder contain a file named "language-language-it.yml"?
Then either:
- Change your config so that it contains
language: it
instead oflanguage: language-it
- Or: Rename your language file to
language-language-it.yml
.
i tried to do the following:
file config it
language file language-language-it
it does not work
i tried the following
config file language-it
language file language-language-it
it does not work
My guess is that you get a different error in your server log once you try one of the file name / config combinations I mentioned above. Please post this other error.
My guess is that there is an issue with your language file. So please upload (e.g. to pastebin.com) your language file and leave a link to it here.
file:///D:/Server%20Locale%201.18.2/plugins/Shopkeepers/lang/language-language-it.yml
You need to upload the file contents somewhere, e.g. here: https://pastebin.com/
Like I suspected, there is an issue with your language file. When I try to load it I get this error:
[19:17:18] [Server thread/WARN]: [Shopkeepers] Could not load language file 'language-it.yml'!
com.nisovin.shopkeepers.util.data.persistence.InvalidDataFormatException: Failed to load data as Bukkit config!
at com.nisovin.shopkeepers.util.data.persistence.bukkit.BukkitConfigDataStore.loadFromString(BukkitConfigDataStore.java:63) ~[?:?]
at com.nisovin.shopkeepers.util.data.persistence.DataStoreBase.load(DataStoreBase.java:58) ~[?:?]
at com.nisovin.shopkeepers.util.data.persistence.DataStoreBase.load(DataStoreBase.java:35) ~[?:?]
at com.nisovin.shopkeepers.util.data.persistence.DataStoreBase.load(DataStoreBase.java:29) ~[?:?]
at com.nisovin.shopkeepers.lang.Messages.loadLanguageFile(Messages.java:808) ~[?:?]
at com.nisovin.shopkeepers.SKShopkeepersPlugin.onEnable(SKShopkeepersPlugin.java:290) ~[?:?]
at com.nisovin.shopkeepers.SKShopkeepersPlugin.reload(SKShopkeepersPlugin.java:511) ~[?:?]
at com.nisovin.shopkeepers.commands.shopkeepers.CommandReload.execute(CommandReload.java:34) ~[?:?]
at com.nisovin.shopkeepers.commands.lib.Command.processCommand(Command.java:619) ~[?:?]
at com.nisovin.shopkeepers.commands.lib.Command.processCommand(Command.java:606) ~[?:?]
at com.nisovin.shopkeepers.commands.lib.Command.handleCommand(Command.java:509) ~[?:?]
at com.nisovin.shopkeepers.commands.lib.BaseCommand.onCommand(BaseCommand.java:92) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[spigot-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[spigot-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_18_R2.CraftServer.dispatchCommand(CraftServer.java:825) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:dev-Spigot-ffceeae-d53c4fb]
at org.bukkit.craftbukkit.v1_18_R2.CraftServer.dispatchServerCommand(CraftServer.java:810) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:dev-Spigot-ffceeae-d53c4fb]
at net.minecraft.server.dedicated.DedicatedServer.be(DedicatedServer.java:454) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:dev-Spigot-ffceeae-d53c4fb]
at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:430) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:dev-Spigot-ffceeae-d53c4fb]
at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1237) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:dev-Spigot-ffceeae-d53c4fb]
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1047) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:dev-Spigot-ffceeae-d53c4fb]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:dev-Spigot-ffceeae-d53c4fb]
at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: org.bukkit.configuration.InvalidConfigurationException: while parsing a block mapping
in 'reader', line 9, column 1:
date-time-format: "dd-MM-yyyy HH ...
^
expected <block end>, but found '<scalar>'
in 'reader', line 241, column 77:
... o per posizionare il negoziante".
^
at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:104) ~[spigot-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at com.nisovin.shopkeepers.util.bukkit.ConfigUtils.loadConfigSafely(ConfigUtils.java:240) ~[?:?]
at com.nisovin.shopkeepers.util.data.persistence.bukkit.BukkitConfigDataStore.loadFromString(BukkitConfigDataStore.java:61) ~[?:?]
... 21 more
Caused by: org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping
in 'reader', line 9, column 1:
date-time-format: "dd-MM-yyyy HH ...
^
expected <block end>, but found '<scalar>'
in 'reader', line 241, column 77:
... o per posizionare il negoziante".
^
at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:644) ~[snakeyaml-1.30.jar:?]
at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:166) ~[snakeyaml-1.30.jar:?]
at org.yaml.snakeyaml.comments.CommentEventsCollector$1.peek(CommentEventsCollector.java:59) ~[snakeyaml-1.30.jar:?]
at org.yaml.snakeyaml.comments.CommentEventsCollector$1.peek(CommentEventsCollector.java:45) ~[snakeyaml-1.30.jar:?]
at org.yaml.snakeyaml.comments.CommentEventsCollector.collectEvents(CommentEventsCollector.java:140) ~[snakeyaml-1.30.jar:?]
at org.yaml.snakeyaml.comments.CommentEventsCollector.collectEvents(CommentEventsCollector.java:119) ~[snakeyaml-1.30.jar:?]
at org.yaml.snakeyaml.composer.Composer.composeScalarNode(Composer.java:214) ~[snakeyaml-1.30.jar:?]
at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:184) ~[snakeyaml-1.30.jar:?]
at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:314) ~[snakeyaml-1.30.jar:?]
at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:305) ~[snakeyaml-1.30.jar:?]
at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:286) ~[snakeyaml-1.30.jar:?]
at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:188) ~[snakeyaml-1.30.jar:?]
at org.yaml.snakeyaml.composer.Composer.getNode(Composer.java:115) ~[snakeyaml-1.30.jar:?]
at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:142) ~[snakeyaml-1.30.jar:?]
at org.yaml.snakeyaml.Yaml.compose(Yaml.java:575) ~[snakeyaml-1.30.jar:?]
at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:102) ~[spigot-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at com.nisovin.shopkeepers.util.bukkit.ConfigUtils.loadConfigSafely(ConfigUtils.java:240) ~[?:?]
at com.nisovin.shopkeepers.util.data.persistence.bukkit.BukkitConfigDataStore.loadFromString(BukkitConfigDataStore.java:61) ~[?:?]
... 21 more
This error indicates that the file is not in a valid yaml format.
For example: You have a lot of lines that end with ".
which is not valid yaml. For example line 241 is must-target-block: "&7Devi guardare un blocco per posizionare il negoziante".
but should be must-target-block: "&7Devi guardare un blocco per posizionare il negoziante."
. The same applies to a lot of other lines in your language file.
There are several issues. The easiest to find and fix these issue is for you to use something like: https://yamlchecker.com/
This tool will show you the lines that are wrongly formatted.
Once these formatting issues are fixed, there are a few more issues that you need to fix:
[19:26:51] [Server thread/WARN]: [Shopkeepers] Language: Unknown message: valuta sconosciuta
[19:26:51] [Server thread/WARN]: [Shopkeepers] Language: Unknown message: valuta-oggetti-regalati
[19:26:51] [Server thread/WARN]: [Shopkeepers] Language: Unknown message: valuta-oggetti-ricevuti
[19:26:51] [Server thread/WARN]: [Shopkeepers] Language: Unknown message: elementi-convertiti
[19:26:51] [Server thread/WARN]: [Shopkeepers] Language: Unknown message: vendita-shop.empty-trade.result-item
[19:26:51] [Server thread/WARN]: [Shopkeepers] Language: Unknown message: libreria.empty-trade.result-item
[19:26:51] [Server thread/WARN]: [Shopkeepers] Language: Missing message: unknown-currency
[19:26:51] [Server thread/WARN]: [Shopkeepers] Language: Missing message: currency-items-given
[19:26:51] [Server thread/WARN]: [Shopkeepers] Language: Missing message: currency-items-received
[19:26:51] [Server thread/WARN]: [Shopkeepers] Language: Missing message: items-converted
[19:26:51] [Server thread/WARN]: [Shopkeepers] Language: Missing message: selling-shop.empty-trade.result-item
[19:26:51] [Server thread/WARN]: [Shopkeepers] Language: Missing message: book-shop.empty-trade.result-item
My guess is that you translated some of the message keys. These keys need to be kept in english because the plugin uses them to look up the message.
This file works for me: https://pastebin.com/uhLu2wQw
By the way, if you want to contribute your language file, so that others can use it too, either upload it here: https://github.com/Shopkeepers/Language-Files
Or, if you are having trouble uploading the file yourself, give me your okay and I will upload it for you.
The same applies whenever you update your language file: Just let me know (e.g. by creating a ticket) and send me your uploaded language file (e.g. via pastebin.com), and I will then upload it to that repository.