~usb-creator-hackers/usb-creator/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
update-po:
	find -regex "./\(usbcreator\|dbus\|gui\|desktop\).*\.\(py\|glade\|ui\|in\)" \
		| sed '/gtk\.ui/ s,^,[type: gettext/glade],' > po/POTFILES.in
	echo ./bin/usb-creator-gtk >> po/POTFILES.in
	echo ./bin/usb-creator-kde >> po/POTFILES.in
	python setup.py build_i18n --merge-po --po-dir po

check: tests/run

clean:
	rm -rf build/*

translations: po/*.po
	# TODO evand 2009-07-28: Ideally we should build the mo files once,
	# instead of once here and once in setup.py.
	# Taken from Wubi.
	rm -rf build/translations
	mkdir -p build/translations/
	@for po in $^; do \
		language=`basename $$po`; \
		language=$${language%%.po}; \
		target="build/translations/$$language/LC_MESSAGES"; \
		mkdir -p $$target; \
		msgfmt --output=$$target/usbcreator.mo $$po; \
	done