Skip to content

Commit

Permalink
explain quote replacements
Browse files Browse the repository at this point in the history
Also add to automation a step where I replaced two-single-quote chars with one.
  • Loading branch information
jacalata committed Jul 23, 2024
1 parent d2c4037 commit 73425a2
Show file tree
Hide file tree
Showing 12 changed files with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions dodo.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import glob
import os
import subprocess
import ftfy
import setuptools_scm

LOCALES = ["en", "de", "es", "fr", "ga", "it", "pt", "sv", "ja", "ko", "zh"]
Expand Down Expand Up @@ -63,11 +62,13 @@ def merge():
for file in glob.glob(INPUT_FILES):
with open(file, encoding="utf-8") as infile:
input = infile.read()
# remove curly quotes, not expected in command line text
# remove curly quotes that are not expected in command line text/may not work for some users
# these may look the same but represent U201C, U201D and U201E - opening quotes, German opening quotes, and closing quotes
import re

changed_input = re.sub("[“„“]", "'", input)
outfile.write(changed_input)
# some strings for some reason use two single quotes as a double quote. Reduce to one single quote.
re_changed_input = re.sub("''", "'", changed_input)
outfile.write(re_changed_input)
outfile.write("\n")
print("Combined strings for {} to {}".format(current_locale, OUTPUT_FILE))
uniquify_file(OUTPUT_FILE)
Expand Down
Binary file modified tabcmd/locales/de/LC_MESSAGES/tabcmd.mo
Binary file not shown.
Binary file modified tabcmd/locales/en/LC_MESSAGES/tabcmd.mo
Binary file not shown.
Binary file modified tabcmd/locales/es/LC_MESSAGES/tabcmd.mo
Binary file not shown.
Binary file modified tabcmd/locales/fr/LC_MESSAGES/tabcmd.mo
Binary file not shown.
Binary file modified tabcmd/locales/ga/LC_MESSAGES/tabcmd.mo
Binary file not shown.
Binary file modified tabcmd/locales/it/LC_MESSAGES/tabcmd.mo
Binary file not shown.
Binary file modified tabcmd/locales/ja/LC_MESSAGES/tabcmd.mo
Binary file not shown.
Binary file modified tabcmd/locales/ko/LC_MESSAGES/tabcmd.mo
Binary file not shown.
Binary file modified tabcmd/locales/pt/LC_MESSAGES/tabcmd.mo
Binary file not shown.
Binary file modified tabcmd/locales/sv/LC_MESSAGES/tabcmd.mo
Binary file not shown.
Binary file modified tabcmd/locales/zh/LC_MESSAGES/tabcmd.mo
Binary file not shown.

0 comments on commit 73425a2

Please sign in to comment.