Skip to content

Commit eed0f3a

Browse files
committed
test: update translation test
### Changed: - Removed the strict check that verified if `.ts` files were identical after extracting translations from the code. Now only `.qm` files are checked to ensure they are the same.
1 parent d4eedb1 commit eed0f3a

1 file changed

Lines changed: 2 additions & 13 deletions

File tree

tests/test_translations.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,9 @@ def test_translations_up_to_date() -> None:
3131
for lang_code in LANG_CODES_TS:
3232
original_file_path = TS_DIR / f"{lang_code}.ts"
3333
shutil.copy(original_file_path, TEMP_DIR)
34-
35-
# `.ts` files
36-
update_languages.update_ts_files(TEMP_DIR, LANG_CODES_TS)
37-
for lang_code in LANG_CODES_TS:
38-
original_file_path = TS_DIR / f"{lang_code}.ts"
39-
original_file_content = original_file_path.read_text(encoding="utf-8")
4034

41-
temp_file_path = TEMP_DIR / f"{lang_code}.ts"
42-
temp_file_content = temp_file_path.read_text(encoding="utf-8").replace("<location filename=\"../../../", "<location filename=\"../../")
43-
44-
assert original_file_content == temp_file_content
45-
46-
# `.qm` files
47-
update_languages.update_qm_files(TS_DIR, TEMP_DIR, LANG_CODES_TS)
35+
update_languages.update_ts_files(TEMP_DIR, LANG_CODES_TS)
36+
update_languages.update_qm_files(TEMP_DIR, TEMP_DIR, LANG_CODES_TS)
4837
for lang_code in LANG_CODES_TS:
4938
original_file_path = QM_DIR / f"{lang_code}.qm"
5039
temp_file_path = TEMP_DIR / f"{lang_code}.qm"

0 commit comments

Comments
 (0)