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:
Michael Telatynski
2023-11-20 11:05:18 +00:00
parent 85250e6ea3
commit 71664f5f8e
47 changed files with 718 additions and 584 deletions

View File

@@ -97,7 +97,7 @@ export const FeedbackSettingsTab: FC<Props> = ({ roomId }) => {
</FieldRow>
)}
<Button type="submit" disabled={sending}>
{sending ? t("Submitting…") : t("Submit")}
{sending ? t("Submitting…") : ("action.submit")}
</Button>
</FieldRow>
)}

View File

@@ -82,7 +82,7 @@ export const ProfileSettingsTab: FC<Props> = ({ client }) => {
<AvatarInputField
id="avatar"
name="avatar"
label={t("Avatar")}
label={t("common.avatar")}
avatarUrl={avatarUrl}
userId={userId}
displayName={displayName}
@@ -94,7 +94,7 @@ export const ProfileSettingsTab: FC<Props> = ({ client }) => {
<InputField
id="userId"
name="userId"
label={t("Username")}
label={t("common.username")}
type="text"
disabled
value={client.getUserId()!}
@@ -104,11 +104,11 @@ export const ProfileSettingsTab: FC<Props> = ({ client }) => {
<InputField
id="displayName"
name="displayName"
label={t("Display name")}
label={t("common.display_name")}
type="text"
required
autoComplete="off"
placeholder={t("Display name")}
placeholder={t("common.display_name")}
defaultValue={displayName}
data-testid="profile_displayname"
/>

View File

@@ -121,11 +121,11 @@ export const SettingsModal: FC<Props> = (props) => {
title={
<>
<AudioIcon width={16} height={16} />
<span className={styles.tabLabel}>{t("Audio")}</span>
<span className={styles.tabLabel}>{t("common.audio")}</span>
</>
}
>
{generateDeviceSelection(devices.audioInput, t("Microphone"))}
{generateDeviceSelection(devices.audioInput, t("common.microphone"))}
{!isFirefox() &&
generateDeviceSelection(devices.audioOutput, t("Speaker"))}
</TabItem>
@@ -137,11 +137,11 @@ export const SettingsModal: FC<Props> = (props) => {
title={
<>
<VideoIcon width={16} height={16} />
<span>{t("Video")}</span>
<span>{t("common.video")}</span>
</>
}
>
{generateDeviceSelection(devices.videoInput, t("Camera"))}
{generateDeviceSelection(devices.videoInput, t("common.camera"))}
</TabItem>
);
@@ -151,7 +151,7 @@ export const SettingsModal: FC<Props> = (props) => {
title={
<>
<UserIcon width={15} height={15} />
<span>{t("Profile")}</span>
<span>{t("common.profile")}</span>
</>
}
>
@@ -251,7 +251,7 @@ export const SettingsModal: FC<Props> = (props) => {
return (
<Modal
title={t("Settings")}
title={t("common.settings")}
className={styles.settingsModal}
open={props.open}
onDismiss={props.onDismiss}