-
Notifications
You must be signed in to change notification settings - Fork 39
feat(VCST-3986): multilingual seo urls #1976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
…it to get slugInfo
}; | ||
if (cultureName !== currentLanguage.value?.cultureName) { | ||
pinLocale(cultureName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pinLocale(cultureName) is called twice with the same value. Is there a specific reason for this duplication?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice spot! deleted the second call
|
||
const pinedLocale = useLocalStorage<string | null>("pinedLocale", null); | ||
const pinnedLocale = useLocalStorage<string | null>("pinnedLocale", null); | ||
const previousCultureSlug = useSessionStorage<{ cultureName: string; slug: string }>("previousCultureSlug", { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to move pinnedLocale and previousCultureSlug inside the function useLanguages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to keep it in module scope, chat gpt agrees)
basically if we move it inside the function it will behave the same way, no changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements multilingual SEO URLs functionality by replacing the previous two-letter language code approach with full culture names (e.g., "en-US" instead of "en"). The implementation adds support for localized permalinks that update dynamically when switching languages.
Key changes include:
- Migration from
twoLetterLanguageName
tocultureName
throughout the language system - Addition of localized URL management with
updateLocalizedUrl()
functionality - Enhanced locale resolution with support for short aliases and culture disambiguation
- Implementation of
previousCultureSlug
tracking for cross-language navigation
Reviewed Changes
Copilot reviewed 17 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
client-app/core/composables/useLanguages.ts | Core refactoring to support culture names and localized URL management |
client-app/shared/layout/components/language-selector/language-selector.vue | Updated to use culture names instead of two-letter codes |
client-app/shared/common/composables/useSlugInfo.ts | Added culture-aware slug resolution using previous culture tracking |
client-app/pages/product.vue | Integrated localized URL updates for product pages |
client-app/pages/catalog.vue | Minor refactoring of destructuring order |
client-app/shared/catalog/components/category.vue | Integrated localized URL updates for category pages |
client-app/pages/brand.vue | Integrated localized URL updates for brand pages |
client-app/pages/matcher/virto-pages/virto-pages.vue | Integrated localized URL updates for CMS pages |
client-app/core/composables/useLanguages.test.ts | Comprehensive test suite for new language functionality |
client-app/core/utilities/common/index.ts | Added safeDecode utility and removed unused getBaseUrl function |
client-app/app-runner.ts | Updated app initialization to use new locale resolution system |
client-app/modules/utils.ts | Updated method name from mergeLocales to mergeLocalesMessages |
client-app/shared/account/composables/useUser.ts | Renamed contact locale property to use culture name |
client-app/shared/layout/components/header/_internal/mobile-menu/mobile-menu.vue | Updated property reference for supported languages |
client-app/core/constants/locale.ts | Added pt-br country mapping |
README.md | Added comprehensive documentation for the new language flow |
Comments suppressed due to low confidence (1)
client-app/core/composables/useLanguages.ts:1
- The pinLocale function is called twice - once on line 79 and again on line 86. The second call is redundant and should be removed.
import { useLocalStorage, useSessionStorage } from "@vueuse/core";
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Description
Screencast.from.2025-10-02.14-38-45.mp4
References
Jira-link:
https://virtocommerce.atlassian.net/browse/VCST-3986
Artifact URL:
https://vc3prerelease.blob.core.windows.net/packages/vc-theme-b2b-vue-2.32.0-pr-1976-63c6-63c65db4.zip