Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Migrate more strings to translation keys #11512

Merged
merged 19 commits into from
Sep 4, 2023
6 changes: 3 additions & 3 deletions src/components/structures/ViewSource.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,14 @@ export default class ViewSource extends React.Component<IProps, IState> {
<BaseDialog className="mx_ViewSource" onFinished={this.props.onFinished} title={_t("action|view_source")}>
<div className="mx_ViewSource_header">
<CopyableText getTextToCopy={() => roomId} border={false}>
{_t("Room ID: %(roomId)s", { roomId })}
{_t("devtools|room_id", { roomId })}
</CopyableText>
<CopyableText getTextToCopy={() => eventId} border={false}>
{_t("Event ID: %(eventId)s", { eventId })}
{_t("devtools|event_id", { eventId })}
</CopyableText>
{mxEvent.threadRootId && (
<CopyableText getTextToCopy={() => mxEvent.threadRootId!} border={false}>
{_t("Thread root ID: %(threadRootId)s", {
{_t("devtools|thread_root_id", {
threadRootId: mxEvent.threadRootId,
})}
</CopyableText>
Expand Down
28 changes: 14 additions & 14 deletions src/components/views/dialogs/DevtoolsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@ const categoryLabels: Record<Category, TranslationKey> = {
export type Tool = React.FC<IDevtoolsProps> | ((props: IDevtoolsProps) => JSX.Element);
const Tools: Record<Category, [label: TranslationKey, tool: Tool][]> = {
[Category.Room]: [
[_td("Send custom timeline event"), TimelineEventEditor],
[_td("Explore room state"), RoomStateExplorer],
[_td("Explore room account data"), RoomAccountDataExplorer],
[_td("View servers in room"), ServersInRoom],
[_td("Notifications debug"), RoomNotifications],
[_td("Verification explorer"), VerificationExplorer],
[_td("Active Widgets"), WidgetExplorer],
[_td("devtools|send_custom_timeline_event"), TimelineEventEditor],
[_td("devtools|explore_room_state"), RoomStateExplorer],
[_td("devtools|explore_room_account_data"), RoomAccountDataExplorer],
[_td("devtools|view_servers_in_room"), ServersInRoom],
[_td("devtools|notifications_debug"), RoomNotifications],
[_td("devtools|verification_explorer"), VerificationExplorer],
[_td("devtools|active_widgets"), WidgetExplorer],
],
[Category.Other]: [
[_td("Explore account data"), AccountDataExplorer],
[_td("Settings explorer"), SettingExplorer],
[_td("Server info"), ServerInfo],
[_td("devtools|explore_account_data"), AccountDataExplorer],
[_td("devtools|settings_explorer"), SettingExplorer],
[_td("devtools|server_info"), ServerInfo],
],
};

Expand Down Expand Up @@ -116,23 +116,23 @@ const DevtoolsDialog: React.FC<IProps> = ({ roomId, threadRootId, onFinished })
);
}

const label = tool ? tool[0] : _t("Toolbox");
const label = tool ? tool[0] : _t("devtools|toolbox");
return (
<BaseDialog className="mx_QuestionDialog" onFinished={onFinished} title={_t("Developer Tools")}>
<BaseDialog className="mx_QuestionDialog" onFinished={onFinished} title={_t("devtools|developer_tools")}>
<MatrixClientContext.Consumer>
{(cli) => (
<>
<div className="mx_DevTools_label_left">{label}</div>
<CopyableText className="mx_DevTools_label_right" getTextToCopy={() => roomId} border={false}>
{_t("Room ID: %(roomId)s", { roomId })}
{_t("devtools|room_id", { roomId })}
</CopyableText>
{!threadRootId ? null : (
<CopyableText
className="mx_DevTools_label_right"
getTextToCopy={() => threadRootId}
border={false}
>
{_t("Thread Root ID: %(threadRootId)s", { threadRootId })}
{_t("devtools|thread_root_id", { threadRootId })}
</CopyableText>
)}
<div className="mx_DevTools_label_bottom" />
Expand Down
38 changes: 19 additions & 19 deletions src/hooks/useUserOnboardingTasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,55 +57,55 @@ const tasks: UserOnboardingTask[] = [
{
id: "create-account",
title: _t("Create account"),
description: _t("You made it!"),
description: _t("onboarding|you_made_it"),
completed: () => true,
},
{
id: "find-friends",
title: _t("Find and invite your friends"),
description: _t("It’s what you’re here for, so lets get to it"),
title: _t("onboarding|find_friends"),
description: _t("onboarding|find_friends_description"),
completed: (ctx: UserOnboardingContext) => ctx.hasDmRooms,
relevant: [UseCase.PersonalMessaging, UseCase.Skip],
action: {
label: _t("Find friends"),
label: _t("onboarding|find_friends_action"),
onClick: onClickStartDm,
},
},
{
id: "find-coworkers",
title: _t("Find and invite your co-workers"),
description: _t("Get stuff done by finding your teammates"),
title: _t("onboarding|find_coworkers"),
description: _t("onboarding|get_stuff_done"),
completed: (ctx: UserOnboardingContext) => ctx.hasDmRooms,
relevant: [UseCase.WorkMessaging],
action: {
label: _t("Find people"),
label: _t("onboarding|find_people"),
onClick: onClickStartDm,
},
},
{
id: "find-community-members",
title: _t("Find and invite your community members"),
description: _t("Get stuff done by finding your teammates"),
title: _t("onboarding|find_community_members"),
description: _t("onboarding|get_stuff_done"),
completed: (ctx: UserOnboardingContext) => ctx.hasDmRooms,
relevant: [UseCase.CommunityMessaging],
action: {
label: _t("Find people"),
label: _t("onboarding|find_people"),
onClick: onClickStartDm,
},
},
{
id: "download-apps",
title: () =>
_t("Download %(brand)s", {
_t("onboarding|download_app", {
brand: SdkConfig.get("brand"),
}),
description: () =>
_t("Don’t miss a thing by taking %(brand)s with you", {
_t("onboarding|download_app_description", {
brand: SdkConfig.get("brand"),
}),
completed: (ctx: UserOnboardingContext) => ctx.hasDevices,
action: {
label: _t("Download apps"),
label: _t("onboarding|download_app_action"),
onClick: (ev: ButtonEvent) => {
PosthogTrackers.trackInteraction("WebUserOnboardingTaskDownloadApps", ev);
Modal.createDialog(AppDownloadDialog, {}, "mx_AppDownloadDialog_wrapper", false, true);
Expand All @@ -114,11 +114,11 @@ const tasks: UserOnboardingTask[] = [
},
{
id: "setup-profile",
title: _t("Set up your profile"),
description: _t("Make sure people know it’s really you"),
title: _t("onboarding|set_up_profile"),
description: _t("onboarding|set_up_profile_description"),
completed: (ctx: UserOnboardingContext) => ctx.hasAvatar,
action: {
label: _t("Your profile"),
label: _t("onboarding|set_up_profile_action"),
onClick: (ev: ButtonEvent) => {
PosthogTrackers.trackInteraction("WebUserOnboardingTaskSetupProfile", ev);
defaultDispatcher.dispatch({
Expand All @@ -130,11 +130,11 @@ const tasks: UserOnboardingTask[] = [
},
{
id: "permission-notifications",
title: _t("Turn on notifications"),
description: _t("Don’t miss a reply or important message"),
title: _t("onboarding|enable_notifications"),
description: _t("onboarding|enable_notifications_description"),
completed: (ctx: UserOnboardingContext) => ctx.hasNotificationsEnabled,
action: {
label: _t("Enable notifications"),
label: _t("onboarding|enable_notifications_action"),
onClick: (ev: ButtonEvent) => {
PosthogTrackers.trackInteraction("WebUserOnboardingTaskEnableNotifications", ev);
Notifier.setEnabled(true);
Expand Down
10 changes: 5 additions & 5 deletions src/i18n/strings/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@
"All Rooms": "كل الغُرف",
"All messages": "كل الرسائل",
"What's New": "آخِر المُستجدّات",
"Toolbox": "علبة الأدوات",
"Collecting logs": "تجميع السجلات",
"No update available.": "لا يوجد هناك أي تحديث.",
"Collecting app version information": "تجميع المعلومات حول نسخة التطبيق",
"Changelog": "سِجل التغييرات",
"Waiting for response from server": "في انتظار الرد مِن الخادوم",
"Thank you!": "شكرًا !",
"Call invitation": "دعوة لمحادثة",
"Developer Tools": "أدوات التطوير",
"What's new?": "ما الجديد ؟",
"powered by Matrix": "مشغل بواسطة Matrix",
"Use Single Sign On to continue": "استعمل الولوج الموحّد للمواصلة",
Expand Down Expand Up @@ -1341,9 +1339,6 @@
"time": {
"date_at_time": "%(date)s في %(time)s"
},
"devtools": {
"state_key": "مفتاح الحالة"
},
"settings": {
"show_breadcrumbs": "إظهار اختصارات للغرف التي تم عرضها مؤخرًا أعلى قائمة الغرف",
"use_12_hour_format": "عرض الطوابع الزمنية بتنسيق 12 ساعة (على سبيل المثال 2:30pm)",
Expand All @@ -1361,5 +1356,10 @@
"big_emoji": "تفعيل الرموز التعبيرية الكبيرة في المحادثة",
"prompt_invite": "أعلمني قبل إرسال دعوات لمعرِّفات قد لا تكون صحيحة",
"start_automatically": "ابدأ تلقائيًا بعد تسجيل الدخول إلى النظام"
},
"devtools": {
"state_key": "مفتاح الحالة",
"toolbox": "علبة الأدوات",
"developer_tools": "أدوات التطوير"
}
}
46 changes: 23 additions & 23 deletions src/i18n/strings/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -408,11 +408,9 @@
"Collecting app version information": "Събиране на информация за версията на приложението",
"Search…": "Търсене…",
"Tuesday": "Вторник",
"Developer Tools": "Инструменти за разработчика",
"Preparing to send logs": "Подготовка за изпращане на логове",
"Saturday": "Събота",
"Monday": "Понеделник",
"Toolbox": "Инструменти",
"Collecting logs": "Събиране на логове",
"All Rooms": "Във всички стаи",
"Wednesday": "Сряда",
Expand Down Expand Up @@ -1160,20 +1158,6 @@
"Not Trusted": "Недоверено",
"%(name)s (%(userId)s) signed in to a new session without verifying it:": "%(name)s (%(userId)s) влезе в нова сесия без да я потвърди:",
"Ask this user to verify their session, or manually verify it below.": "Поискайте от този потребител да потвърди сесията си, или я потвърдете ръчно по-долу.",
"a few seconds ago": "преди няколко секунди",
"about a minute ago": "преди около минута",
"%(num)s minutes ago": "преди %(num)s минути",
"about an hour ago": "преди около час",
"%(num)s hours ago": "преди %(num)s часа",
"about a day ago": "преди около ден",
"%(num)s days ago": "преди %(num)s дни",
"a few seconds from now": "след няколко секунди",
"about a minute from now": "след около минута",
"%(num)s minutes from now": "след %(num)s минути",
"about an hour from now": "след около час",
"%(num)s hours from now": "след %(num)s часа",
"about a day from now": "след около ден",
"%(num)s days from now": "след %(num)s дни",
"Never send encrypted messages to unverified sessions from this session": "Никога не изпращай шифровани съобщения към непотвърдени сесии от тази сесия",
"Never send encrypted messages to unverified sessions in this room from this session": "Никога не изпращай шифровани съобщения към непотвърдени сесии в тази стая от тази сесия",
"Enable message search in encrypted rooms": "Включи търсенето на съобщения в шифровани стаи",
Expand Down Expand Up @@ -2122,13 +2106,21 @@
"short_days": "%(value)sд",
"short_hours": "%(value)sч",
"short_minutes": "%(value)sм",
"short_seconds": "%(value)sс"
},
"devtools": {
"event_type": "Вид на събитие",
"state_key": "State ключ",
"event_sent": "Събитието е изпратено!",
"event_content": "Съдържание на събитието"
"short_seconds": "%(value)sс",
"n_minutes_ago": "преди %(num)s минути",
"n_hours_ago": "преди %(num)s часа",
"n_days_ago": "преди %(num)s дни",
"in_n_minutes": "след %(num)s минути",
"in_n_hours": "след %(num)s часа",
"in_n_days": "след %(num)s дни",
"in_few_seconds": "след няколко секунди",
"in_about_minute": "след около минута",
"in_about_hour": "след около час",
"in_about_day": "след около ден",
"few_seconds_ago": "преди няколко секунди",
"about_minute_ago": "преди около минута",
"about_hour_ago": "преди около час",
"about_day_ago": "преди около ден"
},
"settings": {
"show_breadcrumbs": "Показвай преки пътища до скоро-прегледаните стаи над списъка със стаи",
Expand All @@ -2150,5 +2142,13 @@
"big_emoji": "Включи големи емоджита в чатовете",
"prompt_invite": "Питай преди изпращане на покани към потенциално невалидни Matrix идентификатори",
"start_automatically": "Автоматично стартиране след влизане в системата"
},
"devtools": {
"event_type": "Вид на събитие",
"state_key": "State ключ",
"event_sent": "Събитието е изпратено!",
"event_content": "Съдържание на събитието",
"toolbox": "Инструменти",
"developer_tools": "Инструменти за разработчика"
}
}
16 changes: 8 additions & 8 deletions src/i18n/strings/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,9 @@
"Search…": "Cerca…",
"When I'm invited to a room": "Quan sóc convidat a una sala",
"Tuesday": "Dimarts",
"Developer Tools": "Eines de desenvolupador",
"Preparing to send logs": "Preparant l'enviament de logs",
"Saturday": "Dissabte",
"Monday": "Dilluns",
"Toolbox": "Caixa d'eines",
"Collecting logs": "S'estan recopilant els registres",
"All Rooms": "Totes les sales",
"Wednesday": "Dimecres",
Expand Down Expand Up @@ -657,12 +655,6 @@
"submit_debug_logs": "Enviar logs de depuració",
"send_logs": "Envia els registres"
},
"devtools": {
"event_type": "Tipus d'esdeveniment",
"state_key": "Clau d'estat",
"event_sent": "Esdeveniment enviat!",
"event_content": "Contingut de l'esdeveniment"
},
"settings": {
"use_12_hour_format": "Mostra les marques de temps en format de 12 hores (p.e. 2:30pm)",
"always_show_message_timestamps": "Mostra sempre la marca de temps del missatge",
Expand All @@ -674,5 +666,13 @@
"show_read_receipts": "Mostra les confirmacions de lectura enviades pels altres usuaris",
"show_displayname_changes": "Mostra els canvis de nom",
"big_emoji": "Activa Emojis grans en xats"
},
"devtools": {
"event_type": "Tipus d'esdeveniment",
"state_key": "Clau d'estat",
"event_sent": "Esdeveniment enviat!",
"event_content": "Contingut de l'esdeveniment",
"toolbox": "Caixa d'eines",
"developer_tools": "Eines de desenvolupador"
}
}
Loading