Bug 968925 - RFE: "publican update_po" - Localized revision number generation
Summary: RFE: "publican update_po" - Localized revision number generation
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: PressGang CCMS
Classification: Community
Component: CCMS-Core
Version: 1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 1.2
Assignee: Lee Newson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1013825
TreeView+ depends on / blocked
 
Reported: 2013-05-30 09:50 UTC by Yuko Katabami
Modified: 2013-10-17 23:49 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-17 23:49:43 UTC
Embargoed:


Attachments (Terms of Use)
Localization revision number is a subnumber based on the en-US revision number (196.86 KB, image/png)
2013-05-30 09:55 UTC, Yuko Katabami
no flags Details

Description Yuko Katabami 2013-05-30 09:50:05 UTC
Description of problem:
In svn/git based projects, translators usually run "publican update_po" to generate a localization revision number, together with name (option), email address (option), and message (mandatory).
This command cannot be used in pressgang projects.

The current workaround suggested by Rudi is that using "publican add revision" to generate a new number and manually edit the Revision_History.xml file to change the number to a sub-number.

This works fine when we have only one or two localization entries.
However, if the number of entries increases or if we have to reuse that file, it can be problematic. We do not save localized Revision_History.xml in any repo.
If the translator who created it delete the file, it has to be done from the scratch.

Manual work like this is time-consuming and error-prone.
Hope you can come up with more efficient, semi-automated solution, hopefully in time for RHEV 3.3.

Version-Release number of selected component (if applicable): not sure


How reproducible: Always

Steps to Reproduce:
1. In a pressgang-based documentation project, translate Revision History
2. Build the guide
3. Check the Revision History entries

Actual results:
No localization revision number/message is included unless running "publican add revision" command and then editing the file manually.

Expected results:
There should be more integrated step to generate the number, to add a message, and save that information for the subsequent updates.

Additional info:

Comment 1 Yuko Katabami 2013-05-30 09:55:35 UTC
Created attachment 754747 [details]
Localization revision number is a subnumber based on the en-US revision number

Comment 2 Yuko Katabami 2013-05-30 09:57:53 UTC
Comment on attachment 754747 [details]
Localization revision number is a subnumber based on the en-US revision number

In this screenshot, 3.2-37 is the most current en-US revision number, and we needed to manually create 3.2.37.1 for our localized version.

Comment 4 Lee Newson 2013-06-03 06:41:35 UTC
Thanks Yuko for providing so much detail. Just fixing the version and components up for now.

As for some basic details getting it to generate the revision history entry will be trivial, however what we will need to figure out is how to store and get the revision history message to be stored.

Comment 14 Lee Newson 2013-10-08 07:27:07 UTC
Added in 1.2-SNAPSHOT build 201310081705.

Server:

Added the new TranslatedTopicSecondOrderData table to store the additional xml for each TranslatedTopic. Updated the REST Factories and entity model to hold the new parameter.

When a new TranslatedTopicData is created it will attempt to get the previous TranslatedTopicData's Additional XML and insert it into the newly created TranslatedTopicData.

UI:

TranslatedTopics now have the ability to display additional xml and have it merged into the rendered view. This can also be turned off by unchecking the "Merge Additional XML" checkbox.

Builder:

The builder has been updated to merge the additional content into the original XML. This is done by using the same logic that publican uses.

CLI:

Added the "add-revision" command to provide a fairly similar user experience to publican. This command will add a revision to a Content Specifications revision history. The command has the following options:

--date <DATE>            The date for the revision entry.
--email <EMAIL>          The email of the author for the revision entry.
--firstname <FIRSTNAME>  The firstname of the author for the revision entry.
--lang <LOCALE>          What locale the revision should be added to.
--rev-message <MESSAGE>  Add a message for the revision entry.
--revnumber <REVNUMBER>  The revnumber for the revision entry.
--surname <SURNAME>      The surname of the author for the revision entry.

The "firstname", "surname", "email" and "rev-message" options are all mandatory parameters. "rev-message" can be specified multiple times to include multiple revision messages.

The "firstname", "surname" and "email" can be set in the [defaults] section of csprocessor.ini to save having to enter those parameters each time. eg:

[defaults]
firstname=Lee
surname=Newson
email=lnewson

Comment 19 Lee Newson 2013-10-16 05:37:09 UTC
Fixed in 1.2-SNAPSHOT build 201310161533

The add-revision command will now add to the proper revision history entry instead of just the latest version. I also fixed an issue where it wasn't taking into account revision numbers with leading zeros ie "1.2-01"

Comment 21 Matthew Casperson 2013-10-16 06:09:28 UTC
When adding a localised revision message to a content spec, the message will appear:

  a. Against the specific revision of the revision history topic if one is specified in the content spec pushed to Zanata. For example, if the spec includes "Revision History = [1234 rev:9876]", any localised revision history messages will be added to revision 9876 of topic 1234.

  b. Against the latest revision of the revision history topic to be pushed into Zanata. For example, of the content specification includes "Revision History = [1234]", and revision 9999 was the latest revision of topic 1234 to be pushed to Zanata, the localised revision history message would be added to revision 9999 of topic 1234.

Comment 22 Lee Newson 2013-10-16 06:21:12 UTC
Just realised when I was talking to Matt that I forgot to mention in comment #14 that when builds are done an editor link for the additional XML is also added to the topics.


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