scummvm/po/module.mk
aryanrawlani28 4b6976c558 GUI: U32: Reduce number of files changed and fixes
Up until last commit, everything was working fine but the amount of files changed was too large. This commit tries to reduce the changes.

- Add a fake constructor to Keymap, text-to-speech, setDescription (save-state)
- Redirecting functions for PopUpWidget::appendEntry, ButtonWidget::setLabel, GUIErrorMessage
- Use the above functions and constructors to reduce changes in Engines
- Fix warnings being in unicode. Only output english text in - Warnings, Errors, etc.
- Mark some strings as "translation" strings. (Not yet added to POTFILES)
- Remove some CP related things from po/modules.mk
- Previously used some Common::convertToU32 where it was not necessary, replace this with u32constructor
2020-08-30 14:43:41 +02:00

49 lines
1.7 KiB
Makefile

POTFILE := $(srcdir)/po/scummvm.pot
POFILES := $(wildcard $(srcdir)/po/*.po)
ENGINE_INPUT_POTFILES := $(sort $(wildcard $(srcdir)/engines/*/POTFILES))
updatepot:
cat $(srcdir)/po/POTFILES $(ENGINE_INPUT_POTFILES) | \
xgettext -f - -D $(srcdir) -d scummvm --c++ -k_ -k_s -k_c:1,2c -k_sc:1,2c --add-comments=I18N\
-kDECLARE_TRANSLATION_ADDITIONAL_CONTEXT:1,2c -o $(POTFILE) \
--copyright-holder="ScummVM Team" --package-name=ScummVM \
--package-version=$(VERSION) --msgid-bugs-address=scummvm-devel@lists.scummvm.org -o $(POTFILE)_
sed -e 's/SOME DESCRIPTIVE TITLE/LANGUAGE translation for ScummVM/' \
-e 's/UTF-8/CHARSET/' -e 's/PACKAGE/ScummVM/' $(POTFILE)_ > $(POTFILE).new
rm $(POTFILE)_
if test -f $(POTFILE); then \
sed -f $(srcdir)/po/remove-potcdate.sed < $(POTFILE) > $(POTFILE).1 && \
sed -f $(srcdir)/po/remove-potcdate.sed < $(POTFILE).new > $(POTFILE).2 && \
if cmp $(POTFILE).1 $(POTFILE).2 >/dev/null 2>&1; then \
rm -f $(POTFILE).new; \
else \
rm -f $(POTFILE) && \
mv -f $(POTFILE).new $(POTFILE); \
fi; \
rm -f $(POTFILE).1 $(POTFILE).2; \
else \
mv -f $(POTFILE).new $(POTFILE); \
fi;
%.po: $(POTFILE)
msgmerge $@ $(POTFILE) -o $@.new
if cmp $@ $@.new >/dev/null 2>&1; then \
rm -f $@.new; \
else \
mv -f $@.new $@; \
fi;
translations-dat: devtools/create_translations
devtools/create_translations/create_translations $(POFILES)
mv translations.dat $(srcdir)/gui/themes/
update-translations: updatepot $(POFILES) translations-dat
update-translations: updatepot $(POFILES)
@$(foreach file, $(POFILES), echo -n $(notdir $(basename $(file)))": ";msgfmt --statistic $(file);)
@rm -f messages.mo
.PHONY: updatepot translations-dat update-translations