b7f8439
From b312bf2e55aa1fe640695f4106e1e909aca1ee77 Mon Sep 17 00:00:00 2001
b7f8439
From: Rafal Luzynski <digitalfreak@lingonborough.com>
b7f8439
Date: Mon, 21 Aug 2017 12:28:04 +0200
b7f8439
Subject: [PATCH] Mark the `--help' command line descriptions for translation
b7f8439
b7f8439
Due to some bugs xgettext thinks this file is written in C and
b7f8439
ignores the Python syntax. We need some tricks to make it process
b7f8439
the messages correctly.
b7f8439
---
b7f8439
 src/gnome-abrt | 15 +++++++++++++++
b7f8439
 1 file changed, 15 insertions(+)
b7f8439
b7f8439
diff --git a/src/gnome-abrt b/src/gnome-abrt
b7f8439
index b1044d3..a99aecf 100755
b7f8439
--- a/src/gnome-abrt
b7f8439
+++ b/src/gnome-abrt
b7f8439
@@ -397,8 +397,23 @@ if __name__ == "__main__":
b7f8439
 
b7f8439
     CMDARGS = ArgumentParser(
b7f8439
             description=_('View and report application crashes'))
b7f8439
+    # pylint: disable=W0105
b7f8439
+    '''
b7f8439
+    Again a trick to make xgettext think we are C language and emit the
b7f8439
+    translators comment correctly.
b7f8439
+    See: bugs.launchpad.net/intltool/+bug/377872
b7f8439
+    // Translators: This is a description of --verbose command line option
b7f8439
+    // displayed when a user runs: `gnome-abrt --help'
b7f8439
+    _("Be verbose")
b7f8439
+    '''
b7f8439
     CMDARGS.add_argument('-v', '--verbose', action='count',
b7f8439
             help=_('Be verbose'))
b7f8439
+    # pylint: disable=W0105
b7f8439
+    '''
b7f8439
+    // Translators: This is a description of --problem command line option
b7f8439
+    // displayed when a user runs: `gnome-abrt --help'
b7f8439
+    _("Selected problem ID")
b7f8439
+    '''
b7f8439
     CMDARGS.add_argument('-p', '--problem',
b7f8439
             help=_('Selected problem ID'))
b7f8439
 
b7f8439
-- 
b7f8439
2.13.6
b7f8439