Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

lang: editor translations

httpjamesmd69530b34011
diff --git a/apps/photos/public/locales/en/translation.json b/apps/photos/public/locales/en/translation.json
index 50647d86b9..4a06eb17d7 100644
--- a/apps/photos/public/locales/en/translation.json
+++ b/apps/photos/public/locales/en/translation.json
@@ -593,5 +593,26 @@
"IMAGE": "Image",
"VIDEO": "Video",
"LIVE_PHOTO": "Live Photo",
- "CONVERT": "Convert"
+ "CONVERT": "Convert",
+ "CONFIRM_EDITOR_CLOSE_MESSAGE": "Are you sure you want to close the editor?",
+ "CONFIRM_EDITOR_CLOSE_DESCRIPTION": "Download your edited image or save a copy to ente to persist your changes.",
+ "BRIGHTNESS": "Brightness",
+ "CONTRAST": "Contrast",
+ "SATURATION": "Saturation",
+ "BLUR": "Blur",
+ "INVERT_COLORS": "Invert Colors",
+ "ASPECT_RATIO": "Aspect Ratio",
+ "SQUARE": "Square",
+ "ROTATE_LEFT": "Rotate Left",
+ "ROTATE_RIGHT": "Rotate Right",
+ "FLIP_VERTICALLY": "Flip Vertically",
+ "FLIP_HORIZONTALLY": "Flip Horizontally",
+ "DOWNLOAD_EDITED": "Download Edited",
+ "SAVE_A_COPY_TO_ENTE": "Save a copy to ente",
+ "RESTORE_ORIGINAL": "Restore Original",
+ "TRANSFORM": "Transform",
+ "COLORS": "Colors",
+ "FLIP": "Flip",
+ "ROTATION": "Rotation",
+ "RESET": "Reset"
}
diff --git a/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/AreYouSureCloseDialog.tsx b/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/AreYouSureCloseDialog.tsx
index 9017e4d9a9..169a6fe2e7 100644
--- a/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/AreYouSureCloseDialog.tsx
+++ b/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/AreYouSureCloseDialog.tsx
@@ -16,19 +16,16 @@ const AreYouSureCloseDialog = (props: IProps) => {
open={props.open}
onClose={props.onClose}
attributes={{
- title: 'Are you sure you want to close the editor?',
+ title: t('CONFIRM_EDITOR_CLOSE_MESSAGE'),
}}>
- <Typography>
- Download your edited image or save a copy to ente to persist
- your changes.
- </Typography>
+ <Typography>{t('CONFIRM_EDITOR_CLOSE_DESCRIPTION')}</Typography>
<Stack spacing={'8px'}>
<EnteButton
type="submit"
size="large"
color="critical"
onClick={props.doClose}>
- Close Editor
+ {t('CLOSE')}
</EnteButton>
<Button
size="large"
diff --git a/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/ColoursMenu.tsx b/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/ColoursMenu.tsx
index e4d6935c9f..1d01142e4f 100644
--- a/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/ColoursMenu.tsx
+++ b/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/ColoursMenu.tsx
@@ -2,6 +2,7 @@ import { Dispatch, SetStateAction } from 'react';
import MenuSectionTitle from 'components/Menu/MenuSectionTitle';
import { Box, Slider, Switch, Typography } from '@mui/material';
import { SpaceBetweenFlex } from 'components/Container';
+import { t } from 'i18next';
interface IProps {
brightness: number;
@@ -19,7 +20,7 @@ interface IProps {
const ColoursMenu = (props: IProps) => {
return (
<>
- <MenuSectionTitle title="Brightness" />
+ <MenuSectionTitle title={t('BRIGHTNESS')} />
<Slider
min={0}
max={200}
@@ -37,7 +38,7 @@ const ColoursMenu = (props: IProps) => {
props.setBrightness(value as number);
}}
/>
- <MenuSectionTitle title="Contrast" />
+ <MenuSectionTitle title={t('CONTRAST')} />
<Slider
min={0}
max={200}
@@ -55,7 +56,7 @@ const ColoursMenu = (props: IProps) => {
},
]}
/>
- <MenuSectionTitle title="Blur" />
+ <MenuSectionTitle title={t('BLUR')} />
<Slider
min={0}
max={10}
@@ -67,7 +68,7 @@ const ColoursMenu = (props: IProps) => {
props.setBlur(value as number);
}}
/>
- <MenuSectionTitle title="Saturation" />
+ <MenuSectionTitle title={t('SATURATION')} />
<Slider
min={0}
max={200}
@@ -86,7 +87,7 @@ const ColoursMenu = (props: IProps) => {
]}
/>
<SpaceBetweenFlex minHeight={'48px'}>
- <Typography color="text.muted">Invert Colours</Typography>
+ <Typography color="text.muted">{t('INVERT_COLORS')}</Typography>
<Box>
<Switch
value={props.invert}
diff --git a/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/TransformMenu.tsx b/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/TransformMenu.tsx
index f2a244ff11..c82bd4fad4 100644
--- a/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/TransformMenu.tsx
+++ b/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/TransformMenu.tsx
@@ -10,6 +10,7 @@ import RotateLeftIcon from '@mui/icons-material/RotateLeft';
import RotateRightIcon from '@mui/icons-material/RotateRight';
import FlipIcon from '@mui/icons-material/Flip';
import MenuItemDivider from 'components/Menu/MenuItemDivider';
+import { t } from 'i18next';
const PRESET_ASPECT_RATIOS = [
{
@@ -163,7 +164,7 @@ const TransformMenu = () => {
};
return (
<>
- <MenuSectionTitle title={'Aspect Ratio'} />
+ <MenuSectionTitle title={t('ASPECT_RATIO')} />
<MenuItemGroup
style={{
marginBottom: '0.5rem',
@@ -178,7 +179,7 @@ const TransformMenu = () => {
setCanvasLoading(false);
setTransformationPerformed(true);
}}
- label={'Square (1:1)'}
+ label={t('SQUARE') + ' (1:1)'}
/>
</MenuItemGroup>
<MenuItemGroup
@@ -247,7 +248,7 @@ const TransformMenu = () => {
</Fragment>
))}
</MenuItemGroup>
- <MenuSectionTitle title={'Rotation'} />
+ <MenuSectionTitle title={t('ROTATION')} />
<MenuItemGroup
style={{
marginBottom: '1rem',
@@ -262,7 +263,7 @@ const TransformMenu = () => {
setCanvasLoading(false);
setTransformationPerformed(true);
}}
- label="Rotate Left 90˚"
+ label={t('ROTATE_LEFT') + ' 90˚'}
/>
<MenuItemDivider />
<EnteMenuItem
@@ -275,10 +276,10 @@ const TransformMenu = () => {
setTransformationPerformed(true);
setCanvasLoading(false);
}}
- label="Rotate Right 90˚"
+ label={t('ROTATE_RIGHT') + ' 90˚'}
/>
</MenuItemGroup>
- <MenuSectionTitle title={'Flip'} />
+ <MenuSectionTitle title={t('FLIP')} />
<MenuItemGroup
style={{
marginBottom: '1rem',
@@ -293,7 +294,7 @@ const TransformMenu = () => {
setCanvasLoading(false);
setTransformationPerformed(true);
}}
- label="Flip Vertically"
+ label={t('FLIP_VERTICALLY')}
/>
<MenuItemDivider />
<EnteMenuItem
@@ -306,7 +307,7 @@ const TransformMenu = () => {
setCanvasLoading(false);
setTransformationPerformed(true);
}}
- label="Flip Horizontally"
+ label={t('FLIP_HORIZONTALLY')}
/>
</MenuItemGroup>
</>
diff --git a/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx b/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx
index c97a8743e9..6fa5bfd0b7 100644
--- a/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx
+++ b/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx
@@ -36,6 +36,7 @@ import { getLocalCollections } from 'services/collectionService';
import CloudUploadIcon from '@mui/icons-material/CloudUpload';
import MenuItemDivider from 'components/Menu/MenuItemDivider';
import AreYouSureCloseDialog from './AreYouSureCloseDialog';
+import { t } from 'i18next';
interface IProps {
file: EnteFile;
@@ -276,15 +277,18 @@ const ImageEditorOverlay = (props: IProps) => {
onChange={(_, value) => {
setCurrentTab(value);
}}>
- <Tab label="Transform" value="transform" />
<Tab
- label="Colours"
+ label={t('TRANSFORM')}
+ value="transform"
+ />
+ <Tab
+ label={t('COLORS')}
value="colours"
disabled={transformationPerformed}
/>
</Tabs>
</HorizontalFlex>
- <MenuSectionTitle title="Reset" />
+ <MenuSectionTitle title={t('RESET')} />
<MenuItemGroup
style={{
marginBottom: '0.5rem',
@@ -295,7 +299,7 @@ const ImageEditorOverlay = (props: IProps) => {
onClick={() => {
loadCanvas();
}}
- label={'Restore Original'}
+ label={t('RESTORE_ORIGINAL')}
/>
</MenuItemGroup>
@@ -327,7 +331,7 @@ const ImageEditorOverlay = (props: IProps) => {
/>
)}
- <MenuSectionTitle title={'Export'} />
+ <MenuSectionTitle title={t('EXPORT')} />
<MenuItemGroup>
<EnteMenuItem
startIcon={<DownloadIcon />}
@@ -354,7 +358,7 @@ const ImageEditorOverlay = (props: IProps) => {
URL.revokeObjectURL(a.href);
});
}}
- label={'Download Edited'}
+ label={t('DOWNLOAD_EDITED')}
/>
<MenuItemDivider />
<EnteMenuItem
@@ -408,7 +412,7 @@ const ImageEditorOverlay = (props: IProps) => {
props.onClose();
});
}}
- label={'Save a copy to ente'}
+ label={t('SAVE_A_COPY_TO_ENTE')}
/>
</MenuItemGroup>
</Box>