mirror of
https://github.com/libretro/RetroArch
synced 2025-01-27 21:35:25 +00:00
Add Hungarian language option (#14585)
This commit is contained in:
parent
5b8baaf2d9
commit
b89692c532
@ -475,7 +475,8 @@ ifeq ($(HAVE_LANGEXTRA), 1)
|
||||
intl/msg_hash_cs.o \
|
||||
intl/msg_hash_val.o \
|
||||
intl/msg_hash_ca.o \
|
||||
intl/msg_hash_en.o
|
||||
intl/msg_hash_en.o \
|
||||
intl/msg_hash_hu.o
|
||||
endif
|
||||
|
||||
ifneq ($(HAVE_GETOPT_LONG), 1)
|
||||
|
@ -99,10 +99,10 @@ bitmapfont_lut_t *bitmapfont_6x10_load(unsigned language)
|
||||
case RETRO_LANGUAGE_INDONESIAN:
|
||||
case RETRO_LANGUAGE_SWEDISH:
|
||||
case RETRO_LANGUAGE_CZECH:
|
||||
case RETRO_LANGUAGE_HUNGARIAN:
|
||||
/* These languages are not yet added
|
||||
case RETRO_LANGUAGE_ROMANIAN:
|
||||
case RETRO_LANGUAGE_CROATIAN:
|
||||
case RETRO_LANGUAGE_HUNGARIAN:
|
||||
case RETRO_LANGUAGE_SERBIAN:
|
||||
case RETRO_LANGUAGE_WELSH:
|
||||
*/
|
||||
|
@ -1275,6 +1275,7 @@ RETROARCH
|
||||
#include "../intl/msg_hash_val.c"
|
||||
#include "../intl/msg_hash_ca.c"
|
||||
#include "../intl/msg_hash_en.c"
|
||||
#include "../intl/msg_hash_hu.c"
|
||||
#endif
|
||||
|
||||
#include "../intl/msg_hash_us.c"
|
||||
|
60
intl/msg_hash_hu.c
Normal file
60
intl/msg_hash_hu.c
Normal file
@ -0,0 +1,60 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <compat/strl.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include "../msg_hash.h"
|
||||
#include "../configuration.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
#if defined(_MSC_VER) && !defined(_XBOX) && (_MSC_VER >= 1500 && _MSC_VER < 1900)
|
||||
#if (_MSC_VER >= 1700)
|
||||
/* https://support.microsoft.com/en-us/kb/980263 */
|
||||
#pragma execution_character_set("utf-8")
|
||||
#endif
|
||||
#pragma warning(disable:4566)
|
||||
#endif
|
||||
|
||||
int msg_hash_get_help_hu_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
switch (msg)
|
||||
{
|
||||
case MSG_UNKNOWN:
|
||||
default:
|
||||
ret = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
const char *msg_hash_to_str_hu(enum msg_hash_enums msg)
|
||||
{
|
||||
switch (msg)
|
||||
{
|
||||
#include "msg_hash_hu.h"
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return "null";
|
||||
}
|
@ -290,6 +290,7 @@ enum retro_language
|
||||
RETRO_LANGUAGE_CATALAN_VALENCIA = 28,
|
||||
RETRO_LANGUAGE_CATALAN = 29,
|
||||
RETRO_LANGUAGE_BRITISH_ENGLISH = 30,
|
||||
RETRO_LANGUAGE_HUNGARIAN = 31,
|
||||
RETRO_LANGUAGE_LAST,
|
||||
|
||||
/* Ensure sizeof(enum) == sizeof(int) */
|
||||
|
@ -1548,10 +1548,10 @@ static bool rgui_fonts_init(rgui_t *rgui)
|
||||
case RETRO_LANGUAGE_TURKISH:
|
||||
case RETRO_LANGUAGE_SLOVAK:
|
||||
case RETRO_LANGUAGE_CZECH:
|
||||
case RETRO_LANGUAGE_HUNGARIAN:
|
||||
/* These languages are not yet implemented
|
||||
case RETRO_LANGUAGE_ROMANIAN:
|
||||
case RETRO_LANGUAGE_CROATIAN:
|
||||
case RETRO_LANGUAGE_HUNGARIAN:
|
||||
case RETRO_LANGUAGE_SERBIAN:
|
||||
case RETRO_LANGUAGE_WELSH:
|
||||
*/
|
||||
@ -4214,6 +4214,7 @@ static void rgui_set_blit_functions(unsigned language,
|
||||
case RETRO_LANGUAGE_TURKISH:
|
||||
case RETRO_LANGUAGE_SLOVAK:
|
||||
case RETRO_LANGUAGE_CZECH:
|
||||
case RETRO_LANGUAGE_HUNGARIAN:
|
||||
blit_line = blit_line_6x10_shadow;
|
||||
break;
|
||||
default:
|
||||
@ -4251,6 +4252,7 @@ static void rgui_set_blit_functions(unsigned language,
|
||||
case RETRO_LANGUAGE_TURKISH:
|
||||
case RETRO_LANGUAGE_SLOVAK:
|
||||
case RETRO_LANGUAGE_CZECH:
|
||||
case RETRO_LANGUAGE_HUNGARIAN:
|
||||
blit_line = blit_line_6x10;
|
||||
break;
|
||||
default:
|
||||
|
@ -6845,6 +6845,7 @@ static void setting_get_string_representation_uint_user_language(
|
||||
modes[RETRO_LANGUAGE_CATALAN_VALENCIA] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_CATALAN_VALENCIA);
|
||||
modes[RETRO_LANGUAGE_CATALAN] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_CATALAN);
|
||||
modes[RETRO_LANGUAGE_BRITISH_ENGLISH] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_BRITISH_ENGLISH);
|
||||
modes[RETRO_LANGUAGE_HUNGARIAN] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_HUNGARIAN);
|
||||
strlcpy(s, modes[*msg_hash_get_uint(MSG_HASH_USER_LANGUAGE)], len);
|
||||
}
|
||||
#endif
|
||||
|
@ -124,6 +124,9 @@ int msg_hash_get_help_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
case RETRO_LANGUAGE_BRITISH_ENGLISH:
|
||||
ret = msg_hash_get_help_en_enum(msg, s, len);
|
||||
break;
|
||||
case RETRO_LANGUAGE_HUNGARIAN:
|
||||
ret = msg_hash_get_help_hu_enum(msg, s, len);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -211,6 +214,8 @@ const char *get_user_language_iso639_1(bool limit)
|
||||
if (limit)
|
||||
return "en";
|
||||
return "en_gb";
|
||||
case RETRO_LANGUAGE_HUNGARIAN:
|
||||
return "hu";
|
||||
}
|
||||
return "en";
|
||||
}
|
||||
@ -312,6 +317,9 @@ const char *msg_hash_to_str(enum msg_hash_enums msg)
|
||||
case RETRO_LANGUAGE_BRITISH_ENGLISH:
|
||||
ret = msg_hash_to_str_en(msg);
|
||||
break;
|
||||
case RETRO_LANGUAGE_HUNGARIAN:
|
||||
ret = msg_hash_to_str_hu(msg);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -3644,6 +3644,9 @@ int msg_hash_get_help_ca_enum(enum msg_hash_enums msg, char *s, size_t len);
|
||||
const char *msg_hash_to_str_en(enum msg_hash_enums msg);
|
||||
int msg_hash_get_help_en_enum(enum msg_hash_enums msg, char *s, size_t len);
|
||||
|
||||
const char *msg_hash_to_str_hu(enum msg_hash_enums msg);
|
||||
int msg_hash_get_help_hu_enum(enum msg_hash_enums msg, char *s, size_t len);
|
||||
|
||||
int msg_hash_get_help_enum(enum msg_hash_enums msg, char *s, size_t len);
|
||||
|
||||
enum msg_file_type msg_hash_to_file_type(uint32_t hash);
|
||||
|
@ -6279,6 +6279,7 @@ enum retro_language rarch_get_language_from_iso(const char *iso639)
|
||||
{"ca_valencia", RETRO_LANGUAGE_CATALAN_VALENCIA},
|
||||
{"ca", RETRO_LANGUAGE_CATALAN},
|
||||
{"en_GB", RETRO_LANGUAGE_BRITISH_ENGLISH},
|
||||
{"hu", RETRO_LANGUAGE_HUNGARIAN},
|
||||
};
|
||||
|
||||
if (string_is_empty(iso639))
|
||||
|
Loading…
x
Reference in New Issue
Block a user