Bug 407037 - meinproc5 is not honoring Korean naming order (reversed surname/firstname)
Summary: meinproc5 is not honoring Korean naming order (reversed surname/firstname)
Status: CONFIRMED
Alias: None
Product: frameworks-kdoctools
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.56.0
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Documentation Editorial Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-28 23:55 UTC by Shinjo Park
Modified: 2020-10-05 09:23 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shinjo Park 2019-04-28 23:55:02 UTC
SUMMARY

While I was testing generation of DocBook file and HTML files based on Korean translation for docmessages (not in SVN yet), I found that surname, firstname is not correctly ordered in Korean even if I specified lang="ko" attribute to the <othercredit> tag. Because Korean names in Hangul (FirstnameSurname display) and names in Latin alphabet (Surname Firstname display) can appear on the single document, I think the lang attribute of not only the document but also the individual credit should be honored.

Note that order reversing is implemented in DocBook's DSSSL since version 1.59.

STEPS TO REPRODUCE
1. Add translator information to ROLES_OF_TRANSLATORS such as:
<othercredit lang="ko" role="translator">
<surname>박</surname><firstname>신조</firstname></ordercredit>
Note that lang="ko" attribute.
2. Run scripts/update.xml from l10n-kf5 directory, check whether those attributes are preserved.
3. Run meinproc5 --check index.docbook for the generated docbook and check the generated HTML.

OBSERVED RESULT
Generated HTML document shows:
<span class="othercredit"><span class="contrib"></span>: <span class="firstname">신조</span> <span class="surname">박</span><br></span>

EXPECTED RESULT
This should be:
<span class="othercredit"><span class="contrib"></span>: <span class="surname">박</span><span class="firstname">신조</span><br></span>

Note that there is no space between surname and firstname, and surname goes first. While the <span class="contrib"> part is empty, but looks like it is mentioned in TODO.

SOFTWARE/OS VERSIONS

KDE Frameworks Version: 5.56
Qt Version: 5.12.2
Comment 1 Albert Astals Cid 2019-05-01 10:49:43 UTC
Yeah seems to be happening.

Personally i don't have enough time to learn about xslt to figure why it happens. My first suggestion is "this is most probably not meinproc" since meinproc doesn't do much, but as said i don't know much about this.
Comment 2 Luigi Toscano 2020-10-04 23:53:36 UTC
Does it work if you add a file called <installation_prefix>/kf5/kdoctools/customization/xsl/ko.xsl with the following content?

<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
<l:l10n language="ko" english-language-name="Korean">

<l:context name="styles">
  <l:template name="person-name" text="last-first"/>
</l:context>
</l:l10n>
</l:i18n>
Comment 3 Shinjo Park 2020-10-05 09:23:33 UTC
(In reply to Luigi Toscano from comment #2)
> Does it work if you add a file called
> <installation_prefix>/kf5/kdoctools/customization/xsl/ko.xsl with the
> following content?
> 
> <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
> <l:l10n language="ko" english-language-name="Korean">
> 
> <l:context name="styles">
>   <l:template name="person-name" text="last-first"/>
> </l:context>
> </l:l10n>
> </l:i18n>

I tried that, but nope.