RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 592823 - <indexterm> should not break a paragraph for translation
Summary: <indexterm> should not break a paragraph for translation
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: publican
Version: 6.0
Hardware: All
OS: Linux
low
high
Target Milestone: rc
: ---
Assignee: Jeff Fearn 🐞
QA Contact: ecs-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-17 05:34 UTC by Chester Cheng
Modified: 2016-06-23 04:45 UTC (History)
5 users (show)

Fixed In Version: publican-2.1-0.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-10 21:22:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Proposed patch (1.19 KB, patch)
2010-05-21 09:12 UTC, Raphaël Hertzog
no flags Details | Diff

Description Chester Cheng 2010-05-17 05:34:05 UTC
Description of problem:
publican interprets <indexterm> tags in a wrong way thus splits up a paragraph into 2 or more paragraphs in .po files.

Version-Release number of selected component (if applicable):
publican-1.6.3-0.el5

How reproducible:


Steps to Reproduce:
1.  publican update_pot
2.  publican update_po --lang=<lang>
3.  Check the .po files
  
Actual results:
(From Installation Guide 6.0 FINAL, techref.xml and techref.po.)

#1: To learn more about
#2: <primary>Anaconda</primary>
#3: <application>anaconda</application>, the Red Hat Enterprise Linux installation program, visit the project Web page: <ulink url="http://www.fedoraproject.org/wiki/Anaconda"/>.

Expected results:
(in one string)
    To learn more about
    <indexterm>
      <primary>Anaconda</primary>
    </indexterm>
    <application>anaconda</application>, the Red Hat Enterprise Linux installation program, visit the project Web page:
    <ulink url="http://www.fedoraproject.org/wiki/Anaconda"/>.

Additional info:
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=581773

Comment 1 Raphaël Hertzog 2010-05-17 05:57:34 UTC
I requested that <indexterm> be translatable even outside of translatables tags (see https://bugzilla.redhat.com/show_bug.cgi?id=582255). While implementing my request this change was apparently introduced.

But I agree with you, it should not split a paragraph or any other translatable tag that contains an <indexterm>.

Comment 2 Manuel Ospina 2010-05-19 22:59:44 UTC
As this bug affect the readability and clarity of the strings to be translated, leaving half phrases out of context, I have increase the severity of this bug.

Comment 3 Raphaël Hertzog 2010-05-21 09:12:52 UTC
Created attachment 415618 [details]
Proposed patch

The attached patch adds indexterm to IGNOREBLOCKS so that it doesn't split translatable tags like it does currently.

Comment 4 Raphaël Hertzog 2010-05-21 09:20:29 UTC
Hum somehow this doesn't work as expected. <indexterm> is no longer caught outside of translatable tags with this patch despite the fact that it's still listed in $TRANSTAGS.

Comment 5 Raphaël Hertzog 2010-05-21 13:43:16 UTC
Trying to fix this, I discovered that's because $node->look_up() (from XML::Element) would happily return the element itself. So the following change is also needed:
@@ -335,7 +335,7 @@ sub get_msgs {
             qr/$TRANSTAGS/,
             sub {
                 not defined(
-                    $_[0]->look_up(
+                    $_[0]->parent()->look_up(
                         '_tag',
                         qr/$IGNOREBLOCKS/,
                         sub {

With this, <indexterm> doesn't split the <para> anymore but it still doesn't appear in the translation string of the para, it has its own string. This might be ok but I have not been able to find the proper way to keep it inline. I'm not sure whether the above change has other undesired side-effects.

Comment 6 Jeff Fearn 🐞 2010-05-22 02:11:12 UTC
Hi Raphaël, which tree are you creating your patch against? There is already a patch for this checked in on the 1.6 branch, it's waiting for testing before this bug can be updated.

Comment 7 Jeff Fearn 🐞 2010-05-22 02:25:30 UTC
Gah, I just noticed this is still in new ... more coffee needed :(

Fixed in build 1.6.3-0.f12.t67

Comment 8 Raphaël Hertzog 2010-05-22 06:23:14 UTC
Hi Jeff, my patch was against the 1.6.3 tarball.

So this bug is fixed by r1215 and is in fact the same than https://bugzilla.redhat.com/show_bug.cgi?id=592666 if I understand correctly. You might want to merge both entries then.

Comment 10 Chester Cheng 2010-05-27 06:17:19 UTC
Change Product to RHEL6, since this affects all the documents to be used in RHEL6.

Comment 11 RHEL Program Management 2010-06-07 16:08:25 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 12 Ruediger Landmann 2010-07-05 04:01:23 UTC
Confirmed that Publican 1.99.t135 doesn't break the string. 

Given this XML:

<para>
This is a test <indexterm><primary>paragraph</primary></indexterm> paragraph in a section
</para>

the resulting PO file entry is:

#. Tag: para
#, no-c-format
msgid "This is a test <indexterm><primary>paragraph</primary></indexterm> paragraph in a section"
msgstr ""


Chester, could you please confirm that this is suitable?

Comment 13 Chester Cheng 2010-07-05 04:04:14 UTC
Hi Rudi,

Yes, it is suitable.

Cheers,
Chester

(In reply to comment #12)
> Confirmed that Publican 1.99.t135 doesn't break the string. 
> 
> Given this XML:
> 
> <para>
> This is a test <indexterm><primary>paragraph</primary></indexterm> paragraph in
> a section
> </para>
> 
> the resulting PO file entry is:
> 
> #. Tag: para
> #, no-c-format
> msgid "This is a test <indexterm><primary>paragraph</primary></indexterm>
> paragraph in a section"
> msgstr ""
> 
> 
> Chester, could you please confirm that this is suitable?

Comment 14 Fedora Update System 2010-07-07 17:35:15 UTC
publican-2.1-0.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2010-07-07 17:39:49 UTC
publican-2.1-0.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 20 Andrew Ross 2010-08-08 23:08:21 UTC
Verified: publican-2.1-0.el6.x86_64

Build doc using publican, added xml from comment#12 , po updated as per Chester's orig description.

Output as described / approved in comment#13

#. Tag: para
#, no-c-format
msgid "This is a test <indexterm><primary>paragraph</primary></indexterm> paragraph in a section"
msgstr ""

Comment 21 releng-rhel@redhat.com 2010-11-10 21:22:22 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.