mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-08-20 07:33:43 +08:00
657e180ba3
======================== * Added ko-KR translation. * Added Honda Jade support. (Thanks to @lijunhao731) * Fixed ui.cc memory out of bound issue. (Thanks to @piggy) * gpxd now store in zip format. * Force disabled DOS hardware check in panda.
12 lines
418 B
Python
12 lines
418 B
Python
import gettext
|
|
from common import android
|
|
|
|
is_android = android.ANDROID
|
|
locale_dir = '/data/openpilot/selfdrive/assets/locales'
|
|
supported_language = ['en-US', 'zh-TW', 'zh-CN', 'ja-JP', 'ko-KR']
|
|
locale = android.getprop("persist.sys.locale") if is_android else 'en-US'
|
|
|
|
def events():
|
|
i18n = gettext.translation('events', localedir=locale_dir, fallback=True, languages=[locale])
|
|
i18n.install()
|
|
return i18n.gettext |