summaryrefslogtreecommitdiffhomepage
path: root/android
diff options
context:
space:
mode:
Diffstat (limited to 'android')
-rw-r--r--android/translations-converter/src/normalize.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/android/translations-converter/src/normalize.rs b/android/translations-converter/src/normalize.rs
index 9e8af385f4..83f144d874 100644
--- a/android/translations-converter/src/normalize.rs
+++ b/android/translations-converter/src/normalize.rs
@@ -39,6 +39,7 @@ mod gettext {
lazy_static! {
static ref APOSTROPHE_VARIATION: Regex = Regex::new("’").unwrap();
+ static ref ESCAPED_SINGLE_QUOTES: Regex = Regex::new(r"\\'").unwrap();
static ref ESCAPED_DOUBLE_QUOTES: Regex = Regex::new(r#"\\""#).unwrap();
static ref PARAMETERS: Regex = Regex::new(r"%\([^)]*\)").unwrap();
}
@@ -49,6 +50,8 @@ mod gettext {
let string = APOSTROPHE_VARIATION.replace_all(&*self, "'");
// Mark where parameters are positioned, removing the parameter name
let string = PARAMETERS.replace_all(&string, "%");
+ // Remove escaped single-quotes
+ let string = ESCAPED_SINGLE_QUOTES.replace_all(&string, r"'");
// Remove escaped double-quotes
let string = ESCAPED_DOUBLE_QUOTES.replace_all(&string, r#"""#);