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

Support chinese traditional #1245

Merged
merged 10 commits into from
Jul 9, 2024
Merged

Conversation

binh-dam-ibigroup
Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup commented Jul 3, 2024

Description

Requires opentripplanner/otp-ui#741.

This PR adds support for Chinese Traditional (zh-Hant in config, zh_Hant.yml for the content), including translated content from #1243 and code changes needed to enable that language. The Chinese (Simplified) file is renamed to zh_Hans.yml.

Config changes:

  • zh is still supported by itself, i.e. if no other Chinese languages are configured such as Chinese (Traditional).
  • If multiple Chinese languages/scripts are configured, then Chinese (Simplified), if used, must be configured as zh-Hans.
  • Same applies for other languages.

PR Checklist

  • Does the code follow accessibility standards (WCAG 2.1 AA Compliant)?
  • Are all languages supported (Internationalization/Localization)?
  • Are appropriate Typescript types implemented?

@binh-dam-ibigroup binh-dam-ibigroup added the BLOCKED Blocked (waiting on another PR to be merged) label Jul 3, 2024
// (The lang is the first portion of the locale.)
const lang = matchedLocale.split('-')[0]
document.documentElement.lang = lang
document.documentElement.lang = matchedLocale
Copy link
Collaborator Author

@binh-dam-ibigroup binh-dam-ibigroup Jul 3, 2024

Choose a reason for hiding this comment

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

The HTML lang tag can be a locale (language-suffix format) so we should be good here. See for instance https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang.

Copy link
Contributor

@amy-corson-ibigroup amy-corson-ibigroup left a comment

Choose a reason for hiding this comment

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

Packages updated and looking good to me!!

@amy-corson-ibigroup amy-corson-ibigroup removed the BLOCKED Blocked (waiting on another PR to be merged) label Jul 8, 2024
@amy-corson-ibigroup amy-corson-ibigroup removed their assignment Jul 8, 2024
Copy link
Contributor

@josh-willis-arcadis josh-willis-arcadis left a comment

Choose a reason for hiding this comment

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

LGTM!

@binh-dam-ibigroup
Copy link
Collaborator Author

Packages updated and looking good to me!!

Thanks for updating the OTP-UI packages!

@binh-dam-ibigroup binh-dam-ibigroup merged commit e9ed2ce into dev Jul 9, 2024
9 checks passed
@binh-dam-ibigroup binh-dam-ibigroup deleted the support-chinese-traditional branch July 9, 2024 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants