Bug 1097090

Summary: Unable to translate verbatim elements that start with a space
Product: [Community] Publican Reporter: Lee Newson <lnewson>
Component: publicanAssignee: Jeff Fearn 🐞 <jfearn>
Status: CLOSED CURRENTRELEASE QA Contact: Bruce Reeler <breeler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.1CC: aigao, ddomingo, jfearn, rlandman
Target Milestone: 4.2   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.2.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1133745 (view as bug list) Environment:
Last Closed: 2014-09-01 03:40:31 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:
Bug Depends On:    
Bug Blocks: 1133745    
Attachments:
Description Flags
A simple case to reproduce the issue none

Description Lee Newson 2014-05-13 06:51:20 UTC
Created attachment 895015 [details]
A simple case to reproduce the issue

If a verbatim element is used in the following format:

    <screen> blah blah</screen>

then the msgid in the pot file is:

    msgid " blah blah"

which is correct, however when you build you get the following warning:

WARNING: Message missing from PO file, consider updating your POT and PO files.
"blah blah"

Additionally any string that is translated for the msgid will not be used in the builds.

Note: The file I've attached only shows <screen> elements, but I can reproduce it using <programlisting> and <literallayout> as well.

Comment 1 Jeff Fearn 🐞 2014-05-21 05:34:52 UTC
Fixed white space being removed for comparison without attributes.

To ssh://git.fedorahosted.org/git/publican.git
   ae38cf1..1e53c5e  devel -> devel

Comment 2 Don Domingo 2014-08-26 00:04:00 UTC
reassigning QA to Bruce Reeler, as he already has translation set up in his test environment.

Comment 3 Bruce Reeler 2014-08-26 02:51:19 UTC
Reviewed. Whitespace issue seems fixed.

=== But a query to Jeff as per Lee Newson:

if one has, for example, the 3 lines as follows in the en-US .xml file:
 <screen> # ln -s /etc/pki/ovirt-engine/certs/engine.cer /var/lib/pgsql/data/server.crt</screen>
 <programlisting> # ln -s /etc/pki/ovirt-engine/certs/engine.cer /var/lib/pgsql/data/server.crt</programlisting>
 <literallayout> # ln -s /etc/pki/ovirt-engine/certs/engine.cer /var/lib/pgsql/data/server.crt</literallayout>


=== should it result in a .pot file with 3 entries, as in:
msgid " # ln -s /etc/pki/ovirt-engine/certs/engine.cer /var/lib/pgsql/data/server.crt"
msgstr ""

msgid " # ln -s /etc/pki/ovirt-engine/certs/engine.cer /var/lib/pgsql/data/server.crt"
msgstr ""

msgid " # ln -s /etc/pki/ovirt-engine/certs/engine.cer /var/lib/pgsql/data/server.crt"
msgstr ""


=== and a similar .po file:
msgid " # ln -s /etc/pki/ovirt-engine/certs/engine.cer /var/lib/pgsql/data/server.crt"
msgstr ""

msgid " # ln -s /etc/pki/ovirt-engine/certs/engine.cer /var/lib/pgsql/data/server.crt"
msgstr ""

msgid " # ln -s /etc/pki/ovirt-engine/certs/engine.cer /var/lib/pgsql/data/server.crt"
msgstr ""

Lee mentioned that as it is the same string, one could expect just one msgid line?

Comment 4 Jeff Fearn 🐞 2014-08-26 03:20:04 UTC
(In reply to Bruce Reeler from comment #3)
> Reviewed. Whitespace issue seems fixed.
> 
> === But a query to Jeff as per Lee Newson:
> 
> if one has, for example, the 3 lines as follows in the en-US .xml file:
>  <screen> # ln -s /etc/pki/ovirt-engine/certs/engine.cer
> /var/lib/pgsql/data/server.crt</screen>
>  <programlisting> # ln -s /etc/pki/ovirt-engine/certs/engine.cer
> /var/lib/pgsql/data/server.crt</programlisting>
>  <literallayout> # ln -s /etc/pki/ovirt-engine/certs/engine.cer
> /var/lib/pgsql/data/server.crt</literallayout>
> 
> 
> === should it result in a .pot file with 3 entries, as in:
> msgid " # ln -s /etc/pki/ovirt-engine/certs/engine.cer
> /var/lib/pgsql/data/server.crt"
> msgstr ""
> 
> msgid " # ln -s /etc/pki/ovirt-engine/certs/engine.cer
> /var/lib/pgsql/data/server.crt"
> msgstr ""
> 
> msgid " # ln -s /etc/pki/ovirt-engine/certs/engine.cer
> /var/lib/pgsql/data/server.crt"
> msgstr ""
> 
> 
> === and a similar .po file:
> msgid " # ln -s /etc/pki/ovirt-engine/certs/engine.cer
> /var/lib/pgsql/data/server.crt"
> msgstr ""
> 
> msgid " # ln -s /etc/pki/ovirt-engine/certs/engine.cer
> /var/lib/pgsql/data/server.crt"
> msgstr ""
> 
> msgid " # ln -s /etc/pki/ovirt-engine/certs/engine.cer
> /var/lib/pgsql/data/server.crt"
> msgstr ""
> 
> Lee mentioned that as it is the same string, one could expect just one msgid
> line?

No, But that is unrelated to this bug, please open a new bug and set this to verified if that is the only issue.

Comment 5 Bruce Reeler 2014-08-26 03:43:45 UTC
New bug, BZ#1133745 , cloned from this one as per JFearn's request in comment 4. 

Setting this one to Verified.

Comment 6 Jeff Fearn 🐞 2014-09-01 03:40:31 UTC
A fix for this shipped in Publican 4.2.0.