Migrate action, common, a11y translation keys
```
move () {
FROM=$1 TO=$2 find public/locales -type f -exec sh -c 'jq ".$TO = .\"$FROM\" | del(.\"$FROM\") | del(..|nulls) | select(length > 0)" {} | sponge {}' \;
}
move "Avatar" "common.avatar"
move "Camera" "common.camera"
move "Close" "action.close"
move "Copied!" "common.copied"
move "Copy" "action.copy"
move "Copy link" "action.copy_link"
move "Encrypted" "common.encrypted"
move "Go" "action.go"
move "Home" "common.home"
move "Invite" "action.invite"
move "Loading…" "common.loading"
move "Microphone" "common.microphone"
move "No" "action.no"
move "Not encrypted" "common.unencrypted"
move "Password" "common.password"
move "Profile" "common.profile"
move "Username" "common.username"
move "Video" "common.video"
move "Register" "action.register"
move "Remove" "action.remove"
move "Settings" "common.settings"
move "Sign in" "action.sign_in"
move "Sign out" "action.sign_out"
move "Submit" "action.submit"
move "User menu" "a11y.user_menu"
move "Audio" "common.audio"
move "Display name" "common.display_name"
```
This commit is contained in:
@@ -66,13 +66,13 @@ export const UserMenu: FC<Props> = ({
|
||||
arr.push({
|
||||
key: "settings",
|
||||
icon: SettingsIcon,
|
||||
label: t("Settings"),
|
||||
label: "common.settings",
|
||||
});
|
||||
|
||||
if (isPasswordlessUser && !preventNavigation) {
|
||||
arr.push({
|
||||
key: "login",
|
||||
label: t("Sign in"),
|
||||
label: "action.sign_in",
|
||||
icon: LoginIcon,
|
||||
dataTestid: "usermenu_login",
|
||||
});
|
||||
@@ -81,7 +81,7 @@ export const UserMenu: FC<Props> = ({
|
||||
if (!isPasswordlessUser && !preventNavigation) {
|
||||
arr.push({
|
||||
key: "logout",
|
||||
label: t("Sign out"),
|
||||
label: "action.sign_out",
|
||||
icon: LogoutIcon,
|
||||
dataTestid: "usermenu_logout",
|
||||
});
|
||||
@@ -91,7 +91,7 @@ export const UserMenu: FC<Props> = ({
|
||||
return arr;
|
||||
}, [isAuthenticated, isPasswordlessUser, displayName, preventNavigation, t]);
|
||||
|
||||
const tooltip = useCallback(() => t("Profile"), [t]);
|
||||
const tooltip = useCallback(() => t("common.profile"), [t]);
|
||||
|
||||
if (!isAuthenticated) {
|
||||
return (
|
||||
@@ -124,7 +124,7 @@ export const UserMenu: FC<Props> = ({
|
||||
{
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
(props: any): ReactNode => (
|
||||
<Menu {...props} label={t("User menu")} onAction={onAction}>
|
||||
<Menu {...props} label={t("a11y.user_menu")} onAction={onAction}>
|
||||
{items.map(({ key, icon: Icon, label, dataTestid }) => (
|
||||
<Item key={key} textValue={label}>
|
||||
<Icon
|
||||
|
||||
Reference in New Issue
Block a user