~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/export_pot.py

(jameinel) Make kind markers optional for bzr status. (Martin von Gagern)

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    errors,
29
29
    help_topics,
30
30
    plugin,
31
 
    help,
32
31
    )
33
32
from bzrlib.trace import (
34
33
    mutter,
35
34
    note,
36
35
    )
37
 
from bzrlib.i18n import gettext
38
36
 
39
37
 
40
38
def _escape(s):
120
118
        if getattr(opt, 'title', None):
121
119
            lineno = offsets.get(opt.title, 9999)
122
120
            if lineno == 9999:
123
 
                note(gettext("%r is not found in bzrlib/option.py") % opt.title)
 
121
                note("%r is not found in bzrlib/option.py" % opt.title)
124
122
            _poentry(outf, path, lineno, opt.title,
125
123
                     'title of %r option' % name)
126
124
        if getattr(opt, 'help', None):
127
125
            lineno = offsets.get(opt.help, 9999)
128
126
            if lineno == 9999:
129
 
                note(gettext("%r is not found in bzrlib/option.py") % opt.help)
 
127
                note("%r is not found in bzrlib/option.py" % opt.help)
130
128
            _poentry(outf, path, lineno, opt.help,
131
129
                     'help of %r option' % name)
132
130
 
182
180
        command = _mod_commands.get_cmd_object(cmd_name, False)
183
181
        if command.hidden:
184
182
            continue
185
 
        note(gettext("Exporting messages from builtin command: %s"), cmd_name)
 
183
        note("Exporting messages from builtin command: %s", cmd_name)
186
184
        _write_command_help(outf, command)
187
185
 
188
186
    plugin_path = plugin.get_core_plugin_path()
198
196
            # skip non-core plugins
199
197
            # TODO: Support extracting from third party plugins.
200
198
            continue
201
 
        note(gettext("Exporting messages from plugin command: {0} in {1}").format(
202
 
             cmd_name, command.plugin_name() ))
 
199
        note("Exporting messages from plugin command: %s in %s",
 
200
             cmd_name, command.plugin_name())
203
201
        _write_command_help(outf, command)
204
202
 
205
203
 
223
221
            continue
224
222
        fmt = getattr(klass, "_fmt", None)
225
223
        if fmt:
226
 
            note(gettext("Exporting message from error: %s"), name)
 
224
            note("Exporting message from error: %s", name)
227
225
            _poentry(outf, 'bzrlib/errors.py',
228
226
                     offsets.get(fmt, 9999), fmt)
229
227
 
236
234
                    outf,
237
235
                    'dummy/help_topics/'+key+'/detail.txt',
238
236
                    1, doc)
239
 
        elif callable(doc): # help topics from files
240
 
            _poentry_per_paragraph(
241
 
                    outf,
242
 
                    'en/help_topics/'+key+'.txt',
243
 
                    1, doc(key))
 
237
 
244
238
        summary = topic_registry.get_summary(key)
245
239
        if summary is not None:
246
240
            _poentry(outf, 'dummy/help_topics/'+key+'/summary.txt',
252
246
    _standard_options(outf)
253
247
    _command_helps(outf)
254
248
    _error_messages(outf)
255
 
    _help_topics(outf)
 
249
    # disable exporting help topics until we decide  how to translate it.
 
250
    #_help_topics(outf)