Skip to content

Commit

Permalink
just handle errors, no need for the unicode specific stuff..
Browse files Browse the repository at this point in the history
  • Loading branch information
rowr111 committed Dec 2, 2024
1 parent 6f9e371 commit 56e7412
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions tools/i18n_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ def get_languages(self):
if essential in obj:
for key in obj[essential].keys():
self.languages.append(key)
except UnicodeDecodeError as e:
self.err(f"UnicodeDecodeError: {e}")
return 1
except Exception as e:
self.err(f"Error: {e}")
return 1
Expand Down Expand Up @@ -156,9 +153,6 @@ def show_missing(self, i18n, is_manifest):
try:
with open(i18n_path, encoding='utf-8') as f:
obj = json.load(f)
except UnicodeDecodeError as e:
self.err(f"UnicodeDecodeError: {e}")
return 1
except Exception as e:
self.err(f"Error: {e}")
return 1
Expand Down Expand Up @@ -197,9 +191,6 @@ def stub_missing(self, i18n, is_manifest):
try:
with open(i18n_path, encoding='utf-8') as f:
obj = json.load(f)
except UnicodeDecodeError as e:
self.err(f"UnicodeDecodeError: {e}")
return 1
except Exception as e:
self.err(f"Error: {e}")
return 1
Expand Down Expand Up @@ -231,9 +222,6 @@ def stub_missing(self, i18n, is_manifest):
try:
with open(i18n_path, 'w', encoding='utf-8') as f:
json.dump(obj, f, ensure_ascii=False, check_circular=False, sort_keys=True, indent=4)
except UnicodeEncodeError as e:
self.err(f"UnicodeEncodeError: {e}")
return 1
except Exception as e:
self.err(f"Error: {e}")
return 1
Expand Down Expand Up @@ -277,9 +265,6 @@ def add_new_lang(self, i18n, is_manifest):
try:
with open(i18n_path_orig, encoding='utf-8') as orig_file:
obj = json.load(orig_file)
except UnicodeDecodeError as e:
self.err(f"UnicodeDecodeError: {e}")
return 1
except Exception as e:
self.err(f"Error: {e}")
return 1
Expand Down Expand Up @@ -307,9 +292,6 @@ def add_new_lang(self, i18n, is_manifest):
sort_keys=True,
indent=4,
)
except UnicodeEncodeError as e:
self.err(f"UnicodeEncodeError: {e}")
return 1
except Exception as e:
self.err(f"Error: {e}")
return 1
Expand Down

0 comments on commit 56e7412

Please sign in to comment.