Closed steinbacher01 closed 3 years ago
Supporting Hungarian xrefs that refers steps will need language specific information. According to your information, the page should precedes step. I will investigate the relevant stylesheet.
I have tested with new Hungarian style hu_style.xml.
<?xml version="1.0" encoding="UTF-8" ?>
<!--
************************************************************
DITA to XSL-FO Style Definition
************************************************************
File Name : hu_style.xml
************************************************************
Copyright © 2009 2021 Antenna House, Inc.
Antenna House is a trademark of Antenna House, Inc.
URL : http://www.antennahouse.com/
************************************************************
-->
<style-definition xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
xmlns="http://www.antennahouse.com/names/XSLT/Document/Layout">
<variables>
<!-- Xref -->
<variable name="Xref_Prefix">. oldal </variable>
<variable name="Xref_Suffix"/>
<variable name="Xref_Adopt_Title_Page_Order">false</variable>
<variable name="Xref_Prefix_Title_Page"></variable>
<variable name="Xref_Suffix_Title_Page">. oldal, </variable>
<variable name="Xref_Prefix_Page_Only"/>
<variable name="Xref_Suffix_Page_Only">. oldal </variable>
<variable name="Xref_Title_Prefix"></variable>
<variable name="Xref_Title_Suffix"></variable>
<variable name="Xref_Step_Prefix"> </variable>
<variable name="Xref_Step_Suffix">. lépés</variable>
<variable name="Xref_Step_Substep_Separator">.</variable>
</variables>
</style-definition>
And the PDF result.
However there exists one redundant space in the step-number only formatting result.
However there exists one redundant space in the step-number only formatting result.
Removing prefix   solved this problem.
<variable name="Xref_Step_Prefix"></variable>
<variable name="Xref_Step_Suffix">. lépés</variable>
<variable name="Xref_Step_Substep_Separator">.</variable>
Thank you very much for the solution. 🥇 It is now working as expected. Our Hungarian linguists will be pleased.
@steinbacher01 I have merged "issue-hangarian-xref" branch into "develop". In a short time I will merge it into "master" and make the release. For your reference, I've heard from my user that Hungarian word "lépés" may vary by context. This user only use step number and author this word manually.
Thanks! Yes we are aware of how the proper Hungarian translation of this reference can vary by context. Based on the case, the suffix of lépés will change. We have advised our writers to be careful when writing xrefs in English to make it easier to translate to Hungarian and other agglutinative languages.
Our localization team has given us some feedback on how Hungarian xrefs that point to steps should be handled.
English: “step X on page N.”
should be
Hungarian: "N. oldal, X. lépés" (oldal is page and lépés is step)
I added a new string for step suffix.
Then I created a custom extension for the getXrefTitleStep template (dita2fo_xref.xsl).
Added the stepHeading-suffix variable.
Included the stepHeading-suffix variable in output.
This puts the number in front of "step" (page already has a suffix string).
But, the xref generated text for Hungarian is still this.
See 1. lépés, 11. oldal.
Is it possible to change the step and page order so the Hungarian output is like this?
See 11. oldal,1. lépés.
It looks like the the page number is generated in different templates within dita2fo_xref.xsl, so I am not sure how this can be done.
Thanks,
Leroy Steinbacher t_xref-test_hu.zip