Page MenuHomeFreeBSD

Simplified Chinese Translation Project: Update where.xsl
ClosedPublic

Authored by ygy on Aug 13 2017, 8:13 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 20 2024, 1:27 PM
Unknown Object (File)
Feb 10 2024, 2:12 AM
Unknown Object (File)
Jan 31 2024, 5:36 AM
Unknown Object (File)
Jan 27 2024, 1:07 AM
Unknown Object (File)
Jan 20 2024, 12:54 PM
Unknown Object (File)
Dec 22 2023, 11:05 PM
Unknown Object (File)
Dec 20 2023, 4:20 AM
Unknown Object (File)
Dec 2 2023, 10:57 PM
Subscribers
None

Details

Summary

Fresh update based on the en_US version.

Diff Detail

Repository
rD FreeBSD doc repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

delphij requested changes to this revision.Aug 16 2017, 7:06 PM

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?

This revision now requires changes to proceed.Aug 16 2017, 7:06 PM

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?

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.

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 ;-)

ygy edited edge metadata.

Fix the translation of the word "checksum"

ygy marked 4 inline comments as done.Aug 16 2017, 7:46 PM

Fix multiple whitespace errors.

ygy marked an inline comment as done.Aug 19 2017, 1:18 AM

Change whitespace to follow the new style guide

This comment was removed by ygy.

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>

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.

In D12015#253757, @cyang_freebsdfoundation.org wrote:

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)?

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>

Fix minor punctuation errors.

Thanks for the info, that's helpful. I've now confirmed that Firefox does not convert line breaks to a space since 52.0.

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)?

I am curious to know if @delphij has some insights about this.

Okay, it turned out that's a new feature not a regression ...
https://bugzilla.mozilla.org/show_bug.cgi?id=1081858

Okay, interesting...

So, are we still approving this differential revision?

The patch looks good to me.
Perhaps worth waiting for delphij@ to review it again ...

Sorry for the delay. Looks good to me now, thanks!

This revision is now accepted and ready to land.Sep 18 2017, 4:25 PM

Sorry for the delay. Looks good to me now, thanks!

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?

ygy requested review of this revision.Sep 21 2017, 9:22 AM

You can commit by yourself. This will be your first commit!

This revision is now accepted and ready to land.Sep 21 2017, 9:49 AM

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

[0]: https://www.freebsd.org/doc/en_US.ISO8859-1/articles/committers-guide/article.html#commit-log-message

This revision was automatically updated to reflect the committed changes.