Skip to content

Commit

Permalink
docs: wrap up translation doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerry23011 committed Nov 19, 2023
1 parent 7460c0d commit f36a5f9
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions docs/How-to-translate-Easydict.md
Original file line number Diff line number Diff line change
@@ -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
### 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)

0 comments on commit f36a5f9

Please sign in to comment.