Blob Blame History Raw
From b312bf2e55aa1fe640695f4106e1e909aca1ee77 Mon Sep 17 00:00:00 2001
From: Rafal Luzynski <digitalfreak@lingonborough.com>
Date: Mon, 21 Aug 2017 12:28:04 +0200
Subject: [PATCH] Mark the `--help' command line descriptions for translation

Due to some bugs xgettext thinks this file is written in C and
ignores the Python syntax. We need some tricks to make it process
the messages correctly.
---
 src/gnome-abrt | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/gnome-abrt b/src/gnome-abrt
index b1044d3..a99aecf 100755
--- a/src/gnome-abrt
+++ b/src/gnome-abrt
@@ -397,8 +397,23 @@ if __name__ == "__main__":
 
     CMDARGS = ArgumentParser(
             description=_('View and report application crashes'))
+    # pylint: disable=W0105
+    '''
+    Again a trick to make xgettext think we are C language and emit the
+    translators comment correctly.
+    See: bugs.launchpad.net/intltool/+bug/377872
+    // Translators: This is a description of --verbose command line option
+    // displayed when a user runs: `gnome-abrt --help'
+    _("Be verbose")
+    '''
     CMDARGS.add_argument('-v', '--verbose', action='count',
             help=_('Be verbose'))
+    # pylint: disable=W0105
+    '''
+    // Translators: This is a description of --problem command line option
+    // displayed when a user runs: `gnome-abrt --help'
+    _("Selected problem ID")
+    '''
     CMDARGS.add_argument('-p', '--problem',
             help=_('Selected problem ID'))
 
-- 
2.13.6