From 2851d7d6cdfa06d67a060fe91c7b4dcc1acf86ab Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Tue, 3 Oct 2017 10:40:50 +1100 Subject: (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" --- makefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'makefile') diff --git a/makefile b/makefile index 7b156207702..cb15cb3f511 100644 --- a/makefile +++ b/makefile @@ -971,9 +971,10 @@ PROJECTDIR := $(BUILDDIR)/projects/$(OSD)/$(FULLTARGET) PROJECTDIR_SDL := $(BUILDDIR)/projects/sdl/$(FULLTARGET) PROJECTDIR_WIN := $(BUILDDIR)/projects/windows/$(FULLTARGET) -.PHONY: all clean regenie generate +.PHONY: all clean regenie generate FORCE all: $(GENIE) $(TARGETOS)$(ARCHITECTURE) regenie: +FORCE: #------------------------------------------------- # gmake-mingw64-gcc @@ -1710,9 +1711,11 @@ shaders: bgfx-tools .PHONY: translation -translation: +$(GENDIR)/mame.pot: FORCE $(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 language -iname "*.po" -print0 | xargs -0 -n 1 -I %% msgmerge -U -N %% mame.pot - $(SILENT) find language -iname "*.po" -print0 | xargs -0 -n 1 -I %% msgattrib --clear-fuzzy --empty %% -o %% + $(SILENT) find src -iname "*.cpp" -print0 | xargs -0 xgettext --from-code=UTF-8 -k_ -k__ -o $@ + $(SILENT) find plugins -iname "*.lua" -print0 | xargs -0 xgettext --from-code=UTF-8 -k_ -k__ -j -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 %% -- cgit v1.2.3