Bug 255702 - Redundant/incorrect dot on fr, ja, zh-cn, zh-tw homepages
Summary: Redundant/incorrect dot on fr, ja, zh-cn, zh-tw homepages
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Website (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Sergio Carlavilla Delgado
Depends on:
Reported: 2021-05-08 09:49 UTC by Guangyuan Yang
Modified: 2021-05-15 21:00 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Guangyuan Yang freebsd_committer 2021-05-08 09:49:16 UTC
For the homepage, the "freebsdDescription"s are assembled in index.html where only the period after freebsdDescription2 is included in the template:

          <h1>{{ i18n "freebsdProject" }}</h1>
            {{ i18n "freebsdDescription1" }}
            <a href={{ "platforms/" | absLangURL }}>{{ i18n "freebsdDescription2" }}</a>.
            {{ i18n "freebsdDescription3" }}
            <a href={{ printf "%s%s%s" "https://docs.FreeBSD.org/" $currentLang "/articles/contributors/#staff-committers/" }}>{{ i18n "freebsdDescription4" }}</a>
            {{ i18n "freebsdDescription5" }}
            <a href={{ printf "%s%s%s" "https://docs.FreeBSD.org/" $currentLang "/books/handbook/introduction/#introduction-nutshell-users" }}>{{ i18n "freebsdDescription6" }}</a>
            {{ i18n "freebsdDescription7" }}

This is not fine for all the languages where the period is something else (e.g. zh-cn, zh-tw and also fr etc.):

FreeBSD 是一个适用于现代服务器、桌面与嵌入式 平台. 的操作系统, 由一个庞大的 开发人员团队 持续开发超过三十年。 FreeBSD 先进的网络、安全性和存储方面的特色使得它成为许多 大型网站 以及最普遍的嵌入式网络与存储设备的平台选择。

So there are 2 ways of solving this:

1. Let the "user" (i.e. toml files) handle the punctuation completely. This is a quick fix:

-other = "A large"
+other = ". A large"

2. On a second thought, dividing the freebsdDescription into elements may not make much sense, even so when I work on zh-cn where the order of sentence elements are different. It also introduces problems when we update en version + the template only, and the template may no longer suitable for outdated language versions.

So for a more permanent fix I purpose to have only one freebsdDescription and let each language teams handle the rest. WDYT?
Comment 1 commit-hook freebsd_committer 2021-05-15 20:51:20 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/doc/commit/?id=73149c38b0652940135eaee643a55329c420f90c

commit 73149c38b0652940135eaee643a55329c420f90c
Author:     Sergio Carlavilla Delgado <carlavilla@FreeBSD.org>
AuthorDate: 2021-05-15 20:49:39 +0000
Commit:     Sergio Carlavilla Delgado <carlavilla@FreeBSD.org>
CommitDate: 2021-05-15 20:49:39 +0000

    Redundant/incorrect dot on fr, ja, zh-cn, zh-tw homepages

    PR:             255702
    Submitted by:   ygy@

 website/themes/beastie/i18n/en.toml       | 2 +-
 website/themes/beastie/layouts/index.html | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 2 Sergio Carlavilla Delgado freebsd_committer 2021-05-15 20:54:31 UTC
I fixed the problem moving the dot to the .toml file.
I know that the best option it's to merge all the translation into one single but since there's three links I can't
Comment 3 Guangyuan Yang freebsd_committer 2021-05-15 21:00:29 UTC
(In reply to Sergio Carlavilla Delgado from comment #2)

Thanks! That works well for now I think.