I tried made a multilingual platform for GitHub Desktop - yasuking0304/desktop GitHub Wiki

I tried made a multilingual platform

Pros

  • The language part is shared by cli and render

Cons

  • In the current structure, there is no choice but to embed the language and build it without extracting the language file as a separate file.
  • There are more than 150 modified files this time, and there is too much modification risk to respond at once.
  • LocalStorage cannot be used because the source is shared between cli and render

Check OS

  • Windows 10
  • macOS Monterey (x64)

Base release version

  • Version 3.0.8

snap shot

  • For Windows(Windows 10)

Fc8BEVLakAEL-T4

  • For Mac(intel, Monterey)

Fc8BEVNakAICBuS

Used OSS

  • i18next
  • i18next-parser

flow

  1. If there is an environment variable "GITHUB_DESKTOP_LANG", set it to that language
  2. If not, get the language with "Intl.NumberFormat().resolvedOptions().locale"
  3. Set to "en" if not in the judgment table

yet

  • Only Japanese has been translated
  • Error messages are caught by jest, so they are not translatable.
  • Date check format in test, so the multilingual part is passed with US setting
  • Procedures for creating multilingual translation documents have not been created.

this repository

https://github.com/yasuking0304/desktop