Skip to content

Commit

Permalink
Improve KR updating
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasGrosjean committed Jan 1, 2025
1 parent aee2c81 commit bb0018c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def extract_paratranz_localisation(paratranz_file_path: str, localisation_file_p
key, value, version = get_key_value_and_version(lines[i])
if version is None:
version = ""
if key in paratranz_data:
if key in paratranz_data and paratranz_data[key] != value:
f.write(" " + key + ":" + str(version) + ' "' + paratranz_data[key] + '"\n')
else:
f.write(lines[i])
Expand Down
2 changes: 2 additions & 0 deletions paradox_localization_utils/update_from_paratranz.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ def update_files_from_paratranz(
# copy new files
shutil.copytree(loc_dir / language, steam_loc_dir / language)
shutil.copytree(loc_dir / "replace", steam_loc_dir / "replace")
for file in loc_dir.glob(f"*_{language}.yml"):
shutil.copy(file, steam_loc_dir / file.name)
for file in (steam_loc_dir / "replace").glob("*_english.yml"):
file.unlink()

Expand Down

0 comments on commit bb0018c

Please sign in to comment.