diff options
author | Tomer Shalev <shalev.tomer@gmail.com> | 2009-11-15 21:39:39 +0000 |
---|---|---|
committer | Tomer Shalev <shalev.tomer@gmail.com> | 2009-11-15 21:39:39 +0000 |
commit | ec0f4b40442fc9b150ea06f11c94638e4c76acb7 (patch) | |
tree | 6aa602041fb1a12ade92e62a5b51d88b05a7a538 /apps | |
parent | ca39b27dd498145eed13d7fab991ca6dee9786be (diff) |
FS#10783 - WPS translation
- Use the %Sx skin tag in WPS to translate 'Next Track', 'Next', and 'of' (X of Y tracks)
- New conditional skin token 'Sr' which checks whether the currently loaded language is an RTL language (Hebrew/Arabic). It uses lang_is_rtl().
- Added Hebrew translation
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23638 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/skin_engine/skin_parser.c | 1 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_tokens.c | 4 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_tokens.h | 1 | ||||
-rw-r--r-- | apps/gui/skin_engine/wps_debug.c | 3 | ||||
-rw-r--r-- | apps/lang/english.lang | 42 | ||||
-rw-r--r-- | apps/lang/hebrew.lang | 42 |
6 files changed, 93 insertions, 0 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index 0e21ec0c81..e0dedd5d48 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c @@ -362,6 +362,7 @@ static const struct wps_tag all_tags[] = { parse_setting_and_lang }, { WPS_TOKEN_TRANSLATEDSTRING, "Sx", WPS_REFRESH_STATIC, parse_setting_and_lang }, + { WPS_TOKEN_LANG_IS_RTL , "Sr", WPS_REFRESH_STATIC, NULL }, { WPS_TOKEN_LASTTOUCH, "Tl", WPS_REFRESH_DYNAMIC, parse_timeout }, { WPS_TOKEN_CURRENT_SCREEN, "cs", WPS_REFRESH_DYNAMIC, NULL }, diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c index d4adfa8c85..9622e127a7 100644 --- a/apps/gui/skin_engine/skin_tokens.c +++ b/apps/gui/skin_engine/skin_tokens.c @@ -59,6 +59,7 @@ #include "recording.h" #include "pcm_record.h" #endif +#include "language.h" static char* get_codectype(const struct mp3entry* id3) { @@ -1174,6 +1175,9 @@ const char *get_token_value(struct gui_wps *gwps, return buf; } + case WPS_TOKEN_LANG_IS_RTL: + return lang_is_rtl() ? "r" : NULL; + default: return NULL; } diff --git a/apps/gui/skin_engine/skin_tokens.h b/apps/gui/skin_engine/skin_tokens.h index 27594db27f..a59074fdd7 100644 --- a/apps/gui/skin_engine/skin_tokens.h +++ b/apps/gui/skin_engine/skin_tokens.h @@ -202,6 +202,7 @@ enum wps_token_type { /* Setting option */ WPS_TOKEN_SETTING, WPS_TOKEN_CURRENT_SCREEN, + WPS_TOKEN_LANG_IS_RTL, /* Recording Tokens */ TOKEN_MARKER_RECORDING, diff --git a/apps/gui/skin_engine/wps_debug.c b/apps/gui/skin_engine/wps_debug.c index 7d485f2c50..a0bf970e0d 100644 --- a/apps/gui/skin_engine/wps_debug.c +++ b/apps/gui/skin_engine/wps_debug.c @@ -490,6 +490,9 @@ static char *get_token_desc(struct wps_token *token, char *buf, snprintf(buf, bufsize, "Setting value: '%s'", settings[token->value.i].cfg_name); break; + case WPS_TOKEN_LANG_IS_RTL: + snprintf(buf, bufsize, "lang: is_rtl?"); + break; default: for(i=1; i<sizeof(tokens)/sizeof(*token); i++) { diff --git a/apps/lang/english.lang b/apps/lang/english.lang index 94bc191b8e..1a814e0879 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang @@ -13244,3 +13244,45 @@ crossfade: "Automatic Track Change Only" </voice> </phrase> +<phrase> + id: LANG_NEXT_TRACK + desc: Shown in WPS + user: core + <source> + *: "Next Track:" + </source> + <dest> + *: "Next Track:" + </dest> + <voice> + *: "Next Track:" + </voice> +</phrase> +<phrase> + id: LANG_NEXT + desc: Shown in WPS (short form of Next Track) + user: core + <source> + *: "Next:" + </source> + <dest> + *: "Next:" + </dest> + <voice> + *: "Next:" + </voice> +</phrase> +<phrase> + id: LANG_OF + desc: Shown in WPS: X of Y (tracks) + user: core + <source> + *: "of" + </source> + <dest> + *: "of" + </dest> + <voice> + *: "of" + </voice> +</phrase> diff --git a/apps/lang/hebrew.lang b/apps/lang/hebrew.lang index 9d1de158c5..cd827dfe0f 100644 --- a/apps/lang/hebrew.lang +++ b/apps/lang/hebrew.lang @@ -13179,3 +13179,45 @@ crossfade: "רק בהחלפה אוטומטית של שיר" </voice> </phrase> +<phrase> + id: LANG_NEXT_TRACK + desc: Shown in Cabbie theme + user: core + <source> + *: "Next Track:" + </source> + <dest> + *: ":השיר הבא" + </dest> + <voice> + *: ":השיר הבא" + </voice> +</phrase> +<phrase> + id: LANG_NEXT + desc: Shown in Cabbie theme + user: core + <source> + *: "Next:" + </source> + <dest> + *: ":הבא" + </dest> + <voice> + *: ":הבא" + </voice> +</phrase> +<phrase> + id: LANG_OF + desc: Shown in Cabbie theme + user: core + <source> + *: "of" + </source> + <dest> + *: "מתוך" + </dest> + <voice> + *: "מתוך" + </voice> +</phrase> |