提示:查看 server.yml 和 client.yml 的 git blame 的变通方法

在翻译时,查看字符串所属的提交记录往往很有帮助。为此,我会检查 GitHub 上的 blame 文件,例如 https://github.com/discourse/discourse/blame/master/config/locales/server.en.yml。现在,如果你点击该链接,很可能会看到一只独角兽的图片,而不是你原本想找的内容。这个问题已经存在相当长一段时间了,而且随着这两个大型 YML 文件不断变大,情况只会越来越糟。

我刚刚想出了一个变通方法,想与大家分享。

  1. 打开文件 discourse/config/locales/server.en.yml at main · discourse/discourse · GitHubhttps://github.com/discourse/discourse/blob/master/config/locales/client.en.yml。

  2. 滚动到底部

  3. 点击任意行号,然后选择“查看 git blame”。

经过一些测试,我可以确认:这种方法可以极大概率地避免出现独角兽问题。祝您使用愉快!

5 个赞