Migrate more strings to translation keys (#11680)

This commit is contained in:
Michael Telatynski 2023-09-29 08:49:26 +01:00 committed by GitHub
parent 8014cebb20
commit 6af4335db1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
101 changed files with 6739 additions and 5973 deletions

View file

@ -149,7 +149,7 @@ const AppRow: React.FC<IAppRowProps> = ({ app, room }) => {
let pinTitle: string;
if (cannotPin) {
pinTitle = _t("You can only pin up to %(count)s widgets", { count: MAX_PINNED });
pinTitle = _t("right_panel|pinned_messages|limits", { count: MAX_PINNED });
} else {
pinTitle = isPinned ? _t("action|unpin") : _t("action|pin");
}
@ -167,9 +167,9 @@ const AppRow: React.FC<IAppRowProps> = ({ app, room }) => {
let openTitle = "";
if (isPinned) {
openTitle = _t("Unpin this widget to view it in this panel");
openTitle = _t("widget|unpin_to_view_right_panel");
} else if (isMaximised) {
openTitle = _t("Close this widget to view it in this panel");
openTitle = _t("widget|close_to_view_right_panel");
}
const classes = classNames("mx_BaseCard_Button mx_RoomSummaryCard_Button", {
@ -237,19 +237,19 @@ const AppsSection: React.FC<IAppsSectionProps> = ({ room }) => {
if (realApps.length > 0 && WidgetLayoutStore.instance.canCopyLayoutToRoom(room)) {
copyLayoutBtn = (
<AccessibleButton kind="link" onClick={() => WidgetLayoutStore.instance.copyLayoutToRoom(room)}>
{_t("Set my room layout for everyone")}
{_t("widget|set_room_layout")}
</AccessibleButton>
);
}
return (
<Group className="mx_RoomSummaryCard_appsGroup" title={_t("Widgets")}>
<Group className="mx_RoomSummaryCard_appsGroup" title={_t("right_panel|widgets_section")}>
{realApps.map((app) => (
<AppRow key={app.id} app={app} room={room} />
))}
{copyLayoutBtn}
<AccessibleButton kind="link" onClick={onManageIntegrations}>
{realApps.length > 0 ? _t("Edit widgets, bridges & bots") : _t("Add widgets, bridges & bots")}
{realApps.length > 0 ? _t("right_panel|edit_integrations") : _t("right_panel|add_integrations")}
</AccessibleButton>
</Group>
);
@ -310,7 +310,7 @@ const RoomSummaryCard: React.FC<IProps> = ({ room, permalinkCreator, onClose, on
<div className="mx_RoomSummaryCard_avatar" role="presentation">
<RoomAvatar room={room} size="54px" viewAvatarOnClick />
<TextWithTooltip
tooltip={isRoomEncrypted ? _t("common|encrypted") : _t("Not encrypted")}
tooltip={isRoomEncrypted ? _t("common|encrypted") : _t("common|unencrypted")}
class={classNames("mx_RoomSummaryCard_e2ee", {
mx_RoomSummaryCard_e2ee_normal: isRoomEncrypted,
mx_RoomSummaryCard_e2ee_warning: isRoomEncrypted && e2eStatus === E2EStatus.Warning,
@ -350,28 +350,28 @@ const RoomSummaryCard: React.FC<IProps> = ({ room, permalinkCreator, onClose, on
onSearchClick?.();
}}
>
{_t("Search")}
{_t("right_panel|search_button")}
</Button>
)}
{!isVideoRoom && (
<Button className="mx_RoomSummaryCard_icon_files" onClick={onRoomFilesClick}>
{_t("Files")}
{_t("right_panel|files_button")}
</Button>
)}
{!isVideoRoom && (
<Button className="mx_RoomSummaryCard_icon_poll" onClick={onRoomPollHistoryClick}>
{_t("Poll history")}
{_t("right_panel|polls_button")}
</Button>
)}
{pinningEnabled && !isVideoRoom && (
<Button className="mx_RoomSummaryCard_icon_pins" onClick={onRoomPinsClick}>
{_t("Pinned")}
{_t("right_panel|pinned_messages_button")}
{pinCount > 0 && <span className="mx_BaseCard_Button_sublabel">{pinCount}</span>}
</Button>
)}
{!isVideoRoom && (
<Button className="mx_RoomSummaryCard_icon_export" onClick={onRoomExportClick}>
{_t("Export chat")}
{_t("right_panel|export_chat_button")}
</Button>
)}
<Button
@ -379,10 +379,10 @@ const RoomSummaryCard: React.FC<IProps> = ({ room, permalinkCreator, onClose, on
className="mx_RoomSummaryCard_icon_share"
onClick={onShareRoomClick}
>
{_t("Share room")}
{_t("right_panel|share_button")}
</Button>
<Button className="mx_RoomSummaryCard_icon_settings" onClick={onRoomSettingsClick}>
{_t("Room settings")}
{_t("right_panel|settings_button")}
</Button>
</Group>