Roundup Tracker - Issues

Message5578

Author rouilj
Recipients antmail, jerrykan, rouilj
Date 2016-06-05.05:28:02
Message-id <1465104483.54.0.199798049152.issue2550871@psf.upfronthosting.co.za>
In-reply-to
Hi Anthony:

Anthony said:
> The patch with no whitespace problems (i hope) attached here.

It looks cleaner than the original. Did you merge the patch from
issue2550887 into it? If so I will close issue2550887.

> Also, the code base of date.py has changed after this patch
> was written so i did  some  merging.  Unfortunately  I don't
> know what to get from Mercurial VCS to help other people to
> apply this patch.

I don't understand what you mean here. Are you saying this patch
will not apply to the current head of the default branch?
John K. any ideas?

I do have a couple of questions about the patch itself that I don't
understand.

On part of the patch has this:

         if allowdate and info['D'] is not None:
-            now = Date('.')
+            now = Date()

why was this change needed?

Also I see:

-            raise HyperdbValueError, _('property %s: %r is not a number')%(
+            raise HyperdbValueError, translator.gettext('property %s:
%r is not a number')%(
                 kw['propname'], value)

in a number of places. What does it do? I thought _('....') is
replaced by the localized version of .... and the items in the tuple
are just substituted into the localized string. IIUC that is exactly
the same thing that

   translator.gettext('...')%(tuple)

will do. Translator.gettext won't translate any values in the tuple.
So what does this change accomplish?

Also will I need another patch for the Integer patch I just
committed (reversing what I took out in issue2550886).
The patch will add the translator:

-    def from_raw(self, value, **kw):
+    def from_raw(self, value, translator=translation, **kw):

to the Integer::from_raw function and insert translator.gettext to
replace _ .

-- rouilj
History
Date User Action Args
2016-06-05 05:28:03rouiljsetmessageid: <1465104483.54.0.199798049152.issue2550871@psf.upfronthosting.co.za>
2016-06-05 05:28:03rouiljsetrecipients: + rouilj, jerrykan, antmail
2016-06-05 05:28:03rouiljlinkissue2550871 messages
2016-06-05 05:28:02rouiljcreate