Skip to content

Commit

Permalink
[web] Translation cleanup (#3983)
Browse files Browse the repository at this point in the history
...related to dialogs etc that were recently changed
  • Loading branch information
mnvr authored Nov 8, 2024
2 parents 672ee27 + 5c1984f commit 157746b
Show file tree
Hide file tree
Showing 56 changed files with 1,928 additions and 1,931 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export function ManageDownloadAccess({

const disableFileDownload = () => {
showMiniDialog({
title: t("DISABLE_FILE_DOWNLOAD"),
message: <Trans i18nKey={"DISABLE_FILE_DOWNLOAD_MESSAGE"} />,
title: t("disable_file_download"),
message: <Trans i18nKey={"disable_file_download_message"} />,
continue: {
text: t("disable"),
color: "critical",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ export function ManageLinkExpiry({
}
subText={
isLinkExpired(publicShareProp?.validTill)
? t("LINK_EXPIRED")
? t("link_expired")
: publicShareProp?.validTill
? formatDateTime(
publicShareProp?.validTill / 1000,
)
: t("NEVER")
: t("never")
}
/>
</MenuItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export function ManageLinkPassword({

const confirmDisablePublicUrlPassword = async () => {
showMiniDialog({
title: t("DISABLE_PASSWORD"),
message: t("DISABLE_PASSWORD_MESSAGE"),
title: t("disable_password"),
message: t("disable_password_message"),
continue: {
text: t("disable"),
color: "critical",
Expand All @@ -52,7 +52,7 @@ export function ManageLinkPassword({
return (
<>
<EnteMenuItem
label={t("link_password_lock")}
label={t("password_lock")}
onClick={handlePasswordChangeSetting}
checked={!!publicShareProp?.passwordEnabled}
variant="toggle"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ export function PublicLinkSetPassword({
>
<Stack spacing={3} p={1.5}>
<Typography variant="h3" px={1} py={0.5} fontWeight={"bold"}>
{t("PASSWORD_LOCK")}
{t("password_lock")}
</Typography>
<SingleInputForm
callback={savePassword}
placeholder={t("password")}
buttonText={t("LOCK")}
buttonText={t("lock")}
fieldType="password"
secondaryButtonAction={onClose}
submitButtonProps={{ sx: { mt: 1, mb: 2 } }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function ManagePublicShare({
startIcon={<ErrorOutlineIcon />}
color="critical"
onClick={openManageShare}
label={t("LINK_EXPIRED")}
label={t("link_expired")}
/>
) : (
<EnteMenuItem
Expand Down
6 changes: 3 additions & 3 deletions web/apps/photos/src/components/ExportFinished.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ export default function ExportFinished(props: Props) {
</SpaceBetweenFlex>
<SpaceBetweenFlex minHeight={"48px"}>
<Typography color="text.muted">
{t("LAST_EXPORT_TIME")}
{t("last_export_time")}
</Typography>
<Typography>
{props.lastExportTime
? formatDateTime(props.lastExportTime)
: t("NEVER")}
: t("never")}
</Typography>
</SpaceBetweenFlex>
</Stack>
Expand All @@ -69,7 +69,7 @@ export default function ExportFinished(props: Props) {
{t("close")}
</Button>
<Button size="large" color="primary" onClick={props.onResync}>
{t("EXPORT_AGAIN")}
{t("export_again")}
</Button>
</DialogActions>
<ExportPendingList
Expand Down
2 changes: 1 addition & 1 deletion web/apps/photos/src/components/ExportInit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function ExportInit({ startExport }: Props) {
<DialogContent>
<DialogActions>
<Button size="large" color="accent" onClick={startExport}>
{t("START")}
{t("start")}
</Button>
</DialogActions>
</DialogContent>
Expand Down
8 changes: 4 additions & 4 deletions web/apps/photos/src/components/ExportModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ export default function ExportModal(props: ExportModalProps) {
const verifyExportFolderExists = async () => {
if (!(await exportService.exportFolderExists(exportFolder))) {
showMiniDialog({
title: t("EXPORT_DIRECTORY_DOES_NOT_EXIST"),
title: t("export_directory_does_not_exist"),
message: (
<Trans
i18nKey={"EXPORT_DIRECTORY_DOES_NOT_EXIST_MESSAGE"}
i18nKey={"export_directory_does_not_exist_message"}
/>
),
cancel: t("ok"),
Expand Down Expand Up @@ -170,7 +170,7 @@ export default function ExportModal(props: ExportModalProps) {
fullWidth
>
<DialogTitleWithCloseButton onClose={props.onHide}>
{t("EXPORT_DATA")}
{t("export_data")}
</DialogTitleWithCloseButton>
<DialogContent>
<ExportDirectory
Expand Down Expand Up @@ -202,7 +202,7 @@ function ExportDirectory({ exportFolder, changeExportDirectory, exportStage }) {
return (
<SpaceBetweenFlex minHeight={"48px"}>
<Typography color="text.muted" mr={"16px"}>
{t("DESTINATION")}
{t("destination")}
</Typography>
<>
{!exportFolder ? (
Expand Down
6 changes: 3 additions & 3 deletions web/apps/photos/src/components/FilesDownloadProgress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ export const FilesDownloadProgress: React.FC<FilesDownloadProgressProps> = ({
attributes: FilesDownloadProgressAttributes,
) => {
showMiniDialog({
title: t("STOP_DOWNLOADS_HEADER"),
message: t("STOP_ALL_DOWNLOADS_MESSAGE"),
title: t("stop_downloads_title"),
message: t("stop_downloads_message"),
continue: {
text: t("YES_STOP_DOWNLOADS"),
text: t("yes_stop_downloads"),
color: "critical",
action: () => {
attributes?.canceller.abort();
Expand Down
6 changes: 3 additions & 3 deletions web/apps/photos/src/components/PhotoViewer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -563,10 +563,10 @@ function PhotoViewer(props: PhotoViewerProps) {
return;
}
showMiniDialog({
title: t("TRASH_FILE_TITLE"),
message: t("TRASH_FILE_MESSAGE"),
title: t("trash_file_title"),
message: t("trash_file_message"),
continue: {
text: t("MOVE_TO_TRASH"),
text: t("move_to_trash"),
color: "critical",
action: () => trashFile(file),
autoFocus: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ export default function UploadProgress({

function confirmCancelUpload() {
showMiniDialog({
title: t("STOP_UPLOADS_HEADER"),
message: t("STOP_ALL_UPLOADS_MESSAGE"),
title: t("stop_uploads_title"),
message: t("stop_uploads_message"),
continue: {
text: t("YES_STOP_UPLOADS"),
text: t("yes_stop_uploads"),
color: "critical",
action: cancelUploads,
},
Expand Down
4 changes: 2 additions & 2 deletions web/apps/photos/src/components/Upload/Uploader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -763,11 +763,11 @@ export default function Uploader({
if (importSuggestion.hasRootLevelFileWithFolder) {
showMiniDialog({
icon: <InfoOutlined />,
title: t("ROOT_LEVEL_FILE_WITH_FOLDER_NOT_ALLOWED"),
title: t("root_level_file_with_folder_not_allowed"),
message: (
<Trans
i18nKey={
"ROOT_LEVEL_FILE_WITH_FOLDER_NOT_ALLOWED_MESSAGE"
"root_level_file_with_folder_not_allowed_message"
}
/>
),
Expand Down
6 changes: 3 additions & 3 deletions web/apps/photos/src/components/WatchFolder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ const WatchEntry: React.FC<WatchEntryProps> = ({ watch, removeWatch }) => {

const confirmStopWatching = () => {
showMiniDialog({
title: t("STOP_WATCHING_FOLDER"),
message: t("STOP_WATCHING_DIALOG_MESSAGE"),
title: t("stop_watching_folder_title"),
message: t("stop_watching_folder_message"),
continue: {
text: t("YES_STOP"),
color: "critical",
Expand Down Expand Up @@ -325,7 +325,7 @@ const EntryOptions: React.FC<EntryOptionsProps> = ({ confirmStopWatching }) => {
onClick={confirmStopWatching}
startIcon={<DoNotDisturbOutlinedIcon />}
>
{t("STOP_WATCHING")}
{t("stop_watching")}
</OverflowMenuOption>
</OverflowMenu>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ export default function DeduplicateOptions({

const trashHandler = () =>
showMiniDialog({
title: t("TRASH_FILES_TITLE"),
message: t("TRASH_FILES_MESSAGE"),
title: t("trash_files_title"),
message: t("trash_files_message"),
continue: {
text: t("MOVE_TO_TRASH"),
text: t("move_to_trash"),
color: "critical",
action: deleteFileHelper,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,19 @@ const SelectedFileOptions = ({

const trashHandler = () =>
showMiniDialog({
title: t("TRASH_FILES_TITLE"),
message: t("TRASH_FILES_MESSAGE"),
title: t("trash_files_title"),
message: t("trash_files_message"),
continue: {
text: t("MOVE_TO_TRASH"),
text: t("move_to_trash"),
color: "critical",
action: handleFileOps(FILE_OPS_TYPE.TRASH),
},
});

const permanentlyDeleteHandler = () =>
showMiniDialog({
title: t("DELETE_FILES_TITLE"),
message: t("DELETE_FILES_MESSAGE"),
title: t("delete_files_title"),
message: t("delete_files_message"),
continue: {
text: t("delete"),
color: "critical",
Expand All @@ -123,10 +123,10 @@ const SelectedFileOptions = ({
const removeFromCollectionHandler = () => {
if (ownCount === count) {
showMiniDialog({
title: t("REMOVE_FROM_COLLECTION"),
message: t("CONFIRM_SELF_REMOVE_MESSAGE"),
title: t("remove_from_album"),
message: t("confirm_remove_message"),
continue: {
text: t("YES_REMOVE"),
text: t("yes_remove"),
color: "primary",

action: () =>
Expand All @@ -137,10 +137,10 @@ const SelectedFileOptions = ({
});
} else {
showMiniDialog({
title: t("REMOVE_FROM_COLLECTION"),
message: t("CONFIRM_SELF_AND_OTHER_REMOVE_MESSAGE"),
title: t("remove_from_album"),
message: t("confirm_remove_incl_others_message"),
continue: {
text: t("YES_REMOVE"),
text: t("yes_remove"),
color: "critical",
action: () =>
handleCollectionOps(COLLECTION_OPS_TYPE.REMOVE)(
Expand Down Expand Up @@ -266,12 +266,12 @@ const SelectedFileOptions = ({
</>
) : activeCollectionID === TRASH_SECTION ? (
<>
<Tooltip title={t("RESTORE")}>
<Tooltip title={t("restore")}>
<IconButton onClick={restoreHandler}>
<RestoreIcon />
</IconButton>
</Tooltip>
<Tooltip title={t("DELETE_PERMANENTLY")}>
<Tooltip title={t("delete_permanently")}>
<IconButton onClick={permanentlyDeleteHandler}>
<DeleteIcon />
</IconButton>
Expand All @@ -286,7 +286,7 @@ const SelectedFileOptions = ({
<DownloadIcon />
</IconButton>
</Tooltip>
<Tooltip title={t("MOVE")}>
<Tooltip title={t("move")}>
<IconButton onClick={moveToCollection}>
<MoveIcon />
</IconButton>
Expand Down Expand Up @@ -385,13 +385,13 @@ const SelectedFileOptions = ({
activeCollectionID !== ARCHIVE_SECTION &&
!isFavoriteCollection && (
<>
<Tooltip title={t("MOVE")}>
<Tooltip title={t("move")}>
<IconButton onClick={moveToCollection}>
<MoveIcon />
</IconButton>
</Tooltip>

<Tooltip title={t("REMOVE")}>
<Tooltip title={t("remove")}>
<IconButton
onClick={
removeFromCollectionHandler
Expand Down
2 changes: 1 addition & 1 deletion web/apps/photos/src/pages/deduplicate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export default function Deduplicate() {
errorDialogAttributes(
e instanceof ApiError &&
e.httpStatusCode == HttpStatusCode.Forbidden
? t("NOT_FILE_OWNER")
? t("not_file_owner_delete_error")
: t("generic_error"),
),
);
Expand Down
6 changes: 3 additions & 3 deletions web/apps/photos/src/pages/shared-albums.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ export default function PublicCollectionGallery() {

const showPublicLinkExpiredMessage = () =>
showMiniDialog({
title: t("LINK_EXPIRED"),
message: t("LINK_EXPIRED_MESSAGE"),
title: t("link_expired"),
message: t("link_expired_message"),
nonClosable: true,
continue: {
text: t("login"),
Expand Down Expand Up @@ -369,7 +369,7 @@ export default function PublicCollectionGallery() {
setErrorMessage(
parsedError.message === CustomError.TOO_MANY_REQUESTS
? t("LINK_TOO_MANY_REQUESTS")
: t("LINK_EXPIRED_MESSAGE"),
: t("link_expired_message"),
);
// share has been disabled
// local cache should be cleared
Expand Down
12 changes: 6 additions & 6 deletions web/apps/photos/src/utils/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,25 +200,25 @@ export function getDeviceLimitOptions() {
}

export const shareExpiryOptions = () => [
{ label: t("NEVER"), value: () => 0 },
{ label: t("never"), value: () => 0 },
{
label: t("AFTER_TIME.HOUR"),
label: t("after_time.hour"),
value: () => getUnixTimeInMicroSecondsWithDelta({ hours: 1 }),
},
{
label: t("AFTER_TIME.DAY"),
label: t("after_time.day"),
value: () => getUnixTimeInMicroSecondsWithDelta({ days: 1 }),
},
{
label: t("AFTER_TIME.WEEK"),
label: t("after_time.week"),
value: () => getUnixTimeInMicroSecondsWithDelta({ days: 7 }),
},
{
label: t("AFTER_TIME.MONTH"),
label: t("after_time.month"),
value: () => getUnixTimeInMicroSecondsWithDelta({ months: 1 }),
},
{
label: t("AFTER_TIME.YEAR"),
label: t("after_time.year"),
value: () => getUnixTimeInMicroSecondsWithDelta({ years: 1 }),
},
];
Expand Down
2 changes: 1 addition & 1 deletion web/packages/accounts/pages/change-email.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const ChangeEmailForm: React.FC = () => {
// ottInputRef.current?.focus();
// }, 250);
} catch (e) {
setFieldError("email", t("EMAIl_ALREADY_OWNED"));
setFieldError("email", t("email_already_taken"));
}
setLoading(false);
};
Expand Down
Loading

0 comments on commit 157746b

Please sign in to comment.