Open renovate[bot] opened 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
dashboard | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Aug 10, 2023 8:27am |
docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Aug 10, 2023 8:27am |
storybook | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Aug 10, 2023 8:27am |
www | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Aug 10, 2023 8:27am |
Latest commit: b023231c1c49c92d4ba9ab7200d348d90d4629fe
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
This PR contains the following updates:
^0.6.4
->^0.8.0
Release Notes
QuiiBz/next-international (next-international)
### [`v0.8.2`](https://togithub.com/QuiiBz/next-international/releases/tag/0.8.2) [Compare Source](https://togithub.com/QuiiBz/next-international/compare/eabe08b0594e15c602c84cbe7a2cdd0e43637f25...0.8.2) #### What's Changed - chore: update middleware regex by [@QuiiBz](https://togithub.com/QuiiBz) in [https://github.com/QuiiBz/next-international/pull/98](https://togithub.com/QuiiBz/next-international/pull/98) - fix(next-international): use default locale when Accept-Language is unknown by [@QuiiBz](https://togithub.com/QuiiBz) in [https://github.com/QuiiBz/next-international/pull/101](https://togithub.com/QuiiBz/next-international/pull/101) **Full Changelog**: https://github.com/QuiiBz/next-international/compare/0.8.0...0.8.2 ### [`v0.8.1`](https://togithub.com/QuiiBz/next-international/compare/0.8.0...eabe08b0594e15c602c84cbe7a2cdd0e43637f25) [Compare Source](https://togithub.com/QuiiBz/next-international/compare/0.8.0...eabe08b0594e15c602c84cbe7a2cdd0e43637f25) ### [`v0.8.0`](https://togithub.com/QuiiBz/next-international/releases/tag/0.8.0) [Compare Source](https://togithub.com/QuiiBz/next-international/compare/0.7.0...0.8.0) #### App Router ##### Rewrite the URL to hide the locale You might have noticed that by default, next-international redirects and shows the locale in the URL (e.g `/en/products`). This is helpful for users, but you can transparently rewrite the URL to hide the locale (e.g `/products`). Navigate to the `middleware.ts` file and set the `urlMappingStrategy` to `rewrite` (the default is `redirect`): ```ts // middleware.ts const I18nMiddleware = createI18nMiddleware(['en', 'fr'] as const, 'fr', { urlMappingStrategy: 'rewrite' }) ``` ##### `useChangeLocale` with `basePath` When using `useChangeLocale` and if you have set a [`basePath`](https://nextjs.org/docs/app/api-reference/next-config-js/basePath) option inside `next.config.js`, you'll also need to set it here: ```ts const changeLocale = useChangeLocale({ basePath: '/your-base-path' }) ``` #### What's Changed - fix(international-types): plural tags by [@QuiiBz](https://togithub.com/QuiiBz) in [https://github.com/QuiiBz/next-international/pull/80](https://togithub.com/QuiiBz/next-international/pull/80) - chore: improve README by [@QuiiBz](https://togithub.com/QuiiBz) in [https://github.com/QuiiBz/next-international/pull/82](https://togithub.com/QuiiBz/next-international/pull/82) - feat(next-international): `useParams` & `rewrite` strategy to hide locale from URL by [@EdmundKorley](https://togithub.com/EdmundKorley) in [https://github.com/QuiiBz/next-international/pull/83](https://togithub.com/QuiiBz/next-international/pull/83) - fix(international-types): plurals params with scope by [@QuiiBz](https://togithub.com/QuiiBz) in [https://github.com/QuiiBz/next-international/pull/88](https://togithub.com/QuiiBz/next-international/pull/88) - fix(next-international): `useChangeLocale` with `basePath` by [@QuiiBz](https://togithub.com/QuiiBz) in [https://github.com/QuiiBz/next-international/pull/90](https://togithub.com/QuiiBz/next-international/pull/90) - fix(next-international): derive plurals from fallback locale by [@ArmanAryanpour](https://togithub.com/ArmanAryanpour) in [https://github.com/QuiiBz/next-international/pull/79](https://togithub.com/QuiiBz/next-international/pull/79) - fix(next-international): plural with scopes by [@QuiiBz](https://togithub.com/QuiiBz) in [https://github.com/QuiiBz/next-international/pull/91](https://togithub.com/QuiiBz/next-international/pull/91) #### New Contributors - [@EdmundKorley](https://togithub.com/EdmundKorley) made their first contribution in [https://github.com/QuiiBz/next-international/pull/83](https://togithub.com/QuiiBz/next-international/pull/83) - [@ArmanAryanpour](https://togithub.com/ArmanAryanpour) made their first contribution in [https://github.com/QuiiBz/next-international/pull/79](https://togithub.com/QuiiBz/next-international/pull/79) **Full Changelog**: https://github.com/QuiiBz/next-international/compare/0.7.0...0.8.0 ### [`v0.7.0`](https://togithub.com/QuiiBz/next-international/releases/tag/0.7.0) [Compare Source](https://togithub.com/QuiiBz/next-international/compare/0.6.4...0.7.0) ##### Plurals Plural translations work out of the box without any external dependencies, using the [`Intl.PluralRules`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/PluralRules) API, which is supported in all browsers and Node.js. To declare plural translations, append `#` followed by `zero`, `one`, `two`, `few`, `many` or `other`: ```ts // locales/en.ts export default { 'cows#one': 'A cow', 'cows#other': '{count} cows' } as const ``` The correct translation will then be determined automatically using a mandatory `count` parameter. This works with the Pages Router, App Router in both Client and Server Components, and with [scoped translations](#scoped-translations): ```tsx export default function Page() { const t = useI18n() return ({t('cows', { count: 1 })}
{/* Output: 3 cows */}{t('cows', { count: 3 })}
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.