Bug 844202 - Common Content reverts back to en-US when a language without a region is used
Summary: Common Content reverts back to en-US when a language without a region is used
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Publican
Classification: Community
Component: publican
Version: 3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 3.2
Assignee: Jeff Fearn 🐞
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-30 00:47 UTC by Lee Newson
Modified: 2013-08-09 04:48 UTC (History)
4 users (show)

Fixed In Version: 3.2.0
Clone Of:
Environment:
Last Closed: 2013-08-09 04:48:47 UTC
Embargoed:


Attachments (Terms of Use)

Description Lee Newson 2012-07-30 00:47:18 UTC
Description of problem:

When building translated documents, if you only specify a country code rather then a country and region then the Common Content reverts back to en-US rather than just using any region that exists. This happens if your building from PO files or XML files that are in the translated language. I've checked with Rudi and he believed that this shouldn't be happening.

Version-Release number of selected component (if applicable):
I've tested this on publican 2.8 & 3.0.

How reproducible:
Always

Steps to Reproduce:
1. Download the attached ZIP.
2. Extract it and then move to the Installation_Guide-ja directory.
3. Run "publican build --lang=ja --format=html-single"
4. Open the built html-single document.
  
Actual results:
The Preface and Feedback sections should be translated, however they are in en-US.

Expected results:
The Common Content should be translated. I've also included another directory in the attached ZIP to show the expected results when the book is built using the "ja-JP" language.

Note: The ZIP is marked private as at this stage it contains pieces of documentation that hasn't been released.

Comment 2 Fedora End Of Life 2013-04-03 17:11:21 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 3 Ruediger Landmann 2013-04-17 01:34:38 UTC
Moving this upstream

Comment 4 Jeff Fearn 🐞 2013-07-10 06:57:22 UTC
Mapped two letter language codes to existing translations where there was no apparent contention between existing translations.

To ssh://git.fedorahosted.org/git/publican.git
   99e013c..d616cb5  HEAD -> devel

Comment 5 Misha H. Ali 2013-07-22 02:07:38 UTC
Checked with publican-3.1.5-0.fc19.t62.noarch 

Appears in Japanese:

* Preface (Ch 1)

Does not appear in Japanese:

* Legal Notice
* Feedback information (Ch 2)

Comment 6 Ruediger Landmann 2013-07-22 02:58:54 UTC
(In reply to Misha H. Ali from comment #5)
> Checked with publican-3.1.5-0.fc19.t62.noarch 
> 
> Appears in Japanese:
> 
> * Preface (Ch 1)

Does the text of Document Conventions appear in Japanese? If so, the fix for this bug is Verified, because:

> Does not appear in Japanese:
> 
> * Legal Notice

we don't ship translations of legal notices and

> * Feedback information (Ch 2)

depending on the brand, this might not ever have been translated

Comment 7 Misha H. Ali 2013-07-22 03:32:22 UTC
(In reply to Ruediger Landmann from comment #6)
> (In reply to Misha H. Ali from comment #5)
> > Checked with publican-3.1.5-0.fc19.t62.noarch 
> > 
> > Appears in Japanese:
> > 
> > * Preface (Ch 1)

Yes

> 
> Does the text of Document Conventions appear in Japanese? If so, the fix for
> this bug is Verified, because:
> 
> > Does not appear in Japanese:
> > 
> > * Legal Notice
> 
> we don't ship translations of legal notices and

OK

> 
> > * Feedback information (Ch 2)
> 
> depending on the brand, this might not ever have been translated

Checked with the JBoss and RedHat brands. Assuming the lack of translation for feedback is intentional, this bug is VERIFIED.

Comment 8 Lee Newson 2013-07-22 04:15:45 UTC
The RedHat and JBoss brands Feedback.xml have both been translated for Japanese, so it should be displaying that content I believe. eg:

JBoss brand: https://access.redhat.com/site/documentation/ja-JP/JBoss_Enterprise_Application_Platform/6/html/Administration_and_Configuration_Guide/sect_JBoss-Getting_Help_and_Giving_Feedback.html

RedHat brand: https://access.redhat.com/site/documentation/ja-JP/Red_Hat_Enterprise_Linux/6/html/Virtualization_Administration_Guide/sect_RedHat-Getting_Help_and_Giving_Feedback.html

I'll build publican from source today/tomorrow and try it myself just to verify (so leaving it as VERIFIED until then).

Comment 9 Lee Newson 2013-07-22 08:29:49 UTC
Okay I've verified what Misha said in Comment #5. The problem as far as I can tell is that the patch only handles getting mapped content from the base_brand and not the brand itself (see line 742 in https://git.fedorahosted.org/cgit/publican.git/tree/publican/lib/Publican/Builder.pm?h=devel&id=d616cb5cfb0bf3fc907106d4c25c576343507b45). This would explain why the overridden en-US JBoss/RedHat Feedback.xml is being copied but not the ja-JP Feedback.xml I believe.

Comment 11 Jeff Fearn 🐞 2013-07-23 01:37:29 UTC
Thanks for the patch!

To ssh://git.fedorahosted.org/git/publican.git
   97b5356..a4b3bc2  HEAD -> devel

Comment 12 Misha H. Ali 2013-07-23 05:57:58 UTC
I'm happy to retest this, but do I need to update my publican or something to get the new patch first?

Comment 13 Ruediger Landmann 2013-07-23 06:44:04 UTC
(In reply to Misha H. Ali from comment #12)
> I'm happy to retest this, but do I need to update my publican or something
> to get the new patch first?

Thanks Misha -- try this: https://fedorahosted.org/publican/wiki/Installing#Upgradingtoanewdevelopmentversion

Comment 14 Lee Newson 2013-07-23 06:48:02 UTC
Yeah Misha you'd need to recompile from the latest source. These should be the steps you need to do:

1. Change into the publican git repo (I'm going to assume you still have the devel branch checked out).
2. git pull
3. Change into the "publican" directory.
4. (Maybe) perl Build.PL
5. ./Build local

For what it's worth, this now works as I'd expect (checking html, html-single and pdf) using publican-3.1.5-0.fc18.t64.noarch

Comment 15 Lee Newson 2013-07-23 06:50:25 UTC
Ignore the process I said sorry Misha, what Rudi said definitely looks like the way to go :)

Comment 16 Misha H. Ali 2013-07-24 01:11:35 UTC
Followed instructions from comment #13 to upgrade to publican-3.1.5-0.fc19.t65.noarch

The following now appear translated as expected:

* Document Conventions
* Getting Help and Giving Feedback

Thanks Lee and Rudi!

Comment 17 Jeff Fearn 🐞 2013-08-09 04:48:47 UTC
The fix for this bug has been shipped in publican 3.2.0


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