[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    Re: Migrating Pology to Python 3
From:       Adrian Chaves <adrian () chaves ! io>
Date:       2022-10-08 10:13:21
Message-ID: c927231c584d172c35232bc3e22b85c9 () chaves ! io
[Download RAW message or body]

I have debugged this issue and I believe the root cause is 
"addFilterHook name="normalize/noinvisible" on="pmsgstr" 
handle="noinvisible"", defined in puretext.filters, which is included in 
ortography.rules. So I think this is another case where Python 3 is 
working as expected, and Python 2 was not.

On 2022-10-07 21:58, Karl Ove Hufthammer wrote:

> Adrian Chaves skreiv 07.10.2022 17:25:
> 
>> I will still be available today and tomorrow all day in case further 
>> changes are needed, so if you have not tested everything you use yet, 
>> please do so as soon as you can.
> 
> I've found a bug in the posieve script for the check-rules command. For 
> Norwegian Nynorsk (language code nn) we have a rule (in 
> pology/lang/nn/rules/ortography.rules) with this trigger:
> 
> [\b …]
> 
> This will catch strings that have a *normal* space before …, e.g., 
> 'Search …'. (The space should instead be a non-breaking space, to avoid 
> the string being broken over two lines between 'Search' and '…'.)
> 
> In Python 2, the rule worked fine. But in Python 3, it's *also* 
> triggered by strings that have a non-breaking space.
> 
> Test case:
> 
> posieve check-rules 
> l10n-support/nn/summit/messages/akonadi-contacts/akonadicontact5.po
> 
> In Python 2, this detects no problems. In Python 3, it detects 7 
> problems.
[Attachment #3 (unknown)]

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" \
/></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'> <p>I \
have debugged this issue and I believe the root cause is &ldquo;addFilterHook \
name="normalize/noinvisible" on="pmsgstr" handle="noinvisible"&rdquo;, defined in \
puretext.filters, which is included in ortography.rules. So I think this is another \
case where Python 3 is working as expected, and Python 2 was not.</p> <p \
id="reply-intro">On 2022-10-07 21:58, Karl Ove Hufthammer wrote:</p> <blockquote \
type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"> <div \
class="pre" style="margin: 0; padding: 0; font-family: monospace"><span \
style="white-space: nowrap;">Adrian&nbsp;Chaves&nbsp;skreiv&nbsp;07.10.2022&nbsp;17:25:</span>
 <blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; \
margin: 0">I will still be available today and tomorrow all day in case further \
changes are needed, so if you have not tested everything you use yet, please do so as \
soon as you can.</blockquote> <br />I&lsquo;ve found a bug in the posieve script for \
the check-rules command. For Norwegian Nynorsk (language code nn) we have a rule (in \
pology/lang/nn/rules/ortography.rules) with this trigger:<br /><br /><span \
style="white-space: nowrap;">[\b&nbsp;&hellip;]</span><br /><br />This will catch \
strings that have a *normal* space before &hellip;, e.g., &lsquo;Search \
&hellip;&rsquo;. (The space should instead be a non-breaking space, to avoid the \
string being broken over two lines between &lsquo;Search&rsquo; and \
&lsquo;&hellip;&rsquo;.)<br /><br />In Python 2, the rule worked fine. But in Python \
3, it&rsquo;s *also* triggered by strings that have a non-breaking space.<br /><br \
/><span style="white-space: nowrap;">Test&nbsp;case:</span><br /><br />posieve \
check-rules l10n-support/nn/summit/messages/akonadi-contacts/akonadicontact5.po<br \
/><br /><span style="white-space: \
nowrap;">In&nbsp;Python&nbsp;2,&nbsp;this&nbsp;detects&nbsp;no&nbsp;problems.&nbsp;In&nbsp;Python&nbsp;3,&nbsp;it&nbsp;detects&nbsp;7&nbsp;problems.</span><br \
/><br /></div> </blockquote>
<p><br /></p>

</body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic