Blame 0002-Mark-the-help-command-line-descriptions-for-translat.patch

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