Skip to content

Commit

Permalink
Merge pull request #599 from openSUSE/596-zh-cn-tw
Browse files Browse the repository at this point in the history
Fix #596: Correct runinhead.default.title.end.punct
  • Loading branch information
tomschr authored Nov 28, 2023
2 parents 1cbe65a + 14c2959 commit 9ab9984
Show file tree
Hide file tree
Showing 22 changed files with 31 additions and 29 deletions.
2 changes: 1 addition & 1 deletion suse2022-ns/common/l10n/ar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ translators apparently want those. - sknorr, 2016-09-30 -->
<l:gentext key="showcontentsoverview" text="ﻉﺮﺿ ﺎﻠﻤﺤﺗﻮﻳﺎﺗ" />
<l:gentext key="find" text="ﺐﺤﺛ" />

<l:gentext key="runinhead.default.title.end.punct" text="."/>
<l:gentext key="runinhead.default.title.end.punct" text=".&#x00a0;"/>

<l:gentext key="navigation" text="التنقل"/>
<l:gentext key="moredocuments" text="المزيد من المستندات"/>
Expand Down
2 changes: 1 addition & 1 deletion suse2022-ns/common/l10n/cs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<l:gentext key="showcontentsoverview" text="Zobrazit obsah"/>
<l:gentext key="find" text="Najít"/>

<l:gentext key="runinhead.default.title.end.punct" text="."/>
<l:gentext key="runinhead.default.title.end.punct" text=".&#x00a0;"/>

<l:gentext key="navigation" text="Navigace"/>
<l:gentext key="moredocuments" text="Více dokumentů"/>
Expand Down
2 changes: 1 addition & 1 deletion suse2022-ns/common/l10n/da.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<l:gentext key="showcontentsoverview" text="Vis indhold"/>
<l:gentext key="find" text="Find"/>

<l:gentext key="runinhead.default.title.end.punct" text="."/>
<l:gentext key="runinhead.default.title.end.punct" text=".&#x00a0;"/>

<l:gentext key="navigation" text="Navigation"/>
<l:gentext key="moredocuments" text="Flere dokumenter"/>
Expand Down
2 changes: 1 addition & 1 deletion suse2022-ns/common/l10n/de.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<l:gentext key="showcontentsoverview" text="Inhalt anzeigen"/>
<l:gentext key="find" text="Suchen"/>

<l:gentext key="runinhead.default.title.end.punct" text="."/>
<l:gentext key="runinhead.default.title.end.punct" text=".&#x00a0;"/>

<l:gentext key="navigation" text="Navigation" />
<l:gentext key="moredocuments" text="Weitere Dokumente" />
Expand Down
2 changes: 1 addition & 1 deletion suse2022-ns/common/l10n/en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<l:gentext key="showcontentsoverview" text="Show Contents"/>
<l:gentext key="find" text="Find"/>

<l:gentext key="runinhead.default.title.end.punct" text="."/>
<l:gentext key="runinhead.default.title.end.punct" text=".&#x00a0;"/>

<l:gentext key="navigation" text="Navigation"/>
<l:gentext key="moredocuments" text="More documents"/>
Expand Down
2 changes: 1 addition & 1 deletion suse2022-ns/common/l10n/es.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<l:gentext key="showcontentsoverview" text="Mostrar contenido"/>
<l:gentext key="find" text="Buscar"/>

<l:gentext key="runinhead.default.title.end.punct" text="."/>
<l:gentext key="runinhead.default.title.end.punct" text=".&#x00a0;"/>

<l:gentext key="navigation" text="Navegación"/>
<l:gentext key="moredocuments" text="Más documentos"/>
Expand Down
2 changes: 1 addition & 1 deletion suse2022-ns/common/l10n/fi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<l:gentext key="showcontentsoverview" text="Näytä sisältö"/>
<l:gentext key="find" text="Etsi"/>

<l:gentext key="runinhead.default.title.end.punct" text="."/>
<l:gentext key="runinhead.default.title.end.punct" text=".&#x00a0;"/>

<l:gentext key="navigation" text="Siirtyminen"/>
<l:gentext key="moredocuments" text="Lisää asiakirjoja"/>
Expand Down
2 changes: 1 addition & 1 deletion suse2022-ns/common/l10n/fr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<l:gentext key="showcontentsoverview" text="Afficher la table des matières" />
<l:gentext key="find" text="Rechercher" />

<l:gentext key="runinhead.default.title.end.punct" text="."/>
<l:gentext key="runinhead.default.title.end.punct" text=".&#x00a0;"/>

<l:gentext key="navigation" text="Navigation" />
<l:gentext key="moredocuments" text="Plus de documents" />
Expand Down
2 changes: 1 addition & 1 deletion suse2022-ns/common/l10n/hu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<l:gentext key="showcontentsoverview" text="Tartalom megjelenítése"/>
<l:gentext key="find" text="Keresés"/>

<l:gentext key="runinhead.default.title.end.punct" text="."/>
<l:gentext key="runinhead.default.title.end.punct" text=".&#x00a0;"/>

<l:gentext key="navigation" text="Navigáció" />
<l:gentext key="moredocuments" text="Több dokumentum" />
Expand Down
2 changes: 1 addition & 1 deletion suse2022-ns/common/l10n/it.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<l:gentext key="showcontentsoverview" text="Mostra contenuto"/>
<l:gentext key="find" text="Trova"/>

<l:gentext key="runinhead.default.title.end.punct" text="."/>
<l:gentext key="runinhead.default.title.end.punct" text=".&#x00a0;"/>

<l:gentext key="navigation" text="Navigazione"/>
<l:gentext key="moredocuments" text="Altri documenti" />
Expand Down
2 changes: 1 addition & 1 deletion suse2022-ns/common/l10n/ja.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<l:gentext key="showcontentsoverview" text="目次を表示" />
<l:gentext key="find" text="検索"/>

<l:gentext key="runinhead.default.title.end.punct" text="." />
<l:gentext key="runinhead.default.title.end.punct" text=".&#x00a0;" />

<l:gentext key="navigation" text="ナビゲーション"/>
<l:gentext key="moredocuments" text="その他のドキュメント" />
Expand Down
2 changes: 1 addition & 1 deletion suse2022-ns/common/l10n/ko.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<l:gentext key="showcontentsoverview" text="목차 표시"/>
<l:gentext key="find" text="찾기"/>

<l:gentext key="runinhead.default.title.end.punct" text="."/>
<l:gentext key="runinhead.default.title.end.punct" text=".&#x00a0;"/>

<l:gentext key="navigation" text="탐색"/>
<l:gentext key="moredocuments" text="문서 더 보기" />
Expand Down
2 changes: 1 addition & 1 deletion suse2022-ns/common/l10n/lt_lt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<l:gentext key="showcontentsoverview" text="Rodyti turinį"/>
<l:gentext key="find" text="Rasti"/>

<l:gentext key="runinhead.default.title.end.punct" text="."/>
<l:gentext key="runinhead.default.title.end.punct" text=".&#x00a0;"/>

<l:gentext key="navigation" text="Naršymas"/>
<l:gentext key="moredocuments" text="More documents"/>
Expand Down
2 changes: 1 addition & 1 deletion suse2022-ns/common/l10n/nl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<l:gentext key="showcontentsoverview" text="Inhoud weergeven"/>
<l:gentext key="find" text="Zoeken"/>

<l:gentext key="runinhead.default.title.end.punct" text="."/>
<l:gentext key="runinhead.default.title.end.punct" text=".&#x00a0;"/>

<l:gentext key="navigation" text="Navigatie"/>
<l:gentext key="moredocuments" text="More documents"/>
Expand Down
2 changes: 1 addition & 1 deletion suse2022-ns/common/l10n/no.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<l:gentext key="showcontentsoverview" text="Vis innhold"/>
<l:gentext key="find" text="Søk"/>

<l:gentext key="runinhead.default.title.end.punct" text="."/>
<l:gentext key="runinhead.default.title.end.punct" text=".&#x00a0;"/>

<l:gentext key="navigation" text="Navigasjon"/>
<l:gentext key="moredocuments" text="More documents"/>
Expand Down
2 changes: 1 addition & 1 deletion suse2022-ns/common/l10n/pl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<l:gentext key="showcontentsoverview" text="Pokaż treść" />
<l:gentext key="find" text="Znajdź"/>

<l:gentext key="runinhead.default.title.end.punct" text="."/>
<l:gentext key="runinhead.default.title.end.punct" text=".&#x00a0;"/>

<l:gentext key="navigation" text="Nawigacja"/>
<l:gentext key="moredocuments" text="Więcej dokumentów" />
Expand Down
2 changes: 1 addition & 1 deletion suse2022-ns/common/l10n/pt_br.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<l:gentext key="showcontentsoverview" text="Mostrar Conteúdo"/>
<l:gentext key="find" text="Encontrar" />

<l:gentext key="runinhead.default.title.end.punct" text="."/>
<l:gentext key="runinhead.default.title.end.punct" text=".&#x00a0;"/>

<l:gentext key="navigation" text="Navegação"/>
<l:gentext key="moredocuments" text="Mais documentos" />
Expand Down
2 changes: 1 addition & 1 deletion suse2022-ns/common/l10n/ru.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<l:gentext key="showcontentsoverview" text="Показать содержание"/>
<l:gentext key="find" text="Поиск" />

<l:gentext key="runinhead.default.title.end.punct" text="."/>
<l:gentext key="runinhead.default.title.end.punct" text=".&#x00a0;"/>

<l:gentext key="navigation" text="Навигация"/>
<l:gentext key="moredocuments" text="Еще документы" />
Expand Down
2 changes: 1 addition & 1 deletion suse2022-ns/common/l10n/sv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<l:gentext key="showcontentsoverview" text="Visa innehåll"/>
<l:gentext key="find" text="Hitta"/>

<l:gentext key="runinhead.default.title.end.punct" text="."/>
<l:gentext key="runinhead.default.title.end.punct" text=".&#x00a0;"/>

<l:gentext key="navigation" text="Navigering"/>
<l:gentext key="sharethispage" text="Dela den här sidan"/>
Expand Down
2 changes: 1 addition & 1 deletion suse2022-ns/common/l10n/zh_cn.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<l:gentext key="showcontentsoverview" text="显示目录" />
<l:gentext key="find" text="查找" />

<l:gentext key="runinhead.default.title.end.punct" text="." />
<l:gentext key="runinhead.default.title.end.punct" text="&#xff1a;" />

<l:gentext key="navigation" text="导航" />
<l:gentext key="moredocuments" text="更多文档" />
Expand Down
13 changes: 7 additions & 6 deletions suse2022-ns/fo/block.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,16 @@
</xsl:template>

<xsl:template match="d:formalpara/d:title|d:formalpara/d:info/d:title">
<xsl:variable name="title-str">
<xsl:variable name="titlestr">
<xsl:apply-templates/>
</xsl:variable>
<xsl:variable name="ns-titlestr" select="normalize-space($titlestr)"/>
<!-- Logic: If there is already a &punctuation; character at the end, we don't
need to add another one, $last-char allows us to check. -->
<xsl:variable name="last-char-candidate">
<xsl:choose>
<xsl:when test="$title-str != ''">
<xsl:value-of select="substring($title-str,string-length($title-str),1)"/>
<xsl:when test="$titlestr != ''">
<xsl:value-of select="substring($ns-titlestr, string-length($ns-titlestr),1)"/>
</xsl:when>
<xsl:otherwise>FAIL</xsl:otherwise>
</xsl:choose>
Expand All @@ -105,18 +106,18 @@
<xsl:value-of select="translate($last-char-candidate, '&punctuation;', '')"/>
</xsl:variable>

<xsl:if test="$title-str != ''">
<xsl:if test="$ns-titlestr != ''">
<fo:inline keep-with-next.within-line="always"
padding-end="0.2em"
xsl:use-attribute-sets="variablelist.term.properties">
<xsl:copy-of select="$title-str"/>
<xsl:copy-of select="$titlestr"/>
<xsl:if test="$last-char != ''
and not(contains($runinhead.title.end.punct, $last-char))">
<xsl:call-template name="gentext">
<xsl:with-param name="key">runinhead.default.title.end.punct</xsl:with-param>
</xsl:call-template>
</xsl:if>
<fo:leader leader-pattern="space" leader-length=".3em"/>
<!-- <fo:leader leader-pattern="space" leader-length=".3em"/> -->
</fo:inline>
</xsl:if>
</xsl:template>
Expand Down
7 changes: 4 additions & 3 deletions suse2022-ns/xhtml/block.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,10 @@
<xsl:variable name="titleStr">
<xsl:apply-templates/>
</xsl:variable>
<xsl:variable name="ns-titleStr" select="normalize-space($titleStr)"/>
<xsl:variable name="lastChar">
<xsl:if test="$titleStr != ''">
<xsl:value-of select="substring($titleStr,string-length($titleStr),1)"/>
<xsl:if test="normalize-space($ns-titleStr) != ''">
<xsl:value-of select="substring($ns-titleStr, string-length($ns-titleStr), 1)"/>
</xsl:if>
</xsl:variable>

Expand All @@ -143,7 +144,7 @@
<xsl:with-param name="key">runinhead.default.title.end.punct</xsl:with-param>
</xsl:call-template>
</xsl:if>
<xsl:text>&#160;</xsl:text>
<!--<xsl:text>&#160;</xsl:text>-->
</span>
</xsl:template>

Expand Down

0 comments on commit 9ab9984

Please sign in to comment.