setup: Use xgettext --add-comments=translators
So in the code we can prefix comments with 'translators:' before translated strings to have them show up in .pot file output Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
14f8d2ff7a
commit
35bfdc26a6
1
setup.py
1
setup.py
|
@ -660,6 +660,7 @@ class ExtractMessages(distutils.core.Command):
|
|||
potfile = "po/virt-manager.pot"
|
||||
xgettext_args = [
|
||||
"xgettext",
|
||||
"--add-comments=translators",
|
||||
"--msgid-bugs-address=" + bug_address,
|
||||
"--package-name=virt-manager",
|
||||
"--output=" + potfile,
|
||||
|
|
|
@ -454,8 +454,9 @@ class XMLBuilder(object):
|
|||
# know don't work
|
||||
forbid = [" "]
|
||||
if not val:
|
||||
raise ValueError(
|
||||
_("A name must be specified for the %s") % name_label)
|
||||
# translators: value is a generic object type name
|
||||
raise ValueError(_("A name must be specified for the %s") %
|
||||
name_label)
|
||||
for c in forbid:
|
||||
if c not in val:
|
||||
continue
|
||||
|
|
Loading…
Reference in New Issue