mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-09-25 17:09:33 +02:00
fix: i18n tsc
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { Box } from '@mui/material';
|
||||
import React, { useState } from 'react';
|
||||
import ToolContent from '@components/ToolContent';
|
||||
import { ToolComponentProps } from '@tools/defineTool';
|
||||
@@ -25,7 +24,7 @@ export default function XmlBeautifier({
|
||||
title,
|
||||
longDescription
|
||||
}: ToolComponentProps) {
|
||||
const { t } = useTranslation();
|
||||
const { t } = useTranslation('xml');
|
||||
const [input, setInput] = useState<string>('');
|
||||
const [result, setResult] = useState<string>('');
|
||||
|
||||
@@ -39,15 +38,14 @@ export default function XmlBeautifier({
|
||||
input={input}
|
||||
inputComponent={
|
||||
<ToolTextInput
|
||||
title={t('xml:beautifier.inputTitle')}
|
||||
title={t('xmlBeautifier.inputTitle')}
|
||||
value={input}
|
||||
onChange={setInput}
|
||||
placeholder={t('xml:beautifier.placeholder')}
|
||||
/>
|
||||
}
|
||||
resultComponent={
|
||||
<ToolTextResult
|
||||
title={t('xml:beautifier.resultTitle')}
|
||||
title={t('xmlBeautifier.resultTitle')}
|
||||
value={result}
|
||||
extension="xml"
|
||||
/>
|
||||
@@ -58,7 +56,7 @@ export default function XmlBeautifier({
|
||||
setInput={setInput}
|
||||
compute={compute}
|
||||
toolInfo={{
|
||||
title: t('xml:beautifier.toolInfo.title', { title }),
|
||||
title: t('xmlBeautifier.toolInfo.title', { title }),
|
||||
description: longDescription
|
||||
}}
|
||||
/>
|
||||
|
@@ -32,7 +32,7 @@ export default function XmlValidator({
|
||||
title,
|
||||
longDescription
|
||||
}: ToolComponentProps) {
|
||||
const { t } = useTranslation();
|
||||
const { t } = useTranslation('xml');
|
||||
const [input, setInput] = useState<string>('');
|
||||
const [result, setResult] = useState<string>('');
|
||||
|
||||
@@ -48,7 +48,7 @@ export default function XmlValidator({
|
||||
<ToolTextInput
|
||||
value={input}
|
||||
onChange={setInput}
|
||||
placeholder={t('xml:xmlValidator.placeholder')}
|
||||
placeholder={t('xmlValidator.placeholder')}
|
||||
/>
|
||||
}
|
||||
resultComponent={<ToolTextResult value={result} extension="txt" />}
|
||||
@@ -58,8 +58,8 @@ export default function XmlValidator({
|
||||
setInput={setInput}
|
||||
compute={compute}
|
||||
toolInfo={{
|
||||
title: t('xml:xmlValidator.toolInfo.title'),
|
||||
description: t('xml:xmlValidator.toolInfo.description')
|
||||
title: t('xmlValidator.toolInfo.title'),
|
||||
description: t('xmlValidator.toolInfo.description')
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
Reference in New Issue
Block a user