Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Latest commit

 

History

History
99 lines (75 loc) · 5.33 KB

i18n_l10n_a11y.md

File metadata and controls

99 lines (75 loc) · 5.33 KB

Commitment To The Community

Google is commited to Build For Everyone, which is a goal is to build a more diverse, inclusive, and accessible company that better represents our users. Open Source is no exception, StarThinker supports accessibility, internationalization, and localization to help build for everyone. We are continously refining there areas and community contributions are greatly welcome.

Internationalization - I18N

UI

The StarThinker UI inherits all of its I18N functionality from the Django Framework. An in depth Django Translation Guide provides all developer details.

Recipes / Scripts

The StarThinker Script, to keep the translation with the solution, includes an optional section of JSON commited to each locale. The CM360 Report Replicate Script contains a Spanish transaltion under es. When loaded into the UI, translation happens in the starthinker_ui/recipe/scripts.py module. Each solution owner is enouraged to include translations within newly created scripts. Anyone wanting to translate a script is welcome to contribute to the recipe.

Localization - L10N

UI

Currently the StarThinker UI includes localization for:

  1. English - En
  2. French - Fr
  3. French For Canada - Fr-CA
  4. Hinid - Hi
  5. Polish - Pl
  6. Portuguese For Brazil - Pt-BR
  7. Spanish - Es
  8. Spanish For LATAM - Es-419

Quick Start

To generate new localization follow the official Django Translation Guide, Use the Language Code Directory to identify valid localization codes. After completing the steps below, launch the UI and change browser language settings to load the translated pages.

source starthinker_assets/development.sh
cd starthinker_ui
python manage.py makemessages -l COUNTRY_CODE_HERE
vim translations/en/LC_MESSAGES/django.po
python manage.py compilemessages

Caution:

  • Django translation commands must be run from the starthinker_ui directory to prevent errors.
  • Please avoids using autmated translators, while the accurace of Google Translate is improving, without context, ranslations may be misleading.

Recipes / Scripts

Recipe and script localization is entirely confined to the JSON file. Any assets or external dependeinces such as Sheets or Data Studio Dashboards can also be copied and translated for each languge, the UI will display the locale specific links. All Script Metadata can be transformed to a new locale.

Quick Start

To generate a new localization for a script, include the following JSON in the file. For each Script Field include a translation in the new locale block.

  "script":{
    "es":{
      "title":string,
      "description":string,
      "instructions":[
        string,
        string,
      ]
    },
  }

Notes:

  • The default language for a script can be anything your team is comfortable using, English is not required.
  • The es block should include translations for all fields in the recipe for that locale.
  • Add multiple lanaguage codes for multiple translations.

Accessibility - A11Y

StartThinker leverages the Material Design Accessibility framework. In addition, the project meets all internal Google Accessability release guidelines for code. StarThinker contributors are commited to continuing to improve UI/UX for all user.


© 2021 Google LLC - Apache License, Version 2.0