Skip to content

Commit

Permalink
[web] Translation cleanup (#4183)
Browse files Browse the repository at this point in the history
  • Loading branch information
mnvr authored Nov 26, 2024
2 parents e87e293 + 768195c commit 1b16901
Show file tree
Hide file tree
Showing 54 changed files with 1,732 additions and 1,808 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,15 @@ export const AlbumCastDialog: React.FC<AlbumCastDialogProps> = ({
</div>
<Typography>{t("choose_device_from_browser")}</Typography>
<Button color="secondary" onClick={() => setView("choose")}>
{t("GO_BACK")}
{t("go_back")}
</Button>
</Stack>
)}
{view == "auto-cast-error" && (
<Stack sx={{ pt: 1, gap: 3, textAlign: "center" }}>
<Typography>{t("cast_auto_pair_failed")}</Typography>
<Button color="secondary" onClick={() => setView("choose")}>
{t("GO_BACK")}
{t("go_back")}
</Button>
</Stack>
)}
Expand All @@ -208,7 +208,7 @@ export const AlbumCastDialog: React.FC<AlbumCastDialogProps> = ({
<SingleInputForm
callback={onSubmit}
fieldType="text"
realLabel={"Code"}
realLabel={t("code")}
realPlaceholder={"123456"}
buttonText={t("pair_device_to_tv")}
submitButtonProps={{ sx: { mt: 1, mb: 2 } }}
Expand All @@ -218,7 +218,7 @@ export const AlbumCastDialog: React.FC<AlbumCastDialogProps> = ({
fullWidth
onClick={() => setView("choose")}
>
{t("GO_BACK")}
{t("go_back")}
</Button>
</>
)}
Expand Down
4 changes: 2 additions & 2 deletions web/apps/photos/src/components/FullScreenDropZone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ export default function FullScreenDropZone(props: Props) {
<CloseIcon />
</CloseButtonWrapper>
{appContext.watchFolderView
? t("WATCH_FOLDER_DROPZONE_MESSAGE")
: t("UPLOAD_DROPZONE_MESSAGE")}
? t("watch_folder_dropzone_hint")
: t("upload_dropzone_hint")}
</Overlay>
)}
{props.children}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function RenderCaption({
validationSchema={Yup.object().shape({
caption: Yup.string().max(
MAX_CAPTION_SIZE,
t("CAPTION_CHARACTER_LIMIT"),
t("caption_character_limit"),
),
})}
validateOnBlur={false}
Expand All @@ -91,7 +91,7 @@ export function RenderCaption({
name="caption"
type="text"
multiline
placeholder={t("CAPTION_PLACEHOLDER")}
placeholder={t("caption_placeholder")}
value={values.caption}
onChange={handleChange("caption")}
error={Boolean(errors.caption)}
Expand Down
4 changes: 2 additions & 2 deletions web/apps/photos/src/components/PhotoViewer/FileInfo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export const FileInfo: React.FC<FileInfoProps> = ({

return (
<FileInfoSidebar open={showInfo} onClose={handleCloseInfo}>
<Titlebar onClose={handleCloseInfo} title={t("INFO")} backIsClose />
<Titlebar onClose={handleCloseInfo} title={t("info")} backIsClose />
<Stack pt={1} pb={3} spacing={"20px"}>
<RenderCaption
{...{
Expand Down Expand Up @@ -258,7 +258,7 @@ export const FileInfo: React.FC<FileInfoProps> = ({
)}
<InfoItem
icon={<TextSnippetOutlinedIcon />}
title={t("DETAILS")}
title={t("details")}
caption={
!exif ? (
<ActivityIndicator size={12} />
Expand Down
48 changes: 24 additions & 24 deletions web/apps/photos/src/components/PhotoViewer/ImageEditorOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ export const ImageEditorOverlay: React.FC<ImageEditorOverlayProps> = (
alignItems={"center"}
>
<Typography variant="h2" fontWeight="bold">
{t("PHOTO_EDITOR")}
{t("photo_editor")}
</Typography>
<IconButton
onClick={() => {
Expand Down Expand Up @@ -613,7 +613,7 @@ export const ImageEditorOverlay: React.FC<ImageEditorOverlayProps> = (
startIcon={<CropIcon />}
onClick={applyCrop}
>
{t("APPLY_CROP")}
{t("apply_crop")}
</Button>
</CenteredFlex>
)}
Expand Down Expand Up @@ -645,10 +645,10 @@ export const ImageEditorOverlay: React.FC<ImageEditorOverlayProps> = (
setCurrentTab(value);
}}
>
<Tab label={t("editor.crop")} value="crop" />
<Tab label={t("TRANSFORM")} value="transform" />
<Tab label={t("crop")} value="crop" />
<Tab label={t("transform")} value="transform" />
<Tab
label={t("COLORS")}
label={t("colors")}
value="colors"
disabled={transformationPerformed}
/>
Expand All @@ -666,7 +666,7 @@ export const ImageEditorOverlay: React.FC<ImageEditorOverlayProps> = (
onClick={() => {
loadCanvas();
}}
label={t("RESTORE_ORIGINAL")}
label={t("restore_original")}
/>
</MenuItemGroup>
{currentTab === "crop" && (
Expand Down Expand Up @@ -700,7 +700,7 @@ export const ImageEditorOverlay: React.FC<ImageEditorOverlayProps> = (
<EnteMenuItem
startIcon={<DownloadIcon />}
onClick={downloadEditedPhoto}
label={t("DOWNLOAD_EDITED")}
label={t("download_edited")}
disabled={
!transformationPerformed && !coloursAdjusted
}
Expand All @@ -709,15 +709,15 @@ export const ImageEditorOverlay: React.FC<ImageEditorOverlayProps> = (
<EnteMenuItem
startIcon={<CloudUploadIcon />}
onClick={saveCopyToEnte}
label={t("SAVE_A_COPY_TO_ENTE")}
label={t("save_a_copy_to_ente")}
disabled={
!transformationPerformed && !coloursAdjusted
}
/>
</MenuItemGroup>
{!transformationPerformed && !coloursAdjusted && (
<MenuSectionTitle
title={t("PHOTO_EDIT_REQUIRED_TO_SAVE")}
title={t("photo_edit_required_to_save")}
/>
)}
</SidebarDrawer>
Expand Down Expand Up @@ -818,7 +818,7 @@ const CropMenu: React.FC<CropMenuProps> = (props) => {

return (
<>
<MenuSectionTitle title={t("FREEHAND")} />
<MenuSectionTitle title={t("freehand")} />
<MenuItemGroup
style={{
marginBottom: "0.5rem",
Expand Down Expand Up @@ -850,7 +850,7 @@ const CropMenu: React.FC<CropMenuProps> = (props) => {

setCurrentTab("transform");
}}
label={t("APPLY_CROP")}
label={t("apply_crop")}
/>
</MenuItemGroup>
</>
Expand Down Expand Up @@ -1231,7 +1231,7 @@ const TransformMenu: React.FC<CommonMenuProps> = ({

return (
<>
<MenuSectionTitle title={t("ASPECT_RATIO")} />
<MenuSectionTitle title={t("aspect_ratio")} />
<MenuItemGroup
style={{
marginBottom: "0.5rem",
Expand All @@ -1241,7 +1241,7 @@ const TransformMenu: React.FC<CommonMenuProps> = ({
disabled={canvasLoading}
startIcon={<CropSquareIcon />}
onClick={createCropHandler(1, 1)}
label={t("SQUARE") + " (1:1)"}
label={t("square") + " (1:1)"}
/>
</MenuItemGroup>
<MenuItemGroup
Expand Down Expand Up @@ -1289,7 +1289,7 @@ const TransformMenu: React.FC<CommonMenuProps> = ({
</Fragment>
))}
</MenuItemGroup>
<MenuSectionTitle title={t("ROTATION")} />
<MenuSectionTitle title={t("rotation")} />
<MenuItemGroup
style={{
marginBottom: "1rem",
Expand All @@ -1299,17 +1299,17 @@ const TransformMenu: React.FC<CommonMenuProps> = ({
disabled={canvasLoading}
startIcon={<RotateLeftIcon />}
onClick={createRotationHandler("left")}
label={t("ROTATE_LEFT") + " 90˚"}
label={t("rotate_left") + " 90˚"}
/>
<MenuItemDivider />
<EnteMenuItem
disabled={canvasLoading}
startIcon={<RotateRightIcon />}
onClick={createRotationHandler("right")}
label={t("ROTATE_RIGHT") + " 90˚"}
label={t("rotate_right") + " 90˚"}
/>
</MenuItemGroup>
<MenuSectionTitle title={t("FLIP")} />
<MenuSectionTitle title={t("flip")} />
<MenuItemGroup
style={{
marginBottom: "1rem",
Expand All @@ -1321,14 +1321,14 @@ const TransformMenu: React.FC<CommonMenuProps> = ({
<FlipIcon style={{ transform: "rotateZ(90deg)" }} />
}
onClick={createFlipCanvasHandler("vertical")}
label={t("FLIP_VERTICALLY")}
label={t("flip_vertically")}
/>
<MenuItemDivider />
<EnteMenuItem
disabled={canvasLoading}
startIcon={<FlipIcon />}
onClick={createFlipCanvasHandler("horizontal")}
label={t("FLIP_HORIZONTALLY")}
label={t("flip_horizontally")}
/>
</MenuItemGroup>
</>
Expand All @@ -1351,7 +1351,7 @@ interface ColoursMenuProps {
const ColoursMenu: React.FC<ColoursMenuProps> = (props) => (
<>
<Box px={"8px"}>
<MenuSectionTitle title={t("BRIGHTNESS")} />
<MenuSectionTitle title={t("brightness")} />
<Slider
min={0}
max={200}
Expand All @@ -1369,7 +1369,7 @@ const ColoursMenu: React.FC<ColoursMenuProps> = (props) => (
props.setBrightness(value as number);
}}
/>
<MenuSectionTitle title={t("CONTRAST")} />
<MenuSectionTitle title={t("contrast")} />
<Slider
min={0}
max={200}
Expand All @@ -1387,7 +1387,7 @@ const ColoursMenu: React.FC<ColoursMenuProps> = (props) => (
},
]}
/>
<MenuSectionTitle title={t("BLUR")} />
<MenuSectionTitle title={t("blur")} />
<Slider
min={0}
max={10}
Expand All @@ -1399,7 +1399,7 @@ const ColoursMenu: React.FC<ColoursMenuProps> = (props) => (
props.setBlur(value as number);
}}
/>
<MenuSectionTitle title={t("SATURATION")} />
<MenuSectionTitle title={t("saturation")} />
<Slider
min={0}
max={200}
Expand All @@ -1426,7 +1426,7 @@ const ColoursMenu: React.FC<ColoursMenuProps> = (props) => (
<EnteMenuItem
variant="toggle"
checked={props.invert}
label={t("INVERT_COLORS")}
label={t("invert_colors")}
onClick={() => {
props.setInvert(!props.invert);
}}
Expand Down
9 changes: 5 additions & 4 deletions web/apps/photos/src/components/PhotoViewer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,8 @@ function PhotoViewer(props: PhotoViewerProps) {
disabled={livePhotoBtnOptions.loading}
>
<FlexWrapper gap={"4px"}>
{<AlbumOutlined />} {t("LIVE")}
{<AlbumOutlined />}{" "}
{t("live_photo_indicator")}
</FlexWrapper>
</Button>
</LivePhotoBtnContainer>
Expand Down Expand Up @@ -904,7 +905,7 @@ function PhotoViewer(props: PhotoViewerProps) {

<button
className="pswp__button pswp__button--custom"
title={t("INFO_OPTION")}
title={t("info_key")}
onClick={() => handleOpenInfo(photoSwipe)}
>
<InfoIcon />
Expand Down Expand Up @@ -944,7 +945,7 @@ function PhotoViewer(props: PhotoViewerProps) {
)}
{showConvertButton && (
<button
title={t("CONVERT")}
title={t("convert")}
className="pswp__button pswp__button--custom"
onClick={handleForceConvert}
>
Expand Down Expand Up @@ -1062,7 +1063,7 @@ const ConversionFailedNotification: React.FC<
variant="small"
sx={{ flex: 1, textAlign: "left" }}
>
{t("CONVERSION_FAILED_NOTIFICATION_MESSAGE")}
{t("unpreviewable_file_notification")}
</Typography>
<FilledIconButton onClick={handleClose}>
<CloseIcon />
Expand Down
2 changes: 1 addition & 1 deletion web/apps/photos/src/components/Sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ const UtilitySection: React.FC<UtilitySectionProps> = ({ closeSidebar }) => {
<EnteMenuItem
onClick={showWatchFolder}
variant="secondary"
label={t("WATCH_FOLDERS")}
label={t("watch_folders")}
/>
)}
<EnteMenuItem
Expand Down
10 changes: 5 additions & 5 deletions web/apps/photos/src/components/WatchFolder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export const WatchFolder: React.FC<ModalVisibilityProps> = ({
>
<SpaceBetweenFlex sx={{ p: "16px 8px 8px 8px" }}>
<DialogTitle variant="h3" fontWeight={"bold"}>
{t("WATCHED_FOLDERS")}
{t("watched_folders")}
</DialogTitle>
<DialogCloseIconButton {...{ onClose }} />
</SpaceBetweenFlex>
Expand Down Expand Up @@ -185,21 +185,21 @@ const NoWatches: React.FC = () => {
<NoWatchesContainer>
<Stack spacing={1}>
<Typography variant="large" fontWeight={"bold"}>
{t("NO_FOLDERS_ADDED")}
{t("no_folders_added")}
</Typography>
<Typography py={0.5} variant={"small"} color="text.muted">
{t("FOLDERS_AUTOMATICALLY_MONITORED")}
{t("watch_folders_hint_1")}
</Typography>
<Typography variant={"small"} color="text.muted">
<FlexWrapper gap={1}>
<CheckmarkIcon />
{t("UPLOAD_NEW_FILES_TO_ENTE")}
{t("watch_folders_hint_2")}
</FlexWrapper>
</Typography>
<Typography variant={"small"} color="text.muted">
<FlexWrapper gap={1}>
<CheckmarkIcon />
{t("REMOVE_DELETED_FILES_FROM_ENTE")}
{t("watch_folders_hint_3")}
</FlexWrapper>
</Typography>
</Stack>
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 @@ -192,7 +192,7 @@ const ChangeEmailForm: React.FC = () => {
</LinkButton>
)}
<LinkButton onClick={goToApp}>
{t("GO_BACK")}
{t("go_back")}
</LinkButton>
</FormPaperFooter>
</>
Expand Down
2 changes: 1 addition & 1 deletion web/packages/accounts/pages/change-password.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const Page: React.FC<PageProps> = () => {
{(getData(LS_KEYS.SHOW_BACK_BUTTON)?.value ?? true) && (
<FormPaperFooter>
<LinkButton onClick={router.back}>
{t("GO_BACK")}
{t("go_back")}
</LinkButton>
</FormPaperFooter>
)}
Expand Down
2 changes: 1 addition & 1 deletion web/packages/accounts/pages/generate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const Page: React.FC<PageProps> = ({ appContext }) => {
/>
<FormPaperFooter>
<LinkButton onClick={logout}>
{t("GO_BACK")}
{t("go_back")}
</LinkButton>
</FormPaperFooter>
</FormPaper>
Expand Down
2 changes: 1 addition & 1 deletion web/packages/accounts/pages/recover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const Page: React.FC<PageProps> = ({ appContext }) => {
{t("NO_RECOVERY_KEY")}
</LinkButton>
<LinkButton onClick={router.back}>
{t("GO_BACK")}
{t("go_back")}
</LinkButton>
</FormPaperFooter>
</FormPaper>
Expand Down
Loading

0 comments on commit 1b16901

Please sign in to comment.