mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-12-29 16:16:02 +00:00
fix: misc
This commit is contained in:
@@ -60,20 +60,20 @@ export default function ResizeImage({ title }: ToolComponentProps) {
|
||||
updateField
|
||||
}) => [
|
||||
{
|
||||
title: t('image.resize.resizeMethod'),
|
||||
title: t('image:resize.resizeMethod'),
|
||||
component: (
|
||||
<Box>
|
||||
<SimpleRadio
|
||||
onClick={() => updateField('resizeMethod', 'pixels')}
|
||||
checked={values.resizeMethod === 'pixels'}
|
||||
description={t('image.resize.resizeByPixelsDescription')}
|
||||
title={t('image.resize.resizeByPixels')}
|
||||
description={t('image:resize.resizeByPixelsDescription')}
|
||||
title={t('image:resize.resizeByPixels')}
|
||||
/>
|
||||
<SimpleRadio
|
||||
onClick={() => updateField('resizeMethod', 'percentage')}
|
||||
checked={values.resizeMethod === 'percentage'}
|
||||
description={t('image.resize.resizeByPercentageDescription')}
|
||||
title={t('image.resize.resizeByPercentage')}
|
||||
description={t('image:resize.resizeByPercentageDescription')}
|
||||
title={t('image:resize.resizeByPercentage')}
|
||||
/>
|
||||
</Box>
|
||||
)
|
||||
@@ -81,7 +81,7 @@ export default function ResizeImage({ title }: ToolComponentProps) {
|
||||
...(values.resizeMethod === 'pixels'
|
||||
? [
|
||||
{
|
||||
title: t('image.resize.dimensionType'),
|
||||
title: t('image:resize.dimensionType'),
|
||||
component: (
|
||||
<Box>
|
||||
<CheckboxWithDesc
|
||||
@@ -89,29 +89,29 @@ export default function ResizeImage({ title }: ToolComponentProps) {
|
||||
onChange={(value) =>
|
||||
updateField('maintainAspectRatio', value)
|
||||
}
|
||||
description={t('image.resize.maintainAspectRatioDescription')}
|
||||
title={t('image.resize.maintainAspectRatio')}
|
||||
description={t('image:resize.maintainAspectRatioDescription')}
|
||||
title={t('image:resize.maintainAspectRatio')}
|
||||
/>
|
||||
{values.maintainAspectRatio && (
|
||||
<Box>
|
||||
<SimpleRadio
|
||||
onClick={() => updateField('dimensionType', 'width')}
|
||||
checked={values.dimensionType === 'width'}
|
||||
description={t('image.resize.setWidthDescription')}
|
||||
title={t('image.resize.setWidth')}
|
||||
description={t('image:resize.setWidthDescription')}
|
||||
title={t('image:resize.setWidth')}
|
||||
/>
|
||||
<SimpleRadio
|
||||
onClick={() => updateField('dimensionType', 'height')}
|
||||
checked={values.dimensionType === 'height'}
|
||||
description={t('image.resize.setHeightDescription')}
|
||||
title={t('image.resize.setHeight')}
|
||||
description={t('image:resize.setHeightDescription')}
|
||||
title={t('image:resize.setHeight')}
|
||||
/>
|
||||
</Box>
|
||||
)}
|
||||
<TextFieldWithDesc
|
||||
value={values.width}
|
||||
onOwnChange={(val) => updateField('width', val)}
|
||||
description={t('image.resize.widthDescription')}
|
||||
description={t('image:resize.widthDescription')}
|
||||
disabled={
|
||||
values.maintainAspectRatio &&
|
||||
values.dimensionType === 'height'
|
||||
@@ -125,7 +125,7 @@ export default function ResizeImage({ title }: ToolComponentProps) {
|
||||
<TextFieldWithDesc
|
||||
value={values.height}
|
||||
onOwnChange={(val) => updateField('height', val)}
|
||||
description={t('image.resize.heightDescription')}
|
||||
description={t('image:resize.heightDescription')}
|
||||
disabled={
|
||||
values.maintainAspectRatio &&
|
||||
values.dimensionType === 'width'
|
||||
@@ -142,13 +142,13 @@ export default function ResizeImage({ title }: ToolComponentProps) {
|
||||
]
|
||||
: [
|
||||
{
|
||||
title: t('image.resize.percentage'),
|
||||
title: t('image:resize.percentage'),
|
||||
component: (
|
||||
<Box>
|
||||
<TextFieldWithDesc
|
||||
value={values.percentage}
|
||||
onOwnChange={(val) => updateField('percentage', val)}
|
||||
description={t('image.resize.percentageDescription')}
|
||||
description={t('image:resize.percentageDescription')}
|
||||
inputProps={{
|
||||
'data-testid': 'percentage-input',
|
||||
type: 'number',
|
||||
@@ -175,19 +175,19 @@ export default function ResizeImage({ title }: ToolComponentProps) {
|
||||
value={input}
|
||||
onChange={setInput}
|
||||
accept={['image/jpeg', 'image/png', 'image/svg+xml', 'image/gif']}
|
||||
title={t('image.resize.inputTitle')}
|
||||
title={t('image:resize.inputTitle')}
|
||||
/>
|
||||
}
|
||||
resultComponent={
|
||||
<ToolFileResult
|
||||
title={t('image.resize.resultTitle')}
|
||||
title={t('image:resize.resultTitle')}
|
||||
value={result}
|
||||
extension={input?.name.split('.').pop() || 'png'}
|
||||
/>
|
||||
}
|
||||
toolInfo={{
|
||||
title: t('image.resize.toolInfo.title'),
|
||||
description: t('image.resize.toolInfo.description')
|
||||
title: t('image:resize.toolInfo.title'),
|
||||
description: t('image:resize.toolInfo.description')
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -148,25 +148,5 @@
|
||||
"typeSaturation": "संतृप्ति",
|
||||
"filterIntensity": "फ़िल्टर तीव्रता",
|
||||
"intensityPlaceholder": "मान (0-100)"
|
||||
},
|
||||
"resize": {
|
||||
"title": "छवि आकार बदलें",
|
||||
"description": "छवि का आकार बदलें।",
|
||||
"inputTitle": "इनपुट छवि",
|
||||
"resultTitle": "आकार बदली गई छवि",
|
||||
"resizeOptions": "आकार बदलने के विकल्प",
|
||||
"resizeMethod": "आकार बदलने की विधि",
|
||||
"methodPercentage": "प्रतिशत",
|
||||
"methodPixels": "पिक्सेल",
|
||||
"methodAspectRatio": "आकार अनुपात",
|
||||
"width": "चौड़ाई",
|
||||
"widthPlaceholder": "मान",
|
||||
"height": "ऊंचाई",
|
||||
"heightPlaceholder": "मान",
|
||||
"maintainAspectRatio": "आकार अनुपात बनाए रखें",
|
||||
"interpolationMethod": "इंटरपोलेशन विधि",
|
||||
"methodNearest": "निकटतम",
|
||||
"methodBilinear": "द्विरेखीय",
|
||||
"methodBicubic": "द्विघन"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user