Bug 1067783 - RFE: Add support for other languages in Content Specs
Summary: RFE: Add support for other languages in Content Specs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: PressGang CCMS
Classification: Community
Component: CCMS-Core
Version: 1.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 1.5
Assignee: Lee Newson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1067789 1072685
TreeView+ depends on / blocked
 
Reported: 2014-02-21 03:59 UTC by Matthew Casperson
Modified: 2014-08-04 22:28 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-01 21:39:56 UTC
Embargoed:


Attachments (Terms of Use)

Comment 1 Lee Newson 2014-02-21 04:36:05 UTC
Going to move this to an RFE, as Content Specs weren't original meant to be used outside of English content.

Comment 2 Lee Newson 2014-02-27 02:03:05 UTC
This actually brings up a few problems when the base locale isn't English. These are the things I've noticed so far:

1. We'll need to determine a way to create the "id"/fixed url attribute, since it can only contain the following sequence [A-Za-z0-9][A-Za-z0-9_:.-]*. Since it will be extremely rare that other locales will work for that we may just have to use the Topic ID (as we do when fixed url processing fails).

2. Title and Product must contain certain characters (or have equivalent publican.cfg properties) otherwise "publican package" will fail due to the naming restrictions on rpms. The valid chars for product/title are: 0-9a-zA-Z_-.+

Comment 3 Lee Newson 2014-02-27 03:06:37 UTC
3. File names must use a similar syntax as above, otherwise you will get this error:

FATAL ERROR: XInclude:1605 in Title.xml on line 9: failed build URL

Comment 4 Lee Newson 2014-02-28 01:48:31 UTC
Upon reading the XML spec and doing some testing, I've found a way to deal with points 1 and 3.

Point 1 can be dealt with by escaping the id based on the information in http://www.w3.org/TR/REC-xml/#id. However I'll still need to test the html produced to ensure that it works on older browsers, as the HTML 4 spec says that ids should only contain the characters I mentioned, see http://www.w3.org/TR/xhtml1/#C_8 (I should note this is actually the xhtml 1.0 spec, but xhtml is what is produced by the docbook xsl stylesheets).

Point 3 just requires the href to be URL encoded in the XInclude. This means that the file name can remain something readable.

Comment 8 Lee Newson 2014-03-17 04:57:20 UTC
Fixed in 1.5-SNAPSHOT build 201403171432

Content specs now have a "Locale" metadata attribute. This attribute will be synced with the properties locale value when saving content specs. In the case of text based content specs (ie the /rest/1/contentspec/update/text endpoint) then the value will be pulled from the content spec text.

Comment 11 Matthew Casperson 2014-03-23 22:49:17 UTC
Confirmed that specs with topics that don't match the spec locale result in an error.
Confirmed that the Locale metadata element is copied from the locale property.

Comment 15 Matthew Casperson 2014-04-22 21:06:43 UTC
Built a newly imported Japanese book, and fixed urls were generated ok.


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