/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/export_pot.py

  • Committer: Jelmer Vernooij
  • Date: 2017-06-10 00:52:08 UTC
  • mfrom: (6675 work)
  • mto: (6670.4.8 move-bzr)
  • mto: This revision was merged to the branch mainline in revision 6681.
  • Revision ID: jelmer@jelmer.uk-20170610005208-dthx80fkolfpsenj
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
import inspect
32
32
import os
33
33
 
 
34
import breezy
34
35
from . import (
35
36
    commands as _mod_commands,
36
37
    errors,
37
38
    help_topics,
38
39
    option,
39
 
    plugin,
40
40
    help,
41
41
    )
42
42
from .trace import (
202
202
def _standard_options(exporter):
203
203
    OPTIONS = option.Option.OPTIONS
204
204
    context = exporter.get_context(option)
205
 
    for name in sorted(OPTIONS.keys()):
 
205
    for name in sorted(OPTIONS):
206
206
        opt = OPTIONS[name]
207
207
        _write_option(exporter, context.from_string(name), opt, "option")
208
208
 
238
238
    This respects the Bazaar cmdtable/table convention and will
239
239
    only extract docstrings from functions mentioned in these tables.
240
240
    """
241
 
    from glob import glob
242
241
 
243
242
    # builtin commands
244
243
    for cmd_name in _mod_commands.builtin_command_names():
251
250
        note(gettext("Exporting messages from builtin command: %s"), cmd_name)
252
251
        _write_command_help(exporter, command)
253
252
 
254
 
    plugin_path = plugin.get_core_plugin_path()
255
 
    core_plugins = glob(plugin_path + '/*/__init__.py')
256
 
    core_plugins = [os.path.basename(os.path.dirname(p))
257
 
                        for p in core_plugins]
 
253
    plugins = breezy.global_state.plugins
 
254
    core_plugins = set(name for name in plugins
 
255
        if plugins[name].path().startswith(breezy.__path__[0]))
258
256
    # plugins
259
257
    for cmd_name in _mod_commands.plugin_command_names():
260
258
        command = _mod_commands.get_cmd_object(cmd_name, False)