Skip to content
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

Add i18next-shopify framework #3

Merged

Conversation

mkevinosullivan
Copy link

@mkevinosullivan mkevinosullivan commented Jun 20, 2023

This commit adds the i18next-shopify framework to the list of supported frameworks.

It is an extension of the React i18next framework, with some configuration changes.

(Modified duplicate of Donn's PR: lokalise#931)

src/frameworks/i18next-shopify.ts Outdated Show resolved Hide resolved
src/frameworks/index.ts Outdated Show resolved Hide resolved
@mkevinosullivan mkevinosullivan changed the base branch from main to kos/enable_extraction_on_reacti18next_framework June 21, 2023 16:02
@mkevinosullivan mkevinosullivan force-pushed the kos/add_i18next_shopify_framework branch from 836027b to ef19b97 Compare June 21, 2023 16:03
src/frameworks/i18next-shopify.ts Outdated Show resolved Hide resolved
@mkevinosullivan mkevinosullivan force-pushed the kos/add_i18next_shopify_framework branch from dd21ea2 to 134008a Compare June 21, 2023 20:20
@@ -0,0 +1,11 @@
{
"title": "hello",
"description": {

Choose a reason for hiding this comment

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

Could you please add a pluralization key to one of these example files? That's where i18next-shopify diverges most from react-i18next, and it will be good to have for demoing and testing feature improvements.

Copy link
Author

Choose a reason for hiding this comment

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

Done! See "count.one", "count.other" below, and there's usage in App.jsx

package.json Show resolved Hide resolved
@mkevinosullivan mkevinosullivan force-pushed the kos/enable_extraction_on_reacti18next_framework branch 2 times, most recently from 8dd5c42 to 7ee58be Compare June 22, 2023 15:30
@mkevinosullivan mkevinosullivan force-pushed the kos/add_i18next_shopify_framework branch from 134008a to 92cfeaa Compare June 22, 2023 15:37
<div>{t("translation.description.part2")}</div>
{/* plain <Trans>, #423 */}
<Trans i18nKey="translation.description.part2">Fallback text</Trans>
<p>{t("translation.count", { count: 1 })}</p>
Copy link
Author

Choose a reason for hiding this comment

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

Until the pluralization PR is merged, this will still render as "{...}"

This commit adds the i18next-shopify framework to the list of supported
frameworks. It is an extension of the React i18next framework, with some
configuration changes.

Also add i18next-shopify example app, including a pluralization example.
@mkevinosullivan mkevinosullivan force-pushed the kos/add_i18next_shopify_framework branch from 2bd2073 to e933f63 Compare June 22, 2023 18:46
@trishrempel trishrempel changed the base branch from kos/enable_extraction_on_reacti18next_framework to release/i18next-shopify July 10, 2023 18:11
@trishrempel trishrempel merged commit b4018f6 into release/i18next-shopify Jul 10, 2023
7 checks passed
@trishrempel trishrempel added the #gsd:32590 App localization tools & guidance label Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#gsd:32590 App localization tools & guidance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants