9d853bbb03
- anki._backend stores the protobuf files and rsbackend.py code - pylib modules import protobuf messages directly from the _pb2 files, and explicitly export any will be returned or consumed by public pylib functions, so that calling code can import from pylib - the "rsbackend" no longer imports and re-exports protobuf messages - pylib can just consume them directly. - move errors to errors.py Still todo: - rsbridge - finishing the work on rsbackend, and check what we need to add back to the original file location to avoid breaking add-ons
14 lines
435 B
Python
14 lines
435 B
Python
import anki.lang
|
|
from anki.lang 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
|
|
assert no_uni(tr2(TR.STATISTICS_REVIEWS, reviews=2)) == "2 reviews"
|
|
|
|
anki.lang.set_lang("ja", "")
|
|
tr2 = anki.lang.current_i18n.translate
|
|
assert no_uni(tr2(TR.STATISTICS_REVIEWS, reviews=2)) == "2 枚の復習カード"
|