Skip to content

Commit

Permalink
fix: change system arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
AzaleeX committed Aug 28, 2024
1 parent ba638bf commit 443d6b9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 21 deletions.
5 changes: 4 additions & 1 deletion src/main/java/org/sculk/lang/LanguageManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ public static String getLanguage() {

public String tr(LanguageKeys key, Object... params) {
String pattern = currentLanguage.getProperty(String.valueOf(key), "Translation not found");
return MessageFormat.format(pattern, params);
for (int i = 0; i < params.length; i++) {
pattern = pattern.replace("{" + "%" + i + "}", params[i].toString());
}
return pattern;
}

public String tr(LanguageKeys key) {
Expand Down
19 changes: 9 additions & 10 deletions src/main/resources/language/eng.ini
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
sculk.server.starting=Starting {0} software version {1}
sculk.server.loading=Loading {0}...
sculk.server.starting=Starting {%0} software version {%1}
sculk.server.loading=Loading {%0}...
sculk.server.loading.commands=Loading commands...
sculk.server.selected.language=Selected language: {0}
sculk.server.starting.version=Starting Minecraft: Bedrock Edition server version {0}
sculk.server.selected.language=Selected language: {%0}
sculk.server.starting.version=Starting Minecraft: Bedrock Edition server version {%0}
sculk.server.loading.plugins=Loading all plugins...
sculk.server.success.plugin=Loading plugin {0}...
sculk.server.success.plugin=Loading plugin {%0}...
sculk.server.plugins.loaded=All plugins have been successfully loaded
sculk.server.network.interface.running=Minecraft network interface running on {0}
sculk.server.failed.bind=**** FAILED TO BIND TO {0}
sculk.server.network.interface.running=Minecraft network interface running on {%0}
sculk.server.failed.bind=**** FAILED TO BIND TO {%0}
sculk.server.server.already.running=Perhaps a server is already running on that port?
sculk.server.online.mode.enabled=Online mode is enabled. The server will verify that players are authenticated with Xbox Live.
sculk.server.online.mode.disabled=Online mode is not enabled. The server will no longer verify if players are authenticated with Xbox Live.
sculk.server.running.version=This server is running version {0}
sculk.server.distributed.under=Sculk is distributed under the {0}
sculk.server.distributed.under=Sculk is distributed under the {%0}
sculk.server.enable.all.plugins=Enabling all plugins...
sculk.server.all.plugins.enabled=All plugins have been successfully enabled
sculk.server.done=Done ({0}s)! For help, type "help" or "?"
sculk.server.done=Done ({%0}s)! For help, type "help" or "?"
sculk.server.stopping=Stopping the server
sculk.plugins.disabling=Disabling all plugins...
sculk.plugins.disabled=All plugins disabled
Expand Down
19 changes: 9 additions & 10 deletions src/main/resources/language/fr.ini
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
sculk.server.starting=Démarrage du logiciel {0} en version {1}
sculk.server.loading=Chargement de {0}...
sculk.server.starting=Démarrage du logiciel {%0} en version {%1}
sculk.server.loading=Chargement de {%0}...
sculk.server.loading.commands=Chargement des commandes...
sculk.server.selected.language=Langue sélectionnée : {0}
sculk.server.starting.version=Démarrage du serveur Minecraft : Bedrock Edition version {0}
sculk.server.selected.language=Langue sélectionnée : {%0}
sculk.server.starting.version=Démarrage du serveur Minecraft: Bedrock Edition version {%0}
sculk.server.loading.plugins=Chargement de tous les plugins...
sculk.server.success.plugin=Chargement du plugin {0}...
sculk.server.success.plugin=Chargement du plugin {%0}...
sculk.server.plugins.loaded=Tous les plugins ont été chargés avec succès
sculk.server.network.interface.running=Interface réseau Minecraft en cours d'exécution sur {0}
sculk.server.failed.bind=**** ÉCHEC DE LIAISON À {0}
sculk.server.network.interface.running=Interface réseau Minecraft en cours d'exécution sur {%0}
sculk.server.failed.bind=**** ÉCHEC DE LIAISON À {%0}
sculk.server.server.already.running=Peut-être qu'un serveur est déjà en cours d'exécution sur ce port?
sculk.server.online.mode.enabled=Le mode en ligne est activé. Le serveur vérifiera que les joueurs sont authentifiés sur XboxLive.
sculk.server.online.mode.disabled=Le mode en ligne n'est pas activé. Le serveur ne vérifie plus si les joueurs sont authentifiés sur XboxLive.
sculk.server.running.version=Ce serveur fonctionne sur la version {0}
sculk.server.distributed.under=Sculk est distribué sous la {0}
sculk.server.distributed.under=Sculk est distribué sous la {%0}
sculk.server.enable.all.plugins=Activation de tous les plugins...
sculk.server.all.plugins.enabled=Tous les plugins ont été activés avec succès
sculk.server.done=Terminé ({0}s)! Pour obtenir de l'aide, tapez "help" ou "?"
sculk.server.done=Terminé ({%0}s)! Pour obtenir de l'aide, tapez "help" ou "?"
sculk.server.stopping=Arrêt du serveur
sculk.plugins.disabling=Désactivation de tous les plugins...
sculk.plugins.disabled=Tous les plugins désactivés
Expand Down

0 comments on commit 443d6b9

Please sign in to comment.