Make --no-overwrite still overwrite fuzzies.
This commit is contained in:
parent
fa83920923
commit
445fa03c1e
|
@ -55,7 +55,7 @@ def write_translations(
|
||||||
for po_file in tqdm(files, desc="Updating translations"):
|
for po_file in tqdm(files, desc="Updating translations"):
|
||||||
po_file = polib.pofile(po_file)
|
po_file = polib.pofile(po_file)
|
||||||
for entry in po_file:
|
for entry in po_file:
|
||||||
if not overwrite and entry.msgstr:
|
if not overwrite and entry.msgstr and "fuzzy" not in entry.flags:
|
||||||
continue
|
continue
|
||||||
if (
|
if (
|
||||||
entry.msgid in translations
|
entry.msgid in translations
|
||||||
|
@ -138,7 +138,7 @@ is equivalent to:
|
||||||
"-n",
|
"-n",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
help="When applying translation, "
|
help="When applying translation, "
|
||||||
"do not overwrite existing translations (apply only to untranslated ones).",
|
"do not overwrite existing translations (apply only to untranslated or fuzzy ones).",
|
||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
|
Loading…
Reference in New Issue