[PATCH] Move translations to transifex.com (was: Translation management)

Kévin Raymond shaiton at fedoraproject.org
Mon Feb 25 08:23:54 PST 2013


Hi folks,

We spoke about moving the translations to a translation system in order to
help maintain translations, and decided to check this after the 3.0
release.

Here is a patch to pull translations from transifex.com and push the POT
file there.

The project is at transifex.com[1], I pushed the current translations  to
have an example, but of course if we decide to not use transifex.com, I
will delete this project.
If we move there, please give me the name of the transifex.com account to
set as maintainers. They will have to approve team creations and are able
to push POT update.

Few thoughts before applying this patch:
- Transifex does the PO merge itself
- Transifex does not handle fuzzy string by choice. Therefore translators
  can't work with the "fuzzy" status (information lost while uploading the
  PO file to Transifex).
- We can download POs from Transifex only with valid credentials. This is
  a limitation that devel where going to resolve (I don't know the
  status).
- The transifex client should be installed on the host in order to pull
  POs and push the POT.
- Each time we do a "tx push -t" in order to push the translations like I
  did to import the current translations, the "Last-Translator:" header is
  overridden with the maintainer name who is currently pushing, but should
  not appear on the "# Translators:" credit lines. Which is not totally
  wrong.
- Basically, a maintainer would just have to "make update-po-files" in
  order to build a new POT, push it to Transifex, and then pull the POs
  that got just merged.

I don't know what process you want to use here, but we can probably use
only one Transifex resource by translation template file. Should we define
a new one for major releases? (Having only one is probably better.)

There could also be other files, I tried to import the README as a simple
txt file, but strings are exploded by-line, which is not the best to
translate. Do we want to create a release for websites, Release Notes, and
README? (I locked the translations of the README file as it was only a
test).

I would be happy to speak more about Transifex if you have questions, or
to let people move to an other platform.

[1] https://www.transifex.com/projects/p/subsurface/

Regards,

-- 
Kévin Raymond
-------------- next part --------------
From 16e74970c13f9e92fbab3f0087b745a6bb1f0939 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?K=C3=A9vin=20Raymond?= <shaiton at fedoraproject.org>
Date: Mon, 25 Feb 2013 16:40:05 +0100
Subject: [PATCH] Move translations to transifex.com
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Translation management is done through Transifex now for easy translations.
Translators should note that fuzzy strings are not used any more since
Transifex does not handle it (by choice).

In order to pull translations, you need a transifex.com account.

Signed-off-by: Kévin Raymond <shaiton at fedoraproject.org>
---
 .tx/config |  9 +++++++++
 Makefile   | 11 +++--------
 2 files changed, 12 insertions(+), 8 deletions(-)
 create mode 100644 .tx/config

diff --git a/.tx/config b/.tx/config
new file mode 100644
index 0000000..6177106
--- /dev/null
+++ b/.tx/config
@@ -0,0 +1,9 @@
+[main]
+host = https://www.transifex.net
+
+[subsurface.subsurface]
+file_filter = po/<lang>.po
+source_file = po/subsurface-new.pot
+source_lang = en
+type = PO
+
diff --git a/Makefile b/Makefile
index a8e4d2f..884e024 100644
--- a/Makefile
+++ b/Makefile
@@ -243,16 +243,11 @@ $(NSIFILE): $(NSIINPUTFILE)
 $(INFOPLIST): $(INFOPLISTINPUT)
 	$(shell cat $(INFOPLISTINPUT) | sed -e 's/CFBUNDLEVERSION_TOKEN/$(CFBUNDLEVERSION_STRING)/' > $(INFOPLIST))
 
+# Transifex merge the translations
 update-po-files:
 	xgettext -o po/subsurface-new.pot -s -k_ -kN_ --keyword=C_:1c,2  --add-comments="++GETTEXT" *.c
-	for i in po/*.po; do \
-		msgmerge --no-wrap -s -U $$i po/subsurface-new.pot ; \
-	done
-
-prepare-po-files:
-	for i in po/*.po; do \
-		msgcat --no-wrap $$i -o $$i ; \
-	done
+	tx push -s
+	tx pull -af
 
 EXTRA_FLAGS =	$(GTKCFLAGS) $(GLIB2CFLAGS) $(XML2CFLAGS) \
 		$(XSLT) $(ZIP) $(LIBDIVECOMPUTERCFLAGS) \
-- 
1.8.1.2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130225/ea5d8db7/attachment-0001.pgp>


More information about the subsurface mailing list