Description of problem: Publican uses the value of the "menu_category" config file parameter to create a .desktop file for the desktop-html version of a document. The value of "menu_category" is added to a section of the document's spec file that controls the .desktop file generation. This works fine as-is, as long as a project intends that all documents in all languages should appear in the same menu, or where people packaging the translated docs know to change the menu_category parameter before they run "publican package". A language variable would let us set different desktop groups for different languages without having to modify the publican.cfg file at packaging time: for example, English documentation for Foo 123 gets grouped into X-Documentation-Foo-12-en-US while Japanese translations appear in a separate submenu: X-Documentation-Foo-12-ja-JP. Version-Release number of selected component (if applicable): Publican 3.0.0 How reproducible: 100% Steps to Reproduce: 1. Set "menu_category" for a book that has been translated into at least one language 2. package the book in its original language and note the part of the spec file that governs .desktop file creation 3. package the book in the translated language and note the part of the spec file that governs .desktop file creation Actual results: Untranslated and translated books would appear in the same menu or submenu Expected results: Packagers should have an easy way to specify that documents in different languages should go into separate menus. Additional info: Workaround is to manually update the publican.cfg file depending on the language being packaged.
All strings matching __LANG__ in menu_category will now be replaced with $lang. The documentation for menu_category needs to be updated with this information. This fix has been committed to the devel branch for inclusion in Publican 3.1.
Verify version: publican-3.1.0-0.el6eng.noarch --> PASS Verify steps: 1. Edit /etc/xdg/menus/documentation.menu, add four categorys, "X-Publican-en-US","X-Publican-ru-RU","X-Publican-zh-CN","X-Publican-fr-FR". 2. edit publican.cfg with menu_category:X-Publican-__LANG__. 3. $publican package --binary --desktop --lang=each long 4. install all rpms Actual results: menu_category:X-Publican-__LANG__ can be take as menu_category:X-Publican-${lang}