From 35563b8457e06028746a09881164e0504838f59a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8E=AB=E9=A2=93?= Date: Sun, 22 Oct 2023 16:07:43 +0800 Subject: [PATCH 01/11] feat(i18n): 404 page (#679) --- locales/en.yml | 6 +++++- src/pages/404.page.vue | 8 ++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/locales/en.yml b/locales/en.yml index 385e019b..489a1689 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -1,4 +1,8 @@ home: categories: newestTools: Newest tools - +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' diff --git a/src/pages/404.page.vue b/src/pages/404.page.vue index 2bf49bcb..20f61c41 100644 --- a/src/pages/404.page.vue +++ b/src/pages/404.page.vue @@ -11,17 +11,17 @@ useHead({ title: 'Page not found - IT Tools' });

- 404 Not Found + {{ $t('404.notFound') }}

- Sorry, this page does not seem to exist + {{ $t('404.sorry') }}
- Maybe the cache is doing tricky things, try force-refreshing? + {{ $t('404.maybe') }}
- Back home + {{ $t('404.backHome') }} From a2b53c2e38aca1824d8ee90aaf5f49d0884c3ecf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8E=AB=E9=A2=93?= Date: Sun, 22 Oct 2023 16:15:39 +0800 Subject: [PATCH 02/11] feat(i18n): about page (#680) (cherry picked from commit 605b84c16e0eec1a16e6133203e7810a68447607) Co-authored-by: Corentin THOMASSET --- locales/en.yml | 16 ++++++++++++++++ src/pages/About.vue | 36 +++++++++++++++--------------------- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/locales/en.yml b/locales/en.yml index 489a1689..c2fc89d4 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -1,6 +1,22 @@ home: categories: newestTools: Newest tools +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' 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(); From 84a4a646f6d859915e8e3120fe6a8917ed09d854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8E=AB=E9=A2=93?= Date: Sun, 22 Oct 2023 16:21:10 +0800 Subject: [PATCH 03/11] feat(i18n): tool card (#682) (cherry picked from commit 1d0a3904f72ab24364beda034d17cf6de9b5e959) --- locales/en.yml | 2 ++ src/components/ToolCard.vue | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/locales/en.yml b/locales/en.yml index c2fc89d4..dfe668e7 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -22,3 +22,5 @@ about: 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/src/components/ToolCard.vue b/src/components/ToolCard.vue index 00f22466..768e9ede 100644 --- a/src/components/ToolCard.vue +++ b/src/components/ToolCard.vue @@ -26,7 +26,7 @@ const appTheme = useAppTheme(); :bordered="false" :color="{ color: theme.primaryColor, textColor: theme.tagColor }" > - New + {{ $t('toolCard.new') }} From ebb4ec416511c02108704e3909c565aa47890b62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8E=AB=E9=A2=93?= Date: Sun, 22 Oct 2023 16:23:00 +0800 Subject: [PATCH 04/11] feat(i18n): support for i18n in .ts files (#683) (cherry picked from commit 732313bfc32a514ef064ca0f90304ff05e2e7ef3) --- src/plugins/i18n.plugin.ts | 6 ++++++ 1 file changed, 6 insertions(+) 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; +}; From eea9f9127681595bec6c7868e415763d2640a2a5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 22 Oct 2023 10:26:05 +0200 Subject: [PATCH 05/11] chore(deps): update dependency node to v18.18.2 (#674) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .nvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nvmrc b/.nvmrc index 02c8b485..87ec8842 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -18.18.0 +18.18.2 From d36b18f193952ddc499b56c6831bc6deea4af91d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 22 Oct 2023 10:29:05 +0200 Subject: [PATCH 06/11] chore(deps): update docker/build-push-action action to v5 (#624) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/docker-nightly-release.yml | 2 +- .github/workflows/releases.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-nightly-release.yml b/.github/workflows/docker-nightly-release.yml index 46a9ed7f..3247e6b8 100644 --- a/.github/workflows/docker-nightly-release.yml +++ b/.github/workflows/docker-nightly-release.yml @@ -76,7 +76,7 @@ jobs: uses: docker/setup-buildx-action@v2 - 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..42524346 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -35,7 +35,7 @@ jobs: uses: docker/setup-buildx-action@v2 - name: Build and push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile From d8d7a3b9ab6bb83af2591e00d20289052dd184d2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 22 Oct 2023 10:30:04 +0200 Subject: [PATCH 07/11] chore(deps): update docker/login-action action to v3 (#625) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/docker-nightly-release.yml | 4 ++-- .github/workflows/releases.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-nightly-release.yml b/.github/workflows/docker-nightly-release.yml index 3247e6b8..7c4aa51e 100644 --- a/.github/workflows/docker-nightly-release.yml +++ b/.github/workflows/docker-nightly-release.yml @@ -57,14 +57,14 @@ 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 }} diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index 42524346..71879ff1 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -16,14 +16,14 @@ 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 }} From 57ecda16238fd760ec0675426b072c50ac2e786b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 22 Oct 2023 10:30:16 +0200 Subject: [PATCH 08/11] chore(deps): update docker/setup-buildx-action action to v3 (#626) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/docker-nightly-release.yml | 2 +- .github/workflows/releases.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-nightly-release.yml b/.github/workflows/docker-nightly-release.yml index 7c4aa51e..924a0da2 100644 --- a/.github/workflows/docker-nightly-release.yml +++ b/.github/workflows/docker-nightly-release.yml @@ -73,7 +73,7 @@ jobs: uses: docker/setup-qemu-action@v2 - 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@v5 diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index 71879ff1..fd5f63b0 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -32,7 +32,7 @@ jobs: uses: docker/setup-qemu-action@v2 - 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@v5 From 4365226d0168b023160eb96dfd412d88e5bb662d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 22 Oct 2023 10:30:26 +0200 Subject: [PATCH 09/11] chore(deps): update docker/setup-qemu-action action to v3 (#627) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/docker-nightly-release.yml | 2 +- .github/workflows/releases.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-nightly-release.yml b/.github/workflows/docker-nightly-release.yml index 924a0da2..81a0898c 100644 --- a/.github/workflows/docker-nightly-release.yml +++ b/.github/workflows/docker-nightly-release.yml @@ -70,7 +70,7 @@ jobs: 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@v3 diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index fd5f63b0..8ed4099d 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -29,7 +29,7 @@ jobs: 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@v3 From 00562ed5e87a88a7038b4670f20e155c4f5b070d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8E=AB=E9=A2=93?= Date: Mon, 23 Oct 2023 15:14:34 +0800 Subject: [PATCH 10/11] feat(i18n): home page (#687) (cherry picked from commit 9d39826078ceb929a5ca3b577f9f39449303c289) --- locales/en.yml | 27 ++++++++++++++++++++++++++- src/components/NavbarButtons.vue | 16 ++++++++-------- src/layouts/base.layout.vue | 10 +++++----- src/pages/Home.page.vue | 16 ++++++++-------- 4 files changed, 47 insertions(+), 22 deletions(-) diff --git a/locales/en.yml b/locales/en.yml index dfe668e7..1f31b68a 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -1,6 +1,30 @@ 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' @@ -23,4 +47,5 @@ about: maybe: 'Maybe the cache is doing tricky things, try force-refreshing?' backHome: 'Back home' toolCard: - new: New \ No newline at end of file + new: New + \ No newline at end of file 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);