  
          for file_ext in ["ts", "qm"]:
            with self.subTest(file_ext=file_ext):
  
              # caught by test_missing_translation_files
              if not os.path.exists(os.path.join(TRANSLATIONS_DIR, f"{file}.{file_ext}")):
                self.skipTest(f"{name} missing translation file")
  
              cur_translations = self._read_translation_file(TRANSLATIONS_DIR, file, file_ext)
              new_translations = self._read_translation_file(TMP_TRANSLATIONS_DIR, file, file_ext)
  
              self.assertEqual(cur_translations, new_translations,
                               f"{file} ({name}) {file_ext.upper()} translation file out of date. Run selfdrive/ui/update_translations.py to update the translation files")
  
    @unittest.skip("Only test unfinished translations before going to release")
    def test_unfinished_translations(self):
      for name, file in self.translation_files.items():
        with self.subTest(name=name, file=file):
 
</s> remove         for file_ext in ["ts", "qm"]:
          with self.subTest(file_ext=file_ext):
 </s> add         # caught by test_missing_translation_files
        if not os.path.exists(os.path.join(TRANSLATIONS_DIR, f"{file}.ts")):
          self.skipTest(f"{name} missing translation file") </s> remove         cur_translations = self._read_translation_file(TRANSLATIONS_DIR, file, "ts")
 </s> add         cur_translations = self._read_translation_file(TRANSLATIONS_DIR, file) </s> remove         if not (os.path.exists(os.path.join(TRANSLATIONS_DIR, f"{file}.ts")) and
                os.path.exists(os.path.join(TRANSLATIONS_DIR, f"{file}.qm"))):
          self.fail(f"{name} is missing translation files, run selfdrive/ui/update_translations.py")
 </s> add         self.assertTrue(os.path.exists(os.path.join(TRANSLATIONS_DIR, f"{file}.ts")),
                        f"{name} has no XML translation file, run selfdrive/ui/update_translations.py") </s> remove   def _read_translation_file(path, file, file_ext):
    tr_file = os.path.join(path, f"{file}.{file_ext}")
 </s> add   def _read_translation_file(path, file):
    tr_file = os.path.join(path, f"{file}.ts") </s> remove     ret = os.system(f"lrelease {tr_file}")
    assert ret == 0

 </s> add 
        cur_translations = self._read_translation_file(TRANSLATIONS_DIR, file)
        new_translations = self._read_translation_file(TMP_TRANSLATIONS_DIR, file)
        self.assertEqual(cur_translations, new_translations,
                         f"{file} ({name}) XML translation file out of date. Run selfdrive/ui/update_translations.py to update the translation files")
  
          for file_ext in ["ts", "qm"]:
            with self.subTest(file_ext=file_ext):
  
        cur_translations = self._read_translation_file(TRANSLATIONS_DIR, file)
        new_translations = self._read_translation_file(TMP_TRANSLATIONS_DIR, file)
        self.assertEqual(cur_translations, new_translations,
                         f"{file} ({name}) XML translation file out of date. Run selfdrive/ui/update_translations.py to update the translation files")
        cur_translations = self._read_translation_file(TRANSLATIONS_DIR, file)
        new_translations = self._read_translation_file(TMP_TRANSLATIONS_DIR, file)
        self.assertEqual(cur_translations, new_translations,
                         f"{file} ({name}) XML translation file out of date. Run selfdrive/ui/update_translations.py to update the translation files")
        cur_translations = self._read_translation_file(TRANSLATIONS_DIR, file)
        new_translations = self._read_translation_file(TMP_TRANSLATIONS_DIR, file)
        self.assertEqual(cur_translations, new_translations,
                         f"{file} ({name}) XML translation file out of date. Run selfdrive/ui/update_translations.py to update the translation files")
        cur_translations = self._read_translation_file(TRANSLATIONS_DIR, file)
        new_translations = self._read_translation_file(TMP_TRANSLATIONS_DIR, file)
        self.assertEqual(cur_translations, new_translations,
                         f"{file} ({name}) XML translation file out of date. Run selfdrive/ui/update_translations.py to update the translation files")
        cur_translations = self._read_translation_file(TRANSLATIONS_DIR, file)
        new_translations = self._read_translation_file(TMP_TRANSLATIONS_DIR, file)
        self.assertEqual(cur_translations, new_translations,
                         f"{file} ({name}) XML translation file out of date. Run selfdrive/ui/update_translations.py to update the translation files")
        cur_translations = self._read_translation_file(TRANSLATIONS_DIR, file)
        new_translations = self._read_translation_file(TMP_TRANSLATIONS_DIR, file)
        self.assertEqual(cur_translations, new_translations,
                         f"{file} ({name}) XML translation file out of date. Run selfdrive/ui/update_translations.py to update the translation files")
        cur_translations = self._read_translation_file(TRANSLATIONS_DIR, file)
        new_translations = self._read_translation_file(TMP_TRANSLATIONS_DIR, file)
        self.assertEqual(cur_translations, new_translations,
                         f"{file} ({name}) XML translation file out of date. Run selfdrive/ui/update_translations.py to update the translation files")
        cur_translations = self._read_translation_file(TRANSLATIONS_DIR, file)
        new_translations = self._read_translation_file(TMP_TRANSLATIONS_DIR, file)
        self.assertEqual(cur_translations, new_translations,
                         f"{file} ({name}) XML translation file out of date. Run selfdrive/ui/update_translations.py to update the translation files")
        cur_translations = self._read_translation_file(TRANSLATIONS_DIR, file)
        new_translations = self._read_translation_file(TMP_TRANSLATIONS_DIR, file)
        self.assertEqual(cur_translations, new_translations,
                         f"{file} ({name}) XML translation file out of date. Run selfdrive/ui/update_translations.py to update the translation files")
  
    @unittest.skip("Only test unfinished translations before going to release")
    def test_unfinished_translations(self):
      for name, file in self.translation_files.items():
        with self.subTest(name=name, file=file):
keep keep keep keep replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 multilanguage: compile QM in scons (#25217)

* All in scons

* delete all this

* delete the qm files

* No need to check QM files in test_translations.py anymore

* readme

* add lupdate to third party

* fix

* one line

* update files_common

* readme imp

* add j flag

* add to path

* duplicate scons!

* update readme

* fix path

fix path

fix path

* no path 
selfdrive/ui/tests/test_translations.py