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

优化中英双语支持 #4

Open
martinliu opened this issue Mar 9, 2023 · 4 comments
Open

优化中英双语支持 #4

martinliu opened this issue Mar 9, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@martinliu
Copy link
Contributor

  1. 默认中文语言
  2. 菜单增加中文语言菜单
  3. 保持所有英文文章
  4. 在查看中文文章的时候,可以一键切换到英文文章
  5. 保持用相同的配图路径,配图在中文和英文切换的时候总能显示正常
@martinliu martinliu added the enhancement New feature or request label Mar 9, 2023
@8ar10der
Copy link
Contributor

8ar10der commented Mar 12, 2023

根据我的个人Hugo网站配置以及fixit主题文档,给出如下建议:

  1. 在config.toml中指定defaultContentLanguage = "zh-cn"
  2. 在config.toml中添加i18n中英文子分类,详看文档:https://fixit.lruihao.cn/documentation/basics/#basic-configuration
  3. 保留就好,但是注意下一点。
  4. 在配置完第2点的情况下,在content中针对不同语言的posts添加后缀:example.en.mdexample.zh-cn.md
  5. 配图只要不轻易更改/static/image中的文件路径就可以,markdown中均是静态路径引用。

@martinliu
Copy link
Contributor Author

我的想法变了:

  • 保持纯中文会更简单些
  • 英文原文链接加载每篇文章的明显位置
  • 菜单和界面使用纯中文

大家怎么看?

@8ar10der
Copy link
Contributor

我的想法变了:

  • 保持纯中文会更简单些
  • 英文原文链接加载每篇文章的明显位置
  • 菜单和界面使用纯中文

大家怎么看?

个人更为同意这种设计,因为我们并不对上游英文内容的更新负责,应当仅关注在中文翻译工作上。既然这样就没有必要保留英文内容。恰当直接且必要的英文原文重定向足以。

但是同时也要考虑到,在上游英文内容修正后,我们应当如何获取更新部分,并且补充进翻译。

@martinliu
Copy link
Contributor Author

但是同时也要考虑到,在上游英文内容修正后,我们应当如何获取更新部分,并且补充进翻译。

首先,我们分析一下上游旧文章的修订次数,和总数。大概在过去增删改的次数和频率。
其次,可以做一个自动化分析的GitHub的Action,让上游发生了新的pr的时候,我们在自己的issue清单中新建一个issue,根据上游更新的实际情况,判断是否需要修订我们已经翻译过的内容。

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

No branches or pull requests

2 participants