mirror of
https://github.com/libretro/RetroArch
synced 2025-03-04 07:13:26 +00:00
Fix pseudolocalization
This commit is contained in:
parent
e41aa1f8fe
commit
3899984bbb
@ -229,7 +229,7 @@ OBJ += intl/msg_hash_de.o \
|
|||||||
intl/msg_hash_es.o \
|
intl/msg_hash_es.o \
|
||||||
intl/msg_hash_fr.o \
|
intl/msg_hash_fr.o \
|
||||||
intl/msg_hash_it.o \
|
intl/msg_hash_it.o \
|
||||||
intl/msg_hash_jp.o \
|
intl/msg_hash_jp.o \
|
||||||
intl/msg_hash_nl.o \
|
intl/msg_hash_nl.o \
|
||||||
intl/msg_hash_pl.o \
|
intl/msg_hash_pl.o \
|
||||||
intl/msg_hash_pt.o
|
intl/msg_hash_pt.o
|
||||||
|
@ -23,6 +23,10 @@
|
|||||||
#include "../configuration.h"
|
#include "../configuration.h"
|
||||||
#include "../verbosity.h"
|
#include "../verbosity.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_UTF8
|
||||||
|
#include "msg_hash_uspseudo.c"
|
||||||
|
#else
|
||||||
|
|
||||||
int menu_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len)
|
int menu_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||||
{
|
{
|
||||||
uint32_t driver_hash = 0;
|
uint32_t driver_hash = 0;
|
||||||
@ -4470,3 +4474,4 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg)
|
|||||||
|
|
||||||
return "null";
|
return "null";
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -89,32 +89,16 @@ def pseudolocalize_code(string):
|
|||||||
|
|
||||||
print("/* Autogenerated, do not edit. Your changes will be undone. */")
|
print("/* Autogenerated, do not edit. Your changes will be undone. */")
|
||||||
|
|
||||||
localize = False
|
localize = True
|
||||||
for line in sys.stdin:
|
for line in sys.stdin:
|
||||||
line = line.strip("\n")
|
line = line.strip("\n")
|
||||||
if 'force_iso_8859_1' in line: # nuke this because we're UTF-8 now
|
|
||||||
continue
|
if 'const char *hash_to_str_us_label_enum' in line: localize = False
|
||||||
elif 'menu_hash_to_str_' in line or 'menu_hash_get_help_' in line:
|
if 'return "null"' in line: localize = True
|
||||||
#line = line.replace("_us", "_pseudo")
|
if line=='#ifdef HAVE_UTF8': line="#if 0"
|
||||||
if '_label' not in line: localize = True
|
|
||||||
if localize:
|
if '#include' in line: pass
|
||||||
line = pseudolocalize_code(line)
|
elif not localize: pass
|
||||||
|
else: line = pseudolocalize_code(line)
|
||||||
|
|
||||||
print(line)
|
print(line)
|
||||||
|
|
||||||
# look for const char *menu_hash_to_str_us(uint32_t hash) and add a 'pseudo'
|
|
||||||
for line in sys.stdin:
|
|
||||||
line = line.strip("\n")
|
|
||||||
if 'menu_hash_to_str' in line:
|
|
||||||
print(line.replace("(", "pseudo("))
|
|
||||||
break
|
|
||||||
print(line)
|
|
||||||
|
|
||||||
# screw with all strings in the rest of the file
|
|
||||||
# and add 'pseudo' to int menu_hash_get_help_us(uint32_t hash, char *s, size_t len)
|
|
||||||
for line in sys.stdin:
|
|
||||||
line = line.strip("\n")
|
|
||||||
if 'force_iso_8859_1' in line: pass
|
|
||||||
elif 'menu_hash_get_help' in line:
|
|
||||||
print(line.replace("(", "pseudo("))
|
|
||||||
else:
|
|
||||||
print(pseudolocalize_code(line))
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user