Migrate more strings to translation keys (#11665)

This commit is contained in:
Michael Telatynski 2023-09-25 18:12:41 +01:00 committed by GitHub
parent de250df520
commit 54c88c57ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
127 changed files with 6797 additions and 5825 deletions

View file

@ -148,16 +148,13 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
eventIndexingSettings = (
<>
<SettingsSubsectionText>
{_t(
"Securely cache encrypted messages locally for them 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),
},
)}
{_t("settings|security|message_search_enabled", {
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),
})}
</SettingsSubsectionText>
<AccessibleButton kind="primary" onClick={this.onManage}>
{_t("action|manage")}
@ -167,9 +164,7 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
} else if (!this.state.eventIndexingEnabled && EventIndexPeg.supportIsInstalled()) {
eventIndexingSettings = (
<>
<SettingsSubsectionText>
{_t("Securely cache encrypted messages locally for them to appear in search results.")}
</SettingsSubsectionText>
<SettingsSubsectionText>{_t("settings|security|message_search_disabled")}</SettingsSubsectionText>
<div>
<AccessibleButton kind="primary" disabled={this.state.enabling} onClick={this.onEnable}>
{_t("action|enable")}
@ -187,7 +182,7 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
eventIndexingSettings = (
<SettingsSubsectionText>
{_t(
"%(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 <nativeLink>search components added</nativeLink>.",
"settings|security|message_search_unsupported",
{
brand,
},
@ -205,7 +200,7 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
eventIndexingSettings = (
<SettingsSubsectionText>
{_t(
"%(brand)s can't securely cache encrypted messages locally while running in a web browser. Use <desktopLink>%(brand)s Desktop</desktopLink> for encrypted messages to appear in search results.",
"settings|security|message_search_unsupported_web",
{
brand,
},
@ -227,12 +222,12 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
eventIndexingSettings = (
<>
<SettingsSubsectionText>
{this.state.enabling ? <InlineSpinner /> : _t("Message search initialisation failed")}
{this.state.enabling ? <InlineSpinner /> : _t("settings|security|message_search_failed")}
</SettingsSubsectionText>
{EventIndexPeg.error && (
<SettingsSubsectionText>
<details>
<summary>{_t("Advanced")}</summary>
<summary>{_t("common|Advanced")}</summary>
<code>
{EventIndexPeg.error instanceof Error
? EventIndexPeg.error.message