From b230b69539c1ec84c425da9808dceb5b13a37bb0 Mon Sep 17 00:00:00 2001
From: Přemysl Janouch
Date: Mon, 13 Sep 2010 19:24:53 +0200
Subject: Initial commit
---
po/logdiag.pot | 23 +++++++++++++++++++++++
po/make-template.sh | 33 +++++++++++++++++++++++++++++++++
2 files changed, 56 insertions(+)
create mode 100644 po/logdiag.pot
create mode 100755 po/make-template.sh
(limited to 'po')
diff --git a/po/logdiag.pot b/po/logdiag.pot
new file mode 100644
index 0000000..7f375e2
--- /dev/null
+++ b/po/logdiag.pot
@@ -0,0 +1,23 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Přemysl Janouch
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR , YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: logdiag \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-07-05 23:23+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../src/window-main.c:102
+#, c-format
+msgid "Building UI failed: %s"
+msgstr ""
diff --git a/po/make-template.sh b/po/make-template.sh
new file mode 100755
index 0000000..e688847
--- /dev/null
+++ b/po/make-template.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+# This script makes a translation template
+# The reason for this not being inside CMakeLists.txt
+# is that the translator should not need to run
+# the whole configure process to get this single stupid file.
+
+# Get the package name from CMakeLists.txt
+PACKAGE=$(sed -n '/^[ \t]*[pP][rR][oO][jJ][eE][cC][tT][ \t]*([ \t]*\([^ \t)]\{1,\}\).*).*/{s//\1/p;q}' \
+ ../CMakeLists.txt)
+
+# Get the package version from CMakeLists.txt
+EXP_BEG='/^[ \t]*[sS][eE][tT][ \t]*([ \t]*'$PACKAGE'_VERSION_'
+EXP_END='[ \t]\{1,\}"\{0,1\}\([^)"]\{1,\}\)"\{0,1\}).*/{s//\1/p;q}'
+
+MAJOR=$(sed -n "${EXP_BEG}MAJOR${EXP_END}" ../CMakeLists.txt)
+MINOR=$(sed -n "${EXP_BEG}MINOR${EXP_END}" ../CMakeLists.txt)
+PATCH=$(sed -n "${EXP_BEG}PATCH${EXP_END}" ../CMakeLists.txt)
+
+if [ "$MAJOR" != "" ]; then
+ VERSION=$MAJOR
+ if [ "$MINOR" != "" ]; then
+ VERSION=$VERSION.$MINOR
+ if [ "$PATCH" != "" ]; then
+ VERSION=$VERSION.$PATCH
+ fi
+ fi
+fi
+
+# Finally make the template
+xgettext -LC -k_ -kN_:1,2 -kG_ ../src/*.c -o "$PACKAGE".pot \
+ --package-name="$PACKAGE" --package-version="$VERSION" \
+ --copyright-holder="Přemysl Janouch"
+
--
cgit v1.2.3-70-g09d2