diff options
| author | Lex Neva <lexelby@users.noreply.github.com> | 2018-02-04 22:38:24 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-04 22:38:24 -0500 |
| commit | 72d52dc317b562f728b772f058ab2c5059a2a618 (patch) | |
| tree | 8c975a567e99d89514b6b49430b5b439d800f3e4 /Makefile | |
| parent | 1dd76646cc5379e686a1c8785a4dc38b6e24c931 (diff) | |
framework for translations (#55)
sets up all the plumbing to send strings to CrowdIn for translation and incorporate the results
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -5,10 +5,30 @@ VERSION:=$(TRAVIS_BRANCH) OS:=$(shell uname) ARCH:=$(shell uname -m) -dist: distclean +dist: distclean locales bin/build-dist $(EXTENSIONS) cp *.inx dist + mv locales dist/bin cd dist; tar zcf ../inkstitch-$(VERSION)-$(OS)-$(ARCH).tar.gz * distclean: rm -rf build dist *.spec *.tar.gz + +messages.po: embroider*.py inkstitch.py + rm -f messages.po + xgettext embroider*.py inkstitch.py + +.PHONY: locales +locales: + # message files will look like this: + # translations/messages-en_US.po + if ls translations/*.po > /dev/null 2>&1; then \ + for po in translations/*.po; do \ + lang=$${po%.po}; \ + lang=$${lang#messages-}; \ + mkdir -p locales/$$lang/LC_MESSAGES/; \ + msgfmt $$po -o locales/$$lang/LC_MESSAGES/inkstitch.mo; \ + done; \ + else \ + mkdir locales; \ + fi |
