Permalink
Browse files

Base translations moved to submodule!

  • Loading branch information...
1 parent 4145496 commit 5a0d1affcc7806ea70ac80a6286148d1286960d8 @shoghicp shoghicp committed Apr 11, 2015
View
@@ -12,3 +12,6 @@
[submodule "tests/TesterPlugin"]
path = tests/TesterPlugin
url = https://github.com/PocketMine/TesterPlugin.git
+[submodule "src/pocketmine/lang/locale"]
+ path = src/pocketmine/lang/locale
+ url = https://github.com/PocketMine/PocketMine-Language.git
@@ -2683,6 +2683,7 @@ public function kill(){
break;
case EntityDamageEvent::CAUSE_CUSTOM:
+ break;
default:
@@ -1515,8 +1515,9 @@ public function __construct(\ClassLoader $autoloader, \ThreadedLogger $logger, $
"auto-save" => true,
]);
- $this->baseLang = new BaseLang($this->getProperty("settings.settings.language", "en"));
-
+ $this->baseLang = new BaseLang($this->getProperty("settings.settings.language", BaseLang::FALLBACK_LANGUAGE));
+ $this->logger->info($this->getLanguage()->translateString("language.selected", [$this->getLanguage()->getName(), $this->getLanguage()->getLang()]));
+
$this->logger->info($this->getLanguage()->translateString("pocketmine.server.start", [TextFormat::AQUA . $this->getVersion()]));
ServerScheduler::$WORKERS = $this->getProperty("settings.async-workers", ServerScheduler::$WORKERS);
@@ -26,7 +26,7 @@
class BaseLang{
- const FALLBACK_LANGUAGE = "en";
+ const FALLBACK_LANGUAGE = "eng";
protected $langName;
@@ -38,7 +38,7 @@ public function __construct($lang, $path = null){
$this->langName = strtolower($lang);
if($path === null){
- $path = \pocketmine\PATH . "src/pocketmine/lang/base/";
+ $path = \pocketmine\PATH . "src/pocketmine/lang/locale/";
}
$this->loadLang($path . $this->langName . ".ini", $this->lang);
@@ -1,246 +0,0 @@
-# Language file compatible with Minecraft: Pocket Edition identifiers
-#
-# A message doesn't need to be there to be shown correctly on the client.
-# Only messages shown in PocketMine itself need to be here
-
-language.name=English
-
-multiplayer.player.joined={%0} joined the game
-multiplayer.player.leave={%0} left the game
-
-chat.type.text=<{%0}> {%1}
-chat.type.emote=* {%0} {%1}
-chat.type.announcement=[{%0}] {%1}
-chat.type.admin=[{%0}: {%1}]
-chat.type.achievement={%0} has just earned the achievement {%1}
-
-disconnectionScreen.outdatedClient=Outdated client!
-disconnectionScreen.outdatedServer=Outdated server!
-disconnectionScreen.serverFull=Server is full!
-disconnectionScreen.noReason=Disconnected from server
-disconnectionScreen.invalidSkin=Invalid skin!
-
-death.fell.accident.generic={%0} fell from a high place
-death.attack.inFire={%0} went up in flames
-death.attack.onFire={%0} burned to death
-death.attack.lava={%0} tried to swim in lava
-death.attack.inWall={%0} suffocated in a wall
-death.attack.drown={%0} drowned
-death.attack.cactus={%0} was pricked to death
-death.attack.generic={%0} died
-death.attack.explosion={%0} blew up
-death.attack.explosion.player={%0} was blown up by {%1}
-death.attack.magic={%0} was killed by magic
-death.attack.wither={%0} withered away
-death.attack.mob={%0} was slain by {%1}
-death.attack.player={%0} was slain by {%1}
-death.attack.player.item={%0} was slain by {%1} using {%2}
-death.attack.arrow={%0} was shot by {%1}
-death.attack.arrow.item={%0} was shot by {%1} using {%2}
-death.attack.fall={%0} hit the ground too hard
-death.attack.outOfWorld={%0} fell out of the world
-
-gameMode.survival=Survival Mode
-gameMode.creative=Creative Mode
-gameMode.adventure=Adventure Mode
-gameMode.spectator=Spectator Mode
-gameMode.changed=Your game mode has been updated
-
-potion.moveSpeed=Speed
-potion.moveSlowdown=Slowness
-potion.digSpeed=Haste
-potion.digSlowDown=Mining Fatigue
-potion.damageBoost=Strength
-potion.heal=Instant Health
-potion.harm=Instant Damage
-potion.jump=Jump Boost
-potion.confusion=Nausea
-potion.regeneration=Regeneration
-potion.resistance=Resistance
-potion.fireResistance=Fire Resistance
-potion.waterBreathing=Water Breathing
-potion.invisibility=Invisibility
-potion.blindness=Blindness
-potion.nightVision=Night Vision
-potion.hunger=Hunger
-potion.weakness=Weakness
-potion.poison=Poison
-potion.wither=Wither
-potion.healthBoost=Health Boost
-potion.absorption=Absorption
-potion.saturation=Saturation
-
-commands.generic.exception=An unknown error occurred while attempting to perform this command
-commands.generic.permission=You do not have permission to use this command
-commands.generic.notFound=Unknown command. Try /help for a list of commands
-commands.generic.player.notFound=That player cannot be found
-commands.generic.usage=Usage: {%0}
-
-commands.time.added=Added {%0} to the time
-commands.time.set=Set the time to {%0}
-commands.time.query=Time is {%0}
-
-commands.me.usage=/me <action ...>
-
-commands.give.item.notFound=There is no such item with name {%0}
-commands.give.success=Given {%0} * {%1} to {%2}
-
-commands.effect.usage=/effect <player> <effect> [seconds] [amplifier] [hideParticles] OR /effect <player> clear
-commands.effect.notFound=There is no such mob effect with ID {%0}
-commands.effect.success=Given {%0} (ID {%1}) * {%2} to {%3} for {%4} seconds
-commands.effect.success.removed=Took {%0} from {%1}
-commands.effect.success.removed.all=Took all effects from {%0}
-commands.effect.failure.notActive=Couldn't take {%0} from {%1} as they do not have the effect
-commands.effect.failure.notActive.all=Couldn't take any effects from {%0} as they do not have any
-
-commands.particle.success=Playing effect {%0} for {%1} times
-commands.particle.notFound=Unknown effect name {%0}
-
-commands.players.usage=/list
-commands.players.list=There are {%0}/{%1} players online:
-
-commands.kill.successful=Killed {%0}
-
-commands.banlist.ips=There are %d total banned IP addresses:
-commands.banlist.players=There are {%0} total banned players:
-commands.banlist.usage=/banlist [ips|players]
-
-commands.defaultgamemode.usage=/defaultgamemode <mode>
-commands.defaultgamemode.success=The world's default game mode is now {%0}
-
-commands.op.success=Opped {%0}
-commands.op.usage=/op <player>
-
-commands.deop.success=De-opped {%0}
-commands.deop.usage=/deop <player>
-
-commands.say.usage=/say <message ...>
-
-commands.seed.usage=/seed
-commands.seed.success=Seed: {%0}
-
-commands.ban.success=Banned player {%0}
-commands.ban.usage=/ban <name> [reason ...]
-
-commands.unban.success=Unbanned player {%0}
-commands.unban.usage=/pardon <name>
-
-commands.banip.invalid=You have entered an invalid IP address or a player that is not online
-commands.banip.success=Banned IP address {%0}
-commands.banip.success.players=Banned IP address {%0} belonging to {%1}
-commands.banip.usage=/ban-ip <address|name> [reason ...]
-
-commands.unbanip.invalid=You have entered an invalid IP address
-commands.unbanip.success=Unbanned IP address {%0}
-commands.unbanip.usage=/pardon-ip <address>
-
-commands.save.usage=/save-all
-commands.save-on.usage=/save-on
-commands.save-off.usage=/save-off
-commands.save.enabled=Turned on world auto-saving
-commands.save.disabled=Turned off world auto-saving
-commands.save.start=Saving...
-commands.save.success=Saved the world
-
-commands.stop.usage=/stop
-commands.stop.start=Stopping the server
-
-commands.kick.success=Kicked {%0} from the game
-commands.kick.success.reason=Kicked {%0} from the game: '{%1}'
-commands.kick.usage=/kick <player> [reason ...]
-
-commands.tp.success=Teleported {%0} to {%1}
-commands.tp.success.coordinates=Teleported {%0} to {%1}, {%2}, {%3}
-commands.tp.usage=/tp [target player] <destination player> OR /tp [target player] <x> <y> <z> [<y-rot> <x-rot>]
-
-commands.whitelist.list=There are {%0} (out of {%1} seen) whitelisted players:
-commands.whitelist.enabled=Turned on the whitelist
-commands.whitelist.disabled=Turned off the whitelist
-commands.whitelist.reloaded=Reloaded the whitelist
-commands.whitelist.add.success=Added {%0} to the whitelist
-commands.whitelist.add.usage=/whitelist add <player>
-commands.whitelist.remove.success=Removed {%0} from the whitelist
-commands.whitelist.remove.usage=/whitelist remove <player>
-commands.whitelist.usage=/whitelist <on|off|list|add|remove|reload>
-
-commands.gamemode.success.self=Set own game mode to {%0}
-commands.gamemode.success.other=Set {%0}'s game mode to {%1}
-commands.gamemode.usage=/gamemode <mode> [player]
-
-commands.help.header=--- Showing help page {%0} of {%1} (/help <page>) ---
-commands.help.usage=/help [page|command name]
-
-commands.message.usage=/tell <player> <private message ...>
-commands.message.sameTarget=You can't send a private message to yourself!
-
-commands.difficulty.usage=/difficulty <new difficulty>
-commands.difficulty.success=Set game difficulty to {%0}
-
-commands.spawnpoint.usage=/spawnpoint [player] [<x> <y> <z>]
-commands.spawnpoint.success=Set {%0}'s spawn point to ({%1}, {%2}, {%3})
-
-commands.setworldspawn.usage=/setworldspawn [<x> <y> <z>]
-commands.setworldspawn.success=Set the world spawn point to ({%0}, {%1}, {%2})
-
-
-# -------------------- PocketMine language files, only for console --------------------
-
-pocketmine.data.playerNotFound=Player data not found for "{%0}", creating new profile
-pocketmine.data.playerCorrupted=Corrupted data found for "{%0}", creating new profile
-pocketmine.data.playerOld=Old Player data found for "{%0}", upgrading profile
-pocketmine.data.saveError=Could not save player "{%0}": {%1}
-
-pocketmine.level.notFound=Level "{%0}" not found
-pocketmine.level.loadError=Could not load level "{%0}": {%1}
-pocketmine.level.generationError=Could not generate level "{%0}": {%1}
-pocketmine.level.tickError=Could not tick level "{%0}": {%1}
-pocketmine.level.chunkUnloadError=Error while unloading a chunk: {%0}
-pocketmine.level.backgroundGeneration=Spawn terrain for level "{%0}" is being generated in the background
-pocketmine.level.defaultError=No default level has been loaded
-pocketmine.level.preparing=Preparing level "{%0}"
-pocketmine.level.unloading=Unloading level "{%0}"
-
-pocketmine.server.start=Starting Minecraft: PE server version {%0}
-pocketmine.server.networkError=[Network] Stopped interface {%0} due to {%1}
-pocketmine.server.networkStart=Opening server on {%0}:{%1}
-pocketmine.server.info=This server is running {%0} version {%1} "{%2}" (API {%3})
-pocketmine.server.license={%0} is distributed under the LGPL License
-pocketmine.server.tickOverload=Can't keep up! Is the server overloaded?
-pocketmine.server.startFinished=Done ({%0}s)! For help, type "help" or "?"
-pocketmine.server.defaultGameMode=Default game type: {%0}
-pocketmine.server.query.start=Starting GS4 status listener
-pocketmine.server.query.info=Setting query port to {%0}
-pocketmine.server.query.running=Query running on {%0}:{%1}
-
-pocketmine.command.alias.illegal=Could not register alias {%0} because it contains illegal characters
-pocketmine.command.alias.notFound=Could not register alias {%0} because it contains commands that do not exist: {%1}
-pocketmine.command.exception=Unhandled exception executing command '{%0}' in {%1}: {%2}
-
-pocketmine.crash.create=An unrecoverable error has occurred and the server has crashed. Creating a crash dump
-pocketmine.crash.error=Could not create crash dump: {%0}
-pocketmine.crash.submit=Please upload the "{%0}" file to the Crash Archive and submit the link to the Bug Reporting page. Give as much info as you can.
-pocketmine.crash.archive=The crash dump has been automatically submitted to the Crash Archive. You can view it on {%0} or use the ID #{%1}.
-
-pocketmine.debug.enable=LevelDB support enabled
-
-pocketmine.player.invalidMove={%0} moved wrongly!
-pocketmine.player.logIn={%0}[/{%1}:{%2}] logged in with entity id {%3} at ({%4}, {%5}, {%6}, {%7})
-pocketmine.player.logOut={%0}[/{%1}:{%2}] logged out due to {%3}
-pocketmine.player.invalidEntity={%0} tried to attack an invalid entity
-
-pocketmine.plugin.load=Loading {%0}
-pocketmine.plugin.enable=Enabling {%0}
-pocketmine.plugin.disable=Disabling {%0}
-pocketmine.plugin.restrictedName=Restricted name
-pocketmine.plugin.incompatibleAPI=Incompatible API version
-pocketmine.plugin.unknownDependency=Unknown dependency
-pocketmine.plugin.circularDependency=Circular dependency detected
-pocketmine.plugin.genericLoadError=Could not load plugin '{%0}'
-pocketmine.plugin.spacesDiscouraged=Plugin '{%0}' uses spaces in its name, this is discouraged
-pocketmine.plugin.loadError=Could not load plugin '{%0}': {%1}
-pocketmine.plugin.duplicateError=Could not load plugin '{%0}': plugin exists
-pocketmine.plugin.fileError=Could not load '{%0}' in folder '{%1}': {%2}
-pocketmine.plugin.commandError=Could not load command {%0} for plugin {%1}
-pocketmine.plugin.aliasError=Could not load alias {%0} for plugin {%1}
-pocketmine.plugin.deprecatedEvent=Plugin '{%0}' has registered a listener for '{%1}' on method '{%2}', but the event is Deprecated.
-pocketmine.plugin.eventError="Could not pass event '{%0}' to '{%1}': {%2} on {%3}
Submodule locale added at 6359f9
@@ -4,8 +4,8 @@
# New settings/defaults won't appear automatically on this file when upgrading.
settings:
- #Language code for server-side localization
- language: "en"
+ #Three-letter language code for server-side localization
+ language: "eng"
shutdown-message: "Server closed"
#Allow listing plugins via Query
query-plugins: true

0 comments on commit 5a0d1af

Please sign in to comment.