Migrate more strings to translation keys (#11665)
This commit is contained in:
parent
de250df520
commit
54c88c57ed
127 changed files with 6797 additions and 5825 deletions
|
@ -58,7 +58,7 @@ const QuickSettingsButton: React.FC<{
|
|||
managed={false}
|
||||
focusLock={true}
|
||||
>
|
||||
<h2>{_t("Quick settings")}</h2>
|
||||
<h2>{_t("quick_settings|title")}</h2>
|
||||
|
||||
<AccessibleButton
|
||||
onClick={() => {
|
||||
|
@ -67,7 +67,7 @@ const QuickSettingsButton: React.FC<{
|
|||
}}
|
||||
kind="primary_outline"
|
||||
>
|
||||
{_t("All settings")}
|
||||
{_t("quick_settings|all_settings")}
|
||||
</AccessibleButton>
|
||||
|
||||
{currentRoomId && developerModeEnabled && (
|
||||
|
@ -90,7 +90,7 @@ const QuickSettingsButton: React.FC<{
|
|||
|
||||
<h4 className="mx_QuickSettingsButton_pinToSidebarHeading">
|
||||
<PinUprightIcon className="mx_QuickSettingsButton_icon" />
|
||||
{_t("Pin to sidebar")}
|
||||
{_t("quick_settings|metaspace_section")}
|
||||
</h4>
|
||||
|
||||
<StyledCheckbox
|
||||
|
@ -120,7 +120,7 @@ const QuickSettingsButton: React.FC<{
|
|||
}}
|
||||
>
|
||||
<EllipsisIcon className="mx_QuickSettingsButton_icon" />
|
||||
{_t("More options")}
|
||||
{_t("quick_settings|sidebar_settings")}
|
||||
</AccessibleButton>
|
||||
|
||||
<QuickThemeSwitcher requestClose={closeMenu} />
|
||||
|
@ -133,7 +133,7 @@ const QuickSettingsButton: React.FC<{
|
|||
<AccessibleTooltipButton
|
||||
className={classNames("mx_QuickSettingsButton", { expanded: !isPanelCollapsed })}
|
||||
onClick={openMenu}
|
||||
title={_t("Quick settings")}
|
||||
title={_t("quick_settings|title")}
|
||||
inputRef={handle}
|
||||
forceHide={!isPanelCollapsed}
|
||||
aria-expanded={!isPanelCollapsed}
|
||||
|
|
|
@ -45,7 +45,7 @@ const QuickThemeSwitcher: React.FC<Props> = ({ requestClose }) => {
|
|||
const themeOptions = [
|
||||
{
|
||||
id: MATCH_SYSTEM_THEME_ID,
|
||||
name: _t("Match system"),
|
||||
name: _t("theme|match_system"),
|
||||
},
|
||||
...orderedThemes,
|
||||
];
|
||||
|
@ -85,7 +85,7 @@ const QuickThemeSwitcher: React.FC<Props> = ({ requestClose }) => {
|
|||
id="mx_QuickSettingsButton_themePickerDropdown"
|
||||
onOptionChange={onOptionChange}
|
||||
value={selectedTheme}
|
||||
label={_t("Space selection")}
|
||||
label={_t("common|theme")}
|
||||
>
|
||||
{
|
||||
themeOptions.map((theme) => <div key={theme.id}>{theme.name}</div>) as NonEmptyArray<
|
||||
|
|
|
@ -67,7 +67,7 @@ export const SpaceAvatar: React.FC<Pick<IProps, "avatarUrl" | "avatarDisabled" |
|
|||
}}
|
||||
kind="link"
|
||||
className="mx_SpaceBasicSettings_avatar_remove"
|
||||
aria-label={_t("Delete avatar")}
|
||||
aria-label={_t("room_settings|delete_avatar_label")}
|
||||
>
|
||||
{_t("action|delete")}
|
||||
</AccessibleButton>
|
||||
|
@ -84,7 +84,7 @@ export const SpaceAvatar: React.FC<Pick<IProps, "avatarUrl" | "avatarDisabled" |
|
|||
<AccessibleButton
|
||||
onClick={() => avatarUploadRef.current?.click()}
|
||||
kind="link"
|
||||
aria-label={_t("Upload avatar")}
|
||||
aria-label={_t("room_settings|upload_avatar_label")}
|
||||
>
|
||||
{_t("action|upload")}
|
||||
</AccessibleButton>
|
||||
|
|
|
@ -33,7 +33,7 @@ interface IProps {
|
|||
}
|
||||
|
||||
const SpacePublicShare: React.FC<IProps> = ({ space, onFinished }) => {
|
||||
const [copiedText, setCopiedText] = useState(_t("Click to copy"));
|
||||
const [copiedText, setCopiedText] = useState(_t("action|click_to_copy"));
|
||||
|
||||
return (
|
||||
<div className="mx_SpacePublicShare">
|
||||
|
@ -43,12 +43,12 @@ const SpacePublicShare: React.FC<IProps> = ({ space, onFinished }) => {
|
|||
const permalinkCreator = new RoomPermalinkCreator(space);
|
||||
permalinkCreator.load();
|
||||
const success = await copyPlaintext(permalinkCreator.forShareableRoom());
|
||||
const text = success ? _t("Copied!") : _t("Failed to copy");
|
||||
const text = success ? _t("common|copied") : _t("error|failed_copy");
|
||||
setCopiedText(text);
|
||||
await sleep(5000);
|
||||
if (copiedText === text) {
|
||||
// if the text hasn't changed by another click then clear it after some time
|
||||
setCopiedText(_t("Click to copy"));
|
||||
setCopiedText(_t("action|click_to_copy"));
|
||||
}
|
||||
}}
|
||||
>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue