From fbf6bf62432368bd6d9f981370bb4245c5e9f6fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Guitaut?= Date: Mon, 29 Jul 2024 15:11:36 +0200 Subject: [PATCH] FIX: Don't escape MF variables in HTML links We have some MF strings that are outputting HTML tags (typically links) and their attributes are using single quotes. The problem is that with the current implementation of MessageFormat, single quotes act as an escaping mechanism for special characters like `{`. This then prevents from interpolating some variables in the strings. This patch addresses that issue by using double quotes instead, restoring the expected behavior. --- config/locales/client.en.yml | 40 ++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index f5da82d509e..dd62a9a33dc 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -1438,25 +1438,25 @@ en: true { { UNREAD, plural, =0 {} - one {There is # unread} - other {There are # unread} + one {There is # unread} + other {There are # unread} } { NEW, plural, =0 {} - one { and # new message remaining, or browse other messages in {groupLink}} - other { and # new messages remaining, or browse other messages in {groupLink}} + one { and # new message remaining, or browse other messages in {groupLink}} + other { and # new messages remaining, or browse other messages in {groupLink}} } } false { { UNREAD, plural, =0 {} - one {There is # unread message remaining, or browse other messages in {groupLink}} - other {There are # unread messages remaining, or browse other messages in {groupLink}} + one {There is # unread message remaining, or browse other messages in {groupLink}} + other {There are # unread messages remaining, or browse other messages in {groupLink}} } { NEW, plural, =0 {} - one {There is # new message remaining, or browse other messages in {groupLink}} - other {There are # new messages remaining, or browse other messages in {groupLink}} + one {There is # new message remaining, or browse other messages in {groupLink}} + other {There are # new messages remaining, or browse other messages in {groupLink}} } } other {} @@ -1471,25 +1471,25 @@ en: true { { UNREAD, plural, =0 {} - one {There is # unread} - other {There are # unread} + one {There is # unread} + other {There are # unread} } { NEW, plural, =0 {} - one { and # new message remaining, or browse other personal messages} - other { and # new messages remaining, or browse other personal messages} + one { and # new message remaining, or browse other personal messages} + other { and # new messages remaining, or browse other personal messages} } } false { { UNREAD, plural, =0 {} - one {There is # unread message remaining, or browse other personal messages} - other {There are # unread messages remaining, or browse other personal messages} + one {There is # unread message remaining, or browse other personal messages} + other {There are # unread messages remaining, or browse other personal messages} } { NEW, plural, =0 {} - one {There is # new message remaining, or browse other personal messages} - other {There are # new messages remaining, or browse other personal messages} + one {There is # new message remaining, or browse other personal messages} + other {There are # new messages remaining, or browse other personal messages} } } other {} @@ -2142,7 +2142,7 @@ en: logs_error_rate_notice: # This string uses the ICU Message Format. See https://meta.discourse.org/t/7035 for translation guidelines. reached_hour_MF: | - {relativeAge}{ rate, plural, + {relativeAge}{ rate, plural, one {# error/hour} other {# errors/hour} } reached site setting limit of {limit, plural, @@ -2152,7 +2152,7 @@ en: # This string uses the ICU Message Format. See https://meta.discourse.org/t/7035 for translation guidelines. reached_minute_MF: | - {relativeAge}{ rate, plural, + {relativeAge}{ rate, plural, one {# error/minute} other {# errors/minute} } reached site setting limit of { limit, plural, @@ -2162,7 +2162,7 @@ en: # This string uses the ICU Message Format. See https://meta.discourse.org/t/7035 for translation guidelines. exceeded_hour_MF: | - {relativeAge}{ rate, plural, + {relativeAge}{ rate, plural, one {# error/hour} other {# errors/hour} } exceeded site setting limit of { limit, plural, @@ -2172,7 +2172,7 @@ en: # This string uses the ICU Message Format. See https://meta.discourse.org/t/7035 for translation guidelines. exceeded_minute_MF: | - {relativeAge}{ rate, plural, + {relativeAge}{ rate, plural, one {# error/minute} other {# errors/minute} } exceeded site setting limit of { limit, plural,