Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-translate the writing style guide for zh-CN (Part 1) #6238

Merged
merged 10 commits into from
Jun 13, 2022
Merged

Re-translate the writing style guide for zh-CN (Part 1) #6238

merged 10 commits into from
Jun 13, 2022

Conversation

awxiaoxian2020
Copy link
Contributor

close #5866

@github-actions github-actions bot added the l10n-zh Issues related to Chinese content. label Jun 13, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jun 13, 2022

Preview URLs

Flaws

URL: /zh-CN/docs/MDN/Guidelines/Writing_style_guide
Title: MDN Web 文档写作规范
on GitHub
Flaw count: 6

  • macros:
    • /zh-CN/docs/Web/HTML/Element/h2 does not exist but fell back to /en-US/docs/Web/HTML/Element/Heading_Elements
    • /zh-CN/docs/Web/HTML/Element/h3 does not exist but fell back to /en-US/docs/Web/HTML/Element/Heading_Elements
    • /zh-CN/docs/Web/HTML/Element/h4 does not exist but fell back to /en-US/docs/Web/HTML/Element/Heading_Elements
  • broken_links:
    • Can use the English (en-US) link as a fallback
    • Can use the English (en-US) link as a fallback
    • Can use the English (en-US) link as a fallback

External URLs

URL: /zh-CN/docs/MDN/Guidelines/Writing_style_guide
Title: MDN Web 文档写作规范
on GitHub

(this comment was updated 2022-06-13 23:55:57.033377)

It seems not to be found in the en-US doc.
@yin1999
Copy link
Member

yin1999 commented Jun 13, 2022

Hi @awxiaoxian2020, we're working on markdown convertion. If you'd like to working on it, please try to rewrite it in markdown. Note that, we need to keep two commits to save the git histroy. See: https://github.com/mdn/translated-content/pull/6153/commits:

  1. using git mv command to rename this file
  2. sync the document or just convert the recent content in to markdown format.

And just using HTML format is also ok for it.

@awxiaoxian2020
Copy link
Contributor Author

Hi @awxiaoxian2020, we're working on markdown convertion. If you'd like to working on it, please try to rewrite it in markdown. Note that, we need to keep two commits to save the git histroy. See: https://github.com/mdn/translated-content/pull/6153/commits:

  1. using git mv command to rename this file
  2. sync the document or just convert the recent content in to markdown format.

And just using HTML format is also ok for it.

For the time being, I only use HTML format. We still maintain the html docs so far because of the incompleted convertion.
The convertion is another work, I think we should seperate them as two tasks. And I'm not checking the convertion workflow now.
If I'm avaliable, I will check it later and do sth.

Thanks for your reminding!

@awxiaoxian2020 awxiaoxian2020 marked this pull request as ready for review June 13, 2022 06:17
@awxiaoxian2020 awxiaoxian2020 requested a review from a team as a code owner June 13, 2022 06:17
@awxiaoxian2020 awxiaoxian2020 requested review from t7yang and removed request for a team June 13, 2022 06:17
@awxiaoxian2020
Copy link
Contributor Author

@yin1999 I think we can review these first.

@yin1999 yin1999 requested review from yin1999 and removed request for t7yang June 13, 2022 08:30
Copy link
Member

@yin1999 yin1999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@awxiaoxian2020
Copy link
Contributor Author

Done! Thank you for your hard work! @yin1999

Copy link
Member

@yin1999 yin1999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not fully synced, but better. Thanks

@yin1999 yin1999 merged commit 51a5c36 into mdn:main Jun 13, 2022
@awxiaoxian2020 awxiaoxian2020 deleted the patch-2 branch June 14, 2022 00:02
@awxiaoxian2020
Copy link
Contributor Author

@yin1999 I am sorry that I did not understand #2474 , could you help me a more concise summary?

@yin1999
Copy link
Member

yin1999 commented Jun 14, 2022

could you help me a more concise summary?

为了更易理解,我用中文说明:

  1. 首先,由于曾经的 MDN 文档托管在 MDN 自己的平台上,并有自己的文档编辑器,所以文档中存在许多 markdown 格式中并不会使用的样式等等,需要首先对它们进行移除,大部分相关的工作我已在 Tracking markdown convertion for zh-{CN,TW} #6173 中提到(提到了大部分可以使用自动化脚本实现的工作)
  2. 在完成移除工作以后,我们可以开始对 MDN 文档不同的部分进行转换。我们首先需要完成环境的配置(markdown 文档的转换可以使用 mdn/yari 中的命令 yarn run md h2m web/http --locale zh-CN --mode replace 来完成,其中的 web/http 是指 files/zh-cn/web/http 这个文件夹),克隆 mdn/yarimdn/content 以及 mdn/translated-content。为了减小每一次转换的工作量,我们可以只转换一个包含多个文件的子文件夹,使用 --mode dry 模式可以列出转换过程中存在错误的部分,然后可以根据指出的错误,对文档进行修正(提交 PR,在合并后进入下一部分的工作)
  3. 在修复文档中存在的问题后,就可以使用 --mode replace 对文档进行正式转换了,其会产生两个 commit,第一个是 rename commit,第二个是内容转换的 commit,请不要合并两个 commit,直接开 PR 即可。
  4. 由本地化文档的维护者,对 PR 进行审查,并通过 rebase and merge 的形式合入 main 分支。

@awxiaoxian2020
Copy link
Contributor Author

could you help me a more concise summary?

为了更易理解,我用中文说明:

  1. 首先,由于曾经的 MDN 文档托管在 MDN 自己的平台上,并有自己的文档编辑器,所以文档中存在许多 markdown 格式中并不会使用的样式等等,需要首先对它们进行移除,大部分相关的工作我已在 Tracking markdown convertion for zh-{CN,TW} #6173 中提到(提到了大部分可以使用自动化脚本实现的工作)
  2. 在完成移除工作以后,我们可以开始对 MDN 文档不同的部分进行转换。我们首先需要完成环境的配置(markdown 文档的转换可以使用 mdn/yari 中的命令 yarn run md h2m web/http --locale zh-CN --mode replace 来完成,其中的 web/http 是指 files/zh-cn/web/http 这个文件夹),克隆 mdn/yarimdn/content 以及 mdn/translated-content。为了减小每一次转换的工作量,我们可以只转换一个包含多个文件的子文件夹,使用 --mode dry 模式可以列出转换过程中存在错误的部分,然后可以根据指出的错误,对文档进行修正(提交 PR,在合并后进入下一部分的工作)
  3. 在修复文档中存在的问题后,就可以使用 --mode replace 对文档进行正式转换了,其会产生两个 commit,第一个是 rename commit,第二个是内容转换的 commit,请不要合并两个 commit,直接开 PR 即可。
  4. 由本地化文档的维护者,对 PR 进行审查,并通过 rebase and merge 的形式合入 main 分支。

Thank you very much indeed! :)

@awxiaoxian2020
Copy link
Contributor Author

could you help me a more concise summary?

为了更易理解,我用中文说明:

  1. 首先,由于曾经的 MDN 文档托管在 MDN 自己的平台上,并有自己的文档编辑器,所以文档中存在许多 markdown 格式中并不会使用的样式等等,需要首先对它们进行移除,大部分相关的工作我已在 Tracking markdown convertion for zh-{CN,TW} #6173 中提到(提到了大部分可以使用自动化脚本实现的工作)
  2. 在完成移除工作以后,我们可以开始对 MDN 文档不同的部分进行转换。我们首先需要完成环境的配置(markdown 文档的转换可以使用 mdn/yari 中的命令 yarn run md h2m web/http --locale zh-CN --mode replace 来完成,其中的 web/http 是指 files/zh-cn/web/http 这个文件夹),克隆 mdn/yarimdn/content 以及 mdn/translated-content。为了减小每一次转换的工作量,我们可以只转换一个包含多个文件的子文件夹,使用 --mode dry 模式可以列出转换过程中存在错误的部分,然后可以根据指出的错误,对文档进行修正(提交 PR,在合并后进入下一部分的工作)
  3. 在修复文档中存在的问题后,就可以使用 --mode replace 对文档进行正式转换了,其会产生两个 commit,第一个是 rename commit,第二个是内容转换的 commit,请不要合并两个 commit,直接开 PR 即可。
  4. 由本地化文档的维护者,对 PR 进行审查,并通过 rebase and merge 的形式合入 main 分支。

我不知道我遗漏了什么步骤,运行命令后似乎不起作用。
issue

@yin1999
Copy link
Member

yin1999 commented Jun 26, 2022

我不知道我遗漏了什么步骤,运行命令后似乎不起作用。 issue

This cli is used to convert a section which means a folder with subfolders in it. So you should convert mdn/guidelines instead.

@awxiaoxian2020
Copy link
Contributor Author

awxiaoxian2020 commented Jun 26, 2022

我不知道我遗漏了什么步骤,运行命令后似乎不起作用。 issue

This cli is used to convert a section which means a folder with subfolders in it. So you should convert mdn/guidelines instead.

仍然没有任何效果,是不是我将目录弄错了,我将 yaritranslated-content 放在了相同的目录。

isssue

@yin1999
Copy link
Member

yin1999 commented Jun 26, 2022

仍然没有任何效果,是不是我将目录弄错了,我将 yaritranslated-content 放在了相同的目录。

isssue

设置 .env 文件 https://github.com/mdn/yari 指定 translated-content 和 content 的目录

@awxiaoxian2020 awxiaoxian2020 changed the title Re-translate the writing style guide for zh-CN Re-translate the writing style guide for zh-CN (Part 1) Jun 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
l10n-zh Issues related to Chinese content.
Projects
Development

Successfully merging this pull request may close these issues.

Issue with "MDN Web 文档写作规范": (out-of-date document)
2 participants