Skip to content

Commit

Permalink
Update: a small change.
Browse files Browse the repository at this point in the history
  • Loading branch information
chouchongYHMing committed Sep 10, 2024
1 parent 3c2dbc3 commit 8b9bef0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/i18n-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Internationalization (aka i18n) is essential for software that aims to become gl

## Motivation

During the development of the Karmada dashboard, we maintained the locales files manually in the early stages. If new Chinese content was added to the code, we need to replace Chinese content with i18n keys and i18n function. After that, a mapping of code points to the corresponding Chinese content was added to the Chinese locales file. Then translating the Chinese content and inserting a mapping of code points to the translated content in the locales files of the respective languages. When the project was small and the amount of Chinese characters was limited, the cost of manual maintenance was relatively acceptable. However, as the project scale up and the number of Chinese characters increased rapidly, the cost of maintaining locales files in manual way rose exponentially. Therefore, an automated i18n tool was needed to meet the i18n requirements of the Karmada dashboard. In the open source community, it was hard to find an out-of-the-box i18n tool that perfectly supported the i18n needs of the Karmada dashboard. Therefore, we aimed to develop an automated i18n tool which is based on the perspective of the Karmada dashboard's i18n requirements, to satisfy the specific i18n needs of the Karmada dashboard.
During the development of the Karmada dashboard, we maintained the locales files manually in the early stages. If new Chinese content was added to the code, we need to replace Chinese content with i18n keys and i18n function. After that, a mapping of code points to the corresponding Chinese content was added to the Chinese locales file. Then translating the Chinese content and inserting a mapping of code points to the translated content in the locales files of the respective languages. When the project was small and the amount of Chinese characters was limited, the cost of manual maintenance was relatively acceptable. However, as the project scaled up and the number of Chinese characters increased rapidly, the cost of maintaining locales files in manual way rose exponentially. Therefore, an automated i18n tool was needed to meet the i18n requirements of the Karmada dashboard. In the open source community, it was hard to find an out-of-the-box i18n tool that perfectly supported the i18n needs of the Karmada dashboard. Therefore, we aimed to develop an automated i18n tool which is based on the perspective of the Karmada dashboard's i18n requirements, to satisfy the specific i18n needs of the Karmada dashboard.
<!--
在开发Karmada dashboard的过程中,早期我们是通过人工的方式来维护locales文件,如果代码中新增了中文内容,则需要替换中文内容为对应的码点+i18n的调用函数,之后在中文的locales文件中插入码点和对应的中文内容的映射关系,再翻译中文内容,并在对应的语言的locales文件插入码点和对应翻译后内容的映射关系。在项目规模小,中文字符少的情况下手动维护的成本相对可以接受,但是一旦项目规模逐渐扩大、中文字符变多的情况下,手动维护locales文件的方式的成本会呈指数倍上升,因此需要一套i18n自动化工具来满足Karmada dashboard的i18n需求。在开源社区中我们发现很难找到一套开箱即用的i18n工具能够完美支持Karmada dashboard的i18n需求,因此我们希望从Karmada dashboard的i18n需求出发,实现一套满足Karmada dashboard的i18n需求的i18n自动化工具。
-->
Expand Down

0 comments on commit 8b9bef0

Please sign in to comment.