Bug 1233202

Summary: Non-breaking spaces are lost in translatable strings
Product: [Community] Publican Reporter: Raphaël Hertzog <raphael>
Component: publicanAssignee: Lee Newson <lnewson>
Status: CLOSED CURRENTRELEASE QA Contact: Ruediger Landmann <rlandman>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.2CC: aigao, cbredesen, lnewson, rlandman
Target Milestone: 4.3   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.3.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-28 06:54:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to preserve non breaking spaces none

Description Raphaël Hertzog 2015-06-18 12:24:00 UTC
This is the return of https://bugzilla.redhat.com/show_bug.cgi?id=582649
Please fix it again and add a non-regression test case so that I won't have to report it again in 5 years. :-)

The problem is that my original document contains an UTF-8 non-breaking space between some words and they are replaced by normal spaces in the strings appearing as "msgid" in the POT files.

And my old translations are no longer used since Publican is now again looking for a string with a normal space instead of non-breaking space.

The problem has probably been reintroduced with c59173f096fcdf8b3e2646244bbf10936e900f14 while fixing #1143792 in 4.2.3.

Comment 1 Raphaël Hertzog 2015-06-25 20:37:38 UTC
Created attachment 1043276 [details]
Patch to preserve non breaking spaces

Please find a patch that fixes this issue. Just like you did last time, I used [ \t] instead of \s.

I did not add any non-regression test though.

Comment 2 Lee Newson 2015-07-16 09:50:16 UTC
Hi Raphaël,

I've applied your patch thanks and also added a basic regression test that should catch this issue in the future.

To ssh://git.fedorahosted.org/git/publican.git
   7471e8c..27e957e  devel -> devel