Migrate more strings to translation keys (#11613)
This commit is contained in:
committed by
GitHub
parent
d46d4b3d04
commit
5cb8cbd893
@@ -74,13 +74,13 @@ export const ThreadPanelHeader: React.FC<{
|
||||
const [menuDisplayed, button, openMenu, closeMenu] = useContextMenu<HTMLElement>();
|
||||
const options: readonly ThreadPanelHeaderOption[] = [
|
||||
{
|
||||
label: _t("All threads"),
|
||||
description: _t("Shows all threads from current room"),
|
||||
label: _t("threads|all_threads"),
|
||||
description: _t("threads|all_threads_description"),
|
||||
key: ThreadFilterType.All,
|
||||
},
|
||||
{
|
||||
label: _t("My threads"),
|
||||
description: _t("Shows all threads you've participated in"),
|
||||
label: _t("threads|my_threads"),
|
||||
description: _t("threads|my_threads_description"),
|
||||
key: ThreadFilterType.My,
|
||||
},
|
||||
];
|
||||
@@ -125,7 +125,7 @@ export const ThreadPanelHeader: React.FC<{
|
||||
PosthogTrackers.trackInteraction("WebRightPanelThreadPanelFilterDropdown", ev);
|
||||
}}
|
||||
>
|
||||
{`${_t("Show:")} ${value?.label}`}
|
||||
{`${_t("threads|show_thread_filter")} ${value?.label}`}
|
||||
</ContextMenuButton>
|
||||
{contextMenu}
|
||||
</>
|
||||
@@ -146,17 +146,14 @@ const EmptyThread: React.FC<EmptyThreadIProps> = ({ hasThreads, filterOption, sh
|
||||
body = (
|
||||
<>
|
||||
<p>
|
||||
{_t(
|
||||
"Reply to an ongoing thread or use “%(replyInThread)s” when hovering over a message to start a new one.",
|
||||
{
|
||||
replyInThread: _t("Reply in thread"),
|
||||
},
|
||||
)}
|
||||
{_t("threads|empty_has_threads_tip", {
|
||||
replyInThread: _t("Reply in thread"),
|
||||
})}
|
||||
</p>
|
||||
<p>
|
||||
{/* Always display that paragraph to prevent layout shift when hiding the button */}
|
||||
{filterOption === ThreadFilterType.My ? (
|
||||
<button onClick={showAllThreadsCallback}>{_t("Show all threads")}</button>
|
||||
<button onClick={showAllThreadsCallback}>{_t("threads|show_all_threads")}</button>
|
||||
) : (
|
||||
<> </>
|
||||
)}
|
||||
@@ -166,10 +163,10 @@ const EmptyThread: React.FC<EmptyThreadIProps> = ({ hasThreads, filterOption, sh
|
||||
} else {
|
||||
body = (
|
||||
<>
|
||||
<p>{_t("Threads help keep your conversations on-topic and easy to track.")}</p>
|
||||
<p>{_t("threads|empty_explainer")}</p>
|
||||
<p className="mx_ThreadPanel_empty_tip">
|
||||
{_t(
|
||||
"<b>Tip:</b> Use “%(replyInThread)s” when hovering over a message.",
|
||||
"threads|empty_tip",
|
||||
{
|
||||
replyInThread: _t("Reply in thread"),
|
||||
},
|
||||
@@ -185,7 +182,7 @@ const EmptyThread: React.FC<EmptyThreadIProps> = ({ hasThreads, filterOption, sh
|
||||
return (
|
||||
<aside className="mx_ThreadPanel_empty">
|
||||
<div className="mx_ThreadPanel_largeIcon" />
|
||||
<h2>{_t("Keep discussions organised with threads")}</h2>
|
||||
<h2>{_t("threads|empty_heading")}</h2>
|
||||
{body}
|
||||
</aside>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user