-
Notifications
You must be signed in to change notification settings - Fork 463
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
ignore this pull request; see #2914 instead #2906
Conversation
* feat: disable caching for dynamic locale messages * docs: add warning about current cache behaviour
* feat: layer vue i18n config merging * test: update snapshot * fix: layer vuei18n configurations merge order * test: disable jit compilation for vuei18n layer test * docs: describe VueI18n option merging on layers page
* feat: locale message file cache configuration * test: fix types and failing errors * fix: nuxtInternalOptions `__normalizedLocales` * refactor: simplify types * refactor: remove duplicate utility function * docs: add caching section to lazy-load translations guide * test: add test to assert cache configuration is used
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…-modules#2368) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ules#2371) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…: true. (nuxt-modules#2363) Fixed protocol because URL(window.localtion.origin).protocol contains already ":". Si we don't need to add them again when we return the URL.
…dules#2383) * Fixed a bug where the correct locale.code could not be obtained when differentDomains: true and locale.domain is set with a protocol header. * add spec issues 2374 * fix getLocaleDomain * Fixed a bug where the correct locale.code could not be obtained when differentDomains: true and locale.domain is set with a protocol header. * fix: cannot resolve message for jit compilation (nuxt-modules#2387) * fix getLocaleDomain --------- Co-authored-by: kazuya kawaguchi <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(deps): update `vue-i18n-routing` to `^1.0.2` * test: add test to confirm query parameters are retained
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…es#2399) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…s#2405) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…modules#2402) * fix: disable typescript checking for generated i18n.options.mjs * test: update snapshots
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…dules#2417) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…s#2882) * fix: locales provided via `installModule` being ignored * fix: use `locales` and `vueI18n` passed by `installModule` * test: add `installModule` options tests * docs: add `installModule` documentation
…x'` (nuxt-modules#2897) * fix: locale head not updating on locale change using `strategy: 'no_prefix'` * test: add locale head tests for `'no_prefix'` strategy * test: fix flakiness by waiting for title change
…lity of default locales per domain
…l not be created or will be removed.
let host: string | undefined | ||
if (import.meta.client) { | ||
host = window.location.host | ||
} else if (import.meta.server) { | ||
const header = useRequestHeaders(['x-forwarded-host', 'host']) | ||
|
||
let detectedHost: string | undefined | ||
if ('x-forwarded-host' in header) { | ||
if (nuxtApp?.ssrContext?.event?.context.storeHost) { |
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.
this will fire only if you add a server plugin like
export default defineNitroPlugin((nitro) => {
nitro.hooks.hook('request', (event) => {
event.context.storeHost = 'host-you-want-to-use.com' // or get the host from event manually;
});
});
It gives more control and easier for local development, if you don't want to use headers, or want to use your own header for any reason
Maybe we should add this to the docs
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.
Where in the docs would be a good place to add this?
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.
d76bb16
to
a523661
Compare
I think I screwed something up 😬... |
Please check out the new pull request: #2914 |
Check out #2914 instead.