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

[Docs] Internationalization docs #2741

Merged
merged 11 commits into from
Oct 7, 2020

Conversation

jcalcaben
Copy link
Contributor

Description

Creates a new Internationalization topic that provides an overview of the I18n framework in PWA Studio.

Related Issue

Closes PWA-930

Related to work done in #2696

Acceptance

@davemacaulay or anyone in the owls team
Any other untitled geese developer

Verification Stakeholders

@davemacaulay or anyone in the owls team
Any other untitled geese developer

Specification

Verification Steps

  1. Navigate to the pwa-devdocs directory: cd pwa-devdocs
  2. Start the html preview server: yarn develop
  3. Navigate to: /technologies/basic-concepts/internationalization/
  4. Verify page exists
  5. Verify navigation entry is highlighted on the left navigation

Screenshots / Screen Captures (if appropriate)

Checklist

  • I have added tests to cover my changes, if necessary.
  • I have updated the documentation accordingly, if necessary.

@jcalcaben jcalcaben added pkg:pwa-devdocs documentation This pertains to documentation. version: Minor This changeset includes functionality added in a backwards compatible manner. docs documentation labels Sep 30, 2020
@PWAStudioBot
Copy link
Contributor

PWAStudioBot commented Sep 30, 2020

Messages
📖

Access a deployed version of this PR here. Make sure to wait for the "pwa-pull-request-deploy" job to complete.

📖 DangerCI Failures related to missing labels/description/linked issues/etc will persist until the next push or next nightly build run (assuming they are fixed).
📖

Associated JIRA tickets: PWA-930.

Generated by 🚫 dangerJS against 6802630

Copy link
Contributor

@sirugh sirugh left a comment

Choose a reason for hiding this comment

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

This is a nice summarization! A few comments but I'm pretty happy with it as is.

- The package contains an `i18n` directory
- The `i18n` directory contains a dictionary file with a locale formatted name

<!-- TODO: Create an in-depth tutorial for creating a language package extension -->
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't there an example repo @davemacaulay created for this? Not sure if it's public but would be trivial to make one and just link it, I'm sure.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

since it's not merged into mainline yet, I can't add a link to it. maybe when I do the tutorial I can add it.

@jcalcaben jcalcaben requested a review from sirugh October 5, 2020 16:50
sirugh
sirugh previously approved these changes Oct 5, 2020
Copy link
Contributor

@sirugh sirugh left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@davemacaulay davemacaulay left a comment

Choose a reason for hiding this comment

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

This looks like a good first pass, a fair few comments to get this in line with our original thinking. I think we can also rely on an issue I originally created to provide more context on our decision making: #669 (comment)

Comment on lines 148 to 149
If a components changes the value of the current locale during runtime, the framework sends a GraphQL query to verify the new value.
Even if you install a language package plugin for a locale, you must enable the locale on the backend to use the translations in the storefront UI.
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this concerning? We don't do any GraphQL queries for individual string changes during development. Be good if you can clarify which feature you mean by this.

Copy link
Contributor

Choose a reason for hiding this comment

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

I wanted to make sure we covered our bases in terms of what minimum requirements are met in order to enable and use translations in the UI. If a user makes an i18n/fr_FR.json they can't just display French right? They'd have to enable it in the backend so that it shows up in the locale switcher that @eug123 has created.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

additional clarification provided

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for explaining @sirugh!

@dpatil-magento
Copy link
Contributor

Verification steps pass.

@dpatil-magento dpatil-magento merged commit 57def6a into develop Oct 7, 2020
@dpatil-magento dpatil-magento deleted the jimothy/pwa-930_i18n-l10n-docs branch October 7, 2020 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs documentation documentation This pertains to documentation. pkg:pwa-devdocs Progress: done version: Minor This changeset includes functionality added in a backwards compatible manner.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants