mirror of
https://github.com/holub/mame
synced 2025-04-16 21:44:32 +03:00
(nw) Improve localisation:
* Change makefile rules to treat mame.pot as a target so rules can depend on it * Put mame.pot inside the build directory so it will get cleaned * Couldn't get xgettext to scrape lua and C++ in the same command and still remove stale strings * Use larger strings and format specifiers to fix some localisation issues - Issue with "None" lacking context in Russian and Turkish translations - Issue with "Not implemented" changing depending on the noun in Serbian - Issues with lua plugins not allowing for languages with different grammar/punctuation Strings that need to be translated after this change - most of these are existing text that's been made into larger chunks or reworded slightly: "Mechanical Machine\tYes\n" "Mechanical Machine\tNo\n" "Requires Artwork\tYes\n" "Requires Artwork\tNo\n" "Requires Clickable Artwork\tYes\n" "Requires Clickable Artwork\tNo\n" "Support Cocktail\tYes\n" "Support Cocktail\tNo\n" "Driver is BIOS\tYes\n" "Driver is BIOS\tNo\n" "Support Save\tYes\n" "Support Save\tNo\n" "Screen Orientation\tVertical\n" "Screen Orientation\tHorizontal\n" "Requires CHD\tYes\n" "Requires CHD\tNo\n" "ROM Audit Result\tOK\n" "ROM Audit Result\tBAD\n" "Samples Audit Result\tNone Needed\n" "Samples Audit Result\tOK\n" "Samples Audit Result\tBAD\n" "ROM Audit Disabled\t\n" "Samples Audit Disabled\t\n" "Activated: %s = %s" "Activated: %s" "Enabled: %s" "Disabled: %s" "%s added" "Default name is %s" "Cheat written to %s and added to cheat.simple" "Unable to write file\n" "Ensure that cheatpath folder exists"
This commit is contained in:
parent
633c37236e
commit
2851d7d6cd
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
13
makefile
13
makefile
@ -971,9 +971,10 @@ PROJECTDIR := $(BUILDDIR)/projects/$(OSD)/$(FULLTARGET)
|
|||||||
PROJECTDIR_SDL := $(BUILDDIR)/projects/sdl/$(FULLTARGET)
|
PROJECTDIR_SDL := $(BUILDDIR)/projects/sdl/$(FULLTARGET)
|
||||||
PROJECTDIR_WIN := $(BUILDDIR)/projects/windows/$(FULLTARGET)
|
PROJECTDIR_WIN := $(BUILDDIR)/projects/windows/$(FULLTARGET)
|
||||||
|
|
||||||
.PHONY: all clean regenie generate
|
.PHONY: all clean regenie generate FORCE
|
||||||
all: $(GENIE) $(TARGETOS)$(ARCHITECTURE)
|
all: $(GENIE) $(TARGETOS)$(ARCHITECTURE)
|
||||||
regenie:
|
regenie:
|
||||||
|
FORCE:
|
||||||
|
|
||||||
#-------------------------------------------------
|
#-------------------------------------------------
|
||||||
# gmake-mingw64-gcc
|
# gmake-mingw64-gcc
|
||||||
@ -1710,9 +1711,11 @@ shaders: bgfx-tools
|
|||||||
|
|
||||||
.PHONY: translation
|
.PHONY: translation
|
||||||
|
|
||||||
translation:
|
$(GENDIR)/mame.pot: FORCE
|
||||||
$(SILENT) echo Generating mame.pot
|
$(SILENT) echo Generating mame.pot
|
||||||
$(SILENT) find src plugins -iname "*.cpp" -print0 -o -iname "*.lua" -print0 | xargs -0 xgettext --from-code=UTF-8 -k_ -k__ -j -o mame.pot
|
$(SILENT) find src -iname "*.cpp" -print0 | xargs -0 xgettext --from-code=UTF-8 -k_ -k__ -o $@
|
||||||
$(SILENT) find language -iname "*.po" -print0 | xargs -0 -n 1 -I %% msgmerge -U -N %% mame.pot
|
$(SILENT) find plugins -iname "*.lua" -print0 | xargs -0 xgettext --from-code=UTF-8 -k_ -k__ -j -o $@
|
||||||
$(SILENT) find language -iname "*.po" -print0 | xargs -0 -n 1 -I %% msgattrib --clear-fuzzy --empty %% -o %%
|
|
||||||
|
|
||||||
|
translation: $(GENDIR)/mame.pot
|
||||||
|
$(SILENT) find language -name "*.po" -print0 | xargs -0 -n 1 -I %% msgmerge -U -N %% $<
|
||||||
|
$(SILENT) find language -name "*.po" -print0 | xargs -0 -n 1 -I %% msgattrib --clear-fuzzy --empty %% -o %%
|
||||||
|
@ -650,7 +650,7 @@ function cheat.startplugin()
|
|||||||
end
|
end
|
||||||
if event == "up" or event == "down" or event == "comment" then
|
if event == "up" or event == "down" or event == "comment" then
|
||||||
if cheat.comment then
|
if cheat.comment then
|
||||||
manager:machine():popmessage(_("Cheat Comment:\n") .. cheat.comment)
|
manager:machine():popmessage(string.format(_("Cheat Comment:\n%s"), cheat.comment))
|
||||||
end
|
end
|
||||||
elseif event == "left" then
|
elseif event == "left" then
|
||||||
if cheat.parameter then
|
if cheat.parameter then
|
||||||
@ -717,10 +717,10 @@ function cheat.startplugin()
|
|||||||
else
|
else
|
||||||
subtext = cheat.parameter.value
|
subtext = cheat.parameter.value
|
||||||
end
|
end
|
||||||
manager:machine():popmessage(_("Activated") .. ": " .. cheat.desc .. " = " .. subtext)
|
manager:machine():popmessage(string.format(_("Activated: %s = %s"), cheat.desc, subtext))
|
||||||
elseif not cheat.parameter and cheat.script.on then
|
elseif not cheat.parameter and cheat.script.on then
|
||||||
cheat.script.on()
|
cheat.script.on()
|
||||||
manager:machine():popmessage(_("Activated") .. ": " .. cheat.desc)
|
manager:machine():popmessage(string.format(_("Activated: %s"), cheat.desc))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -778,16 +778,16 @@ function cheat.startplugin()
|
|||||||
if not run_if(cheat, cheat.script.change) then
|
if not run_if(cheat, cheat.script.change) then
|
||||||
run_if(cheat, cheat.script.on)
|
run_if(cheat, cheat.script.on)
|
||||||
end
|
end
|
||||||
manager:machine():popmessage(_("Activated") .. ": " .. cheat.desc)
|
manager:machine():popmessage(string.format(_("Activated: %s"), cheat.desc))
|
||||||
elseif not cheat.enabled then
|
elseif not cheat.enabled then
|
||||||
cheat.enabled = true
|
cheat.enabled = true
|
||||||
run_if(cheat, cheat.script.on)
|
run_if(cheat, cheat.script.on)
|
||||||
manager:machine():popmessage(_("Enabled") .. ": " .. cheat.desc)
|
manager:machine():popmessage(string.format(_("Enabled: %s"), cheat.desc))
|
||||||
else
|
else
|
||||||
cheat.enabled = false
|
cheat.enabled = false
|
||||||
run_if(cheat, cheat.script.off)
|
run_if(cheat, cheat.script.off)
|
||||||
bwpclr(cheat)
|
bwpclr(cheat)
|
||||||
manager:machine():popmessage(_("Disabled") .. ": " .. cheat.desc)
|
manager:machine():popmessage(string.format(_("Disabled: %s"), cheat.desc))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
cheat.hotkeys.pressed = true
|
cheat.hotkeys.pressed = true
|
||||||
@ -846,7 +846,7 @@ function cheat.startplugin()
|
|||||||
function ce.inject(newcheat)
|
function ce.inject(newcheat)
|
||||||
cheats[#cheats + 1] = newcheat
|
cheats[#cheats + 1] = newcheat
|
||||||
parse_cheat(newcheat)
|
parse_cheat(newcheat)
|
||||||
manager:machine():popmessage(newcheat.desc .. _(" added"))
|
manager:machine():popmessage(string.format(_("%s added"), newcheat.desc))
|
||||||
end
|
end
|
||||||
|
|
||||||
function ce.get(index)
|
function ce.get(index)
|
||||||
|
@ -351,7 +351,7 @@ function cheatfind.startplugin()
|
|||||||
local r
|
local r
|
||||||
name, r = incdec(event, name, 1, #c)
|
name, r = incdec(event, name, 1, #c)
|
||||||
if (event == "select" or event == "comment") and name == 1 then
|
if (event == "select" or event == "comment") and name == 1 then
|
||||||
manager:machine():popmessage(_("Default name is ") .. cheat_save.name)
|
manager:machine():popmessage(string.format(_("Default name is %s"), cheat_save.name))
|
||||||
end
|
end
|
||||||
return r
|
return r
|
||||||
end
|
end
|
||||||
@ -396,7 +396,7 @@ function cheatfind.startplugin()
|
|||||||
file = io.open(cheat_save.path .. "/cheat.simple", "a")
|
file = io.open(cheat_save.path .. "/cheat.simple", "a")
|
||||||
file:write(string.format(cheat_save.simple, desc))
|
file:write(string.format(cheat_save.simple, desc))
|
||||||
file:close()
|
file:close()
|
||||||
manager:machine():popmessage(_("Cheat written to ") .. cheat_save.filename .. _(" and added to cheat.simple"))
|
manager:machine():popmessage(string.format(_("Cheat written to %s and added to cheat.simple"), cheat_save.filename))
|
||||||
end
|
end
|
||||||
written = true
|
written = true
|
||||||
elseif not devtable[devcur].space.shortname then
|
elseif not devtable[devcur].space.shortname then
|
||||||
@ -409,7 +409,7 @@ function cheatfind.startplugin()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if not written then
|
if not written then
|
||||||
manager:machine():popmessage(_("Unable to write file\nCheck cheatpath dir exists"))
|
manager:machine():popmessage(_("Unable to write file\nEnsure that cheatpath folder exists"))
|
||||||
end
|
end
|
||||||
cheat_save = nil
|
cheat_save = nil
|
||||||
return true
|
return true
|
||||||
|
@ -942,22 +942,23 @@ void menu_select_game::general_info(const game_driver *driver, std::string &buff
|
|||||||
else if (flags.imperfect_features() & device_t::feature::TIMING)
|
else if (flags.imperfect_features() & device_t::feature::TIMING)
|
||||||
str << _("Timing\tImperfect\n");
|
str << _("Timing\tImperfect\n");
|
||||||
|
|
||||||
util::stream_format(str, _("Mechanical Machine\t%1$s\n"), ((flags.machine_flags() & machine_flags::MECHANICAL) ? _("Yes") : _("No")));
|
str << (flags.machine_flags() & machine_flags::MECHANICAL) ? _("Mechanical Machine\tYes\n") : _("Mechanical Machine\tNo\n");
|
||||||
util::stream_format(str, _("Requires Artwork\t%1$s\n"), ((flags.machine_flags() & machine_flags::REQUIRES_ARTWORK) ? _("Yes") : _("No")));
|
str << (flags.machine_flags() & machine_flags::REQUIRES_ARTWORK) ? _("Requires Artwork\tYes\n") : _("Requires Artwork\tNo\n");
|
||||||
util::stream_format(str, _("Requires Clickable Artwork\t%1$s\n"), ((flags.machine_flags() & machine_flags::CLICKABLE_ARTWORK) ? _("Yes") : _("No")));
|
str << (flags.machine_flags() & machine_flags::CLICKABLE_ARTWORK) ? _("Requires Clickable Artwork\tYes\n") : _("Requires Clickable Artwork\tNo\n");
|
||||||
util::stream_format(str, _("Support Cocktail\t%1$s\n"), ((flags.machine_flags() & machine_flags::NO_COCKTAIL) ? _("Yes") : _("No")));
|
str << (flags.machine_flags() & machine_flags::NO_COCKTAIL) ? _("Support Cocktail\tYes\n") : _("Support Cocktail\tNo\n");
|
||||||
util::stream_format(str, _("Driver is BIOS\t%1$s\n"), ((flags.machine_flags() & machine_flags::IS_BIOS_ROOT) ? _("Yes") : _("No")));
|
str << (flags.machine_flags() & machine_flags::IS_BIOS_ROOT) ? _("Driver is BIOS\tYes\n") : _("Driver is BIOS\tNo\n");
|
||||||
util::stream_format(str, _("Support Save\t%1$s\n"), ((flags.machine_flags() & machine_flags::SUPPORTS_SAVE) ? _("Yes") : _("No")));
|
str << (flags.machine_flags() & machine_flags::SUPPORTS_SAVE) ? _("Support Save\tYes\n") : _("Support Save\tNo\n");
|
||||||
util::stream_format(str, _("Screen Orientation\t%1$s\n"), ((flags.machine_flags() & ORIENTATION_SWAP_XY) ? _("Vertical") : _("Horizontal")));
|
str << (flags.machine_flags() & ORIENTATION_SWAP_XY) ? _("Screen Orientation\tVertical\n") : _("Screen Orientation\tHorizontal\n");
|
||||||
bool found = false;
|
bool found = false;
|
||||||
auto entries = rom_build_entries(driver->rom);
|
for (romload::region const ®ion : romload::entries(driver->rom).get_regions())
|
||||||
for (const rom_entry &rom : entries)
|
{
|
||||||
if (ROMENTRY_ISREGION(&rom) && ROMREGION_ISDISKDATA(&rom))
|
if (region.is_diskdata())
|
||||||
{
|
{
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
util::stream_format(str, _("Requires CHD\t%1$s\n"), found ? _("Yes") : _("No"));
|
}
|
||||||
|
str << found ? _("Requires CHD\tYes\n") : _("Requires CHD\tNo\n");
|
||||||
|
|
||||||
// audit the game first to see if we're going to work
|
// audit the game first to see if we're going to work
|
||||||
if (ui().options().info_audit())
|
if (ui().options().info_audit())
|
||||||
@ -970,19 +971,21 @@ void menu_select_game::general_info(const game_driver *driver, std::string &buff
|
|||||||
|
|
||||||
// if everything looks good, schedule the new driver
|
// if everything looks good, schedule the new driver
|
||||||
if (summary == media_auditor::CORRECT || summary == media_auditor::BEST_AVAILABLE || summary == media_auditor::NONE_NEEDED)
|
if (summary == media_auditor::CORRECT || summary == media_auditor::BEST_AVAILABLE || summary == media_auditor::NONE_NEEDED)
|
||||||
str << _("Roms Audit Pass\tOK\n");
|
str << _("ROM Audit Result\tOK\n");
|
||||||
else
|
else
|
||||||
str << _("Roms Audit Pass\tBAD\n");
|
str << _("ROM Audit Result\tBAD\n");
|
||||||
|
|
||||||
if (summary_samples == media_auditor::NONE_NEEDED)
|
if (summary_samples == media_auditor::NONE_NEEDED)
|
||||||
str << _("Samples Audit Pass\tNone Needed\n");
|
str << _("Samples Audit Result\tNone Needed\n");
|
||||||
else if (summary_samples == media_auditor::CORRECT || summary_samples == media_auditor::BEST_AVAILABLE)
|
else if (summary_samples == media_auditor::CORRECT || summary_samples == media_auditor::BEST_AVAILABLE)
|
||||||
str << _("Samples Audit Pass\tOK\n");
|
str << _("Samples Audit Result\tOK\n");
|
||||||
else
|
else
|
||||||
str << _("Samples Audit Pass\tBAD\n");
|
str << _("Samples Audit Result\tBAD\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
str << _("Roms Audit Pass\tDisabled\nSamples Audit Pass\tDisabled\n");
|
{
|
||||||
|
str << _("ROM Audit Disabled\t\nSamples Audit Disabled\t\n");
|
||||||
|
}
|
||||||
|
|
||||||
buffer = str.str();
|
buffer = str.str();
|
||||||
}
|
}
|
||||||
|
@ -334,25 +334,21 @@ void simple_menu_select_game::custom_render(void *selectedref, float top, float
|
|||||||
tempbuf[3] = _("Overall: Working");
|
tempbuf[3] = _("Overall: Working");
|
||||||
|
|
||||||
// next line is graphics, sound status
|
// next line is graphics, sound status
|
||||||
const char *gfxstat;
|
|
||||||
if (m_cached_unemulated & device_t::feature::GRAPHICS)
|
if (m_cached_unemulated & device_t::feature::GRAPHICS)
|
||||||
gfxstat = _("Unimplemented");
|
tempbuf[4] = _("Graphics: Unimplemented, ");
|
||||||
else if ((m_cached_unemulated | m_cached_imperfect) & (device_t::feature::GRAPHICS | device_t::feature::PALETTE))
|
else if ((m_cached_unemulated | m_cached_imperfect) & (device_t::feature::GRAPHICS | device_t::feature::PALETTE))
|
||||||
gfxstat = _("Imperfect");
|
tempbuf[4] = _("Graphics: Imperfect, ");
|
||||||
else
|
else
|
||||||
gfxstat = _("OK");
|
tempbuf[4] = _("Graphics: OK, ");
|
||||||
|
|
||||||
const char *soundstat;
|
|
||||||
if (m_cached_flags & machine_flags::NO_SOUND_HW)
|
if (m_cached_flags & machine_flags::NO_SOUND_HW)
|
||||||
soundstat = _("None");
|
tempbuf[4].append(_("Sound: None"));
|
||||||
else if (m_cached_unemulated & device_t::feature::SOUND)
|
else if (m_cached_unemulated & device_t::feature::SOUND)
|
||||||
soundstat = _("Unimplemented");
|
tempbuf[4].append(_("Sound: Unimplemented"));
|
||||||
else if (m_cached_imperfect & device_t::feature::SOUND)
|
else if (m_cached_imperfect & device_t::feature::SOUND)
|
||||||
soundstat = _("Imperfect");
|
tempbuf[4].append(_("Sound: Imperfect"));
|
||||||
else
|
else
|
||||||
soundstat = _("OK");
|
tempbuf[4].append(_("Sound: OK"));
|
||||||
|
|
||||||
tempbuf[4] = string_format(_("Gfx: %s, Sound: %s"), gfxstat, soundstat);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user