[banshee] Add Makefile/intltool hook for *.addin.xml i18n
- From: Gabriel Burt <gburt src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [banshee] Add Makefile/intltool hook for *.addin.xml i18n
- Date: Thu, 3 Dec 2009 01:40:24 +0000 (UTC)
commit 172ffab29518f365123efd940a5e0fce65ab21bb
Author: Gabriel Burt <gabriel burt gmail com>
Date: Wed Dec 2 14:56:03 2009 -0800
Add Makefile/intltool hook for *.addin.xml i18n
If you rename the .addin.xml to .addin.xml.in, it will be automatically
parsed for translatable strings (elements and attributes starting with
an underscore). Then, you can access the translated elements with
eg Catalog.GetString (addin.Name).
build/build.rules.mk | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/build/build.rules.mk b/build/build.rules.mk
index d429751..2b9a980 100644
--- a/build/build.rules.mk
+++ b/build/build.rules.mk
@@ -33,6 +33,13 @@ OUTPUT_FILES = \
$(ASSEMBLY_FILE) \
$(ASSEMBLY_FILE).mdb
+# If there are any files ending in .addin.xml.in, pull translations out of them
+ADDIN_XML_IN_EXPANDED = $(wildcard $(srcdir)/*.addin.xml.in)
+addin_xml_in_files = $(subst $(srcdir)/, , $(ADDIN_XML_IN_EXPANDED))
+addin_xmldir = $(srcdir)
+ADDIN_XML_CLEAN = $(shell if [ ! "x$(addin_xml_in_files)" = "x" ]; then echo "*.addin.xml"; else echo ""; fi)
+ INTLTOOL_XML_NOMERGE_RULE@
+
moduledir = $(INSTALL_DIR_RESOLVED)
module_SCRIPTS = $(OUTPUT_FILES)
@@ -78,9 +85,9 @@ install-data-local: $(THEME_ICONS_SOURCE)
uninstall-local: $(THEME_ICONS_SOURCE)
@$(INSTALL_ICONS) -u "$(DESTDIR)$(pkgdatadir)" "$(srcdir)" $(THEME_ICONS_RELATIVE)
-EXTRA_DIST = $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(THEME_ICONS_SOURCE)
+EXTRA_DIST = $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(THEME_ICONS_SOURCE) $(ADDIN_XML_IN_EXPANDED)
CLEANFILES = $(OUTPUT_FILES)
-DISTCLEANFILES = *.pidb
+DISTCLEANFILES = *.pidb $(ADDIN_XML_CLEAN)
MAINTAINERCLEANFILES = Makefile.in
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]