squirrel-battle/squirrelbattle/tests/translations_test.py

20 lines
601 B
Python
Raw Normal View History

2020-11-27 20:44:17 +00:00
import unittest
from squirrelbattle.translations import gettext as _, setlocale
class TestTranslations(unittest.TestCase):
def setUp(self) -> None:
setlocale("fr")
def test_translations(self):
"""
Ensure that some strings are well-translated.
"""
self.assertEqual(_("New game"), "Nouvelle partie")
self.assertEqual(_("Resume"), "Continuer")
self.assertEqual(_("Load"), "Charger")
self.assertEqual(_("Save"), "Sauvegarder")
self.assertEqual(_("Settings"), "Paramètres")
self.assertEqual(_("Exit"), "Quitter")