Make localization keys compatible with agglutinative and/or SOV type languages (#10159)
* Make localization keys on HelpUserSettingsTab compatible with agglutinative and/or SOV type languages * Make localization keys on room notifications debug dialog on devtools compatible with agglutinative and/or SOV type languages * Make keys compatible with inflection * Clarify context for Weblate translators --------- Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
This commit is contained in:
parent
e4552111c0
commit
b9ff6558e9
4 changed files with 69 additions and 32 deletions
|
@ -20,7 +20,7 @@ import React, { useContext } from "react";
|
||||||
|
|
||||||
import MatrixClientContext from "../../../../contexts/MatrixClientContext";
|
import MatrixClientContext from "../../../../contexts/MatrixClientContext";
|
||||||
import { useNotificationState } from "../../../../hooks/useRoomNotificationState";
|
import { useNotificationState } from "../../../../hooks/useRoomNotificationState";
|
||||||
import { _t } from "../../../../languageHandler";
|
import { _t, _td } from "../../../../languageHandler";
|
||||||
import { determineUnreadState } from "../../../../RoomNotifs";
|
import { determineUnreadState } from "../../../../RoomNotifs";
|
||||||
import { humanReadableNotificationColor } from "../../../../stores/notifications/NotificationColor";
|
import { humanReadableNotificationColor } from "../../../../stores/notifications/NotificationColor";
|
||||||
import { doesRoomOrThreadHaveUnreadMessages } from "../../../../Unread";
|
import { doesRoomOrThreadHaveUnreadMessages } from "../../../../Unread";
|
||||||
|
@ -39,22 +39,38 @@ export default function RoomNotifications({ onBack }: IDevtoolsProps): JSX.Eleme
|
||||||
<h2>{_t("Room status")}</h2>
|
<h2>{_t("Room status")}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
{_t("Room unread status: ")}
|
{_t(
|
||||||
<strong>{humanReadableNotificationColor(color)}</strong>
|
"Room unread status: <strong>%(status)s</strong>, count: <strong>%(count)s</strong>",
|
||||||
{count > 0 && (
|
{
|
||||||
<>
|
status: humanReadableNotificationColor(color),
|
||||||
{_t(", count:")} <strong>{count}</strong>
|
count,
|
||||||
</>
|
},
|
||||||
|
{
|
||||||
|
strong: (sub) => <strong>{sub}</strong>,
|
||||||
|
},
|
||||||
)}
|
)}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
{_t("Notification state is")} <strong>{notificationState}</strong>
|
{_t(
|
||||||
|
"Notification state is <strong>%(notificationState)s</strong>",
|
||||||
|
{
|
||||||
|
notificationState,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
strong: (sub) => <strong>{sub}</strong>,
|
||||||
|
},
|
||||||
|
)}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
{_t("Room is ")}
|
{_t(
|
||||||
<strong>
|
cli.isRoomEncrypted(room.roomId!)
|
||||||
{cli.isRoomEncrypted(room.roomId!) ? _t("encrypted ✅") : _t("not encrypted 🚨")}
|
? _td("Room is <strong>encrypted ✅</strong>")
|
||||||
</strong>
|
: _td("Room is <strong>not encrypted 🚨</strong>"),
|
||||||
|
{},
|
||||||
|
{
|
||||||
|
strong: (sub) => <strong>{sub}</strong>,
|
||||||
|
},
|
||||||
|
)}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -327,10 +327,26 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
|
||||||
<span className="mx_SettingsTab_subheading">{_t("Advanced")}</span>
|
<span className="mx_SettingsTab_subheading">{_t("Advanced")}</span>
|
||||||
<div className="mx_SettingsTab_subsectionText">
|
<div className="mx_SettingsTab_subsectionText">
|
||||||
<div>
|
<div>
|
||||||
{_t("Homeserver is")} <code>{MatrixClientPeg.get().getHomeserverUrl()}</code>
|
{_t(
|
||||||
|
"Homeserver is <code>%(homeserverUrl)s</code>",
|
||||||
|
{
|
||||||
|
homeserverUrl: MatrixClientPeg.get().getHomeserverUrl(),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
code: (sub) => <code>{sub}</code>,
|
||||||
|
},
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{_t("Identity server is")} <code>{MatrixClientPeg.get().getIdentityServerUrl()}</code>
|
{_t(
|
||||||
|
"Identity server is <code>%(identityServerUrl)s</code>",
|
||||||
|
{
|
||||||
|
identityServerUrl: MatrixClientPeg.get().getIdentityServerUrl(),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
code: (sub) => <code>{sub}</code>,
|
||||||
|
},
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<details>
|
<details>
|
||||||
<summary>{_t("Access Token")}</summary>
|
<summary>{_t("Access Token")}</summary>
|
||||||
|
|
|
@ -1567,8 +1567,8 @@
|
||||||
"FAQ": "FAQ",
|
"FAQ": "FAQ",
|
||||||
"Keyboard Shortcuts": "Keyboard Shortcuts",
|
"Keyboard Shortcuts": "Keyboard Shortcuts",
|
||||||
"Versions": "Versions",
|
"Versions": "Versions",
|
||||||
"Homeserver is": "Homeserver is",
|
"Homeserver is <code>%(homeserverUrl)s</code>": "Homeserver is <code>%(homeserverUrl)s</code>",
|
||||||
"Identity server is": "Identity server is",
|
"Identity server is <code>%(identityServerUrl)s</code>": "Identity server is <code>%(identityServerUrl)s</code>",
|
||||||
"Access Token": "Access Token",
|
"Access Token": "Access Token",
|
||||||
"Your access token gives full access to your account. Do not share it with anyone.": "Your access token gives full access to your account. Do not share it with anyone.",
|
"Your access token gives full access to your account. Do not share it with anyone.": "Your access token gives full access to your account. Do not share it with anyone.",
|
||||||
"Clear cache and reload": "Clear cache and reload",
|
"Clear cache and reload": "Clear cache and reload",
|
||||||
|
@ -3150,12 +3150,11 @@
|
||||||
"Filter results": "Filter results",
|
"Filter results": "Filter results",
|
||||||
"No results found": "No results found",
|
"No results found": "No results found",
|
||||||
"Room status": "Room status",
|
"Room status": "Room status",
|
||||||
"Room unread status: ": "Room unread status: ",
|
"Room unread status: <strong>%(status)s</strong>, count: <strong>%(count)s</strong>|other": "Room unread status: <strong>%(status)s</strong>, count: <strong>%(count)s</strong>",
|
||||||
", count:": ", count:",
|
"Room unread status: <strong>%(status)s</strong>, count: <strong>%(count)s</strong>|zero": "Room unread status: <strong>%(status)s</strong>",
|
||||||
"Notification state is": "Notification state is",
|
"Notification state is <strong>%(notificationState)s</strong>": "Notification state is <strong>%(notificationState)s</strong>",
|
||||||
"Room is ": "Room is ",
|
"Room is <strong>encrypted ✅</strong>": "Room is <strong>encrypted ✅</strong>",
|
||||||
"encrypted ✅": "encrypted ✅",
|
"Room is <strong>not encrypted 🚨</strong>": "Room is <strong>not encrypted 🚨</strong>",
|
||||||
"not encrypted 🚨": "not encrypted 🚨",
|
|
||||||
"Main timeline": "Main timeline",
|
"Main timeline": "Main timeline",
|
||||||
"Total: ": "Total: ",
|
"Total: ": "Total: ",
|
||||||
"Highlight: ": "Highlight: ",
|
"Highlight: ": "Highlight: ",
|
||||||
|
|
|
@ -11,20 +11,26 @@ exports[`<RoomNotifications /> should render 1`] = `
|
||||||
</h2>
|
</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
|
<span>
|
||||||
Room unread status:
|
Room unread status:
|
||||||
<strong>
|
<strong>
|
||||||
None
|
None
|
||||||
</strong>
|
</strong>
|
||||||
|
</span>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
<span>
|
||||||
Notification state is
|
Notification state is
|
||||||
<strong />
|
<strong />
|
||||||
|
</span>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
<span>
|
||||||
Room is
|
Room is
|
||||||
<strong>
|
<strong>
|
||||||
not encrypted 🚨
|
not encrypted 🚨
|
||||||
</strong>
|
</strong>
|
||||||
|
</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue