changeset 8318:30e137b4ff18

scripts/i18n: also normalize casing of UTF-8 in Content-Type f626260a376c introduced invariant msgmerge casing. Do the same when normalizing to ensure consistency also without msgmerge and to avoid unnecessary conflicts.
author Mads Kiilerich <mads@kiilerich.com>
date Thu, 19 Dec 2019 20:47:55 +0100
parents 5553ecc962e0
children f8314738030a
files scripts/i18n_utils.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/i18n_utils.py	Wed Sep 04 22:54:49 2019 +0200
+++ b/scripts/i18n_utils.py	Thu Dec 19 20:47:55 2019 +0100
@@ -133,6 +133,9 @@
             .strip(),
         '',
         header_normalize_re.sub('', raw_content[header_start:header_end])
+            .replace(
+                r'"Content-Type: text/plain; charset=utf-8\n"',
+                r'"Content-Type: text/plain; charset=UTF-8\n"')  # maintain msgmerge casing
             .strip(),
         '']  # preserve normalized header
     # all chunks are separated by empty line