Yuriko N. wrote:
Dear XXE support,
I'm really sorry but I don't have good news for you. Explanations below.
We've received requests from our XXE users and trying to translate the words
for ditac style sheet into Japanese but have faced problems.
I have read " Appendix C. Translating the messages generated by ditac"
and doing as instructed there.
In Japanese, we have different word order to some items.
1. Section, Part and Chapter
In English, it will be like "Section 1".
But in Japanese, we express it as "The 1(st) Section", "The 2(nd) section"
and so on.
In Japanese characters it would be like the following.
"Chapter 1" --> "The 1 Chapter" --> 第1章
"Section 2" --> "The 2(nd) Section" --> 第2節
"Part 3" --> "The 3(rd) part" --> 第3部
2. Cite, UIcontrol and term
In English, you change the font to something else such as Italic.
Whereas, in Japanese we normally place a symbol in front of the string
and also after the string. (In the same way as for quotes.)
This is because the use of italic is not so common for Japanese documents, and
also because there aren't
so many free italic fonts available.
For example, we'd express UIcontrols with brackets like: "Press [A] then [B].
So, regarding the above issues, our request for change are as follows.
<Request 1>
For Section, Part and Chapter,
We want to ask you to add closing message for the three messages and
make each one a pair. like you already have for "quote".
########
<message name="openQuote">“</message>
<message name="closeQuote">”</message>
########
Then we'll use like:
<message name="part">第(the)</message> and <message
name="closepart">部(part)</message>
<message name="chapter">第(the)</message> and <message
name="closechapter">章(Chapter)</message>
<message name="section">第(the)</message> and <message
name="closesection">節(Section)</message>
Unlike <Request 2> (see below), this one cannot be solved relatively easily.
Part, chapter, section, etc, automatic numbering is currently somewhat
poorly designed.
It is done in a way which make implementing your request long, difficult
and error prone by us, XMLmind, and even longer, more difficult and more
error prone by a third-party programmer.
I mean just adding a closing message breaks the simplistic code which
currently extracts the number of a chapter from its full label by simply
discarding everything before the number separator (mandatory,
hard-wired, " "; shame on us!).
In other words, in order to implement your (legitimate) <Request 1>, we
need to redesign our part, chapter, section, etc, automatic numbering,
which is a substantial amount of work.
Because you are our only customer which has requested <Request 1> (and
also <Request 2>, and also the indexing of words contained in SVG
graphics, to be honest), we currently do not plan to implement your
<Request 1>.
Really sorry for these bad news.
<Request 2>
For Cite, UIcontrol and term, you currently do not have messages.
Please add open and close new message items, so that we can set opening
and closing symbols for each.
Of course, we will contribute the Japanese translated resulting ja.xml to you.
If you can suggest us any other way to solve the problem that is also fine.
Sorry but this second request is deemed too specific to be implemented
by us.
If you need this feature, please create custom XSL stylesheets
containing XSL templates like the following ones:
XHTML-based output; excerpts from
XXE_install_dir/addon/config/dita/xsl/xhtml/body.xsl
---
<xsl:template match="*[contains(@class,' topic/cite ')]">
<cite>
<xsl:call-template name="commonAttributes"/>
<xsl:call-template name="namedAnchor"/>
<xsl:call-template name="basicLink"/>
</cite>
</xsl:template>
---
customized as:
---
<xsl:template match="*[contains(@class,' topic/cite ')]">
<cite>
<xsl:call-template name="commonAttributes"/>
<xsl:call-template name="namedAnchor"/>
<xsl:call-template name="localize">
<xsl:with-param name="message" select="'cite.before'"/>
</xsl:call-template>
<xsl:call-template name="basicLink"/>
<xsl:call-template name="localize">
<xsl:with-param name="message" select="'cite.after'"/>
</xsl:call-template>
</cite>
</xsl:template>
---
XSL-FO based output; excerpts from
XXE_install_dir/addon/config/dita/xsl/fo/body.xsl
---
<xsl:template match="*[contains(@class,' topic/cite ')]">
<fo:inline xsl:use-attribute-sets="cite">
<xsl:call-template name="commonAttributes"/>
<xsl:call-template name="basicLink">
<xsl:with-param name="href" select="string(@href)"/>
</xsl:call-template>
</fo:inline>
</xsl:template>
---
customized as:
---
<xsl:template match="*[contains(@class,' topic/cite ')]">
<fo:inline xsl:use-attribute-sets="cite">
<xsl:call-template name="commonAttributes"/>
<xsl:call-template name="localize">
<xsl:with-param name="message" select="'cite.before'"/>
</xsl:call-template>
<xsl:call-template name="basicLink">
<xsl:with-param name="href" select="string(@href)"/>
</xsl:call-template>
<xsl:call-template name="localize">
<xsl:with-param name="message" select="'cite.after'"/>
</xsl:call-template>
</fo:inline>
</xsl:template>
---
This assumes that your ja.xml contains:
---
<message name="cite.before">XXX</message>
<message name="cite.after">YYY</message>
---
These custom XSL stylesheets are integrated into XXE as explained here:
5. Customizing an existing configuration
http://www.xmlmind.com/xmleditor/_distrib/doc/configure/customizing.html
and more specifically here:
10. Customizing the XSLT style sheets used in the Convert Document submenu
http://www.xmlmind.com/xmleditor/_distrib/doc/configure/customize_xslt.html
Unfortunately, our "XMLmind XSL Customizer" application does not support
custom XSL templates, but just custom XSL attribute-sets and parameters.
14.3. The "XMLmind XSL Customizer" application
http://www.xmlmind.com/xmleditor/_distrib/doc/help/com.xmlmind.xslcustom.Customizer.html
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support