Merge lp:~jelmer/bzr-builddeb/translations into lp:bzr-builddeb

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Vincent Ladeuil
Approved revision: 644
Merged at revision: 657
Proposed branch: lp:~jelmer/bzr-builddeb/translations
Merge into: lp:bzr-builddeb
Diff against target: 41 lines (+26/-0)
2 files modified
Makefile (+18/-0)
__init__.py (+8/-0)
To merge this branch: bzr merge lp:~jelmer/bzr-builddeb/translations
Reviewer Review Type Date Requested Status
Vincent Ladeuil Approve
Review via email: mp+82043@code.launchpad.net

Description of the change

Add support for translations based on Riddell's work in bzr 2.5.

To post a comment you must log in.
Revision history for this message
Vincent Ladeuil (vila) wrote :

Sounds fine, is there more stuff that needs to be setup on launchpad itself ?

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'Makefile'
--- Makefile 1970-01-01 00:00:00 +0000
+++ Makefile 2011-11-12 05:07:24 +0000
@@ -0,0 +1,18 @@
1all: update-pot
2
3.PHONY: update-pot po/bzr-builddeb.pot
4update-pot: po/bzr-builddeb.pot
5
6TRANSLATABLE_PYFILES:=$(shell find . -name '*.py' \
7 | grep -v 'tests/' \
8 )
9
10po/bzr-builddeb.pot: $(PYFILES) $(DOCFILES)
11 BZR_PLUGINS_AT=builddeb@$(shell pwd) bzr export-pot \
12 --plugin=builddeb > po/bzr-builddeb.pot
13 echo $(TRANSLATABLE_PYFILES) | xargs \
14 xgettext --package-name "bzr-builddeb" \
15 --msgid-bugs-address "<bazaar@lists.canonical.com>" \
16 --copyright-holder "Canonical Ltd. <bazaar@lists.canonical.com>" \
17 --from-code ISO-8859-1 --sort-by-file --join --add-comments=i18n: \
18 -d bzr-builddeb -p po -o bzr-builddeb.pot
019
=== modified file '__init__.py'
--- __init__.py 2011-10-11 21:22:24 +0000
+++ __init__.py 2011-11-12 05:07:24 +0000
@@ -34,6 +34,14 @@
34 )34 )
3535
3636
37try:
38 from bzrlib.i18n import load_plugin_translations
39except ImportError: # No translations for bzr < 2.5
40 gettext = lambda x: x
41else:
42 translation = load_plugin_translations("bzr-builddeb")
43 gettext = translation.ugettext
44
37commands = {45commands = {
38 "builddeb_do": ["bd-do"],46 "builddeb_do": ["bd-do"],
39 "builddeb": ["bd"],47 "builddeb": ["bd"],

Subscribers

People subscribed via source and target branches