mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-17 00:52:38 -05:00
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
This commit is contained in:
parent
ca39b27dd4
commit
ec0f4b4044
49 changed files with 159 additions and 66 deletions
|
|
@ -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 },
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue