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

Allow tutorials to be localized #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ewpatton
Copy link
Member

@ewpatton ewpatton commented May 13, 2020

To test this functionality, you will need to build App Inventor from the branch feature/tutorial-translations-debug, which has PR mit-cml/appinventor-sources#2188 plus support for allowing localhost URLs in the tutorial URL.

I used Google Translate to translate the markdown tutorial from English into Simplified Chinese (@ellelili2025 should probably review it because I expect it's pretty bad).

This works similar to how the documentation localization works. The aforementioned PR adds a locale parameter if the user is using a language other than English. The changes in util.js will detect this, test to see if a page exists with the language tag before the ".html", and will redirect if so.

To test:

  1. Run bundle exec jekyll serve from the root
  2. Start your test server using the feature/tutorial-translations-debug branch
  3. Load HelloPurr in your test server from the no projects dialog
  4. Paste this URL into the TutorialURL: http://localhost:4000/yrtoolkit/yr/tutorials/markdown-tutorial.html
  5. Confirm the tutorial loads in the panel
  6. Switch the language to Simplified Chinese (first Chinese option)
  7. After App Inventor reloads, confirm that the tutorial panel now shows you the Chinese translation

Change-Id: I564c76c2fd058592a5ec7fb4eb551b63b0b04cc3

Change-Id: I564c76c2fd058592a5ec7fb4eb551b63b0b04cc3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants