From 1739cd92b737e1e49e54eab50ae77544c6814dd9 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Thu, 20 Mar 2025 21:32:52 +0800 Subject: [PATCH] :bug: Add backward compatibility --- middleware/redirectLocale.global.ts | 6 ++++++ pages/flow/accounts/{account-delete.vue => deletion.vue} | 0 2 files changed, 6 insertions(+) create mode 100644 middleware/redirectLocale.global.ts rename pages/flow/accounts/{account-delete.vue => deletion.vue} (100%) diff --git a/middleware/redirectLocale.global.ts b/middleware/redirectLocale.global.ts new file mode 100644 index 0000000..08bb273 --- /dev/null +++ b/middleware/redirectLocale.global.ts @@ -0,0 +1,6 @@ +export default defineNuxtRouteMiddleware((to) => { + // No further supported path prefix localization + if (to.path.startsWith("/zh-CN")) { + return navigateTo(to.fullPath.replace("/zh-CN", "")) + } +}) diff --git a/pages/flow/accounts/account-delete.vue b/pages/flow/accounts/deletion.vue similarity index 100% rename from pages/flow/accounts/account-delete.vue rename to pages/flow/accounts/deletion.vue