diff --git a/.github/workflows/docker-nightly-release.yml b/.github/workflows/docker-nightly-release.yml index 46a9ed7f..81a0898c 100644 --- a/.github/workflows/docker-nightly-release.yml +++ b/.github/workflows/docker-nightly-release.yml @@ -57,26 +57,26 @@ jobs: uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 - name: Login to GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Login to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Build and push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index 492f9d15..8ed4099d 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -16,26 +16,26 @@ jobs: uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 - name: Login to GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Login to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Build and push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile diff --git a/.nvmrc b/.nvmrc index 02c8b485..87ec8842 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -18.18.0 +18.18.2 diff --git a/locales/en.yml b/locales/en.yml index 385e019b..1f31b68a 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -1,4 +1,51 @@ home: categories: newestTools: Newest tools - + favoriteTools: 'Your favorite tools' + allTools: 'All the tools' + subtitle: 'Handy tools for developers' + toggleMenu: 'Toggle menu' + home: Home + uiLib: 'UI Lib' + buyMeACoffee: 'Buy me a coffee' + follow: + title: 'You like it-tools?' + p1: 'Give us a star on' + githubRepository: 'IT-Tools GitHub repository' + p2: 'or follow us on' + twitterAccount: 'IT-Tools Twitter account' + thankYou: 'Thank you !' + nav: + github: 'GitHub repository' + githubRepository: 'IT-Tools GitHub repository' + twitter: 'Twitter account' + twitterAccount: 'IT Tools Twitter account' + about: 'About IT-Tools' + aboutLabel: 'About' + darkMode: 'Dark mode' + lightMode: 'Light mode' + mode: 'Toggle dark/light mode' +about: + h1: 'About IT-Tools' + h1p1: 'This wonderful website, made with ❤ by' + h1p2: ', aggregates useful tools for developer and people working in IT. If you find it useful, please feel free to share it to people you think may find it useful too and don''''t forget to bookmark it in your shortcut bar!' + h1p3: 'IT Tools is open-source (under the MIT license) and free, and will always be, but it costs me money to host and renew the domain name. If you want to support my work, and encourage me to add more tools, please consider supporting by' + h1p4: 'sponsoring me' + h2: Technologies + h2p1: 'IT Tools is made in Vue.js (Vue 3) with the the Naive UI component library and is hosted and continuously deployed by Vercel. Third-party open-source libraries are used in some tools, you may find the complete list in the' + h2p2: 'file of the repository.' + h3: 'Found a bug? A tool is missing?' + h3p1: 'If you need a tool that is currently not present here, and you think can be useful, you are welcome to submit a feature request in the' + h3p2: 'issues section' + h3p3: 'in the GitHub repository.' + h3p4: 'And if you found a bug, or something doesn''''t work as expected, please file a bug report in the' + h3p5: 'issues section' + h3p6: 'in the GitHub repository.' +404: + notFound: '404 Not Found' + sorry: 'Sorry, this page does not seem to exist' + maybe: 'Maybe the cache is doing tricky things, try force-refreshing?' + backHome: 'Back home' +toolCard: + new: New + \ No newline at end of file diff --git a/package.json b/package.json index 4ba8fbb1..deafb979 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "dependencies": { "@it-tools/bip39": "^0.0.4", "@it-tools/oggen": "^1.3.0", - "@sindresorhus/slugify": "^2.2.0", + "@sindresorhus/slugify": "^2.2.1", "@tiptap/pm": "^2.1.6", "@tiptap/starter-kit": "^2.1.6", "@tiptap/vue-3": "^2.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 76cf9f1b..05cad907 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ dependencies: specifier: ^1.3.0 version: 1.3.0 '@sindresorhus/slugify': - specifier: ^2.2.0 - version: 2.2.0 + specifier: ^2.2.1 + version: 2.2.1 '@tiptap/pm': specifier: ^2.1.6 version: 2.1.6 @@ -2523,8 +2523,8 @@ packages: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true - /@sindresorhus/slugify@2.2.0: - resolution: {integrity: sha512-9Vybc/qX8Kj6pxJaapjkFbiUJPk7MAkCh/GFCxIBnnsuYCFPIXKvnLidG8xlepht3i24L5XemUmGtrJ3UWrl6w==} + /@sindresorhus/slugify@2.2.1: + resolution: {integrity: sha512-MkngSCRZ8JdSOCHRaYd+D01XhvU3Hjy6MGl06zhOk614hp9EOAp5gIkBeQg7wtmxpitU6eAL4kdiRMcJa2dlrw==} engines: {node: '>=12'} dependencies: '@sindresorhus/transliterate': 1.6.0 diff --git a/src/components/NavbarButtons.vue b/src/components/NavbarButtons.vue index 653afdd2..cfc58cdd 100644 --- a/src/components/NavbarButtons.vue +++ b/src/components/NavbarButtons.vue @@ -7,39 +7,39 @@ const { isDarkTheme } = toRefs(styleStore); diff --git a/src/pages/About.vue b/src/pages/About.vue index 8e6b1aad..9d7436d3 100644 --- a/src/pages/About.vue +++ b/src/pages/About.vue @@ -8,62 +8,56 @@ const { tracker } = useTracker(); diff --git a/src/pages/Home.page.vue b/src/pages/Home.page.vue index 5c7c3c4f..7f34081b 100644 --- a/src/pages/Home.page.vue +++ b/src/pages/Home.page.vue @@ -17,21 +17,21 @@ const { t } = useI18n();
- - Give us a star on + + {{ $t('home.follow.p1') }} GitHub - or follow us on + {{ $t('home.follow.p2') }} Twitter! Thank you + :aria-label="$t('home.follow.twitterAccount')" + >Twitter{{ $t('home.follow.thankYou') }} @@ -39,7 +39,7 @@ const { t } = useI18n();
- Your favorite tools + {{ $t('home.categories.favoriteTools') }} @@ -57,7 +57,7 @@ const { t } = useI18n();
- All the tools + {{ $t('home.categories.allTools') }} diff --git a/src/plugins/i18n.plugin.ts b/src/plugins/i18n.plugin.ts index 8e0b2d33..7ef2c98f 100644 --- a/src/plugins/i18n.plugin.ts +++ b/src/plugins/i18n.plugin.ts @@ -29,3 +29,9 @@ export const i18nPlugin: Plugin = { app.use(i18n); }, }; + +export const translate = function (localeKey: string) { + // @ts-expect-error global + const hasKey = i18n.global.te(localeKey, i18n.global.locale); + return hasKey ? i18n.global.t(localeKey) : localeKey; +}; diff --git a/src/tools/token-generator/index.ts b/src/tools/token-generator/index.ts index bed5f009..4e849758 100644 --- a/src/tools/token-generator/index.ts +++ b/src/tools/token-generator/index.ts @@ -1,11 +1,11 @@ import { ArrowsShuffle } from '@vicons/tabler'; import { defineTool } from '../tool'; +import { translate } from '@/plugins/i18n.plugin'; export const tool = defineTool({ - name: 'Token generator', + name: translate('tools.token-generator.title'), path: '/token-generator', - description: - 'Generate random string with the chars you want: uppercase or lowercase letters, numbers and/or symbols.', + description: translate('tools.token-generator.description'), keywords: ['token', 'random', 'string', 'alphanumeric', 'symbols', 'number', 'letters', 'lowercase', 'uppercase'], component: () => import('./token-generator.tool.vue'), icon: ArrowsShuffle, diff --git a/src/tools/token-generator/locales/en.yml b/src/tools/token-generator/locales/en.yml index c2c03232..7a06f3dd 100644 --- a/src/tools/token-generator/locales/en.yml +++ b/src/tools/token-generator/locales/en.yml @@ -6,4 +6,10 @@ tools: uppercase: Uppercase (ABC...) lowercase: Lowercase (abc...) numbers: Numbers (123...) - symbols: Symbols (!-;...) \ No newline at end of file + symbols: Symbols (!-;...) + length: Length + tokenPlaceholder: 'The token...' + copied: Token copied to the clipboard + button: + copy: Copy + refresh: Refresh \ No newline at end of file diff --git a/src/tools/token-generator/token-generator.tool.vue b/src/tools/token-generator/token-generator.tool.vue index 1019a83b..fe53edcd 100644 --- a/src/tools/token-generator/token-generator.tool.vue +++ b/src/tools/token-generator/token-generator.tool.vue @@ -21,7 +21,7 @@ const [token, refreshToken] = computedRefreshable(() => }), ); -const { copy } = useCopy({ source: token, text: 'Token copied to the clipboard' }); +const { copy } = useCopy({ source: token, text: t('tools.token-generator.copied') });