From b1863fc3ab6538e74b16e760d5f145c5ef39a0d5 Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Wed, 18 May 2022 05:31:30 -0700 Subject: [PATCH] Add contribute translations to learn.robosats documentation --- docs/_data/navigation.yml | 4 +- docs/_pages/contribute/00-contribute.md | 2 +- docs/_pages/contribute/02-translations.md | 44 ++++++++++++++++++- .../00-quick-start/00-quicks-start-guide.md | 12 ++--- 4 files changed, 52 insertions(+), 10 deletions(-) diff --git a/docs/_data/navigation.yml b/docs/_data/navigation.yml index 7787f9cb..cabca499 100644 --- a/docs/_data/navigation.yml +++ b/docs/_data/navigation.yml @@ -32,9 +32,9 @@ docs: - title: " Understand" url: /docs/understand/ children: - - title: "    Trade Pipeline" + - title: "    Trade Pipeline" url: /docs/trade-pipeline/ - - title: "    Premium" + - title: "     Premium" url: /docs/premium/ - title: "    Bonds" url: /docs/bonds/ diff --git a/docs/_pages/contribute/00-contribute.md b/docs/_pages/contribute/00-contribute.md index 2b446ce4..1aec17a1 100644 --- a/docs/_pages/contribute/00-contribute.md +++ b/docs/_pages/contribute/00-contribute.md @@ -8,7 +8,7 @@ sidebar: src: "_pages/contribute/00-contribute.md" --- -You can help RoboSats get better: +RoboSats is a fully community driven project. You can help RoboSats get better in many different ways. 1. [Development](/contribute/code/) 2. [Translations](/contribute/languages/) diff --git a/docs/_pages/contribute/02-translations.md b/docs/_pages/contribute/02-translations.md index 9354fd77..b67e6375 100644 --- a/docs/_pages/contribute/02-translations.md +++ b/docs/_pages/contribute/02-translations.md @@ -9,4 +9,46 @@ toc: true toc_sticky: true src: "_pages/contribute/02-translations.md" --- -{% include wip %} \ No newline at end of file + + +RoboSats is a way to exchange BTC for **any currency of the world**. As such, for many users this tool might only be useful if it is available in a language they can understand. Translating RoboSats into a new language is one of the most valuable contributions to the project, as it makes it available to new audience, increasing the reach of this cool freedom tool. + +There isn't a lot of text in RoboSats, however it might be best to split the work with another contributor. You can poll in the telegram community @RoboSats and find users willing to split the task. + +### How to contribute a new translation. + +Simply create a new translation file in `frontend/src/locales` [Link to GitHub](https://github.com/Reckless-Satoshi/robosats/tree/main/frontend/src/locales). In `locales` there is a single file with a json dictionary for every language. In order to create a new translation, simply copy `en.json` (the master text) into a new file named after the language's [ISO 639 two character code](https://www.loc.gov/standards/iso639-2/php/English_list.php). + +### Guidelines + +Each language `.json` dictionary contains pairs of keys and values in the following format { "key1":"value1", "key2":"value2", ...}. Most keys are the literal English sentence. These simply have to be translated on the right side, for example, in order to translate the `Make Order` button to Spanish we edit the json file to look like this `{... "Make Order":"Crear Orden",...}`. + +#### 1. **Not all keys are explicit sentences.** +Some keys are not the English senstence but a variable names e.g. "phone_unsafe_alert". In this case you must take a look at the value originally in `en.json`. + +#### 2. **The language dictionary is split into 9 sections.** +The first key of each section is a reference and does not need to be translated. For example, the second section starts with the key:value `"USER GENERATION PAGE - UserGenPage.js": "Landing Page and User Generation"` . It does not need to be translated, it is just information for the translator to understand what part of the app he will be working on. + +#### 3. **Try to keep a similar length to the original sentence.** +In most cases it will be okay if the translation is shorter. However, translations that result in a higher character count might break the UI! It might not always be possible to stick to the length of the English sentence. In those cases the UI might have to be changed, contact the responsible person for such a change. + +#### 4. **Some sentences contain variables** +For example, {{currencyCode}}. It will insert the currency code where the variable is found. E.g., `"Pay 30 {{currencyCode}}"` will render as "Pay 30 USD". + +#### 5. **Some sentences contain HTML tags** +These tags are usually hyperlinks. For example in `{"phone_unsafe_alert": "Use <1>Tor Browser and visit the <3>Onion site."}` the children text of <1> (Tor Browser) will link to the Tor Download website, and the children of <3> will link to the RoboSats Onion site. + +#### 6. **It is best to translate from top to bottom of the .json file** +Some text is high priority, some other text is low priority.** Some keys are likely to change soon or they might not be so relevant for the user of the app. The translation files are sorted from top to bottom by the priority of the translation. + +#### 7. Use a **spell checker** +Yes, please ;) + +#### 8. **Understand the context, where will this string be displayed?** +Literal translations might not work well in some languages. While in English the wording is always similar regardless of the position in the UI, in some languages it might be very different if you are translating a button (the user is taking an action) or if you are simply translating a tooltip. It might be clever to translate the strings while looking at the app. However, many strings can only be found while trading. The testnet RoboSats site is great for this use, as you can explore the whole app simply interacting with it with a testnet lightning wallet. However, if you cannot find where a string is displayed, it might be faster to simply write a message on the telegram group @robosats. + +#### 9. **Congratulate yourself** +Seriously. It's so awesome you are helping build freedom tools! + + + diff --git a/docs/_pages/docs/00-quick-start/00-quicks-start-guide.md b/docs/_pages/docs/00-quick-start/00-quicks-start-guide.md index 07df3c48..19a83365 100644 --- a/docs/_pages/docs/00-quick-start/00-quicks-start-guide.md +++ b/docs/_pages/docs/00-quick-start/00-quicks-start-guide.md @@ -6,12 +6,12 @@ sidebar: title: " Quick Start" nav: docs --- -RoboSats is an easy way to privately exchange Bitcoin for national currencies. It simplifies the peer-to-peer experience and makes use lightning hold invoices to minimize custody and trust requirements. The deterministically generated avatars help users stick to best privacy practices. +RoboSats is an easy way to privately exchange Bitcoin for national currencies It simplifies the peer-to-peer experience and makes use lightning hold invoices to minimize custody and trust requirements. -**Let's go!** To start using RoboSats you only need two things: a [ Lightning Wallet](/docs/wallets/) and a [TOR enabled Web Browser](/docs/tor/). +**Let's go!** To start using RoboSats you only need a [ Lightning Wallet](/docs/wallets/) and a [TOR enabled Web Browser](/docs/tor/). {: .notice--primary} -1. Get a Lightning enabled Wallet -2. Get Tor Browser -3. Access RoboSats -4. Watch and read simple tutorials \ No newline at end of file +1. Get a Lightning enabled [Wallet](/docs/wallets/) +2. Get [Tor Browser](https://www.torproject.org/download/) +3. Access [RoboSats](/docs/access/) +4. Watch and read simple [tutorials](/watch/en/) \ No newline at end of file