Migrate more strings to translation keys (#11694)

This commit is contained in:
Michael Telatynski 2023-10-03 19:17:26 +01:00 committed by GitHub
parent 677854d318
commit e1cfde0c6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
201 changed files with 21074 additions and 18552 deletions

View file

@ -66,7 +66,7 @@ export const LocationButton: React.FC<IProps> = ({ roomId, sender, menuPosition,
className={className}
iconClassName="mx_MessageComposer_location"
onClick={openMenu}
title={_t("Location")}
title={_t("common|location")}
inputRef={button}
/>

View file

@ -182,7 +182,7 @@ class LocationPicker extends React.Component<ILocationPickerProps, IState> {
if (isSharingOwnLocation(this.props.shareType)) {
this.props.onFinished();
Modal.createDialog(ErrorDialog, {
title: _t("Could not fetch location"),
title: _t("location_sharing|error_fetch_location"),
description: positionFailureMessage(e.code),
});
}

View file

@ -134,7 +134,7 @@ const useMapWithStyle = ({
const onGeolocateError = (e: GeolocationPositionError): void => {
logger.error("Could not fetch location", e);
Modal.createDialog(ErrorDialog, {
title: _t("Could not fetch location"),
title: _t("location_sharing|error_fetch_location"),
description: positionFailureMessage(e.code) ?? "",
});
};

View file

@ -72,15 +72,15 @@ interface Props {
}
const ShareType: React.FC<Props> = ({ setShareType, enabledShareTypes }) => {
const labels = {
[LocationShareType.Own]: _t("My current location"),
[LocationShareType.Live]: _t("My live location"),
[LocationShareType.Pin]: _t("Drop a Pin"),
[LocationShareType.Own]: _t("location_sharing|share_type_own"),
[LocationShareType.Live]: _t("location_sharing|share_type_live"),
[LocationShareType.Pin]: _t("location_sharing|share_type_pin"),
};
return (
<div className="mx_ShareType">
<LocationIcon className="mx_ShareType_badge" />
<Heading className="mx_ShareType_heading" size="3">
{_t("What location type do you want to share?")}
{_t("location_sharing|share_type_prompt")}
</Heading>
<div className="mx_ShareType_wrapper_options">
{enabledShareTypes.map((type) => (

View file

@ -61,8 +61,8 @@ const getPermissionsErrorParams = (
: "Insufficient permissions to send your location";
const modalParams = {
title: _t("You don't have permission to share locations"),
description: _t("You need to have the right permissions in order to share locations in this room."),
title: _t("location_sharing|error_no_perms_title"),
description: _t("location_sharing|error_no_perms_description"),
button: _t("action|ok"),
hasCancelButton: false,
onFinished: () => {}, // NOOP
@ -82,8 +82,8 @@ const getDefaultErrorParams = (
? "We couldn't start sharing your live location"
: "We couldn't send your location";
const modalParams = {
title: _t("We couldn't send your location"),
description: _t("%(brand)s could not send your location. Please try again later.", {
title: _t("location_sharing|error_send_title"),
description: _t("location_sharing|error_send_description", {
brand: SdkConfig.get().brand,
}),
button: _t("action|try_again"),
@ -111,7 +111,7 @@ const handleShareError = (error: unknown, openMenu: () => void, shareType: Locat
export const shareLiveLocation =
(client: MatrixClient, roomId: string, displayName: string, openMenu: () => void): ShareLocationFn =>
async ({ timeout }): Promise<void> => {
const description = _t(`%(displayName)s's live location`, { displayName });
const description = _t("location_sharing|live_description", { displayName });
try {
await OwnBeaconStore.instance.createLiveBeacon(
roomId,