)]}'
{"oslo_i18n/_message.py":[{"author":{"_account_id":6601,"name":"James Carey","email":"jecarey@yerac.com","username":"jecarey"},"change_message_id":"ac48aae254ce0788f120bd2d00c367040cf8a908","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            LOG.debug("},{"line_number":160,"context_line":"                (u\u0027Failed to insert replacement values into translated \u0027"},{"line_number":161,"context_line":"                 u\u0027message %s (Original: %r): %s\u0027),"},{"line_number":162,"context_line":"                translated_message.__str__(), self.msgid, err,"},{"line_number":163,"context_line":"            )"},{"line_number":164,"context_line":"            translated_message \u003d self.msgid % translated_params"},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_bebdd3b8","line":162,"updated":"2015-08-19 21:11:12.000000000","message":"I don\u0027t think adding __str__() is the right fix to this, since if the translated message contains unicode, it could get an error.   Instead I think that down on L146 we shouldn\u0027t be passing the super class, but instead using six.text_type ... see below.","commit_id":"e594750c4e988e292f4e6f4f1de43a7de2f5da2a"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"328216bf6f1cdb43683483d78d1244bb0c896a70","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            LOG.debug("},{"line_number":160,"context_line":"                (u\u0027Failed to insert replacement values into translated \u0027"},{"line_number":161,"context_line":"                 u\u0027message %s (Original: %r): %s\u0027),"},{"line_number":162,"context_line":"                translated_message.__str__(), self.msgid, err,"},{"line_number":163,"context_line":"            )"},{"line_number":164,"context_line":"            translated_message \u003d self.msgid % translated_params"},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_9e106baa","line":162,"in_reply_to":"fa1b9901_bebdd3b8","updated":"2015-08-24 08:10:10.000000000","message":"Thanks for the suggestion, it looks a lot nicer now. :)","commit_id":"e594750c4e988e292f4e6f4f1de43a7de2f5da2a"},{"author":{"_account_id":6601,"name":"James Carey","email":"jecarey@yerac.com","username":"jecarey"},"change_message_id":"ac48aae254ce0788f120bd2d00c367040cf8a908","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                (u\u0027Failed to insert replacement values into translated \u0027"},{"line_number":161,"context_line":"                 u\u0027message %s (Original: %r): %s\u0027),"},{"line_number":162,"context_line":"                translated_message.__str__(), self.msgid, err,"},{"line_number":163,"context_line":"            )"},{"line_number":164,"context_line":"            translated_message \u003d self.msgid % translated_params"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        return translated_message"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_21b2024d","line":163,"updated":"2015-08-19 21:11:12.000000000","message":"why \u0027,)\u0027 versus just \u0027)\u0027?","commit_id":"e594750c4e988e292f4e6f4f1de43a7de2f5da2a"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"328216bf6f1cdb43683483d78d1244bb0c896a70","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                (u\u0027Failed to insert replacement values into translated \u0027"},{"line_number":161,"context_line":"                 u\u0027message %s (Original: %r): %s\u0027),"},{"line_number":162,"context_line":"                translated_message.__str__(), self.msgid, err,"},{"line_number":163,"context_line":"            )"},{"line_number":164,"context_line":"            translated_message \u003d self.msgid % translated_params"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        return translated_message"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_5e3c132f","line":163,"in_reply_to":"fa1b9901_21b2024d","updated":"2015-08-24 08:10:10.000000000","message":"Done","commit_id":"e594750c4e988e292f4e6f4f1de43a7de2f5da2a"},{"author":{"_account_id":6601,"name":"James Carey","email":"jecarey@yerac.com","username":"jecarey"},"change_message_id":"ac48aae254ce0788f120bd2d00c367040cf8a908","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        # by the parent class (i.e. unicode()), the only thing  we do here is"},{"line_number":171,"context_line":"        # save the original msgid and the parameters in case of a translation"},{"line_number":172,"context_line":"        params \u003d self._sanitize_mod_params(other)"},{"line_number":173,"context_line":"        unicode_mod \u003d self._safe_translate(super(Message, self), params)"},{"line_number":174,"context_line":"        modded \u003d Message(self.msgid,"},{"line_number":175,"context_line":"                         msgtext\u003dunicode_mod,"},{"line_number":176,"context_line":"                         params\u003dparams,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_81cd0eb9","line":173,"updated":"2015-08-19 21:11:12.000000000","message":"I think this should be replaced with:\n\n    unicode_mod \u003d self._safe_translate(six.text_type(self), params)","commit_id":"e594750c4e988e292f4e6f4f1de43a7de2f5da2a"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"328216bf6f1cdb43683483d78d1244bb0c896a70","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        # by the parent class (i.e. unicode()), the only thing  we do here is"},{"line_number":171,"context_line":"        # save the original msgid and the parameters in case of a translation"},{"line_number":172,"context_line":"        params \u003d self._sanitize_mod_params(other)"},{"line_number":173,"context_line":"        unicode_mod \u003d self._safe_translate(super(Message, self), params)"},{"line_number":174,"context_line":"        modded \u003d Message(self.msgid,"},{"line_number":175,"context_line":"                         msgtext\u003dunicode_mod,"},{"line_number":176,"context_line":"                         params\u003dparams,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_fe4887ce","line":173,"in_reply_to":"fa1b9901_81cd0eb9","updated":"2015-08-24 08:10:10.000000000","message":"Done","commit_id":"e594750c4e988e292f4e6f4f1de43a7de2f5da2a"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"5f56fcd3a6aeafc54ca928de68ee3da5b1d5867b","unresolved":false,"context_lines":[{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        return translated_message"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def _safe_translate(self, translated_message, translated_params):"},{"line_number":144,"context_line":"        try:"},{"line_number":145,"context_line":"            translated_message \u003d translated_message % translated_params"},{"line_number":146,"context_line":"        except (KeyError, TypeError) as err:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_84847cb1","line":143,"updated":"2015-08-24 18:36:58.000000000","message":"I\u0027d like a docstring here - documentation for us maintainers.","commit_id":"8d49c279cf28c49666bc7efb0f5ce55eae552841"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"10f88a6dc5720e80eade097685ee3392b64d27dc","unresolved":false,"context_lines":[{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        return translated_message"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def _safe_translate(self, translated_message, translated_params):"},{"line_number":144,"context_line":"        try:"},{"line_number":145,"context_line":"            translated_message \u003d translated_message % translated_params"},{"line_number":146,"context_line":"        except (KeyError, TypeError) as err:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_311d7f62","line":143,"in_reply_to":"fa1b9901_84847cb1","updated":"2015-08-25 16:27:56.000000000","message":"Done","commit_id":"8d49c279cf28c49666bc7efb0f5ce55eae552841"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"5f56fcd3a6aeafc54ca928de68ee3da5b1d5867b","unresolved":false,"context_lines":[{"line_number":155,"context_line":"            LOG.debug("},{"line_number":156,"context_line":"                (u\u0027Failed to insert replacement values into translated \u0027"},{"line_number":157,"context_line":"                 u\u0027message %s (Original: %r): %s\u0027),"},{"line_number":158,"context_line":"                translated_message, self.msgid, err)"},{"line_number":159,"context_line":"            translated_message \u003d self.msgid % translated_params"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        return translated_message"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_e4177852","line":158,"updated":"2015-08-24 18:36:58.000000000","message":"I\u0027m worried that this is going to silently make OpenStack look untranslated  when these errors happen. Should we perhaps issue a warning as well (which will output just once in a process lifetime, and explicltly hide that on CLI apps?)","commit_id":"8d49c279cf28c49666bc7efb0f5ce55eae552841"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"10f88a6dc5720e80eade097685ee3392b64d27dc","unresolved":false,"context_lines":[{"line_number":155,"context_line":"            LOG.debug("},{"line_number":156,"context_line":"                (u\u0027Failed to insert replacement values into translated \u0027"},{"line_number":157,"context_line":"                 u\u0027message %s (Original: %r): %s\u0027),"},{"line_number":158,"context_line":"                translated_message, self.msgid, err)"},{"line_number":159,"context_line":"            translated_message \u003d self.msgid % translated_params"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        return translated_message"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_27fbfd7c","line":158,"in_reply_to":"fa1b9901_e4177852","updated":"2015-08-25 16:27:56.000000000","message":"Done","commit_id":"8d49c279cf28c49666bc7efb0f5ce55eae552841"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"5f56fcd3a6aeafc54ca928de68ee3da5b1d5867b","unresolved":false,"context_lines":[{"line_number":156,"context_line":"                (u\u0027Failed to insert replacement values into translated \u0027"},{"line_number":157,"context_line":"                 u\u0027message %s (Original: %r): %s\u0027),"},{"line_number":158,"context_line":"                translated_message, self.msgid, err)"},{"line_number":159,"context_line":"            translated_message \u003d self.msgid % translated_params"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        return translated_message"},{"line_number":162,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_9f34c94a","line":159,"updated":"2015-08-24 18:36:58.000000000","message":"AIUI the underlying theme of this patch is \u0027don\u0027t halt the app when a translation call fails\u0027. And it can fail for three different causes: the parameters might refuse to %d or %s etc. The translated message string might have too many or too few or wrong-type % strings in it. The msg id might have too many or too few or wrong-type % strings in it.\n\nWe can argue that tests should catch msg id \u003c-\u003e params mismatches, but equally, the translation editing framework should catch translated messages with different parameter types or numbers vs the msg id, so that case shouldn\u0027t happen either.\n\nThe bug report doesn\u0027t indicate that this is happening in the field, but I support the goal of being robust...\n\nYet won\u0027t this fail in exactly the same way if the error is in translated_params, not in the translated_message ? A robust answer would be:\n\n try:\n  translated message % params\n except Keyerror, TypeError:\n  log\n  try:\n   msgid % params\n  except KeyError, TypeError:\n    log\n    msgid + six.text_type(\u0027\u0027).join(text_type(param) for param in params)\n\nWhere, if we can\u0027t format using the translation string at all, we just bang the string plus str\u0027d versions of everything together (and if they won\u0027t str at all, we let that propogate.","commit_id":"8d49c279cf28c49666bc7efb0f5ce55eae552841"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"10f88a6dc5720e80eade097685ee3392b64d27dc","unresolved":false,"context_lines":[{"line_number":156,"context_line":"                (u\u0027Failed to insert replacement values into translated \u0027"},{"line_number":157,"context_line":"                 u\u0027message %s (Original: %r): %s\u0027),"},{"line_number":158,"context_line":"                translated_message, self.msgid, err)"},{"line_number":159,"context_line":"            translated_message \u003d self.msgid % translated_params"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        return translated_message"},{"line_number":162,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_045d9a46","line":159,"in_reply_to":"fa1b9901_9f34c94a","updated":"2015-08-25 16:27:56.000000000","message":"I understand your concern but if I add the proposed fallback that would mean that unit test no longer fail if somebody does a mistake in the msgid. We are not asserting log messages directly in nova (or we do it very seldom) so I think we would make the situation worse.","commit_id":"8d49c279cf28c49666bc7efb0f5ce55eae552841"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"5f56fcd3a6aeafc54ca928de68ee3da5b1d5867b","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        # by the parent class (i.e. unicode()), the only thing  we do here is"},{"line_number":166,"context_line":"        # save the original msgid and the parameters in case of a translation"},{"line_number":167,"context_line":"        params \u003d self._sanitize_mod_params(other)"},{"line_number":168,"context_line":"        unicode_mod \u003d self._safe_translate(six.text_type(self), params)"},{"line_number":169,"context_line":"        modded \u003d Message(self.msgid,"},{"line_number":170,"context_line":"                         msgtext\u003dunicode_mod,"},{"line_number":171,"context_line":"                         params\u003dparams,"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_44f74459","line":168,"updated":"2015-08-24 18:36:58.000000000","message":"The comment is now inconsistent with the code. I don\u0027t know enough to say which is right, but if the intent has changed, please change the comment. If the intent hasn\u0027t changed, then this new code is buggy.","commit_id":"8d49c279cf28c49666bc7efb0f5ce55eae552841"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"10f88a6dc5720e80eade097685ee3392b64d27dc","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        # by the parent class (i.e. unicode()), the only thing  we do here is"},{"line_number":166,"context_line":"        # save the original msgid and the parameters in case of a translation"},{"line_number":167,"context_line":"        params \u003d self._sanitize_mod_params(other)"},{"line_number":168,"context_line":"        unicode_mod \u003d self._safe_translate(six.text_type(self), params)"},{"line_number":169,"context_line":"        modded \u003d Message(self.msgid,"},{"line_number":170,"context_line":"                         msgtext\u003dunicode_mod,"},{"line_number":171,"context_line":"                         params\u003dparams,"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_7f6423b8","line":168,"in_reply_to":"fa1b9901_44f74459","updated":"2015-08-25 16:27:56.000000000","message":"I will change the comment. I don\u0027t see such semantic change that will break the system as it is still the unicode() class and do the translation as in the original case.","commit_id":"8d49c279cf28c49666bc7efb0f5ce55eae552841"}],"oslo_i18n/tests/test_message.py":[{"author":{"_account_id":6601,"name":"James Carey","email":"jecarey@yerac.com","username":"jecarey"},"change_message_id":"d9b71b471b96f742c88f0122980eadca09e4c17f","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        msgid \u003d \"Test that we handle missing args %(arg1)s %(arg2)s\""},{"line_number":188,"context_line":"        params \u003d {\u0027arg1\u0027: \u0027test1\u0027}"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        try:"},{"line_number":191,"context_line":"            _message.Message(msgid) % params"},{"line_number":192,"context_line":"        except KeyError as e:"},{"line_number":193,"context_line":"            self.assertIn(\u0027arg2\u0027, six.text_type(e))"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_904ba12b","line":190,"updated":"2015-08-17 15:48:02.000000000","message":"Why not do something like:\n\n     e \u003d self.assertRaises(KeyError, lambda: _message.Message(msgid) % params)\n     self.assertIn(\u0027arg2\u0027, six.text_type(e), \u0027Missing key \\\u0027arg2\\\u0027 was not flagged\u0027)","commit_id":"2d5483d9187ab037270a37fcadf39f2a20494bba"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1294fb882159e413ce00b08db334a88e10f2bc42","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        msgid \u003d \"Test that we handle missing args %(arg1)s %(arg2)s\""},{"line_number":188,"context_line":"        params \u003d {\u0027arg1\u0027: \u0027test1\u0027}"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        try:"},{"line_number":191,"context_line":"            _message.Message(msgid) % params"},{"line_number":192,"context_line":"        except KeyError as e:"},{"line_number":193,"context_line":"            self.assertIn(\u0027arg2\u0027, six.text_type(e))"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_78200f9c","line":190,"in_reply_to":"fa1b9901_904ba12b","updated":"2015-08-18 10:11:31.000000000","message":"Done","commit_id":"2d5483d9187ab037270a37fcadf39f2a20494bba"},{"author":{"_account_id":6601,"name":"James Carey","email":"jecarey@yerac.com","username":"jecarey"},"change_message_id":"d9b71b471b96f742c88f0122980eadca09e4c17f","unresolved":false,"context_lines":[{"line_number":390,"context_line":"        mock_translation.side_effect \u003d translator"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"        msg \u003d _message.Message(message_with_params)"},{"line_number":393,"context_line":"        msg \u003d msg % param"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"        default_translation \u003d message_with_params % param"},{"line_number":396,"context_line":"        self.assertEqual(default_translation, msg.translate(\u0027es\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_28ba69e2","line":393,"updated":"2015-08-17 15:48:02.000000000","message":"Check that debug message is not produced","commit_id":"2d5483d9187ab037270a37fcadf39f2a20494bba"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1294fb882159e413ce00b08db334a88e10f2bc42","unresolved":false,"context_lines":[{"line_number":390,"context_line":"        mock_translation.side_effect \u003d translator"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"        msg \u003d _message.Message(message_with_params)"},{"line_number":393,"context_line":"        msg \u003d msg % param"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"        default_translation \u003d message_with_params % param"},{"line_number":396,"context_line":"        self.assertEqual(default_translation, msg.translate(\u0027es\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_93b5c4ce","line":393,"in_reply_to":"fa1b9901_28ba69e2","updated":"2015-08-18 10:11:31.000000000","message":"Done","commit_id":"2d5483d9187ab037270a37fcadf39f2a20494bba"},{"author":{"_account_id":6601,"name":"James Carey","email":"jecarey@yerac.com","username":"jecarey"},"change_message_id":"d9b71b471b96f742c88f0122980eadca09e4c17f","unresolved":false,"context_lines":[{"line_number":393,"context_line":"        msg \u003d msg % param"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"        default_translation \u003d message_with_params % param"},{"line_number":396,"context_line":"        self.assertEqual(default_translation, msg.translate(\u0027es\u0027))"},{"line_number":397,"context_line":""},{"line_number":398,"context_line":"    @mock.patch(\u0027gettext.translation\u0027)"},{"line_number":399,"context_line":"    @mock.patch(\u0027locale.getdefaultlocale\u0027, return_value\u003d(\u0027es\u0027, \u0027\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_e65b432d","line":396,"updated":"2015-08-17 15:48:02.000000000","message":"Add check that debug message is produced","commit_id":"2d5483d9187ab037270a37fcadf39f2a20494bba"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1294fb882159e413ce00b08db334a88e10f2bc42","unresolved":false,"context_lines":[{"line_number":393,"context_line":"        msg \u003d msg % param"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"        default_translation \u003d message_with_params % param"},{"line_number":396,"context_line":"        self.assertEqual(default_translation, msg.translate(\u0027es\u0027))"},{"line_number":397,"context_line":""},{"line_number":398,"context_line":"    @mock.patch(\u0027gettext.translation\u0027)"},{"line_number":399,"context_line":"    @mock.patch(\u0027locale.getdefaultlocale\u0027, return_value\u003d(\u0027es\u0027, \u0027\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_33cb9855","line":396,"in_reply_to":"fa1b9901_e65b432d","updated":"2015-08-18 10:11:31.000000000","message":"Done","commit_id":"2d5483d9187ab037270a37fcadf39f2a20494bba"},{"author":{"_account_id":6601,"name":"James Carey","email":"jecarey@yerac.com","username":"jecarey"},"change_message_id":"d9b71b471b96f742c88f0122980eadca09e4c17f","unresolved":false,"context_lines":[{"line_number":408,"context_line":"        mock_translation.side_effect \u003d translator"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"        msg \u003d _message.Message(message_with_params)"},{"line_number":411,"context_line":"        msg \u003d msg % param"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"        default_translation \u003d message_with_params % param"},{"line_number":414,"context_line":"        self.assertEqual(default_translation, msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_26793b94","line":411,"updated":"2015-08-17 15:48:02.000000000","message":"Check that debug message is produced","commit_id":"2d5483d9187ab037270a37fcadf39f2a20494bba"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1294fb882159e413ce00b08db334a88e10f2bc42","unresolved":false,"context_lines":[{"line_number":408,"context_line":"        mock_translation.side_effect \u003d translator"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"        msg \u003d _message.Message(message_with_params)"},{"line_number":411,"context_line":"        msg \u003d msg % param"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"        default_translation \u003d message_with_params % param"},{"line_number":414,"context_line":"        self.assertEqual(default_translation, msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_39f93981","line":411,"in_reply_to":"fa1b9901_26793b94","updated":"2015-08-18 10:11:31.000000000","message":"Done","commit_id":"2d5483d9187ab037270a37fcadf39f2a20494bba"},{"author":{"_account_id":6601,"name":"James Carey","email":"jecarey@yerac.com","username":"jecarey"},"change_message_id":"d9b71b471b96f742c88f0122980eadca09e4c17f","unresolved":false,"context_lines":[{"line_number":411,"context_line":"        msg \u003d msg % param"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"        default_translation \u003d message_with_params % param"},{"line_number":414,"context_line":"        self.assertEqual(default_translation, msg)"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    @mock.patch(\u0027gettext.translation\u0027)"},{"line_number":417,"context_line":"    def test_translate_message_with_object_param(self, mock_translation):"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_68c86175","line":414,"updated":"2015-08-17 15:48:02.000000000","message":"Check that debug message is not produced","commit_id":"2d5483d9187ab037270a37fcadf39f2a20494bba"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1294fb882159e413ce00b08db334a88e10f2bc42","unresolved":false,"context_lines":[{"line_number":411,"context_line":"        msg \u003d msg % param"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"        default_translation \u003d message_with_params % param"},{"line_number":414,"context_line":"        self.assertEqual(default_translation, msg)"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    @mock.patch(\u0027gettext.translation\u0027)"},{"line_number":417,"context_line":"    def test_translate_message_with_object_param(self, mock_translation):"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_59f66d90","line":414,"in_reply_to":"fa1b9901_68c86175","updated":"2015-08-18 10:11:31.000000000","message":"Done","commit_id":"2d5483d9187ab037270a37fcadf39f2a20494bba"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"5f56fcd3a6aeafc54ca928de68ee3da5b1d5867b","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        msgid \u003d \"Test that we handle unused args %(arg1)d\""},{"line_number":182,"context_line":"        params \u003d {\u0027arg1\u0027: \u0027test1\u0027}"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        self.assertRaises(TypeError, lambda: _message.Message(msgid) % params)"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    def test_mod_with_missing_arg(self):"},{"line_number":187,"context_line":"        msgid \u003d \"Test that we handle missing args %(arg1)s %(arg2)s\""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_dfd24134","line":184,"updated":"2015-08-24 18:36:58.000000000","message":"You can write this more simply if you want to. Either as:\n\n self.assertRaises(TypeError, _message.Message(msgid).translate, params)\n\nor\n\n with ExpectedException(TypeError):\n     _message.Message(msgid) % params","commit_id":"8d49c279cf28c49666bc7efb0f5ce55eae552841"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"10f88a6dc5720e80eade097685ee3392b64d27dc","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        msgid \u003d \"Test that we handle unused args %(arg1)d\""},{"line_number":182,"context_line":"        params \u003d {\u0027arg1\u0027: \u0027test1\u0027}"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        self.assertRaises(TypeError, lambda: _message.Message(msgid) % params)"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    def test_mod_with_missing_arg(self):"},{"line_number":187,"context_line":"        msgid \u003d \"Test that we handle missing args %(arg1)s %(arg2)s\""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_e7de656c","line":184,"in_reply_to":"fa1b9901_dfd24134","updated":"2015-08-25 16:27:56.000000000","message":"Done","commit_id":"8d49c279cf28c49666bc7efb0f5ce55eae552841"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"5f56fcd3a6aeafc54ca928de68ee3da5b1d5867b","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        e \u003d self.assertRaises(KeyError,"},{"line_number":191,"context_line":"                              lambda: _message.Message(msgid) % params)"},{"line_number":192,"context_line":"        self.assertIn(\u0027arg2\u0027, six.text_type(e),"},{"line_number":193,"context_line":"                      \u0027Missing key \\\u0027arg2\\\u0027 was not flagged\u0027)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    def test_mod_with_integer_parameters(self):"},{"line_number":196,"context_line":"        msgid \u003d \"Some string with params: %d\""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_bf842d0b","line":193,"updated":"2015-08-24 18:36:58.000000000","message":"and here\n\n with ExpectedException(KeyError, \u0027arg2\u0027):\n     _message.Message(msgid) % params\n\nThough that won\u0027t give you the overridden error.","commit_id":"8d49c279cf28c49666bc7efb0f5ce55eae552841"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"10f88a6dc5720e80eade097685ee3392b64d27dc","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        e \u003d self.assertRaises(KeyError,"},{"line_number":191,"context_line":"                              lambda: _message.Message(msgid) % params)"},{"line_number":192,"context_line":"        self.assertIn(\u0027arg2\u0027, six.text_type(e),"},{"line_number":193,"context_line":"                      \u0027Missing key \\\u0027arg2\\\u0027 was not flagged\u0027)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    def test_mod_with_integer_parameters(self):"},{"line_number":196,"context_line":"        msgid \u003d \"Some string with params: %d\""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_87d9a959","line":193,"in_reply_to":"fa1b9901_bf842d0b","updated":"2015-08-25 16:27:56.000000000","message":"Done","commit_id":"8d49c279cf28c49666bc7efb0f5ce55eae552841"}]}
