aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenny Root <kenny@the-b.org>2010-10-27 06:17:21 -0500
committerKenny Root <kenny@the-b.org>2010-10-27 12:18:06 -0500
commitc5a270ca26299fa95625ab8d776d84ee4f9b1a6e (patch)
tree8c1f986c434b8699d1e6f02628ff0650aee77dd3
parent3654c28153eea540fd0209b5857117ff9de6c0a5 (diff)
downloadconnectbot-c5a270ca26299fa95625ab8d776d84ee4f9b1a6e.tar.gz
connectbot-c5a270ca26299fa95625ab8d776d84ee4f9b1a6e.tar.bz2
connectbot-c5a270ca26299fa95625ab8d776d84ee4f9b1a6e.zip
Add Ant commands to import and export translations
-rw-r--r--.gitignore1
-rw-r--r--AndroidManifest.xml2
-rw-r--r--build.xml33
-rw-r--r--locale/.gitignore1
4 files changed, 36 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index e614fbb..c1f0eb8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
bin
gen
+launchpad-*.tar.gz
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index db964fc..bf8a05d 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.connectbot"
android:versionName="1.7.1"
- android:versionCode="332"
+ android:versionCode="333"
android:installLocation="auto">
<application
diff --git a/build.xml b/build.xml
index e7dbbf4..9de0ea8 100644
--- a/build.xml
+++ b/build.xml
@@ -46,6 +46,16 @@
<property name="proguard.out.dir" value="${out.dir}/proguard.out"/>
<property name="out.dex.input.absolute.dir" value="${proguard.out.dir}"/>
+ <!-- Output directory for .po files. -->
+ <property name="locale.dir" value="locale" />
+
+ <!-- Default args to pass to a2po for .po generation. -->
+ <property name="a2po.args" value="--groups strings --template fortune/fortune.pot --layout 'po/fortune/fortune-%(locale)s.po'"/>
+
+ <!-- File names for launchpad translations. -->
+ <property name="launchpad.export.file" value="launchpad-export.tar.gz"/>
+ <property name="launchpad.import.file" value="launchpad-import.tar.gz"/>
+
<target name="check-proguard">
<available file="tools/proguard.jar" property="have.proguard"/>
</target>
@@ -171,6 +181,29 @@
</fail>
</target>
+ <!-- Translations come from launchpad.net and are placed in the
+ locale/ subdirectory. -->
+ <target name="translations-import">
+ <untar src="${launchpad.export.file}" dest="${locale.dir}" compression="gzip"/>
+ <exec executable="a2po" failonerror="true">
+ <arg value="import"/>
+ <arg line="${a2po.args}"/>
+ </exec>
+ </target>
+
+ <!-- Translations are to be uploaded to launchpad.net as a tar ball
+ created from the locale/ subdirectory. -->
+ <target name="translations-export">
+ <exec executable="a2po" failonerror="true">
+ <arg value="export"/>
+ <arg line="${a2po.args}"/>
+ </exec>
+ <tar destfile="${launchpad.import.file}"
+ compression="gzip"
+ basedir="${locale.dir}"
+ includes="**/*.pot **/*.po" />
+ </target>
+
<!-- End custom ConnectBot stuff -->
<taskdef name="setup"
diff --git a/locale/.gitignore b/locale/.gitignore
new file mode 100644
index 0000000..72e8ffc
--- /dev/null
+++ b/locale/.gitignore
@@ -0,0 +1 @@
+*