openpilot icon indicating copy to clipboard operation
openpilot copied to clipboard

Multilanguage support

Open geohot opened this issue 6 years ago • 17 comments

Before openpilot is 1.0 software, it needs support for multiple languages. We'd need a nice generic way to do this.

I think this will have to be written at first in house, but it should be easy after that to add more languages with pull requests. We should look into what dragonpilot is doing and take what's good.

geohot avatar Feb 09 '20 17:02 geohot

I started working on this (not ready yet) ~~https://github.com/xx979xx/openpilot/blob/i18n/selfdrive/controls/lib/alerts.py~~ plz everyone feel free to critique and contribute

xx979xx avatar Feb 19 '20 23:02 xx979xx

For the language part, are you going to use something like transifex or similar? I would be more than happy to help with Danish translation.

fusk-l avatar Feb 25 '20 18:02 fusk-l

When i18n and l10n support is ready, I can help to translate it to zh_TW.

s8321414 avatar Aug 07 '20 02:08 s8321414

I would love to start contributing by this. Count me in!

caginbektas avatar Aug 10 '20 12:08 caginbektas

The UI rewrite should be done with this in mind.

geohot avatar Aug 10 '20 13:08 geohot

@fusk-l @s8321414 @caginbektas here all Openpilot translatable texts up-to-date messages.pot here is the code(not ready): i18n.py i18n.cc

xx979xx avatar Oct 28 '20 10:10 xx979xx

@fusk-l @s8321414 @caginbektas here all Openpilot translatable texts up-to-date messages.po here is the code(not ready): i18n.py i18n.h

Just to be sure, we just copy everything, translate msgid and reupload where?

fusk-l avatar Oct 28 '20 13:10 fusk-l

@xx979xx does your ui.cc/sidebar.cc translation working? I tried a while ago and couldnt get it to work :(

eFiniLan avatar Oct 28 '20 23:10 eFiniLan

@eFiniLan I have not tried it yet needless to say, this is my first ever C++ code, I am doing it for fun (and learning C++ which I hate so much) I re-based the branch and it is compiled successfully

xx979xx avatar Oct 30 '20 10:10 xx979xx

Whenever there's an explanation of how this works, i'll be ready. Have already looked through some of the strings.

fusk-l avatar Oct 30 '20 11:10 fusk-l

@eFiniLan you are right, ui does not translate. even after installing gettext package from termux-packages repo I tried gettext "Hello world" and it did not work!!

xx979xx avatar Oct 30 '20 22:10 xx979xx

I'm willing to translate into german.

grafst avatar Aug 30 '21 11:08 grafst

I can translate it to Hungarian

KristofKekesi avatar Aug 31 '21 10:08 KristofKekesi

I'm happy to translate into Thai. 👌

kengggg avatar Sep 01 '21 12:09 kengggg

I got Arabic!

royjr avatar Mar 08 '22 03:03 royjr

Merged base multilanguage support into master for offroad settings and onroad static text elements.

  • [ ] We would still like to dynamically translate without restarting UI
  • [ ] Translate alerts (dynamic text requires injecting our own translations with custom contexts into the TS files)

sshane avatar Jul 09 '22 03:07 sshane

Moved improvements to https://github.com/commaai/openpilot/issues/25092

sshane avatar Jul 09 '22 03:07 sshane