anki/qt/tests/test_i18n.py

14 lines
440 B
Python
Raw Normal View History

import anki.lang
2020-02-27 03:25:19 +01:00
from anki.rsbackend import TR
def test_no_collection_i18n():
anki.lang.set_lang("zz", "")
tr2 = anki.lang.current_i18n.translate
no_uni = anki.lang.without_unicode_isolation
2020-02-27 03:25:19 +01:00
assert no_uni(tr2(TR.STATISTICS_REVIEWS, reviews=2)) == "2 reviews"
anki.lang.set_lang("ja", "")
tr2 = anki.lang.current_i18n.translate
2020-02-27 03:25:19 +01:00
assert no_uni(tr2(TR.STATISTICS_REVIEWS, reviews=2)) == "2 枚の復習カード"