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

@ -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"));
}
}}
>