Skip to content

Commit

Permalink
fix: なんかja_jp.jsonにあるkeyの数がen_us.jsonにあるkeyの数より少ないmodが多々あるのでen_us.jso…
Browse files Browse the repository at this point in the history
…nをベースにし、ja_jp.jsonにkeyがある場合はそちらの値を使うように変更
  • Loading branch information
Y-RyuZU committed Oct 22, 2023
1 parent 49bd81c commit b006023
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ def extract_map_from_json(file_path, collected_map):
# 改行を削除(翻訳時扱いがめんどくさいため)
sanitized_value = value.replace('\n', '')
collected_map[key] = sanitized_value
if re.search('[\u3040-\u30FF\u3400-\u4DBF\u4E00-\u9FFF]', value):
collected_map.pop(key, None)
break

except json.JSONDecodeError:
logging.info(f"Failed to load or process JSON from {file_path}. Skipping this mod for translation. Please check the file for syntax errors.")
Expand Down

0 comments on commit b006023

Please sign in to comment.