INNER CODE UNIT · Python
test_missing_element_needs_translation
connectbot/connectbot · translations/test_translate.py:94
def test_missing_element_needs_translation(self):
assert needs_translation(None) is True
def test_machine_translated_true_is_skipped(self):
elem = parse(
f'<string xmlns:tools="{TOOLS_NS}" '
f'tools:machine_translated="true" name="x">foo</string>'
)
assert needs_translation(elem) is False
def test_human_translated_skipped(self):
elem = parse('<string name="x">foo</string>')
assert needs_translation(elem) is False
def test_machine_translated_false_skipped(self):
elem = parse(
f'<string xmlns:tools="{TOOLS_NS}" '
f'tools:machine_translated="false" name="x">foo</string>'