1
# More information: https://wiki.ubuntu.com/Touch/Testing
3
# Notes for autopilot tests:
4
# ---------------------------------------------------------------
5
# In order to run autopilot tests:
6
# sudo apt-add-repository ppa:autopilot/ppa
8
# sudo apt-get install python-autopilot autopilot-qt
10
# Notes for translations:
11
# ---------------------------------------------------------------
12
# In order to create translation files manually:
13
# 1) run make once to create and update the po/template.pot
14
# 2) copy the template file and set the name to the language you want to
15
# translate to: cp po/template.pot po/de.po
17
# 4) run make build-translations to build the translation files
19
# Steps 1) and 4) are automatically executed by QtCreator
20
#################################################################
22
#APP_ID needs to match the "name" field of the click manifest
23
APP_ID=com.ubuntu.developer.majster-pl.socket-world
25
#provides a way for the IDE to set a specific target folder for the translations
28
MO_FILES=$(shell for infile in `find po -name "*.po"`; do basename -s .po $$infile | awk '{print "$(TRANSLATION_ROOT)/share/locale/" $$0 "/LC_MESSAGES/$(APP_ID).mo";}' ; done)
29
QMLJS_FILES=$(shell find . -name "*.qml" -o -name "*.js" | grep -v ./tests)
34
chmod +x tests/autopilot/run
38
qmltestrunner -input tests/unit
42
build-translations: $(MO_FILES)
44
po/template.pot: $(QMLJS_FILES)
45
mkdir -p $(CURDIR)/po && xgettext -o po/template.pot --qt --c++ --add-comments=TRANSLATORS --keyword=tr --keyword=tr:1,2 $(QMLJS_FILES) --from-code=UTF-8
47
$(TRANSLATION_ROOT)/share/locale/%/LC_MESSAGES/$(APP_ID).mo: po/%.po
48
mkdir -p $(TRANSLATION_ROOT)/share/locale/$*/LC_MESSAGES && msgfmt -o $(@) $(<)