From 4fb61a3bf6741e5f9c46cea0f93749c1a0b4d862 Mon Sep 17 00:00:00 2001 From: Cinnamon Date: Thu, 20 Feb 2020 15:15:29 -0800 Subject: [PATCH] Add docs/translating.md -- instructions for adding new languages --- docs/translating.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 docs/translating.md diff --git a/docs/translating.md b/docs/translating.md new file mode 100644 index 0000000..758bb95 --- /dev/null +++ b/docs/translating.md @@ -0,0 +1,24 @@ +# How to add a new language to Oasis + +### 1. Make your own fork of the Oasis repository + +### 2. Add a new language choice on the settings page + +https://github.com/fraction/oasis/blob/16f19e85fbff2b656dd0f9f361bb3ae9f9da4e20/src/views/index.js#L794-L797 + +``` + languageOption("en", "English"), + languageOption("es", "EspaƱol") +``` + +Search the file for `English` to find the right spot. + +### 3. Add translated strings to i18n.js + +https://github.com/fraction/oasis/blob/16f19e85fbff2b656dd0f9f361bb3ae9f9da4e20/src/views/i18n.js#L4-L12 + +Add a new sub-object for the new language and put translated strings in it. + +Oasis uses English as a fallback if a language is not complete yet, so you can work incrementally. + +### 4. Make a pull request!