mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-14 14:28:47 +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_fr.o \
|
||||
intl/msg_hash_it.o \
|
||||
intl/msg_hash_jp.o \
|
||||
intl/msg_hash_jp.o \
|
||||
intl/msg_hash_nl.o \
|
||||
intl/msg_hash_pl.o \
|
||||
intl/msg_hash_pt.o
|
||||
|
@ -23,6 +23,10 @@
|
||||
#include "../configuration.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)
|
||||
{
|
||||
uint32_t driver_hash = 0;
|
||||
@ -4470,3 +4474,4 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg)
|
||||
|
||||
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. */")
|
||||
|
||||
localize = False
|
||||
localize = True
|
||||
for line in sys.stdin:
|
||||
line = line.strip("\n")
|
||||
if 'force_iso_8859_1' in line: # nuke this because we're UTF-8 now
|
||||
continue
|
||||
elif 'menu_hash_to_str_' in line or 'menu_hash_get_help_' in line:
|
||||
#line = line.replace("_us", "_pseudo")
|
||||
if '_label' not in line: localize = True
|
||||
if localize:
|
||||
line = pseudolocalize_code(line)
|
||||
|
||||
if 'const char *hash_to_str_us_label_enum' in line: localize = False
|
||||
if 'return "null"' in line: localize = True
|
||||
if line=='#ifdef HAVE_UTF8': line="#if 0"
|
||||
|
||||
if '#include' in line: pass
|
||||
elif not localize: pass
|
||||
else: line = pseudolocalize_code(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…
Reference in New Issue
Block a user