Skip to content

Commit

Permalink
feat(i18n): hash text
Browse files Browse the repository at this point in the history
  • Loading branch information
motui committed Oct 22, 2023
1 parent 4365226 commit 6f29ded
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
7 changes: 5 additions & 2 deletions src/tools/hash-text/hash-text.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,17 @@ const hashText = (algo: AlgoNames, value: string) => formatWithEncoding(algos[al
<template>
<div>
<c-card>
<c-input-text v-model:value="clearText" multiline raw-text placeholder="Your string to hash..." rows="3" autosize autofocus label="Your text to hash:" />
<c-input-text
v-model:value="clearText" multiline raw-text :placeholder="$t('tools.hash-text.toHashPlaceholder')"
rows="3" autosize autofocus :label="$t('tools.hash-text.toHashLabel')"
/>

<n-divider />

<c-select
v-model:value="encoding"
mb-4
label="Digest encoding"
:label="$t('tools.hash-text.encoding')"
:options="[
{
label: 'Binary (base 2)',
Expand Down
6 changes: 3 additions & 3 deletions src/tools/hash-text/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { EyeOff } from '@vicons/tabler';
import { defineTool } from '../tool';
import { translate } from '@/plugins/i18n.plugin';

export const tool = defineTool({
name: 'Hash text',
name: translate('tools.hash-text.title'),
path: '/hash-text',
description:
'Hash a text string using the function you need : MD5, SHA1, SHA256, SHA224, SHA512, SHA384, SHA3 or RIPEMD160',
description: translate('tools.hash-text.description'),
keywords: [
'hash',
'digest',
Expand Down
8 changes: 8 additions & 0 deletions src/tools/hash-text/locales/en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
tools:
hash-text:
title: 'Hash text'
description: 'Hash a text string using the function you need : MD5, SHA1, SHA256, SHA224, SHA512, SHA384, SHA3 or RIPEMD160'

toHashPlaceholder: 'Your string to hash...'
toHashLabel: 'Your text to hash:'
encoding: 'Digest encoding'

0 comments on commit 6f29ded

Please sign in to comment.