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
|
@ -71,7 +71,7 @@ const BeaconListItem: React.FC<Props & HTMLProps<HTMLLIElement>> = ({ beacon, ..
|
|||
</div>
|
||||
</BeaconStatus>
|
||||
<span className="mx_BeaconListItem_lastUpdated">
|
||||
{_t("Updated %(humanizedUpdateTime)s", { humanizedUpdateTime })}
|
||||
{_t("location_sharing|live_update_time", { humanizedUpdateTime })}
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
|
|
|
@ -35,7 +35,7 @@ interface Props {
|
|||
|
||||
const BeaconExpiryTime: React.FC<{ beacon: Beacon }> = ({ beacon }) => {
|
||||
const expiryTime = formatTime(new Date(getBeaconExpiryTimestamp(beacon)));
|
||||
return <span className="mx_BeaconStatus_expiryTime">{_t("Live until %(expiryTime)s", { expiryTime })}</span>;
|
||||
return <span className="mx_BeaconStatus_expiryTime">{_t("location_sharing|live_until", { expiryTime })}</span>;
|
||||
};
|
||||
|
||||
const BeaconStatus: React.FC<Props & HTMLProps<HTMLDivElement>> = ({
|
||||
|
@ -61,13 +61,19 @@ const BeaconStatus: React.FC<Props & HTMLProps<HTMLDivElement>> = ({
|
|||
)}
|
||||
<div className="mx_BeaconStatus_description">
|
||||
{displayStatus === BeaconDisplayStatus.Loading && (
|
||||
<span className="mx_BeaconStatus_description_status">{_t("Loading live location…")}</span>
|
||||
<span className="mx_BeaconStatus_description_status">
|
||||
{_t("location_sharing|loading_live_location")}
|
||||
</span>
|
||||
)}
|
||||
{displayStatus === BeaconDisplayStatus.Stopped && (
|
||||
<span className="mx_BeaconStatus_description_status">{_t("Live location ended")}</span>
|
||||
<span className="mx_BeaconStatus_description_status">
|
||||
{_t("location_sharing|live_location_ended")}
|
||||
</span>
|
||||
)}
|
||||
{displayStatus === BeaconDisplayStatus.Error && (
|
||||
<span className="mx_BeaconStatus_description_status">{_t("Live location error")}</span>
|
||||
<span className="mx_BeaconStatus_description_status">
|
||||
{_t("location_sharing|live_location_error")}
|
||||
</span>
|
||||
)}
|
||||
{displayStatus === BeaconDisplayStatus.Active && beacon && (
|
||||
<>
|
||||
|
|
|
@ -160,7 +160,9 @@ const BeaconViewDialog: React.FC<IProps> = ({ initialFocusedBeacon, roomId, matr
|
|||
)}
|
||||
{!centerGeoUri && !mapDisplayError && (
|
||||
<MapFallback data-testid="beacon-view-dialog-map-fallback" className="mx_BeaconViewDialog_map">
|
||||
<span className="mx_BeaconViewDialog_mapFallbackMessage">{_t("No live locations")}</span>
|
||||
<span className="mx_BeaconViewDialog_mapFallbackMessage">
|
||||
{_t("location_sharing|live_locations_empty")}
|
||||
</span>
|
||||
<AccessibleButton
|
||||
kind="primary"
|
||||
onClick={onFinished}
|
||||
|
@ -185,7 +187,7 @@ const BeaconViewDialog: React.FC<IProps> = ({ initialFocusedBeacon, roomId, matr
|
|||
>
|
||||
<LiveLocationIcon height={12} />
|
||||
|
||||
{_t("View list")}
|
||||
{_t("action|view_list")}
|
||||
</AccessibleButton>
|
||||
)}
|
||||
<DialogOwnBeaconStatus roomId={roomId} />
|
||||
|
|
|
@ -33,11 +33,11 @@ const DialogSidebar: React.FC<Props> = ({ beacons, onBeaconClick, requestClose }
|
|||
return (
|
||||
<div className="mx_DialogSidebar">
|
||||
<div className="mx_DialogSidebar_header">
|
||||
<Heading size="4">{_t("View List")}</Heading>
|
||||
<Heading size="4">{_t("action|view_list")}</Heading>
|
||||
<AccessibleButton
|
||||
className="mx_DialogSidebar_closeButton"
|
||||
onClick={requestClose}
|
||||
title={_t("Close sidebar")}
|
||||
title={_t("location_sharing|close_sidebar")}
|
||||
data-testid="dialog-sidebar-close"
|
||||
>
|
||||
<CloseIcon className="mx_DialogSidebar_closeButtonIcon" />
|
||||
|
@ -50,7 +50,7 @@ const DialogSidebar: React.FC<Props> = ({ beacons, onBeaconClick, requestClose }
|
|||
))}
|
||||
</ol>
|
||||
) : (
|
||||
<div className="mx_DialogSidebar_noResults">{_t("No live locations")}</div>
|
||||
<div className="mx_DialogSidebar_noResults">{_t("location_sharing|live_locations_empty")}</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -52,12 +52,12 @@ const chooseBestBeacon = (
|
|||
|
||||
const getLabel = (hasStoppingErrors: boolean, hasLocationErrors: boolean): string => {
|
||||
if (hasStoppingErrors) {
|
||||
return _t("An error occurred while stopping your live location");
|
||||
return _t("location_sharing|error_stopping_live_location");
|
||||
}
|
||||
if (hasLocationErrors) {
|
||||
return _t("An error occurred whilst sharing your live location");
|
||||
return _t("location_sharing|error_sharing_live_location");
|
||||
}
|
||||
return _t("You are sharing your live location");
|
||||
return _t("location_sharing|live_location_active");
|
||||
};
|
||||
|
||||
const useLivenessMonitor = (liveBeaconIds: BeaconIdentifier[], beacons: Map<BeaconIdentifier, Beacon>): void => {
|
||||
|
|
|
@ -51,7 +51,7 @@ const OwnBeaconStatus: React.FC<Props & HTMLProps<HTMLDivElement>> = ({ beacon,
|
|||
<BeaconStatus
|
||||
beacon={beacon}
|
||||
displayStatus={ownDisplayStatus}
|
||||
label={_t("Live location enabled")}
|
||||
label={_t("location_sharing|live_location_enabled")}
|
||||
displayLiveTimeRemaining
|
||||
{...rest}
|
||||
>
|
||||
|
|
|
@ -32,12 +32,12 @@ import { Action } from "../../../dispatcher/actions";
|
|||
|
||||
const getLabel = (hasLocationPublishError: boolean, hasStopSharingError: boolean): string => {
|
||||
if (hasLocationPublishError) {
|
||||
return _t("An error occurred whilst sharing your live location, please try again");
|
||||
return _t("location_sharing|error_sharing_live_location_try_again");
|
||||
}
|
||||
if (hasStopSharingError) {
|
||||
return _t("An error occurred while stopping your live location, please try again");
|
||||
return _t("location_sharing|error_stopping_live_location_try_again");
|
||||
}
|
||||
return _t("You are sharing your live location");
|
||||
return _t("location_sharing|live_location_active");
|
||||
};
|
||||
|
||||
interface RoomLiveShareWarningInnerProps {
|
||||
|
|
|
@ -46,7 +46,7 @@ const ShareLatestLocation: React.FC<Props> = ({ latestLocationState }) => {
|
|||
|
||||
return (
|
||||
<>
|
||||
<TooltipTarget label={_t("Open in OpenStreetMap")}>
|
||||
<TooltipTarget label={_t("timeline|context_menu|open_in_osm")}>
|
||||
<a data-testid="open-location-in-osm" href={mapLink} target="_blank" rel="noreferrer noopener">
|
||||
<ExternalLinkIcon className="mx_ShareLatestLocation_icon" />
|
||||
</a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue