From a2a07b528a2a43187680fa51b648811349b07a0a Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 18 Nov 2020 14:46:46 +0000 Subject: [PATCH 1/3] Fix message search summary text This repairs the message search summary text, which regressed in https://github.com/matrix-org/matrix-react-sdk/pull/5416. We can't use the `one` / `other` syntax here since there are two numbers and they are both strings. Fixes https://github.com/vector-im/element-web/issues/15766 --- src/i18n/strings/en_EN.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 40356b11d5..12baf4c60d 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -935,8 +935,7 @@ "Failed to set display name": "Failed to set display name", "Encryption": "Encryption", "Individually verify each session used by a user to mark it as trusted, not trusting cross-signed devices.": "Individually verify each session used by a user to mark it as trusted, not trusting cross-signed devices.", - "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(count)s rooms.|other": "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(count)s rooms.", - "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(count)s rooms.|one": "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(count)s room.", + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(count)s rooms.": "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(count)s rooms.", "Manage": "Manage", "Securely cache encrypted messages locally for them to appear in search results.": "Securely cache encrypted messages locally for them to appear in search results.", "%(brand)s is missing some components required for securely caching encrypted messages locally. If you'd like to experiment with this feature, build a custom %(brand)s Desktop with search components added.": "%(brand)s is missing some components required for securely caching encrypted messages locally. If you'd like to experiment with this feature, build a custom %(brand)s Desktop with search components added.", From 95a436cdafb14cb2b50586fcff58409544e4460f Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 18 Nov 2020 14:49:52 +0000 Subject: [PATCH 2/3] Use room(s) style in message --- src/components/views/settings/EventIndexPanel.js | 4 ++-- src/i18n/strings/en_EN.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/views/settings/EventIndexPanel.js b/src/components/views/settings/EventIndexPanel.js index 1fe18cb207..7391fd479e 100644 --- a/src/components/views/settings/EventIndexPanel.js +++ b/src/components/views/settings/EventIndexPanel.js @@ -130,10 +130,10 @@ export default class EventIndexPanel extends React.Component {
{_t("Securely cache encrypted messages locally for them " + - "to appear in search results, using %(size)s to store messages from %(count)s rooms.", + "to appear in search results, using %(size)s to store messages from %(rooms)s room(s).", { size: formatBytes(this.state.eventIndexSize, 0), - count: formatCountLong(this.state.roomCount), + rooms: formatCountLong(this.state.roomCount), }, )}
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 12baf4c60d..fd61b214ea 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -935,7 +935,7 @@ "Failed to set display name": "Failed to set display name", "Encryption": "Encryption", "Individually verify each session used by a user to mark it as trusted, not trusting cross-signed devices.": "Individually verify each session used by a user to mark it as trusted, not trusting cross-signed devices.", - "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(count)s rooms.": "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(count)s rooms.", + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s room(s).": "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s room(s).", "Manage": "Manage", "Securely cache encrypted messages locally for them to appear in search results.": "Securely cache encrypted messages locally for them to appear in search results.", "%(brand)s is missing some components required for securely caching encrypted messages locally. If you'd like to experiment with this feature, build a custom %(brand)s Desktop with search components added.": "%(brand)s is missing some components required for securely caching encrypted messages locally. If you'd like to experiment with this feature, build a custom %(brand)s Desktop with search components added.", From 14e64c10a30a0ad1481ac0043e7867efbe640de6 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 18 Nov 2020 15:16:35 +0000 Subject: [PATCH 3/3] Restore numeric count as well for better pluralisation --- src/components/views/settings/EventIndexPanel.js | 5 ++++- src/i18n/strings/en_EN.json | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/views/settings/EventIndexPanel.js b/src/components/views/settings/EventIndexPanel.js index 7391fd479e..ec6ccacc9a 100644 --- a/src/components/views/settings/EventIndexPanel.js +++ b/src/components/views/settings/EventIndexPanel.js @@ -130,9 +130,12 @@ export default class EventIndexPanel extends React.Component {
{_t("Securely cache encrypted messages locally for them " + - "to appear in search results, using %(size)s to store messages from %(rooms)s room(s).", + "to appear in search results, using %(size)s to store messages from %(rooms)s rooms.", { size: formatBytes(this.state.eventIndexSize, 0), + // This drives the singular / plural string + // selection for "room" / "rooms" only. + count: this.state.roomCount, rooms: formatCountLong(this.state.roomCount), }, )} diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index fd61b214ea..23047cbdb8 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -935,7 +935,8 @@ "Failed to set display name": "Failed to set display name", "Encryption": "Encryption", "Individually verify each session used by a user to mark it as trusted, not trusting cross-signed devices.": "Individually verify each session used by a user to mark it as trusted, not trusting cross-signed devices.", - "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s room(s).": "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s room(s).", + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|other": "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.", + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|one": "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s room.", "Manage": "Manage", "Securely cache encrypted messages locally for them to appear in search results.": "Securely cache encrypted messages locally for them to appear in search results.", "%(brand)s is missing some components required for securely caching encrypted messages locally. If you'd like to experiment with this feature, build a custom %(brand)s Desktop with search components added.": "%(brand)s is missing some components required for securely caching encrypted messages locally. If you'd like to experiment with this feature, build a custom %(brand)s Desktop with search components added.",