"""
Tests for Sentinel internationalization.
"""

from sentinel.i18n.translator import Translator


def test_translation_in_english() -> None:
    translator = Translator()

    assert (
        translator.translate(
            "status.EXCELLENT",
            language="en",
        )
        == "Excellent"
    )


def test_translation_in_french() -> None:
    translator = Translator()

    assert (
        translator.translate(
            "root_cause.NO_ANOMALY_DETECTED",
            language="fr",
        )
        == "Aucune anomalie détectée."
    )


def test_unknown_key_returns_key() -> None:
    translator = Translator()

    assert (
        translator.translate(
            "unknown.key",
            language="en",
        )
        == "unknown.key"
    )
