diff --git a/crowdin.py b/crowdin.py
index 9af5d50d..4e518fc9 100644
--- a/crowdin.py
+++ b/crowdin.py
@@ -34,7 +34,10 @@ class bcolors:
"date_short_this_year",
"date_short",
"time_short_24_hour",
- "time_short_12_hour"
+ "time_short_12_hour",
+ "date_obscured",
+ "date_long",
+ "date_long_with_time"
]
# List of languages to skip date format check for - e.g. in Japanese, it's legal to have Japanese letters as part of the date format string:
@@ -288,11 +291,19 @@ def validate_translation(locale, path, key, text, en_string, errors, warnings,
print("\t\t{}".format(errors[path][key][-1]))
if text and key in DATE_FORMAT_KEYS and locale not in SKIP_DATE_FORMAT_CHECK:
+ if "\\'\\'\\'" in text:
+ if key not in warnings[path]:
+ warnings[path][key] = []
+ warnings[path][key].append(
+ f"Invalid date format characters: Has extra/unbalanced apostrophe")
+ if options.debug:
+ print("\t\t{}".format(warnings[path][key][-1]))
+
without_escaped_text = re.sub(r"'.+?'", "", text)
potentially_formatted = re.sub(r"[^\w]", "", without_escaped_text)
bad_characters = set(
re.findall(
- r"[^GyYMLwWDdFEuaHkKhmsSzZX]",
+ r"[^GyMLwWDdFEuaHkKhmsSzZX]",
potentially_formatted)
)
# Find bad chars in DATE_FORMAT_KEYS
diff --git a/iNaturalist/src/main/res/values-it-rIT/strings.xml b/iNaturalist/src/main/res/values-it-rIT/strings.xml
index 2fe53d6e..6518e786 100644
--- a/iNaturalist/src/main/res/values-it-rIT/strings.xml
+++ b/iNaturalist/src/main/res/values-it-rIT/strings.xml
@@ -959,7 +959,7 @@ le Linee Guida
d MMM, yyyy
- MMM \'\'\'yy
+ MMM \'\'yy
MMMM d, yyyy hh:mma
Mostra nomi comuni
diff --git a/iNaturalist/src/main/res/values-it/strings.xml b/iNaturalist/src/main/res/values-it/strings.xml
index 2fe53d6e..6518e786 100644
--- a/iNaturalist/src/main/res/values-it/strings.xml
+++ b/iNaturalist/src/main/res/values-it/strings.xml
@@ -959,7 +959,7 @@ le Linee Guida
d MMM, yyyy
- MMM \'\'\'yy
+ MMM \'\'yy
MMMM d, yyyy hh:mma
Mostra nomi comuni
diff --git a/iNaturalist/src/main/res/values-pt-rBR/strings.xml b/iNaturalist/src/main/res/values-pt-rBR/strings.xml
index 3c5ab94f..d2b33897 100644
--- a/iNaturalist/src/main/res/values-pt-rBR/strings.xml
+++ b/iNaturalist/src/main/res/values-pt-rBR/strings.xml
@@ -957,7 +957,7 @@
d \'de\' MMM \'de\' yyyy
- MMM \'\'YY
+ MMM \'\'yy
d MMMM, yyyy hh:mmH
Mostrar nomes comuns
diff --git a/iNaturalist/src/main/res/values-sl-rSI/strings.xml b/iNaturalist/src/main/res/values-sl-rSI/strings.xml
index 9d6a650e..ba6c3b12 100644
--- a/iNaturalist/src/main/res/values-sl-rSI/strings.xml
+++ b/iNaturalist/src/main/res/values-sl-rSI/strings.xml
@@ -967,7 +967,7 @@
hh.mm
- dd. MM. YYYY
+ dd. MM. yyyy
dd. MMMM LLLL, hh.mma
diff --git a/iNaturalist/src/main/res/values-sl/strings.xml b/iNaturalist/src/main/res/values-sl/strings.xml
index 9d6a650e..ba6c3b12 100644
--- a/iNaturalist/src/main/res/values-sl/strings.xml
+++ b/iNaturalist/src/main/res/values-sl/strings.xml
@@ -967,7 +967,7 @@
hh.mm
- dd. MM. YYYY
+ dd. MM. yyyy
dd. MMMM LLLL, hh.mma