forked from len0rd/rockbox
plugins: mikmod and chessbox weren't fully translated
This unfortunately required adding four more strings. Change-Id: I656c3c4902de5f841ea742549b3d122463e399a8
This commit is contained in:
parent
92b5255106
commit
20f50bbca3
3 changed files with 92 additions and 26 deletions
|
@ -16388,3 +16388,60 @@
|
||||||
*: "Legal Notices"
|
*: "Legal Notices"
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: LANG_ERROR_FORMATSTR
|
||||||
|
desc: for general use
|
||||||
|
user: core
|
||||||
|
<source>
|
||||||
|
*: "Error: %s"
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: "Error: %s"
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: "Error"
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: LANG_MIKMOD_SETTINGS
|
||||||
|
desc: mikmod plugin
|
||||||
|
user: core
|
||||||
|
<source>
|
||||||
|
*: "Mikmod Settings"
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: "Mikmod Settings"
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: "Mik mod Settings"
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: LANG_MIKMOD_MENU
|
||||||
|
desc: mikmod plugin
|
||||||
|
user: core
|
||||||
|
<source>
|
||||||
|
*: "Mikmod Menu"
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: "Mikmod Menu"
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: "Mik mod Menu"
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: LANG_CHESSBOX_MENU
|
||||||
|
desc: chessbox plugin
|
||||||
|
user: core
|
||||||
|
<source>
|
||||||
|
*: "Chessbox Menu"
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: "Chessbox Menu"
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: "Chess box Menu"
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
|
|
||||||
|
|
|
@ -555,7 +555,7 @@ static int cb_menu_viewer(void)
|
||||||
{
|
{
|
||||||
int selection;
|
int selection;
|
||||||
|
|
||||||
MENUITEM_STRINGLIST(menu,"Chessbox Menu",NULL,
|
MENUITEM_STRINGLIST(menu, ID2P(LANG_CHESSBOX_MENU), NULL,
|
||||||
ID2P(LANG_CHESSBOX_MENU_RESTART_GAME),
|
ID2P(LANG_CHESSBOX_MENU_RESTART_GAME),
|
||||||
ID2P(LANG_CHESSBOX_MENU_SELECT_OTHER_GAME),
|
ID2P(LANG_CHESSBOX_MENU_SELECT_OTHER_GAME),
|
||||||
ID2P(LANG_CHESSBOX_MENU_RESUME_GAME),
|
ID2P(LANG_CHESSBOX_MENU_RESUME_GAME),
|
||||||
|
@ -800,7 +800,7 @@ static int cb_menu(void)
|
||||||
{
|
{
|
||||||
int selection;
|
int selection;
|
||||||
|
|
||||||
MENUITEM_STRINGLIST(menu,"Chessbox Menu",NULL,
|
MENUITEM_STRINGLIST(menu,ID2P(LANG_CHESSBOX_MENU), NULL,
|
||||||
ID2P(LANG_CHESSBOX_MENU_NEW_GAME),
|
ID2P(LANG_CHESSBOX_MENU_NEW_GAME),
|
||||||
ID2P(LANG_CHESSBOX_MENU_RESUME_GAME),
|
ID2P(LANG_CHESSBOX_MENU_RESUME_GAME),
|
||||||
ID2P(LANG_CHESSBOX_MENU_SAVE_GAME),
|
ID2P(LANG_CHESSBOX_MENU_SAVE_GAME),
|
||||||
|
|
|
@ -236,7 +236,7 @@ static int change_filename(int direct)
|
||||||
|
|
||||||
if (entries == 0)
|
if (entries == 0)
|
||||||
{
|
{
|
||||||
rb->splash(HZ, "No supported files");
|
rb->splash(HZ, ID2P(LANG_NO_FILES));
|
||||||
return PLUGIN_ERROR;
|
return PLUGIN_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -491,20 +491,6 @@ static struct mikmod_settings settings =
|
||||||
|
|
||||||
static struct mikmod_settings old_settings;
|
static struct mikmod_settings old_settings;
|
||||||
|
|
||||||
static const struct configdata config[] =
|
|
||||||
{
|
|
||||||
{ TYPE_INT, 0, 128, { .int_p = &settings.pansep }, "Panning Separation", NULL},
|
|
||||||
{ TYPE_INT, 0, 15, { .int_p = &settings.reverb }, "Reverberation", NULL},
|
|
||||||
{ TYPE_BOOL, 0, 1, { .bool_p = &settings.interp }, "Interpolation", NULL},
|
|
||||||
{ TYPE_BOOL, 0, 1, { .bool_p = &settings.reverse }, "Reverse Channels", NULL},
|
|
||||||
{ TYPE_BOOL, 0, 1, { .bool_p = &settings.surround }, "Surround", NULL},
|
|
||||||
{ TYPE_BOOL, 0, 1, { .bool_p = &settings.hqmixer }, "HQ Mixer", NULL},
|
|
||||||
{ TYPE_INT, 0, HW_NUM_FREQ-1, { .int_p = &settings.sample_rate }, "Sample Rate", NULL},
|
|
||||||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
|
||||||
{ TYPE_BOOL, 0, 1, { .bool_p = &settings.boost }, "CPU Boost", NULL},
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
static void applysettings(void)
|
static void applysettings(void)
|
||||||
{
|
{
|
||||||
md_pansep = settings.pansep;
|
md_pansep = settings.pansep;
|
||||||
|
@ -570,7 +556,7 @@ static int settings_menu(void)
|
||||||
{
|
{
|
||||||
int selection = 0;
|
int selection = 0;
|
||||||
|
|
||||||
MENUITEM_STRINGLIST(settings_menu, "Mikmod Settings", NULL,
|
MENUITEM_STRINGLIST(settings_menu, ID2P(LANG_MIKMOD_SETTINGS), NULL,
|
||||||
ID2P(LANG_PANNING_SEPARATION),
|
ID2P(LANG_PANNING_SEPARATION),
|
||||||
ID2P(LANG_REVERBERATION),
|
ID2P(LANG_REVERBERATION),
|
||||||
ID2P(LANG_INTERPOLATION),
|
ID2P(LANG_INTERPOLATION),
|
||||||
|
@ -582,7 +568,6 @@ static int settings_menu(void)
|
||||||
ID2P(LANG_CPU_BOOST)
|
ID2P(LANG_CPU_BOOST)
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
selection=rb->do_menu(&settings_menu,&selection, NULL, false);
|
selection=rb->do_menu(&settings_menu,&selection, NULL, false);
|
||||||
|
@ -650,7 +635,7 @@ static int main_menu(void)
|
||||||
int selection = 0;
|
int selection = 0;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
MENUITEM_STRINGLIST(main_menu,"Mikmod Main Menu",NULL,
|
MENUITEM_STRINGLIST(main_menu,ID2P(LANG_MIKMOD_MENU), NULL,
|
||||||
ID2P(LANG_SETTINGS),
|
ID2P(LANG_SETTINGS),
|
||||||
ID2P(LANG_RETURN),
|
ID2P(LANG_RETURN),
|
||||||
ID2P(LANG_MENU_QUIT));
|
ID2P(LANG_MENU_QUIT));
|
||||||
|
@ -704,7 +689,12 @@ static void thread(void)
|
||||||
|
|
||||||
static void mm_errorhandler(void)
|
static void mm_errorhandler(void)
|
||||||
{
|
{
|
||||||
rb->splashf(HZ, "%s", MikMod_strerror(MikMod_errno));
|
if (rb->global_settings->talk_menu) {
|
||||||
|
rb->talk_id(LANG_ERROR_FORMATSTR, true);
|
||||||
|
rb->talk_value_decimal(MikMod_errno, UNIT_INT, 0, true);
|
||||||
|
rb->talk_force_enqueue_next();
|
||||||
|
}
|
||||||
|
rb->splashf(HZ, rb->str(LANG_ERROR_FORMATSTR), MikMod_strerror(MikMod_errno));
|
||||||
quit = true;
|
quit = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -717,13 +707,18 @@ static int playfile(char* filename)
|
||||||
|
|
||||||
playingtime = 0;
|
playingtime = 0;
|
||||||
|
|
||||||
rb->splashf(HZ, "Loading %s", filename);
|
if (rb->global_settings->talk_menu) {
|
||||||
|
rb->talk_id(LANG_WAIT, true);
|
||||||
|
rb->talk_file_or_spell(NULL, filename, NULL, true);
|
||||||
|
rb->talk_force_enqueue_next();
|
||||||
|
}
|
||||||
|
rb->splashf(HZ, "%s %s", rb->str(LANG_WAIT), filename);
|
||||||
|
|
||||||
module = Player_Load(filename, 64, 0);
|
module = Player_Load(filename, 64, 0);
|
||||||
|
|
||||||
if (!module)
|
if (!module)
|
||||||
{
|
{
|
||||||
rb->splashf(HZ, "%s", MikMod_strerror(MikMod_errno));
|
mm_errorhandler();
|
||||||
retval = PLUGIN_ERROR;
|
retval = PLUGIN_ERROR;
|
||||||
quit = true;
|
quit = true;
|
||||||
}
|
}
|
||||||
|
@ -745,7 +740,7 @@ static int playfile(char* filename)
|
||||||
IF_PRIO(, PRIORITY_PLAYBACK)
|
IF_PRIO(, PRIORITY_PLAYBACK)
|
||||||
IF_COP(, CPU))) == 0)
|
IF_COP(, CPU))) == 0)
|
||||||
{
|
{
|
||||||
rb->splash(HZ, "Cannot create thread!");
|
rb->splashf(HZ, ID2P(LANG_ERROR_FORMATSTR), "Cannot create thread!");
|
||||||
return PLUGIN_ERROR;
|
return PLUGIN_ERROR;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -925,9 +920,23 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
enum plugin_status retval;
|
enum plugin_status retval;
|
||||||
int orig_samplerate = rb->mixer_get_frequency();
|
int orig_samplerate = rb->mixer_get_frequency();
|
||||||
|
|
||||||
|
const struct configdata config[] =
|
||||||
|
{
|
||||||
|
{ TYPE_INT, 0, 128, { .int_p = &settings.pansep }, rb->str(LANG_PANNING_SEPARATION), NULL},
|
||||||
|
{ TYPE_INT, 0, 15, { .int_p = &settings.reverb }, rb->str(LANG_REVERBERATION), NULL},
|
||||||
|
{ TYPE_BOOL, 0, 1, { .bool_p = &settings.interp }, rb->str(LANG_INTERPOLATION), NULL},
|
||||||
|
{ TYPE_BOOL, 0, 1, { .bool_p = &settings.reverse }, rb->str(LANG_SWAP_CHANNELS), NULL},
|
||||||
|
{ TYPE_BOOL, 0, 1, { .bool_p = &settings.surround }, rb->str(LANG_MIKMOD_SURROUND), NULL},
|
||||||
|
{ TYPE_BOOL, 0, 1, { .bool_p = &settings.hqmixer }, rb->str(LANG_MIKMOD_HQMIXER), NULL},
|
||||||
|
{ TYPE_INT, 0, HW_NUM_FREQ-1, { .int_p = &settings.sample_rate }, rb->str(LANG_MIKMOD_SAMPLERATE), NULL},
|
||||||
|
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||||
|
{ TYPE_BOOL, 0, 1, { .bool_p = &settings.boost }, rb->str(LANG_CPU_BOOST), NULL},
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
if (parameter == NULL)
|
if (parameter == NULL)
|
||||||
{
|
{
|
||||||
rb->splash(HZ*2, " Play .mod, .it, .s3m, .xm file ");
|
rb->splash(HZ*2, ID2P(LANG_NO_FILES));
|
||||||
return PLUGIN_OK;
|
return PLUGIN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -978,7 +987,7 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
|
|
||||||
if (MikMod_Init(""))
|
if (MikMod_Init(""))
|
||||||
{
|
{
|
||||||
rb->splashf(HZ, "%s", MikMod_strerror(MikMod_errno));
|
mm_errorhandler();
|
||||||
return PLUGIN_ERROR;
|
return PLUGIN_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue