Migrate more strings to translation keys (#11694)
This commit is contained in:
parent
677854d318
commit
e1cfde0c6e
201 changed files with 21074 additions and 18552 deletions
|
@ -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}
|
||||
/>
|
||||
|
||||
|
|
|
@ -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),
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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) ?? "",
|
||||
});
|
||||
};
|
||||
|
|
|
@ -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) => (
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue