summaryrefslogtreecommitdiff
path: root/po/Makefile.am
diff options
context:
space:
mode:
authormdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220>2013-08-24 19:40:32 +0000
committermdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220>2013-08-24 19:40:32 +0000
commiteb3b97ad63abcc1be8c8dfd9b5f98e7e2eeb3cdf (patch)
tree5d22effa37b5faefd71f446e2f3820ffd3311c8c /po/Makefile.am
parent28382e2155b417594b0d3f874a33492a58a481cb (diff)
downloadnavit-eb3b97ad63abcc1be8c8dfd9b5f98e7e2eeb3cdf.tar.gz
Add:core:Update gettext db with translations pulled from Android string resources.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5598 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'po/Makefile.am')
-rw-r--r--po/Makefile.am10
1 files changed, 8 insertions, 2 deletions
diff --git a/po/Makefile.am b/po/Makefile.am
index b807e41e9..571af6501 100644
--- a/po/Makefile.am
+++ b/po/Makefile.am
@@ -23,8 +23,9 @@ POTFILES = \
$(top_srcdir)/navit/gui/internal/gui_internal_search.c \
$(top_srcdir)/navit/gui/internal/gui_internal_widget.c \
$(top_srcdir)/navit/osd/core/osd_core.c \
- $(top_builddir)/navit/navit_shipped.c
-
+ $(top_builddir)/navit/navit_shipped.c \
+ $(top_builddir)/navit/strings.c
+
if XGETTEXT_GLADE
POTFILES += $(top_builddir)/navit/navit_shipped.glade
endif
@@ -48,6 +49,11 @@ $(top_builddir)/navit/navit_shipped.glade: $(top_srcdir)/navit/navit_shipped.xml
$(top_builddir)/navit/navit_shipped.c: $(top_srcdir)/navit/navit_shipped.xml
sed -e 's/|//g' -e 's/^/|/' -e 's/$$/|/' -e 's/\(_("[^"]*")\)/| \1; |/g' -e 's/|[^|]*|//g' <$(top_srcdir)/navit/navit_shipped.xml >$(top_builddir)/navit/navit_shipped.c
+# Trick gettext to get translateable strings out of android/strings.xml
+
+$(top_builddir)/navit/strings.c: $(top_srcdir)/navit/android/res/values/strings.xml
+ sed -e "s/\\\\'/'/g" -e 's%.*<string[^>]*name="\(.*\)">\(.*\)</string>%// Android resource: @strings/\1\n_("\2")%g' -e '\%^//%!d'<$(top_srcdir)/navit/android/res/values/strings.xml >$(top_builddir)/navit/strings.c
+
@POFILES@: navit.pot
sed 's/^"Project-Id-Version:.*/"Project-Id-Version: $(PACKAGE_STRING)\\n"/' < $(top_srcdir)/po/$@.in | $(MSGMERGE) --no-fuzzy-matching --verbose -o $(top_builddir)/po/$@ - navit.pot