Skip to content

Conversation

@miya
Copy link
Member

@miya miya commented Nov 19, 2025

@miya miya requested a review from yuki-takei November 19, 2025 09:49
@miya miya self-assigned this Nov 19, 2025
const [i18nPropsResult, pageDataResult] = await Promise.all([
getServerSideI18nProps(context, ['translation']),
getPageDataForSameRoute(context),
]);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

他の NextPage と同様にページ遷移毎に毎回 getPageDataForSameRoute を getServerSideI18nProps を実行するように修正

Admin

const [commonInitialResult, i18nResult] = await Promise.all([
getServerSideCommonInitialProps(context),
getServerSideI18nProps(context, ['admin'], options),
]);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getServerSideI18nProps のコストって低いのかな?
その結論付けがないまま安易に追加したくない

admin はページ遷移時のパフォーマンスを気にしないので安易に追加していいと思っている

もしコストが低いなら追加してOK、高い可能性があるなら言語変更した際はリロードを促すなどすればいいと思う

const [i18nPropsResult, pageDataResult] = await Promise.all([
getServerSideI18nProps(context, ['translation']),
getPageDataForSameRoute(context),
]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getServerSideI18nProps のコストって低いのかな?
その結論付けがないまま安易に追加したくない

admin はページ遷移時のパフォーマンスを気にしないので安易に追加していいと思っている

もしコストが低いなら追加してOK、高い可能性があるなら言語変更した際はリロードを促すなどすればいいと思う

@yuki-takei yuki-takei merged commit b11bb51 into dev/7.4.x Nov 25, 2025
16 checks passed
@yuki-takei yuki-takei deleted the fix/174331-lang-setting-reset-on-page-transition branch November 25, 2025 11:35
@github-actions github-actions bot mentioned this pull request Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants