-
Notifications
You must be signed in to change notification settings - Fork 5.4k
i18n next-intl
#14906
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
Merged
Merged
i18n next-intl
#14906
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
133e5ca
setup next-intl files
pettinarip abdc67f
move pages one level deeper to handle dynamic [locale] route
pettinarip b176281
create custom abstractions for t, Translation, and load namespaces
pettinarip 6d0030b
adapt pages for next-intl
pettinarip 563a65b
migrate hooks and translations
pettinarip 00dbb0e
change BUILD_LOCALES env var to be public
pettinarip 1e40746
fix href for internal pdfs
pettinarip 5298969
switch locale as recommended
pettinarip ac72a0e
default tz to server for now
pettinarip 531a9a9
Merge branch 'dev' into i18n-next-intl
pettinarip de5fdd4
Merge branch 'dev' into i18n-next-intl
pettinarip 1a1ab4b
fix links for static internal files
pettinarip f0d4913
set getMessageFallback for missing translations
pettinarip 83f808d
fix infinite loop with router.query
pettinarip 3492cfa
integrate next-intl with storybook
pettinarip bcce87b
set custom displayName for the switch component to fix storybook issue
pettinarip 247e318
remove i18next related deps
pettinarip d1ab379
Merge branch 'dev' into i18n-next-intl
pettinarip 5ce82af
handle pathname and router support in sb
pettinarip 3c4b0bc
commented out interactive tests based on i18n strings
pettinarip 7b6c07e
align the intl message fallback with previous implementation
pettinarip b7dfd28
Merge branch 'dev' into i18n-next-intl
pettinarip c16b424
update BUILD_LOCALES var to NEXT_PUBLIC_BUILD_LOCALES
pettinarip File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,6 @@ import { extname } from "path" | |
|
|
||
| import { BaseHTMLAttributes } from "react" | ||
| import type { ImageProps, StaticImageData } from "next/image" | ||
| import { useTranslation } from "next-i18next" | ||
|
|
||
| import AssetDownloadArtist from "@/components/AssetDownload/AssetDownloadArtist" | ||
| import AssetDownloadImage from "@/components/AssetDownload/AssetDownloadImage" | ||
|
|
@@ -13,6 +12,8 @@ import { trackCustomEvent } from "@/lib/utils/matomo" | |
| import { ButtonLink } from "../ui/buttons/Button" | ||
| import { Flex, Stack } from "../ui/flex" | ||
|
|
||
| import { useTranslation } from "@/hooks/useTranslation" | ||
|
|
||
| type AssetDownloadProps = { | ||
| title: string | ||
| alt: string | ||
|
|
@@ -55,22 +56,12 @@ const AssetDownload = ({ | |
| )} | ||
| </div> | ||
| <Flex className="mt-4 gap-5"> | ||
| <ButtonLink | ||
| href={imgSrc} | ||
| onClick={matomoHandler} | ||
| target="_blank" | ||
| locale={false} | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Modified the |
||
| > | ||
| <ButtonLink href={imgSrc} onClick={matomoHandler} target="_blank"> | ||
| {t("page-assets-download-download")} ( | ||
| {extname(imgSrc).slice(1).toUpperCase()}) | ||
| </ButtonLink> | ||
| {svgUrl && ( | ||
| <ButtonLink | ||
| href={svgUrl} | ||
| onClick={matomoHandler} | ||
| target="_blank" | ||
| locale={false} | ||
| > | ||
| <ButtonLink href={svgUrl} onClick={matomoHandler} target="_blank"> | ||
| {t("page-assets-download-download")} (SVG) | ||
| </ButtonLink> | ||
| )} | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Important change. This is not supported in the app router, removing now and building the pages using
getStaticPaths