From a05494b810568630b3397277cf0544c434f04d75 Mon Sep 17 00:00:00 2001
From: Jerry <89069957+Jerry23011@users.noreply.github.com>
Date: Sat, 18 Nov 2023 13:38:44 -0800
Subject: [PATCH 1/9] docs: add translation guide
---
docs/How-to-translate-Easydict.md | 8 ++++++++
1 file changed, 8 insertions(+)
create mode 100644 docs/How-to-translate-Easydict.md
diff --git a/docs/How-to-translate-Easydict.md b/docs/How-to-translate-Easydict.md
new file mode 100644
index 000000000..b2673551d
--- /dev/null
+++ b/docs/How-to-translate-Easydict.md
@@ -0,0 +1,8 @@
+## Getting Started
+We are using String Catalog in Xcode to manage translations for Easydict, so the following steps are what you need to get started.
+##### Install Xcode 15+
+You can install Xcode from the [Mac App Store](https://apps.apple.com/app/xcode/id497799835)or its beta versions on [Apple Developer](https://developer.apple.com/xcode/resources/).
+##### Cloning and building the project
+1. Use git to clone the project from GitHub to your Mac. You can do this by using the [git command line tool](https://docs.github.com/en/get-started/getting-started-with-git), or by simply using [GitHub Desktop](https://desktop.github.com).
+2. Open the project and build it, detailed instructions on how to build the project can be found [here](/README_EN#developer-build)
+3.
\ No newline at end of file
From 3c2873de37123fbb485fd8ce9eb8e4349fe78fe5 Mon Sep 17 00:00:00 2001
From: Jerry <89069957+Jerry23011@users.noreply.github.com>
Date: Sat, 18 Nov 2023 13:41:02 -0800
Subject: [PATCH 2/9] docs: update translation guide
---
docs/How-to-translate-Easydict.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/How-to-translate-Easydict.md b/docs/How-to-translate-Easydict.md
index b2673551d..a2c5dc96d 100644
--- a/docs/How-to-translate-Easydict.md
+++ b/docs/How-to-translate-Easydict.md
@@ -1,8 +1,8 @@
## Getting Started
We are using String Catalog in Xcode to manage translations for Easydict, so the following steps are what you need to get started.
-##### Install Xcode 15+
-You can install Xcode from the [Mac App Store](https://apps.apple.com/app/xcode/id497799835)or its beta versions on [Apple Developer](https://developer.apple.com/xcode/resources/).
-##### Cloning and building the project
+#### Install Xcode 15+
+You can install Xcode from the [Mac App Store](https://apps.apple.com/app/xcode/id497799835) or its beta versions on [Apple Developer](https://developer.apple.com/xcode/resources/).
+#### Cloning and building the project
1. Use git to clone the project from GitHub to your Mac. You can do this by using the [git command line tool](https://docs.github.com/en/get-started/getting-started-with-git), or by simply using [GitHub Desktop](https://desktop.github.com).
-2. Open the project and build it, detailed instructions on how to build the project can be found [here](/README_EN#developer-build)
+2. Open the project and build it, detailed instructions on how to build the project can be found [here](/README_EN.md#developer-build)
3.
\ No newline at end of file
From 7460c0df5bfa7527752ce702011a6b796b703f40 Mon Sep 17 00:00:00 2001
From: Jerry <89069957+Jerry23011@users.noreply.github.com>
Date: Sat, 18 Nov 2023 16:05:59 -0800
Subject: [PATCH 3/9] Update How-to-translate-Easydict.md
---
docs/How-to-translate-Easydict.md | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/docs/How-to-translate-Easydict.md b/docs/How-to-translate-Easydict.md
index a2c5dc96d..6a8942180 100644
--- a/docs/How-to-translate-Easydict.md
+++ b/docs/How-to-translate-Easydict.md
@@ -1,8 +1,21 @@
## Getting Started
-We are using String Catalog in Xcode to manage translations for Easydict, so the following steps are what you need to get started.
+We are using String Catalog in Xcode to manage translations for Easydict, so the following steps are what you need to get started on localizing the app.
#### Install Xcode 15+
You can install Xcode from the [Mac App Store](https://apps.apple.com/app/xcode/id497799835) or its beta versions on [Apple Developer](https://developer.apple.com/xcode/resources/).
#### Cloning and building the project
-1. Use git to clone the project from GitHub to your Mac. You can do this by using the [git command line tool](https://docs.github.com/en/get-started/getting-started-with-git), or by simply using [GitHub Desktop](https://desktop.github.com).
-2. Open the project and build it, detailed instructions on how to build the project can be found [here](/README_EN.md#developer-build)
-3.
\ No newline at end of file
+1. Use git to clone the project from GitHub to your Mac. You can do this by using the [git command line tool](https://docs.github.com/en/get-started/getting-started-with-git) or [GitHub Desktop](https://desktop.github.com).
+2. Open the project and build it, detailed instructions on how to build the project can be found [here](/README_EN.md#developer-build).
+#### Add your language to String Catalog
+Now you can start adding your own language!
+1. Navigate to `Easydict -> Easydict -> App -> Localizable.xcstrings`. Also Expand `Main.storyboard` to find `Main.xcstrings (Strings)` These two `.xcstrings` files are what you are going to work on.
+2. Click the `Localizable.xcstrings` file first and click the `+` button to find a list of available options. If you don't see the language you want to localize in the list (e.g. Canadian English). Scroll all the way down to the bottom of the menu to find `More Languages`.
+3. After you add a language, you can start translating. Don't forget to translate the strings in `Main.xcstring (Strings)`😉
+#### Previewing your translations
+After you are done with your translations, it's nice to run the app and preview them to look for rooms for improvements. You can set the app language to the one that you did with a simple few clicks.
+1. Find the Easydict icon on the top toolbar of Xcode and click on it
+2. Click on `Edit Scheme...`
+3. Select `RUN` tab on the left sidebar and choose `Options`
+4. Scroll down and find `App Language`, then choose the one you localized for
+5. Close the tab and use ⌘R to run the app and see your translations
+#### Pushing your changes to GitHub
+#### Additional Resources
\ No newline at end of file
From f36a5f9c750b6bec26ac5ee939155b961fdf23e4 Mon Sep 17 00:00:00 2001
From: Jerry <89069957+Jerry23011@users.noreply.github.com>
Date: Sat, 18 Nov 2023 16:18:24 -0800
Subject: [PATCH 4/9] docs: wrap up translation doc
---
docs/How-to-translate-Easydict.md | 26 ++++++++++++++++++--------
1 file changed, 18 insertions(+), 8 deletions(-)
diff --git a/docs/How-to-translate-Easydict.md b/docs/How-to-translate-Easydict.md
index 6a8942180..b29a68cb4 100644
--- a/docs/How-to-translate-Easydict.md
+++ b/docs/How-to-translate-Easydict.md
@@ -1,21 +1,31 @@
## Getting Started
We are using String Catalog in Xcode to manage translations for Easydict, so the following steps are what you need to get started on localizing the app.
-#### Install Xcode 15+
+### Install Xcode 15+
You can install Xcode from the [Mac App Store](https://apps.apple.com/app/xcode/id497799835) or its beta versions on [Apple Developer](https://developer.apple.com/xcode/resources/).
-#### Cloning and building the project
+### Cloning and building the project
1. Use git to clone the project from GitHub to your Mac. You can do this by using the [git command line tool](https://docs.github.com/en/get-started/getting-started-with-git) or [GitHub Desktop](https://desktop.github.com).
-2. Open the project and build it, detailed instructions on how to build the project can be found [here](/README_EN.md#developer-build).
-#### Add your language to String Catalog
+2. Make sure you are on the [dev](https://github.com/tisfeng/Easydict/tree/dev) branch, this is where development takes place.
+3. Open the project and build it, detailed instructions on how to build the project can be found [here](/README_EN.md#developer-build).
+### Add your language to String Catalog
Now you can start adding your own language!
1. Navigate to `Easydict -> Easydict -> App -> Localizable.xcstrings`. Also Expand `Main.storyboard` to find `Main.xcstrings (Strings)` These two `.xcstrings` files are what you are going to work on.
2. Click the `Localizable.xcstrings` file first and click the `+` button to find a list of available options. If you don't see the language you want to localize in the list (e.g. Canadian English). Scroll all the way down to the bottom of the menu to find `More Languages`.
3. After you add a language, you can start translating. Don't forget to translate the strings in `Main.xcstring (Strings)`😉
-#### Previewing your translations
+### Previewing your translations
After you are done with your translations, it's nice to run the app and preview them to look for rooms for improvements. You can set the app language to the one that you did with a simple few clicks.
1. Find the Easydict icon on the top toolbar of Xcode and click on it
2. Click on `Edit Scheme...`
-3. Select `RUN` tab on the left sidebar and choose `Options`
+3. Select the `RUN` tab on the left sidebar and go to `Options`
4. Scroll down and find `App Language`, then choose the one you localized for
5. Close the tab and use ⌘R to run the app and see your translations
-#### Pushing your changes to GitHub
-#### Additional Resources
\ No newline at end of file
+### Pushing your changes to GitHub
+After you finish checking your localization, it's time to push the changes to GitHub and start a pull request.
+- [Start a Pull Request](https://docs.github.com/en/pull-requests).
+- Remember to set the merge target to the `dev` branch
+Now you can wait for a maintainer's review and get your translations adopted in the next Easydict version.
+### Additional Resources
+- [Localization - Apple Developer](https://developer.apple.com/documentation/Xcode/localization)
+- [Localizing and varying text with a string catalog - Apple Developer](https://developer.apple.com/documentation/xcode/localizing-and-varying-text-with-a-string-catalog)
+- [Discover String Catalogs - WWDC23 Videos](https://developer.apple.com/videos/play/wwdc2023/10155)
+
+- [Apple Localization Glossaries](https://applelocalization.com)
\ No newline at end of file
From 69236e7913e2f977c4aaa1ca4e3cd0ea832a5ac5 Mon Sep 17 00:00:00 2001
From: Jerry <89069957+Jerry23011@users.noreply.github.com>
Date: Sat, 18 Nov 2023 16:19:42 -0800
Subject: [PATCH 5/9] docs: update header
---
docs/How-to-translate-Easydict.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/How-to-translate-Easydict.md b/docs/How-to-translate-Easydict.md
index b29a68cb4..a5d20fba7 100644
--- a/docs/How-to-translate-Easydict.md
+++ b/docs/How-to-translate-Easydict.md
@@ -1,4 +1,4 @@
-## Getting Started
+# Getting Started
We are using String Catalog in Xcode to manage translations for Easydict, so the following steps are what you need to get started on localizing the app.
### Install Xcode 15+
You can install Xcode from the [Mac App Store](https://apps.apple.com/app/xcode/id497799835) or its beta versions on [Apple Developer](https://developer.apple.com/xcode/resources/).
From 1fca1e40469c8726ba24383fde33c6525ada7698 Mon Sep 17 00:00:00 2001
From: Jerry <89069957+Jerry23011@users.noreply.github.com>
Date: Sat, 18 Nov 2023 17:23:42 -0800
Subject: [PATCH 6/9] docs: rename English translation guide
---
...-to-translate-Easydict.md => How-to-translate-Easydict-en.md} | 1 -
1 file changed, 1 deletion(-)
rename docs/{How-to-translate-Easydict.md => How-to-translate-Easydict-en.md} (99%)
diff --git a/docs/How-to-translate-Easydict.md b/docs/How-to-translate-Easydict-en.md
similarity index 99%
rename from docs/How-to-translate-Easydict.md
rename to docs/How-to-translate-Easydict-en.md
index a5d20fba7..b36172a35 100644
--- a/docs/How-to-translate-Easydict.md
+++ b/docs/How-to-translate-Easydict-en.md
@@ -27,5 +27,4 @@ Now you can wait for a maintainer's review and get your translations adopted in
- [Localization - Apple Developer](https://developer.apple.com/documentation/Xcode/localization)
- [Localizing and varying text with a string catalog - Apple Developer](https://developer.apple.com/documentation/xcode/localizing-and-varying-text-with-a-string-catalog)
- [Discover String Catalogs - WWDC23 Videos](https://developer.apple.com/videos/play/wwdc2023/10155)
-
- [Apple Localization Glossaries](https://applelocalization.com)
\ No newline at end of file
From 160dd323868cf16823a1d7ea2bef0171c0b08dad Mon Sep 17 00:00:00 2001
From: Jerry <89069957+Jerry23011@users.noreply.github.com>
Date: Sat, 18 Nov 2023 17:24:01 -0800
Subject: [PATCH 7/9] docs: add SC translation guide
---
docs/How-to-translate-Easydict-zh.md | 30 ++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
create mode 100644 docs/How-to-translate-Easydict-zh.md
diff --git a/docs/How-to-translate-Easydict-zh.md b/docs/How-to-translate-Easydict-zh.md
new file mode 100644
index 000000000..d375bfc5e
--- /dev/null
+++ b/docs/How-to-translate-Easydict-zh.md
@@ -0,0 +1,30 @@
+# 开始翻译
+Easydict 的翻译是通过 Xcode 中的 String Catalog 管理的,下面是翻译 Easydict 的详细步骤
+### 安装 Xcode 15+
+可以从 [Mac App Store](https://apps.apple.com/app/xcode/id497799835) 安装Xcode,或者从 [Apple Developer](https://developer.apple.com/xcode/resources/) 获取 Beta 版本。
+### 克隆和构建项目
+1. 使用 git 将项目从 GitHub 克隆到本地,这里可以使用 [git 命令行工具](https://docs.github.com/en/get-started/getting-started-with-git) 或 [GitHub Desktop](https://desktop.github.com)
+2. 切换到 [dev](https://github.com/tisfeng/Easydict/tree/dev) 分支
+3. 打开项目并构建,有关如何构建项目的详细说明在[这里](/README.md#developer-build)
+### 添加语言到String Catalog
+现在可以添加新的语言了!
+1. 找到 `Easydict -> Easydict -> App -> Localizable.xcstrings`。同时展开 `Main.storyboard` 然后找到 `Main.xcstrings (Strings)`。这两个 `.xcstrings` 是翻译要用的
+2. 首先打开 `Localizable.xcstrings` 文件,然后点`+`按钮添加语言,如果找不到要做翻译的语言(例如 Canadian English),滚动到菜单底部,打开二级菜单 `More Languages`
+3. 添加语言后就可以开始翻译了。不要忘记翻译 `Main.xcstring (Strings)` 中的字符串😉
+### 预览翻译
+在完成翻译后可以跑一下 Easydict 做检查。
+1. 在 Xcode 顶部工具栏上找到 Easydict 图标,然后点击它
+2. 点击 `Edit Scheme...`
+3. 在侧边栏中选择 `RUN`,然后转到 `Options`
+4. 向下滚动找到 `App Language`,然后选择要检查的语言
+5. 关闭选项卡,然后使用快捷键 ⌘R 运行 Easydict 并检查翻译
+### 将更改 push 到 GitHub
+在完成本地化检查后就可以将更改 push 到 GitHub 并发起拉取请求了。
+- [发起拉取请求](https://docs.github.com/zh/pull-requests)。
+- 记得将合并目标设置为`dev`分支
+最后等待 review 完成就可以合并到主仓库啦,下一次发版的时候就能看到最新的翻译啦!
+### 其他资源
+- [Localization - Apple Developer](https://developer.apple.com/documentation/Xcode/localization)
+- [Localizing and varying text with a string catalog - Apple Developer](https://developer.apple.com/documentation/xcode/localizing-and-varying-text-with-a-string-catalog)
+- [Discover String Catalogs - WWDC23 Videos](https://developer.apple.com/videos/play/wwdc2023/10155)
+- [Apple 本地化术语表](https://applelocalization.com)
\ No newline at end of file
From 7210a1489b593f86f8fa510a796a9a1b86cbca6b Mon Sep 17 00:00:00 2001
From: Jerry <89069957+Jerry23011@users.noreply.github.com>
Date: Sat, 18 Nov 2023 17:24:25 -0800
Subject: [PATCH 8/9] docs: add Localization section for README and README_EN
---
README.md | 3 +++
README_EN.md | 3 +++
2 files changed, 6 insertions(+)
diff --git a/README.md b/README.md
index 327f964a4..765742acf 100644
--- a/README.md
+++ b/README.md
@@ -624,6 +624,9 @@ Easydict 有一些应用内快捷键,方便你在使用过程中更加高效
如果 PR 是关于某个新功能或者涉及 UI 等较大的变动,建议先开个 issue 讨论一下,避免功能重复或者冲突。
+### 为 Easydict 提供翻译(本地化)
+我们正在寻找能为 Easydict 提供翻译的 contributor,如果你想为 Easydict 提供翻译,请参考[这篇文档](/docs/How-to-translate-Easydict-zh)
+
## Star History
diff --git a/README_EN.md b/README_EN.md
index 33194b8db..9a3c06bfb 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -625,6 +625,9 @@ If the PR is a bug fix or feature implementation for an existing issue, please s
If the PR is about a new feature or involves major changes to the UI, it is recommended to open an issue for discussion first to avoid duplicate or conflicting features.
+### Localization
+We are actively looking for contributors who can translate Easydict into your own languages. If you are interested, please refer to this [documentation](/docs/How-to-translate-Easydict-en) for details.
+
## Star History
From 929c3137b11eef20805d5be57573215ce5e1b2e6 Mon Sep 17 00:00:00 2001
From: Jerry <89069957+Jerry23011@users.noreply.github.com>
Date: Sat, 18 Nov 2023 17:27:43 -0800
Subject: [PATCH 9/9] docs: update toc for README and README_EN
---
README.md | 3 ++-
README_EN.md | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 765742acf..f0d94a0b1 100644
--- a/README.md
+++ b/README.md
@@ -87,6 +87,7 @@
- [类似开源项目](#类似开源项目)
- [初衷](#初衷)
- [贡献指南](#贡献指南)
+ - [本地化](#本地化)
- [致谢](#致谢)
- [声明](#声明)
- [赞助支持](#赞助支持)
@@ -624,7 +625,7 @@ Easydict 有一些应用内快捷键,方便你在使用过程中更加高效
如果 PR 是关于某个新功能或者涉及 UI 等较大的变动,建议先开个 issue 讨论一下,避免功能重复或者冲突。
-### 为 Easydict 提供翻译(本地化)
+### 本地化
我们正在寻找能为 Easydict 提供翻译的 contributor,如果你想为 Easydict 提供翻译,请参考[这篇文档](/docs/How-to-translate-Easydict-zh)
## Star History
diff --git a/README_EN.md b/README_EN.md
index 9a3c06bfb..36dc19c72 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -85,6 +85,7 @@
- [Similar Open Source Projects](#similar-open-source-projects)
- [Motivation](#motivation)
- [Contributor Guide](#contributor-guide)
+ - [Localization](#localization)
- [Acknowledgements](#acknowledgements)
- [Statement](#statement)
- [Sponsor](#sponsor)