Merge branch 'description' into 'master'

Description

Closes #59

See merge request ynerant/squirrel-battle!57
This commit is contained in:
ynerant 2021-01-08 12:10:29 +01:00
commit 073e3d3740
8 changed files with 235 additions and 96 deletions

View File

@ -172,6 +172,7 @@ class PlayerInventoryDisplay(MenuDisplay):
and self.selected else f" {rep} " and self.selected else f" {rep} "
self.addstr(self.pad, i + 1, 0, selection self.addstr(self.pad, i + 1, 0, selection
+ " " + item.translated_name.capitalize() + " " + item.translated_name.capitalize()
+ (f" ({item.description})" if item.description else "")
+ (": " + str(item.price) + " Hazels" + (": " + str(item.price) + " Hazels"
if self.store_mode else "")) if self.store_mode else ""))
@ -217,6 +218,7 @@ class StoreInventoryDisplay(MenuDisplay):
and self.selected else f" {rep} " and self.selected else f" {rep} "
self.addstr(self.pad, i + 1, 0, selection self.addstr(self.pad, i + 1, 0, selection
+ " " + item.translated_name.capitalize() + " " + item.translated_name.capitalize()
+ (f" ({item.description})" if item.description else "")
+ ": " + str(item.price) + " Hazels") + ": " + str(item.price) + " Hazels")
price = f"{self.pack.HAZELNUT} {self.menu.merchant.hazel} Hazels" price = f"{self.pack.HAZELNUT} {self.menu.merchant.hazel} Hazels"

View File

@ -24,6 +24,13 @@ class Item(Entity):
self.held_by = held_by self.held_by = held_by
self.price = price self.price = price
@property
def description(self) -> str:
"""
In the inventory, indicate the usefulness of the item.
"""
return ""
def drop(self) -> None: def drop(self) -> None:
""" """
The item is dropped from the inventory onto the floor. The item is dropped from the inventory onto the floor.
@ -79,7 +86,7 @@ class Item(Entity):
""" """
Returns the list of all item classes. Returns the list of all item classes.
""" """
return [BodySnatchPotion, Bomb, Heart, Shield, Sword,\ return [BodySnatchPotion, Bomb, Heart, Shield, Sword,
Chestplate, Helmet, RingCritical, RingXP] Chestplate, Helmet, RingCritical, RingXP]
def be_sold(self, buyer: InventoryHolder, seller: InventoryHolder) -> bool: def be_sold(self, buyer: InventoryHolder, seller: InventoryHolder) -> bool:
@ -109,6 +116,10 @@ class Heart(Item):
super().__init__(name=name, price=price, *args, **kwargs) super().__init__(name=name, price=price, *args, **kwargs)
self.healing = healing self.healing = healing
@property
def description(self) -> str:
return f"HP+{self.healing}"
def hold(self, entity: InventoryHolder) -> None: def hold(self, entity: InventoryHolder) -> None:
""" """
When holding a heart, the player is healed and When holding a heart, the player is healed and
@ -217,6 +228,10 @@ class Weapon(Item):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
self.damage = damage self.damage = damage
@property
def description(self) -> str:
return f"STR+{self.damage}" if self.damage else super().description
def save_state(self) -> dict: def save_state(self) -> dict:
""" """
Saves the state of the weapon into a dictionary Saves the state of the weapon into a dictionary
@ -261,6 +276,11 @@ class Armor(Item):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
self.constitution = constitution self.constitution = constitution
@property
def description(self) -> str:
return f"CON+{self.constitution}" if self.constitution \
else super().description
def equip(self) -> None: def equip(self) -> None:
super().equip() super().equip()
self.held_by.constitution += self.constitution self.held_by.constitution += self.constitution
@ -284,6 +304,7 @@ class Shield(Armor):
super().__init__(name=name, constitution=constitution, price=price, super().__init__(name=name, constitution=constitution, price=price,
*args, **kwargs) *args, **kwargs)
class Helmet(Armor): class Helmet(Armor):
""" """
Class of helmet items, they can be equipped on the head. Class of helmet items, they can be equipped on the head.
@ -299,6 +320,7 @@ class Helmet(Armor):
self.held_by.remove_from_inventory(self) self.held_by.remove_from_inventory(self)
self.held_by.equipped_helmet = self self.held_by.equipped_helmet = self
class Chestplate(Armor): class Chestplate(Armor):
""" """
Class of chestplate items, they can be equipped on the body. Class of chestplate items, they can be equipped on the body.
@ -314,6 +336,7 @@ class Chestplate(Armor):
self.held_by.remove_from_inventory(self) self.held_by.remove_from_inventory(self)
self.held_by.equipped_armor = self self.held_by.equipped_armor = self
class BodySnatchPotion(Item): class BodySnatchPotion(Item):
""" """
The body-snatch potion allows to exchange all characteristics with a random The body-snatch potion allows to exchange all characteristics with a random
@ -375,6 +398,14 @@ class Ring(Item):
self.critical = critical self.critical = critical
self.experience = experience self.experience = experience
@property
def description(self) -> str:
fields = [("MAX HP", self.maxhealth), ("STR", self.strength),
("INT", self.intelligence), ("CHR", self.charisma),
("DEX", self.dexterity), ("CON", self.constitution),
("CRI", self.critical), ("XP", self.experience)]
return ", ".join(f"{key}+{value}" for key, value in fields if value)
def equip(self) -> None: def equip(self) -> None:
super().equip() super().equip()
self.held_by.maxhealth += self.maxhealth self.held_by.maxhealth += self.maxhealth

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: squirrelbattle 3.14.1\n" "Project-Id-Version: squirrelbattle 3.14.1\n"
"Report-Msgid-Bugs-To: squirrel-battle@crans.org\n" "Report-Msgid-Bugs-To: squirrel-battle@crans.org\n"
"POT-Creation-Date: 2021-01-08 01:57+0100\n" "POT-Creation-Date: 2021-01-08 12:03+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -21,40 +21,49 @@ msgstr ""
msgid "{name} takes {amount} damage." msgid "{name} takes {amount} damage."
msgstr "{name} nimmt {amount} Schadenspunkte." msgstr "{name} nimmt {amount} Schadenspunkte."
#: squirrelbattle/display/menudisplay.py:160 #: squirrelbattle/display/creditsdisplay.py:28
#: squirrelbattle/display/menudisplay.py:123
#: squirrelbattle/display/menudisplay.py:148
msgid "Credits"
msgstr ""
#: squirrelbattle/display/creditsdisplay.py:32
msgid "Developers:"
msgstr ""
#: squirrelbattle/display/creditsdisplay.py:38
msgid "Translators:"
msgstr ""
#: squirrelbattle/display/menudisplay.py:168
msgid "INVENTORY" msgid "INVENTORY"
msgstr "BESTAND" msgstr "BESTAND"
#: squirrelbattle/display/menudisplay.py:202 #: squirrelbattle/display/menudisplay.py:214
msgid "STALL" msgid "STALL"
msgstr "STAND" msgstr "STAND"
#: squirrelbattle/display/statsdisplay.py:23 #: squirrelbattle/display/statsdisplay.py:40
#: squirrelbattle/tests/translations_test.py:60
msgid "player"
msgstr "Spieler"
#: squirrelbattle/display/statsdisplay.py:35
msgid "Inventory:" msgid "Inventory:"
msgstr "Bestand:" msgstr "Bestand:"
#: squirrelbattle/display/statsdisplay.py:52 #: squirrelbattle/display/statsdisplay.py:57
msgid "Equipped main:" msgid "Equipped main:"
msgstr "" msgstr ""
#: squirrelbattle/display/statsdisplay.py:56 #: squirrelbattle/display/statsdisplay.py:61
msgid "Equipped secondary:" msgid "Equipped secondary:"
msgstr "" msgstr ""
#: squirrelbattle/display/statsdisplay.py:61 #: squirrelbattle/display/statsdisplay.py:66
msgid "Equipped chestplate:" msgid "Equipped chestplate:"
msgstr "" msgstr ""
#: squirrelbattle/display/statsdisplay.py:65 #: squirrelbattle/display/statsdisplay.py:70
msgid "Equipped helmet:" msgid "Equipped helmet:"
msgstr "" msgstr ""
#: squirrelbattle/display/statsdisplay.py:72 #: squirrelbattle/display/statsdisplay.py:77
msgid "YOU ARE DEAD" msgid "YOU ARE DEAD"
msgstr "SIE WURDEN GESTORBEN" msgstr "SIE WURDEN GESTORBEN"
@ -63,41 +72,41 @@ msgstr "SIE WURDEN GESTORBEN"
msgid "I don't sell any squirrel" msgid "I don't sell any squirrel"
msgstr "Ich verkaufe keinen Eichhörnchen." msgstr "Ich verkaufe keinen Eichhörnchen."
#: squirrelbattle/entities/friendly.py:52 #: squirrelbattle/entities/friendly.py:55
msgid "Flower power!!" msgid "Flower power!!"
msgstr "Blumenmacht!!" msgstr "Blumenmacht!!"
#: squirrelbattle/entities/friendly.py:52 #: squirrelbattle/entities/friendly.py:55
msgid "The sun is warm today" msgid "The sun is warm today"
msgstr "Die Sonne ist warm heute" msgstr "Die Sonne ist warm heute"
#. The bomb is exploding. #. The bomb is exploding.
#. Each entity that is close to the bomb takes damages. #. Each entity that is close to the bomb takes damages.
#. The player earn XP if the entity was killed. #. The player earn XP if the entity was killed.
#: squirrelbattle/entities/items.py:163 #: squirrelbattle/entities/items.py:178
msgid "Bomb is exploding." msgid "Bomb is exploding."
msgstr "Die Bombe explodiert." msgstr "Die Bombe explodiert."
#: squirrelbattle/entities/items.py:344 #: squirrelbattle/entities/items.py:365
#, python-brace-format #, python-brace-format
msgid "{player} exchanged its body with {entity}." msgid "{player} exchanged its body with {entity}."
msgstr "{player} täuscht seinem Körper mit {entity} aus." msgstr "{player} täuscht seinem Körper mit {entity} aus."
#: squirrelbattle/game.py:182 #: squirrelbattle/game.py:200
#, python-brace-format #, python-brace-format
msgid "The player climbs down to the floor {floor}." msgid "The player climbs down to the floor {floor}."
msgstr "Der Spieler klettert auf dem Stock {floor} hinunter." msgstr "Der Spieler klettert auf dem Stock {floor} hinunter."
#: squirrelbattle/game.py:195 #: squirrelbattle/game.py:213
#, python-brace-format #, python-brace-format
msgid "The player climbs up the floor {floor}." msgid "The player climbs up the floor {floor}."
msgstr "Der Spieler klettert auf dem Stock {floor} hinoben." msgstr "Der Spieler klettert auf dem Stock {floor} hinoben."
#: squirrelbattle/game.py:285 squirrelbattle/tests/game_test.py:592 #: squirrelbattle/game.py:304 squirrelbattle/tests/game_test.py:603
msgid "The buyer does not have enough money" msgid "The buyer does not have enough money"
msgstr "Der Kaufer hat nicht genug Geld" msgstr "Der Kaufer hat nicht genug Geld"
#: squirrelbattle/game.py:328 #: squirrelbattle/game.py:347
msgid "" msgid ""
"Some keys are missing in your save file.\n" "Some keys are missing in your save file.\n"
"Your save seems to be corrupt. It got deleted." "Your save seems to be corrupt. It got deleted."
@ -105,7 +114,7 @@ msgstr ""
"In Ihrer Speicherdatei fehlen einige Schlüssel.\n" "In Ihrer Speicherdatei fehlen einige Schlüssel.\n"
"Ihre Speicherung scheint korrupt zu sein. Es wird gelöscht." "Ihre Speicherung scheint korrupt zu sein. Es wird gelöscht."
#: squirrelbattle/game.py:336 #: squirrelbattle/game.py:355
msgid "" msgid ""
"No player was found on this map!\n" "No player was found on this map!\n"
"Maybe you died?" "Maybe you died?"
@ -113,7 +122,7 @@ msgstr ""
"Auf dieser Karte wurde kein Spieler gefunden!\n" "Auf dieser Karte wurde kein Spieler gefunden!\n"
"Vielleicht sind Sie gestorben?" "Vielleicht sind Sie gestorben?"
#: squirrelbattle/game.py:356 #: squirrelbattle/game.py:375
msgid "" msgid ""
"The JSON file is not correct.\n" "The JSON file is not correct.\n"
"Your save seems corrupted. It got deleted." "Your save seems corrupted. It got deleted."
@ -121,26 +130,26 @@ msgstr ""
"Die JSON-Datei ist nicht korrekt.\n" "Die JSON-Datei ist nicht korrekt.\n"
"Ihre Speicherung scheint korrumpiert. Sie wurde gelöscht." "Ihre Speicherung scheint korrumpiert. Sie wurde gelöscht."
#: squirrelbattle/interfaces.py:452 #: squirrelbattle/interfaces.py:712
msgid "It's a critical hit!" msgid "It's a critical hit!"
msgstr "" msgstr ""
#: squirrelbattle/interfaces.py:453 #: squirrelbattle/interfaces.py:713
#, python-brace-format #, python-brace-format
msgid "{name} hits {opponent}." msgid "{name} hits {opponent}."
msgstr "{name} schlägt {opponent}." msgstr "{name} schlägt {opponent}."
#: squirrelbattle/interfaces.py:465 #: squirrelbattle/interfaces.py:727
#, python-brace-format #, python-brace-format
msgid "{name} takes {damage} damage." msgid "{name} takes {damage} damage."
msgstr "" msgstr ""
#: squirrelbattle/interfaces.py:467 #: squirrelbattle/interfaces.py:729
#, python-brace-format #, python-brace-format
msgid "{name} dies." msgid "{name} dies."
msgstr "{name} stirbt." msgstr "{name} stirbt."
#: squirrelbattle/interfaces.py:501 #: squirrelbattle/interfaces.py:763
#, python-brace-format #, python-brace-format
msgid "{entity} said: {message}" msgid "{entity} said: {message}"
msgstr "{entity} hat gesagt: {message}" msgstr "{entity} hat gesagt: {message}"
@ -149,8 +158,8 @@ msgstr "{entity} hat gesagt: {message}"
msgid "Back" msgid "Back"
msgstr "Zurück" msgstr "Zurück"
#: squirrelbattle/tests/game_test.py:358 squirrelbattle/tests/game_test.py:361 #: squirrelbattle/tests/game_test.py:368 squirrelbattle/tests/game_test.py:371
#: squirrelbattle/tests/game_test.py:364 squirrelbattle/tests/game_test.py:367 #: squirrelbattle/tests/game_test.py:374 squirrelbattle/tests/game_test.py:377
#: squirrelbattle/tests/translations_test.py:16 #: squirrelbattle/tests/translations_test.py:16
msgid "New game" msgid "New game"
msgstr "Neu Spiel" msgstr "Neu Spiel"
@ -247,6 +256,10 @@ msgstr "Textur-Packung"
msgid "Language" msgid "Language"
msgstr "Sprache" msgstr "Sprache"
#: squirrelbattle/tests/translations_test.py:62
msgid "player"
msgstr "Spieler"
#: squirrelbattle/tests/translations_test.py:64 #: squirrelbattle/tests/translations_test.py:64
msgid "hedgehog" msgid "hedgehog"
msgstr "Igel" msgstr "Igel"
@ -290,3 +303,23 @@ msgstr "Herz"
#: squirrelbattle/tests/translations_test.py:75 #: squirrelbattle/tests/translations_test.py:75
msgid "sword" msgid "sword"
msgstr "schwert" msgstr "schwert"
#: squirrelbattle/tests/translations_test.py:76
msgid "helmet"
msgstr ""
#: squirrelbattle/tests/translations_test.py:77
msgid "chestplate"
msgstr ""
#: squirrelbattle/tests/translations_test.py:78
msgid "shield"
msgstr ""
#: squirrelbattle/tests/translations_test.py:79
msgid "ring_of_critical_damage"
msgstr ""
#: squirrelbattle/tests/translations_test.py:81
msgid "ring_of_more_experience"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: squirrelbattle 3.14.1\n" "Project-Id-Version: squirrelbattle 3.14.1\n"
"Report-Msgid-Bugs-To: squirrel-battle@crans.org\n" "Report-Msgid-Bugs-To: squirrel-battle@crans.org\n"
"POT-Creation-Date: 2021-01-06 15:19+0100\n" "POT-Creation-Date: 2021-01-08 12:03+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -21,40 +21,49 @@ msgstr ""
msgid "{name} takes {amount} damage." msgid "{name} takes {amount} damage."
msgstr "{name} recibe {amount} daño." msgstr "{name} recibe {amount} daño."
#: squirrelbattle/display/menudisplay.py:160 #: squirrelbattle/display/creditsdisplay.py:28
#: squirrelbattle/display/menudisplay.py:123
#: squirrelbattle/display/menudisplay.py:148
msgid "Credits"
msgstr ""
#: squirrelbattle/display/creditsdisplay.py:32
msgid "Developers:"
msgstr ""
#: squirrelbattle/display/creditsdisplay.py:38
msgid "Translators:"
msgstr ""
#: squirrelbattle/display/menudisplay.py:168
msgid "INVENTORY" msgid "INVENTORY"
msgstr "INVENTORIO" msgstr "INVENTORIO"
#: squirrelbattle/display/menudisplay.py:202 #: squirrelbattle/display/menudisplay.py:214
msgid "STALL" msgid "STALL"
msgstr "PUESTO" msgstr "PUESTO"
#: squirrelbattle/display/statsdisplay.py:23 #: squirrelbattle/display/statsdisplay.py:40
#: squirrelbattle/tests/translations_test.py:60
msgid "player"
msgstr "jugador"
#: squirrelbattle/display/statsdisplay.py:35
msgid "Inventory:" msgid "Inventory:"
msgstr "Inventorio :" msgstr "Inventorio :"
#: squirrelbattle/display/statsdisplay.py:52 #: squirrelbattle/display/statsdisplay.py:57
msgid "Equipped main:" msgid "Equipped main:"
msgstr "" msgstr ""
#: squirrelbattle/display/statsdisplay.py:56 #: squirrelbattle/display/statsdisplay.py:61
msgid "Equipped secondary:" msgid "Equipped secondary:"
msgstr "" msgstr ""
#: squirrelbattle/display/statsdisplay.py:61 #: squirrelbattle/display/statsdisplay.py:66
msgid "Equipped chestplate:" msgid "Equipped chestplate:"
msgstr "" msgstr ""
#: squirrelbattle/display/statsdisplay.py:65 #: squirrelbattle/display/statsdisplay.py:70
msgid "Equipped helmet:" msgid "Equipped helmet:"
msgstr "" msgstr ""
#: squirrelbattle/display/statsdisplay.py:72 #: squirrelbattle/display/statsdisplay.py:77
msgid "YOU ARE DEAD" msgid "YOU ARE DEAD"
msgstr "ERES MUERTO" msgstr "ERES MUERTO"
@ -62,41 +71,41 @@ msgstr "ERES MUERTO"
msgid "I don't sell any squirrel" msgid "I don't sell any squirrel"
msgstr "No vendo ninguna ardilla" msgstr "No vendo ninguna ardilla"
#: squirrelbattle/entities/friendly.py:52 #: squirrelbattle/entities/friendly.py:55
msgid "Flower power!!" msgid "Flower power!!"
msgstr "Poder de las flores!!" msgstr "Poder de las flores!!"
#: squirrelbattle/entities/friendly.py:52 #: squirrelbattle/entities/friendly.py:55
msgid "The sun is warm today" msgid "The sun is warm today"
msgstr "El sol está caliente hoy" msgstr "El sol está caliente hoy"
#. The bomb is exploding. #. The bomb is exploding.
#. Each entity that is close to the bomb takes damages. #. Each entity that is close to the bomb takes damages.
#. The player earn XP if the entity was killed. #. The player earn XP if the entity was killed.
#: squirrelbattle/entities/items.py:163 #: squirrelbattle/entities/items.py:178
msgid "Bomb is exploding." msgid "Bomb is exploding."
msgstr "La bomba está explotando." msgstr "La bomba está explotando."
#: squirrelbattle/entities/items.py:344 #: squirrelbattle/entities/items.py:365
#, python-brace-format #, python-brace-format
msgid "{player} exchanged its body with {entity}." msgid "{player} exchanged its body with {entity}."
msgstr "{player} intercambió su cuerpo con {entity}." msgstr "{player} intercambió su cuerpo con {entity}."
#: squirrelbattle/game.py:182 #: squirrelbattle/game.py:200
#, python-brace-format #, python-brace-format
msgid "The player climbs down to the floor {floor}." msgid "The player climbs down to the floor {floor}."
msgstr "" msgstr ""
#: squirrelbattle/game.py:195 #: squirrelbattle/game.py:213
#, python-brace-format #, python-brace-format
msgid "The player climbs up the floor {floor}." msgid "The player climbs up the floor {floor}."
msgstr "" msgstr ""
#: squirrelbattle/game.py:285 squirrelbattle/tests/game_test.py:592 #: squirrelbattle/game.py:304 squirrelbattle/tests/game_test.py:603
msgid "The buyer does not have enough money" msgid "The buyer does not have enough money"
msgstr "El comprador no tiene suficiente dinero" msgstr "El comprador no tiene suficiente dinero"
#: squirrelbattle/game.py:328 #: squirrelbattle/game.py:347
msgid "" msgid ""
"Some keys are missing in your save file.\n" "Some keys are missing in your save file.\n"
"Your save seems to be corrupt. It got deleted." "Your save seems to be corrupt. It got deleted."
@ -104,7 +113,7 @@ msgstr ""
"Algunas claves faltan en su archivo de guarda.\n" "Algunas claves faltan en su archivo de guarda.\n"
"Su guarda parece a ser corruptido. Fue eliminado." "Su guarda parece a ser corruptido. Fue eliminado."
#: squirrelbattle/game.py:336 #: squirrelbattle/game.py:355
msgid "" msgid ""
"No player was found on this map!\n" "No player was found on this map!\n"
"Maybe you died?" "Maybe you died?"
@ -112,7 +121,7 @@ msgstr ""
"No jugador encontrado sobre la carta !\n" "No jugador encontrado sobre la carta !\n"
"¿ Quizas murió ?" "¿ Quizas murió ?"
#: squirrelbattle/game.py:356 #: squirrelbattle/game.py:375
msgid "" msgid ""
"The JSON file is not correct.\n" "The JSON file is not correct.\n"
"Your save seems corrupted. It got deleted." "Your save seems corrupted. It got deleted."
@ -120,26 +129,26 @@ msgstr ""
"El JSON archivo no es correcto.\n" "El JSON archivo no es correcto.\n"
"Su guarda parece corrupta. Fue eliminada." "Su guarda parece corrupta. Fue eliminada."
#: squirrelbattle/interfaces.py:452 #: squirrelbattle/interfaces.py:712
msgid "It's a critical hit!" msgid "It's a critical hit!"
msgstr "" msgstr ""
#: squirrelbattle/interfaces.py:453 #: squirrelbattle/interfaces.py:713
#, python-brace-format #, python-brace-format
msgid "{name} hits {opponent}." msgid "{name} hits {opponent}."
msgstr "{name} golpea a {opponent}." msgstr "{name} golpea a {opponent}."
#: squirrelbattle/interfaces.py:465 #: squirrelbattle/interfaces.py:727
#, python-brace-format #, python-brace-format
msgid "{name} takes {damage} damage." msgid "{name} takes {damage} damage."
msgstr "" msgstr ""
#: squirrelbattle/interfaces.py:467 #: squirrelbattle/interfaces.py:729
#, python-brace-format #, python-brace-format
msgid "{name} dies." msgid "{name} dies."
msgstr "{name} se muere." msgstr "{name} se muere."
#: squirrelbattle/interfaces.py:501 #: squirrelbattle/interfaces.py:763
#, python-brace-format #, python-brace-format
msgid "{entity} said: {message}" msgid "{entity} said: {message}"
msgstr "{entity} dijo : {message}" msgstr "{entity} dijo : {message}"
@ -148,8 +157,8 @@ msgstr "{entity} dijo : {message}"
msgid "Back" msgid "Back"
msgstr "Volver" msgstr "Volver"
#: squirrelbattle/tests/game_test.py:358 squirrelbattle/tests/game_test.py:361 #: squirrelbattle/tests/game_test.py:368 squirrelbattle/tests/game_test.py:371
#: squirrelbattle/tests/game_test.py:364 squirrelbattle/tests/game_test.py:367 #: squirrelbattle/tests/game_test.py:374 squirrelbattle/tests/game_test.py:377
#: squirrelbattle/tests/translations_test.py:16 #: squirrelbattle/tests/translations_test.py:16
msgid "New game" msgid "New game"
msgstr "Nuevo partido" msgstr "Nuevo partido"
@ -246,6 +255,10 @@ msgstr "Paquete de texturas"
msgid "Language" msgid "Language"
msgstr "Languaje" msgstr "Languaje"
#: squirrelbattle/tests/translations_test.py:62
msgid "player"
msgstr "jugador"
#: squirrelbattle/tests/translations_test.py:64 #: squirrelbattle/tests/translations_test.py:64
msgid "hedgehog" msgid "hedgehog"
msgstr "erizo" msgstr "erizo"
@ -289,3 +302,23 @@ msgstr "corazón"
#: squirrelbattle/tests/translations_test.py:75 #: squirrelbattle/tests/translations_test.py:75
msgid "sword" msgid "sword"
msgstr "espada" msgstr "espada"
#: squirrelbattle/tests/translations_test.py:76
msgid "helmet"
msgstr ""
#: squirrelbattle/tests/translations_test.py:77
msgid "chestplate"
msgstr ""
#: squirrelbattle/tests/translations_test.py:78
msgid "shield"
msgstr ""
#: squirrelbattle/tests/translations_test.py:79
msgid "ring_of_critical_damage"
msgstr ""
#: squirrelbattle/tests/translations_test.py:81
msgid "ring_of_more_experience"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: squirrelbattle 3.14.1\n" "Project-Id-Version: squirrelbattle 3.14.1\n"
"Report-Msgid-Bugs-To: squirrel-battle@crans.org\n" "Report-Msgid-Bugs-To: squirrel-battle@crans.org\n"
"POT-Creation-Date: 2021-01-06 15:19+0100\n" "POT-Creation-Date: 2021-01-08 12:03+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -21,40 +21,49 @@ msgstr ""
msgid "{name} takes {amount} damage." msgid "{name} takes {amount} damage."
msgstr "{name} prend {amount} points de dégât." msgstr "{name} prend {amount} points de dégât."
#: squirrelbattle/display/menudisplay.py:160 #: squirrelbattle/display/creditsdisplay.py:28
#: squirrelbattle/display/menudisplay.py:123
#: squirrelbattle/display/menudisplay.py:148
msgid "Credits"
msgstr ""
#: squirrelbattle/display/creditsdisplay.py:32
msgid "Developers:"
msgstr ""
#: squirrelbattle/display/creditsdisplay.py:38
msgid "Translators:"
msgstr ""
#: squirrelbattle/display/menudisplay.py:168
msgid "INVENTORY" msgid "INVENTORY"
msgstr "INVENTAIRE" msgstr "INVENTAIRE"
#: squirrelbattle/display/menudisplay.py:202 #: squirrelbattle/display/menudisplay.py:214
msgid "STALL" msgid "STALL"
msgstr "STAND" msgstr "STAND"
#: squirrelbattle/display/statsdisplay.py:23 #: squirrelbattle/display/statsdisplay.py:40
#: squirrelbattle/tests/translations_test.py:60
msgid "player"
msgstr "joueur"
#: squirrelbattle/display/statsdisplay.py:35
msgid "Inventory:" msgid "Inventory:"
msgstr "Inventaire :" msgstr "Inventaire :"
#: squirrelbattle/display/statsdisplay.py:52 #: squirrelbattle/display/statsdisplay.py:57
msgid "Equipped main:" msgid "Equipped main:"
msgstr "Équipement principal :" msgstr "Équipement principal :"
#: squirrelbattle/display/statsdisplay.py:56 #: squirrelbattle/display/statsdisplay.py:61
msgid "Equipped secondary:" msgid "Equipped secondary:"
msgstr "Équipement secondaire :" msgstr "Équipement secondaire :"
#: squirrelbattle/display/statsdisplay.py:61 #: squirrelbattle/display/statsdisplay.py:66
msgid "Equipped chestplate:" msgid "Equipped chestplate:"
msgstr "Plastron équipé :" msgstr "Plastron équipé :"
#: squirrelbattle/display/statsdisplay.py:65 #: squirrelbattle/display/statsdisplay.py:70
msgid "Equipped helmet:" msgid "Equipped helmet:"
msgstr "Casque équipé :" msgstr "Casque équipé :"
#: squirrelbattle/display/statsdisplay.py:72 #: squirrelbattle/display/statsdisplay.py:77
msgid "YOU ARE DEAD" msgid "YOU ARE DEAD"
msgstr "VOUS ÊTES MORT" msgstr "VOUS ÊTES MORT"
@ -63,41 +72,41 @@ msgstr "VOUS ÊTES MORT"
msgid "I don't sell any squirrel" msgid "I don't sell any squirrel"
msgstr "Je ne vends pas d'écureuil" msgstr "Je ne vends pas d'écureuil"
#: squirrelbattle/entities/friendly.py:52 #: squirrelbattle/entities/friendly.py:55
msgid "Flower power!!" msgid "Flower power!!"
msgstr "Pouvoir des fleurs !!" msgstr "Pouvoir des fleurs !!"
#: squirrelbattle/entities/friendly.py:52 #: squirrelbattle/entities/friendly.py:55
msgid "The sun is warm today" msgid "The sun is warm today"
msgstr "Le soleil est chaud aujourd'hui" msgstr "Le soleil est chaud aujourd'hui"
#. The bomb is exploding. #. The bomb is exploding.
#. Each entity that is close to the bomb takes damages. #. Each entity that is close to the bomb takes damages.
#. The player earn XP if the entity was killed. #. The player earn XP if the entity was killed.
#: squirrelbattle/entities/items.py:163 #: squirrelbattle/entities/items.py:178
msgid "Bomb is exploding." msgid "Bomb is exploding."
msgstr "La bombe explose." msgstr "La bombe explose."
#: squirrelbattle/entities/items.py:344 #: squirrelbattle/entities/items.py:365
#, python-brace-format #, python-brace-format
msgid "{player} exchanged its body with {entity}." msgid "{player} exchanged its body with {entity}."
msgstr "{player} a échangé son corps avec {entity}." msgstr "{player} a échangé son corps avec {entity}."
#: squirrelbattle/game.py:182 #: squirrelbattle/game.py:200
#, python-brace-format #, python-brace-format
msgid "The player climbs down to the floor {floor}." msgid "The player climbs down to the floor {floor}."
msgstr "Le joueur descend à l'étage {floor}." msgstr "Le joueur descend à l'étage {floor}."
#: squirrelbattle/game.py:195 #: squirrelbattle/game.py:213
#, python-brace-format #, python-brace-format
msgid "The player climbs up the floor {floor}." msgid "The player climbs up the floor {floor}."
msgstr "Le joueur monte à l'étage {floor}." msgstr "Le joueur monte à l'étage {floor}."
#: squirrelbattle/game.py:285 squirrelbattle/tests/game_test.py:592 #: squirrelbattle/game.py:304 squirrelbattle/tests/game_test.py:603
msgid "The buyer does not have enough money" msgid "The buyer does not have enough money"
msgstr "L'acheteur n'a pas assez d'argent" msgstr "L'acheteur n'a pas assez d'argent"
#: squirrelbattle/game.py:328 #: squirrelbattle/game.py:347
msgid "" msgid ""
"Some keys are missing in your save file.\n" "Some keys are missing in your save file.\n"
"Your save seems to be corrupt. It got deleted." "Your save seems to be corrupt. It got deleted."
@ -105,7 +114,7 @@ msgstr ""
"Certaines clés de votre ficher de sauvegarde sont manquantes.\n" "Certaines clés de votre ficher de sauvegarde sont manquantes.\n"
"Votre sauvegarde semble corrompue. Elle a été supprimée." "Votre sauvegarde semble corrompue. Elle a été supprimée."
#: squirrelbattle/game.py:336 #: squirrelbattle/game.py:355
msgid "" msgid ""
"No player was found on this map!\n" "No player was found on this map!\n"
"Maybe you died?" "Maybe you died?"
@ -113,7 +122,7 @@ msgstr ""
"Aucun joueur n'a été trouvé sur la carte !\n" "Aucun joueur n'a été trouvé sur la carte !\n"
"Peut-être êtes-vous mort ?" "Peut-être êtes-vous mort ?"
#: squirrelbattle/game.py:356 #: squirrelbattle/game.py:375
msgid "" msgid ""
"The JSON file is not correct.\n" "The JSON file is not correct.\n"
"Your save seems corrupted. It got deleted." "Your save seems corrupted. It got deleted."
@ -121,26 +130,26 @@ msgstr ""
"Le fichier JSON de sauvegarde est incorrect.\n" "Le fichier JSON de sauvegarde est incorrect.\n"
"Votre sauvegarde semble corrompue. Elle a été supprimée." "Votre sauvegarde semble corrompue. Elle a été supprimée."
#: squirrelbattle/interfaces.py:452 #: squirrelbattle/interfaces.py:712
msgid "It's a critical hit!" msgid "It's a critical hit!"
msgstr "C'est un coup critique !" msgstr "C'est un coup critique !"
#: squirrelbattle/interfaces.py:453 #: squirrelbattle/interfaces.py:713
#, python-brace-format #, python-brace-format
msgid "{name} hits {opponent}." msgid "{name} hits {opponent}."
msgstr "{name} frappe {opponent}." msgstr "{name} frappe {opponent}."
#: squirrelbattle/interfaces.py:465 #: squirrelbattle/interfaces.py:727
#, python-brace-format #, python-brace-format
msgid "{name} takes {damage} damage." msgid "{name} takes {damage} damage."
msgstr "{name} prend {damage} dégâts." msgstr "{name} prend {damage} dégâts."
#: squirrelbattle/interfaces.py:467 #: squirrelbattle/interfaces.py:729
#, python-brace-format #, python-brace-format
msgid "{name} dies." msgid "{name} dies."
msgstr "{name} meurt." msgstr "{name} meurt."
#: squirrelbattle/interfaces.py:501 #: squirrelbattle/interfaces.py:763
#, python-brace-format #, python-brace-format
msgid "{entity} said: {message}" msgid "{entity} said: {message}"
msgstr "{entity} a dit : {message}" msgstr "{entity} a dit : {message}"
@ -149,8 +158,8 @@ msgstr "{entity} a dit : {message}"
msgid "Back" msgid "Back"
msgstr "Retour" msgstr "Retour"
#: squirrelbattle/tests/game_test.py:358 squirrelbattle/tests/game_test.py:361 #: squirrelbattle/tests/game_test.py:368 squirrelbattle/tests/game_test.py:371
#: squirrelbattle/tests/game_test.py:364 squirrelbattle/tests/game_test.py:367 #: squirrelbattle/tests/game_test.py:374 squirrelbattle/tests/game_test.py:377
#: squirrelbattle/tests/translations_test.py:16 #: squirrelbattle/tests/translations_test.py:16
msgid "New game" msgid "New game"
msgstr "Nouvelle partie" msgstr "Nouvelle partie"
@ -247,6 +256,10 @@ msgstr "Pack de textures"
msgid "Language" msgid "Language"
msgstr "Langue" msgstr "Langue"
#: squirrelbattle/tests/translations_test.py:62
msgid "player"
msgstr "joueur"
#: squirrelbattle/tests/translations_test.py:64 #: squirrelbattle/tests/translations_test.py:64
msgid "hedgehog" msgid "hedgehog"
msgstr "hérisson" msgstr "hérisson"
@ -290,3 +303,23 @@ msgstr "cœur"
#: squirrelbattle/tests/translations_test.py:75 #: squirrelbattle/tests/translations_test.py:75
msgid "sword" msgid "sword"
msgstr "épée" msgstr "épée"
#: squirrelbattle/tests/translations_test.py:76
msgid "helmet"
msgstr "casque"
#: squirrelbattle/tests/translations_test.py:77
msgid "chestplate"
msgstr "plastron"
#: squirrelbattle/tests/translations_test.py:78
msgid "shield"
msgstr "bouclier"
#: squirrelbattle/tests/translations_test.py:79
msgid "ring of critical damage"
msgstr "anneau de coup critique"
#: squirrelbattle/tests/translations_test.py:81
msgid "ring of more experience"
msgstr "anneau de plus d'expérience"

View File

@ -73,3 +73,10 @@ class TestTranslations(unittest.TestCase):
self.assertEqual(_("explosion"), "explosion") self.assertEqual(_("explosion"), "explosion")
self.assertEqual(_("heart"), "cœur") self.assertEqual(_("heart"), "cœur")
self.assertEqual(_("sword"), "épée") self.assertEqual(_("sword"), "épée")
self.assertEqual(_("helmet"), "casque")
self.assertEqual(_("chestplate"), "plastron")
self.assertEqual(_("shield"), "bouclier")
self.assertEqual(_("ring of critical damage"),
"anneau de coup critique")
self.assertEqual(_("ring of more experience"),
"anneau de plus d'expérience")