Fresh update based on the en_US version.
Details
Diff Detail
- Repository
- rD FreeBSD doc repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
There are multiple blank space issues. For consistency, please add space after all punctuation, unless they are immediately followed by a closing tag.
Line breaks should only happen if a space is appropriate in the context.
zh_CN.UTF-8/htdocs/where.xml | ||
---|---|---|
42 ↗ | (On Diff #32007) | Wrong line break. |
108 ↗ | (On Diff #32007) | Checksum should be 校验和。 |
108 ↗ | (On Diff #32007) | Checksum should be 校验和。 |
168 ↗ | (On Diff #32007) | Same for checksum. Should this benefit from PO translation, by the way? |
There are multiple blank space issues. For consistency, please add space after all punctuation, unless they are immediately followed by a closing tag.
Line breaks should only happen if a space is appropriate in the context.
zh_CN.UTF-8/htdocs/where.xml | ||
---|---|---|
168 ↗ | (On Diff #32007) | Same for checksum. Should this benefit from PO translation, by the way? |
To be honest, I always got confused with these line breaks and blank space in the .xml files. I see line breaks randomly placed across original English docs (cause they have spaces between words and after punctuation anyway), but is that the same case for Chinese docs (space after all punctuation)?
And yes, from my experience with PO, the experience is a lot better (not sure if "translations of common words" can be set in PO to resolve those kinds of questions like "homepage" or "checksum").
Do we have a style guide and a "standard translations for common words" somewhere available for reference? If not, these should be on our to-do list ;-)
You're probably already aware of this, it's the web browser that condenses multiple whitespace characters including newlines to a single space while rendering a page.
There would be an extra space in the second paragraph.
<p>中文,测试。</p> <p>中文, 测试。</p>
Yes, I get what you're saying, and my latest changes already reflected the Chinese style requirements. However, I figured out that it somewhat depends on the browser. I used Firefox at first and line breaks was ignored, then I tried Chrome/Chromium and it worked as intended. Could you please try compiling it with my latest changes and viewing it with Firefox (or a browser not using WebKit)?
PS: Or you could just clone https://github.com/yzgyyang/freebsd-doc-web-deploy as it automatically reflects latest build results from my dev branch.
Thanks for the info, that's helpful. I've now confirmed that Firefox does not convert line breaks to a space since 52.0.
BTW. maybe we can come up with something that checks the punctuation ...
% cat where.xml | perl -CSAD -lnE 'say qq|$.$_| if /[\x{3001}\x{3002}\x{ff01}\x{ff0c}\x{ff1a}\x{ff1b}\x{ff1f}](?!\s|<|\z)/' 27 <p>大多数 &os; 用户使用 amd64,i386 或 armv6 架构的硬件。</p> 41 <p>安装 FreeBSD 有许多种选择,包括从 CD (disc1), DVD (dvd1), 242 欲了解关于过去、现在和未来发行版的更多信息, 请参阅 411 包括从 CD-ROM、DVD、USB 磁盘、匿名 FTP, HTTP 以及 NFS 安装。 428 <p>若要下载过去的发行版,请到 441 的开源存储平台, 它支持在 Windows、Apple 和类 UNIX 系统之间分享文件。</p></li>
Whoa it must be useful to have such tools to check the punctuation. I have fixed those minor errors reported by your "detector".
But before this can be committed, do you think we should come up with another sets of rules to deal with punctuation and line breaks (since it's being proved that the line breaks really depend on the browser/web kernel, and also, space after "," isn't the best solution and won't look good in some browsers IMO)?
Okay, it turned out that's a new feature not a regression ...
https://bugzilla.mozilla.org/show_bug.cgi?id=1081858
The patch looks good to me.
Perhaps worth waiting for delphij@ to review it again ...
Thank you for the review! I just wanna make sure that you are aware of the whitespace issue on Firefox (see conversations above) and you are sure that we stick with the current style guide (which is adding a space after every punctuation). Could you please comment on that?
Hi @ygy,
Just save the commit message to a file
MFen: 1.89 -> r50572 Reviewed by: delphij, loader, rcyu Approved by: delphij (mentor), loader (mentor), rcyu Differential Revision: https://reviews.freebsd.org/D12015
and run
svn ci -F /path/to/commit_msg zh_CN.UTF-8/htdocs/where.xml
Please note that these are tabs [0] in the commit message:
Reviewed by:\t Approved by:\t Differential Revision:\t