mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-06 14:27:11 -04:00
WIP(translate): Completed some page translation under web category
This commit is contained in:
parent
2da11a7242
commit
c6583ef013
90 changed files with 1112 additions and 341 deletions
|
@ -1,11 +1,11 @@
|
|||
import { Binary } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate } from '@/plugins/i18n.plugin';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: translate('tools.text-to-binary.title'),
|
||||
name: t('tools.text-to-binary.title'),
|
||||
path: '/text-to-binary',
|
||||
description: translate('tools.text-to-binary.description'),
|
||||
description: t('tools.text-to-binary.description'),
|
||||
keywords: ['text', 'to', 'binary', 'converter', 'encode', 'decode', 'ascii'],
|
||||
component: () => import('./text-to-binary.vue'),
|
||||
icon: Binary,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { translate } from '@/plugins/i18n.plugin';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export { convertTextToAsciiBinary, convertAsciiBinaryToText };
|
||||
|
||||
|
@ -13,7 +13,7 @@ function convertAsciiBinaryToText(binary: string): string {
|
|||
const cleanBinary = binary.replace(/[^01]/g, '');
|
||||
|
||||
if (cleanBinary.length % 8) {
|
||||
throw new Error(translate('tools.text-to-binary.invalidBinaryString'));
|
||||
throw new Error(t('tools.text-to-binary.invalidBinaryString'));
|
||||
}
|
||||
|
||||
return cleanBinary
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue