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

Traking issue for adding Chinese translation #336

Open
1 of 5 tasks
chirsz-ever opened this issue May 13, 2023 · 14 comments
Open
1 of 5 tasks

Traking issue for adding Chinese translation #336

chirsz-ever opened this issue May 13, 2023 · 14 comments

Comments

@chirsz-ever
Copy link
Contributor

chirsz-ever commented May 13, 2023

This issue is for Chinese translators' communication.


PR: #335

预计主要工作将基于以下已有翻译的译文,进行校对,更新和统一术语:

贡献翻译时要向我的分支提交 PR,我自己的更新出于方便就直接提交了,但欢迎 review,争取每章都至少有一人校对过再合入。

建议翻译的 commit 像 f096d88 一样,commit 信息标题为 Add zh/XXXX.md,每个文件一个 commit,或者同一大章合并为一个 commit。

除了文本翻译,目前网站使用的 daux.io 版本还需要的额外工作:

  • 目前加载中文标题会报错,要使支持显示中文标题,需要合入 Support to use Chinese charactors in names of files and folders daux.io#2
  • 带上 / 访问 /zh/ 会报错,尝试解决;
  • 想办法使目录名能改成中文;
  • 中文文本的段内软换行也会被转换为空格,也许可以通过修改插件来修复,否则需要修改翻译文本禁止换行;
  • 研究是否能使用更好的中文字体和排版规则,如显示强调为楷体,减少二级标题的字重。

翻译中

  • 03_Drawing_a_triangle/00_Setup/03_Physical_devices_and_queue_families.md
@chirsz-ever
Copy link
Contributor Author

@orbitgw @fangcun010 @VitaMeanC
希望能帮助来参与翻译和开发工作,不胜感激!

@chirsz-ever
Copy link
Contributor Author

chirsz-ever commented May 13, 2023

为了在本地验证翻译效果,可以将本项目 clone 到 VulkanTutorial 目录下,clone daux.io 并 checkout 到我的分支,使两项目在同一文件夹。

复制 overv/vulkan-tutorial 镜像中的 /daux/vendor 文件夹到我们 clone 的 daux.io 目录下:

docker create --name dummy overv/vulkan-tutorial
docker cp dummy:/daux/vendor daux.io/vendor
docker rm dummy

再执行 docker 命令

docker run \
	--name "vk-tutorial" \
	--mount type=bind,source="$PWD/VulkanTutorial",target=/build/docs,readonly \
	--mount type=bind,source="$PWD/daux.io",target=/daux,readonly \
	-d -p8085:8085 overv/vulkan-tutorial

来运行名为 vk-tutorial 的实例,其中的相关目录被替换为本地版本。成功运行后再浏览器上打开 http://localhost:8085 即可访问翻译后的网站。

@chirsz-ever
Copy link
Contributor Author

@orbitgw 若正进行某章的翻译工作,请在此评论说明,避免重复劳动。

@orbitgw
Copy link

orbitgw commented May 15, 2023

我想你正在翻译01_Overview.md,所以我翻译02_Development_environment.md. @chirsz-ever

@chirsz-ever
Copy link
Contributor Author

chirsz-ever commented May 15, 2023

我想你正在翻译01_Overview.md,所以我翻译02_Development_environment.md. @chirsz-ever

没问题。

@orbitgw
Copy link

orbitgw commented May 19, 2023

@chirsz-ever 02已经翻译好了,看一下pr

@chirsz-ever
Copy link
Contributor Author

在服务器上搭了网站用来展示中文翻译的效果 http://chirsz.cc:8085/zh

@orbitgw
Copy link

orbitgw commented May 22, 2023

@chirsz-ever 你好,我是一个docker新手,我在搭建预览时出了一点小问题。当我挂载了VulkanTutorialduax.io后,它一直启动不成功:
image
我系统是Win11,然后container是用的wsl2。

@chirsz-ever
Copy link
Contributor Author

@orbitgw 看起来是因为文件中使用 \r\n 行结束符导致 Linux 的 env 命令不识别。可以通过配置 git 来使 checkout 出的文件是 \n 换行符1,在 daux.io 目录下配置 git config core.autocrlf input 应该就行了,注意这行命令没有 --global,只在相应的 git 仓库下起效。

Footnotes

  1. https://www.git-scm.com/book/zh/v2/%E8%87%AA%E5%AE%9A%E4%B9%89-Git-%E9%85%8D%E7%BD%AE-Git

@orbitgw
Copy link

orbitgw commented May 23, 2023

@chirsz-ever 哦,是我忽略了换行符的不同,现在已经全部修改为LF了。不过我又有了新的报错:
image

@chirsz-ever
Copy link
Contributor Author

@orbitgw 不清楚原因,检查下 VulkanTutorial 和 duax.io 切换到正确的分支了吗?挂载成功了吗?

@orbitgw
Copy link

orbitgw commented May 23, 2023

没有问题,vt-12.0分支,挂载成功了,很奇怪

@orbitgw
Copy link

orbitgw commented May 24, 2023

@chirsz-ever 貌似有点小问题:
image

@chirsz-ever
Copy link
Contributor Author

@orbitgw 也有可能是因为,不应该从原 docker 镜像复制,而应该手动执行 composer install 来生成?你 docker exec -it vk-tutorial bash 进正在运行的 docker 容器手动执行试试,或者用我的分支的仓库生成 docker 镜像试试?

另外,chirsz-ever#2 没问题我合并了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants