Merge lp:~jr/bzr/i18n-topic-help into lp:bzr

Proposed by Jonathan Riddell
Status: Superseded
Proposed branch: lp:~jr/bzr/i18n-topic-help
Merge into: lp:bzr
Diff against target: 52 lines (+10/-3)
2 files modified
bzrlib/export_pot.py (+7/-3)
bzrlib/help_topics/__init__.py (+3/-0)
To merge this branch: bzr merge lp:~jr/bzr/i18n-topic-help
Reviewer Review Type Date Requested Status
Jelmer Vernooij (community) Needs Fixing
Review via email: mp+73638@code.launchpad.net

This proposal has been superseded by a proposal from 2011-09-01.

Description of the change

Add topic help to translations

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Should this also be guarded against initializing i18n twice?

review: Needs Fixing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/export_pot.py'
2--- bzrlib/export_pot.py 2011-05-28 12:17:22 +0000
3+++ bzrlib/export_pot.py 2011-09-01 09:07:26 +0000
4@@ -28,6 +28,7 @@
5 errors,
6 help_topics,
7 plugin,
8+ help,
9 )
10 from bzrlib.trace import (
11 mutter,
12@@ -234,7 +235,11 @@
13 outf,
14 'dummy/help_topics/'+key+'/detail.txt',
15 1, doc)
16-
17+ elif callable(doc): # help topics from files
18+ _poentry_per_paragraph(
19+ outf,
20+ 'en/help_topics/'+key+'.txt',
21+ 1, doc(key))
22 summary = topic_registry.get_summary(key)
23 if summary is not None:
24 _poentry(outf, 'dummy/help_topics/'+key+'/summary.txt',
25@@ -246,5 +251,4 @@
26 _standard_options(outf)
27 _command_helps(outf)
28 _error_messages(outf)
29- # disable exporting help topics until we decide how to translate it.
30- #_help_topics(outf)
31+ _help_topics(outf)
32
33=== modified file 'bzrlib/help_topics/__init__.py'
34--- bzrlib/help_topics/__init__.py 2011-08-21 09:24:01 +0000
35+++ bzrlib/help_topics/__init__.py 2011-09-01 09:07:26 +0000
36@@ -40,6 +40,7 @@
37 config,
38 osutils,
39 registry,
40+ i18n,
41 )
42
43
44@@ -879,6 +880,8 @@
45 result += _format_see_also(additional_see_also)
46 if plain:
47 result = help_as_plain_text(result)
48+ i18n.install()
49+ result = i18n.gettext_per_paragraph(result)
50 return result
51
52 def get_help_topic(self):