Skip to content

Japanese Translation of Web Editor #1638

Closed
@koji

Description

@koji

Hi,
I'm trying to add Japanese translation to the web editor.

Would like to get some advice from @catarak and @oruburos.

  1. The folder name for translations.json
    Currently, I named it ja because date-fns/locale is using ja for Japanese translation.
    If you guys have any idea for the folder naming, I want to know about it.
    Ex. lang-Area en-UK
    In terms of Japanese, it will be ja-JP or ja-JA

  2. Display dropdown menu
    I could run the Docker image on my local machine.
    I created a new translations.json file and add ja to client/i18n.js and add a button to client/components/Nav.jsx.

<li className="nav__dropdown-item">
  <button
    onFocus={this.handleFocusForLang}
    onBlur={this.handleBlur}
    value="ja"
    onClick={e => this.handleLangSelection(e)}
  >
    日本語
  </button>
</li>

Currently, I hard-coded ja to check the UI
https://twitter.com/koji_kanao/status/1317094279517536256/photo/1

If there is a way to enable a dropdown menu that the current p5 web editor has, I want to know about it.

  1. space in translations.json
    I copied en-US/translations.json to translate items to Japanese.
    Then I noticed a couple of items have space like the following.

https://github.com/processing/p5.js-web-editor/blob/develop/translations/locales/en-US/translations.json#L520

Is this on purpose? If so, space should be a single byte or I need to align to Japanese 2 bytes?

Thanks!

Nature of issue?

  • Existing feature enhancement

Details about the bug:

  • Web browser and version:
  • Operating System:
  • Steps to reproduce this bug:

Feature enhancement details:

  • Add Japanese translation

New feature details:

Add "Japanese" button on the top right corner

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions