refactor(i18n): 移除 chrome.i18n 国际化,统一使用中文硬编码

移除 chromeI18n 工具、_locales 翻译文件和 manifest default_locale 配置,
将所有 UI 文案改为直接硬编码中文,并更新相关测试与文档。
This commit is contained in:
雨霖铃
2026-06-18 14:22:14 +00:00
parent 618f3c36f2
commit ec92afa294
68 changed files with 531 additions and 2148 deletions
+5 -7
View File
@@ -1,18 +1,16 @@
import TextInputArea from '@/components/TextInputArea';
import { formatBytes } from '@/utils/format';
import { useI18n } from '@/utils/chromeI18n';
import { useTextStatistics } from './useTextStatistics';
import { cn } from '@/lib/utils';
export default function Index() {
const { t } = useI18n('textStatistics');
const { text, stats, setText } = useTextStatistics();
const statItems = [
{ label: t('textStatistics:characters'), value: stats.characters },
{ label: t('textStatistics:words'), value: stats.words },
{ label: t('textStatistics:lines'), value: stats.lines },
{ label: t('textStatistics:bytes'), value: formatBytes(stats.bytes) },
{ label: '字符数', value: stats.characters },
{ label: '单词数', value: stats.words },
{ label: '行数', value: stats.lines },
{ label: '字节大小', value: formatBytes(stats.bytes) },
];
return (
@@ -20,7 +18,7 @@ export default function Index() {
<TextInputArea
value={text}
onChange={setText}
placeholder={t('textStatistics:placeholder')}
placeholder={'在此输入或粘贴文本...'}
minRows={10}
maxRows={18}
showClear={true}