Improve translator documentation and wording

This commit is contained in:
juliancoffee 2024-02-04 00:11:49 +02:00
parent 7bb2d11c98
commit e5c2ee6b23
4 changed files with 69 additions and 43 deletions

View File

@ -1,11 +1,14 @@
body-generic = creature
body-biped_large-ogre = ogre
body-biped_large-cyclops = cyclops
body-biped_large-wendigo = wendigo
body-biped_large-werewolf = werewolf
body-biped_large-cave_troll = cave troll
body-biped_large-mountain_troll = mountain troll
body-biped_large-swamp_troll = swamp troll
body-biped_large-blue_oni = blue oni
body-biped_large-red_oni = red oni
body-biped_large-tursus = tursus
## Used in npc-speech-tell_monster
body-npc-speech-generic = some creature
body-npc-speech-biped_large-ogre-male = an ogre
body-npc-speech-biped_large-ogre-female = an ogre
body-npc-speech-biped_large-cyclops = a cyclops
body-npc-speech-biped_large-wendigo = a wendigo
body-npc-speech-biped_large-werewolf = a werewolf
body-npc-speech-biped_large-cave_troll = a cave troll
body-npc-speech-biped_large-mountain_troll = a mountain troll
body-npc-speech-biped_large-swamp_troll = a swamp troll
body-npc-speech-biped_large-blue_oni = a blue oni
body-npc-speech-biped_large-red_oni = a red oni
body-npc-speech-biped_large-tursus = a tursus

View File

@ -1,3 +1,5 @@
## Generic NPC messages
npc-speech-villager =
.a0 = I love cheese.
npc-speech-villager_open =
@ -249,14 +251,50 @@ npc-speech-merchant_sell_directed =
.a0 = You there! Are you in need of a new thingamabob?
.a1 = Are you hungry? I'm sure I've got some cheese you can buy.
.a2 = You look like you could do with some new armour!
## NPC site hints
## Available variables:
## - $dir references npc-speech-dir-* variables below
## - $dist references npc-speech-dist-* variables below
## - $site represents hard-coded site in the world
npc-speech-tell_site =
.a0 = Have you visited { $site }? It's just { $dir } of here!
.a0 = There's { $site } { $dir } of here. Have you visited it?
.a1 = You should visit { $site } some time.
.a2 = If you travel { $dist } to the { $dir }, you can get to { $site }.
.a3 = To the { $dir } you'll find { $site }, it's { $dist }.
.a2 = If you travel { $dist } { $dir }, you can get to { $site }.
.a3 = { $dir } you'll find { $site }, it's { $dist }.
## NPC monster hints
## Available variables:
## - $dir references npc-speech-dir-* variables below
## - $dist references npc-speech-dist-* variables below
## - $body references body-npc-speech-* variables in `body` component
npc-speech-tell_monster =
.a0 = They say there's a { $body } to the { $dir }, { $dist }...
.a1 = You think you're tough? To the { $dir } there's a { $body }.
.a0 = They say there's { $body } { $dir }, { $dist } ...
.a1 = You think you're tough? There's { $body } { $dir }.
npc-speech-dir_north = to the north
npc-speech-dir_north_east = to the north-east
npc-speech-dir_east = to the east
npc-speech-dir_south_east = to the south-east
npc-speech-dir_south = to the south
npc-speech-dir_south_west = to the south-west
npc-speech-dir_west = to the west
npc-speech-dir_north_west = to the north-west
npc-speech-dist_very_far = very far away
npc-speech-dist_far = far away
npc-speech-dist_ahead = some way away
npc-speech-dist_near = nearby
npc-speech-dist_near_to = very close
## NPC proposals
npc-speech-arena = Let's sit over there!
## NPC reactions
npc-speech-witness_murder =
.a0 = Murderer!
.a1 = How could you do this?
@ -273,18 +311,3 @@ npc-speech-welcome-aboard =
.a0 = Welcome aboard!
.a1 = Can I see your ticket... just kidding it's free!
.a2 = Have a nice ride!
npc-speech-dir_north = north
npc-speech-dir_north_east = north-east
npc-speech-dir_east = east
npc-speech-dir_south_east = south-east
npc-speech-dir_south = south
npc-speech-dir_south_west = south-west
npc-speech-dir_west = west
npc-speech-dir_north_west = north-west
npc-speech-dist_very_far = very far away
npc-speech-dist_far = far away
npc-speech-dist_ahead = some way away
npc-speech-dist_near = nearby
npc-speech-dist_near_to = very close
npc-speech-arena = Let's sit over there!

View File

@ -1358,7 +1358,7 @@ impl Body {
}
}
try_localize(self).unwrap_or_else(|| Content::localized("body-generic"))
try_localize(self).unwrap_or_else(|| Content::localized("body-npc-speech-generic"))
}
}

View File

@ -32,18 +32,18 @@ impl Body {
pub fn localize_npc(&self) -> Option<Content> {
let key = match &self.species {
Species::Ogre => match self.body_type {
BodyType::Male => "body-biped_large-ogre-male",
BodyType::Female => "body-biped_large-ogre-female",
BodyType::Male => "body-npc-speech-biped_large-ogre-male",
BodyType::Female => "body-npc-speech-biped_large-ogre-female",
},
Species::Cyclops => "body-biped_large-cyclops",
Species::Wendigo => "body-biped_large-wendigo",
Species::Werewolf => "body-biped_large-werewolf",
Species::Cavetroll => "body-biped_large-cave_troll",
Species::Mountaintroll => "body-biped_large-mountain_troll",
Species::Swamptroll => "body-biped_large-swamp_troll",
Species::Blueoni => "body-biped_large-blue_oni",
Species::Redoni => "body-biped_large-red_oni",
Species::Tursus => "body-biped_large-tursus",
Species::Cyclops => "body-npc-speech-biped_large-cyclops",
Species::Wendigo => "body-npc-speech-biped_large-wendigo",
Species::Werewolf => "body-npc-speech-biped_large-werewolf",
Species::Cavetroll => "body-npc-speech-biped_large-cave_troll",
Species::Mountaintroll => "body-npc-speech-biped_large-mountain_troll",
Species::Swamptroll => "body-npc-speech-biped_large-swamp_troll",
Species::Blueoni => "body-npc-speech-biped_large-blue_oni",
Species::Redoni => "body-npc-speech-biped_large-red_oni",
Species::Tursus => "body-npc-speech-biped_large-tursus",
_ => return None,
};