From 8daffd69eb916d4f5a18c3fd288d99caca8d3c9e Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 7 Apr 2023 14:49:28 -0700 Subject: rename coinos to hashme --- doc/i18n-technical.md | 12 ++++++------ doc/i18n.md | 26 +++++++++++++------------- 2 files changed, 19 insertions(+), 19 deletions(-) (limited to 'doc') diff --git a/doc/i18n-technical.md b/doc/i18n-technical.md index 3f6a09d5..7352f88b 100644 --- a/doc/i18n-technical.md +++ b/doc/i18n-technical.md @@ -1,4 +1,4 @@ -# coinos Internationalization - Technical Information +# hashme Internationalization - Technical Information _NOTE: This documentation was written for people with a technical background. If you do not have a technical background, consider reading [this guide](./i18n.md) instead._ @@ -6,11 +6,11 @@ Last Updated: 2022-08-23 ## Dependencies -coinos's internationalization system depends on the `npm` package [`sveltekit-i18n`](https://www.npmjs.com/package/sveltekit-i18n). Consider reading [its documentation](https://github.com/sveltekit-i18n/lib/tree/master/docs/README.md) in addition to this. +hashme's internationalization system depends on the `npm` package [`sveltekit-i18n`](https://www.npmjs.com/package/sveltekit-i18n). Consider reading [its documentation](https://github.com/sveltekit-i18n/lib/tree/master/docs/README.md) in addition to this. ## Internationalization Code -The main code for coinos's internationalization is at `src/lib/translations/index.js`. When imported, it does the following: +The main code for hashme's internationalization is at `src/lib/translations/index.js`. When imported, it does the following: 1. Load all of the locales asynchronously, based on . 2. Initialize `sveltekit-i18n`. @@ -19,7 +19,7 @@ It also defines important constants, including the list of available locales and ## Locale Files -Each locale in `coinos-ui-v2` is defined by a JSON file in `src/locales`. Its name is the locale's [ISO 639-1 code](https://en.wikipedia.org/wiki/ISO_639-1) plus `.json`. It is simply a file that maps string IDs to translated strings. Here is an example of `en.json`: +Each locale in `hashme-ui-v2` is defined by a JSON file in `src/locales`. Its name is the locale's [ISO 639-1 code](https://en.wikipedia.org/wiki/ISO_639-1) plus `.json`. It is simply a file that maps string IDs to translated strings. Here is an example of `en.json`: ```json { @@ -41,11 +41,11 @@ Strings are internationalized by simply using `sveltekit-i18n`'s `$t` function. ## The Locale Selector -coinos also has a `LocaleSelector` component, which should be used to select locales. It is a dropdown that allows you to select & update the locale. +hashme also has a `LocaleSelector` component, which should be used to select locales. It is a dropdown that allows you to select & update the locale. ## The Guided Translation Script -coinos has a Python script that helps you with the technical parts of translation. It is located at `src/locales/guided_translation.py`. It also has some utility functions: +hashme has a Python script that helps you with the technical parts of translation. It is located at `src/locales/guided_translation.py`. It also has some utility functions: - `nested_dict_keys` - gets a list of keys of a nested dictionary in dot-separated shallow format (e.g. a.b.c) - `create_locale` - adds a new locale to the lang.json file diff --git a/doc/i18n.md b/doc/i18n.md index c6577b4d..660d58b5 100644 --- a/doc/i18n.md +++ b/doc/i18n.md @@ -1,10 +1,10 @@ -# coinos Internationalization +# hashme Internationalization -coinos can be translated into other languages by editing [JSON](https://www.json.org/json-en.html) files. You do not need programming knowledge to do this, or to use these instructions. Here are instructions on how to translate coinos: +hashme can be translated into other languages by editing [JSON](https://www.json.org/json-en.html) files. You do not need programming knowledge to do this, or to use these instructions. Here are instructions on how to translate hashme: _NOTE: This guide was written for people without a technical background. If you want more technical details, click [here](./i18n-technical.md)._ -These instructions assume you have a GitHub account and have permission to modify this repository. If you do not have permission, you will need to [make a fork](https://github.com/coinos/coinos-ui-v2/fork) using the link on the top-right, then follow these instructions to translate your fork, then make a pull request using the link below the "Code" button to apply your changes to the main repository. +These instructions assume you have a GitHub account and have permission to modify this repository. If you do not have permission, you will need to [make a fork](https://github.com/hashme/hashme-ui-v2/fork) using the link on the top-right, then follow these instructions to translate your fork, then make a pull request using the link below the "Code" button to apply your changes to the main repository. Last Updated: 2023-01-05 @@ -12,11 +12,11 @@ Last Updated: 2023-01-05 ### Language Codes -Before you can translate coinos, you need to know the [ISO 639-1 code](https://en.wikipedia.org/wiki/ISO_639-1) of your language. This is a standard two-letter code that your browser uses to refer to a language (for example, English is `en`, and Spanish is `es`). You can also add a dash and more letters to refer to a specific region (for example, American English is `en-US`, and British English is `en-GB`). A list of all codes can be found [here](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes), and Firefox-based browsers show you the code when you are selecting your browser's language. +Before you can translate hashme, you need to know the [ISO 639-1 code](https://en.wikipedia.org/wiki/ISO_639-1) of your language. This is a standard two-letter code that your browser uses to refer to a language (for example, English is `en`, and Spanish is `es`). You can also add a dash and more letters to refer to a specific region (for example, American English is `en-US`, and British English is `en-GB`). A list of all codes can be found [here](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes), and Firefox-based browsers show you the code when you are selecting your browser's language. ### Locale Files -Each translation of coinos is stored in a special _locale file_. These files can be found in the `src/locales` folder in the coinos directory. The name of these files is the language code plus "`.json`". A file might look something like this: +Each translation of hashme is stored in a special _locale file_. These files can be found in the `src/locales` folder in the hashme directory. The name of these files is the language code plus "`.json`". A file might look something like this: ```JSON { @@ -42,7 +42,7 @@ There is also a JSON file that controls which languages are understood. It is at } ``` -This file simply maps each language to its name. It is used both to get a list of languages and to get the name of each language for the language selector. If a translation is not in this file, coinos will not be able to see it. +This file simply maps each language to its name. It is used both to get a list of languages and to get the name of each language for the language selector. If a translation is not in this file, hashme will not be able to see it. ### JSON Sections @@ -62,7 +62,7 @@ You might notice that some of the left-text in the language files don't have a s These denote sections of the JSON file, which helps keep it organized. If you're translating some text that is in a section, make sure the translated text is in the same section of the new file. If that section doesn't exist, just create it. -In the translation files, sections roughly correspond to where the the text is in coinos. This can be useful if you need context for some text. Here are some of these associations (`A.B` means section `B` is located inside `A`): +In the translation files, sections roughly correspond to where the the text is in hashme. This can be useful if you need context for some text. Here are some of these associations (`A.B` means section `B` is located inside `A`): | Section | Location | | -------------- | ------------------------------------------------- | @@ -82,7 +82,7 @@ In the translation files, sections roughly correspond to where the the text is i | user.support | the user's support page | | transactions | anything to do with transactions | -If you have the `grep` tool installed and know how to use a terminal, you can use it to find where a certain bit of text is being used. In the main folder (usually called `coinos-ui-v2`), you can use the following command to find where `transactions.submit` is being used, for example: +If you have the `grep` tool installed and know how to use a terminal, you can use it to find where a certain bit of text is being used. In the main folder (usually called `hashme-ui-v2`), you can use the following command to find where `transactions.submit` is being used, for example: ```bash grep -r "transactions.submit" src @@ -93,10 +93,10 @@ grep -r "transactions.submit" src Sometimes, you will see strange text surrounded with `<>` angle brackets. Every one of these "HTML tags" will be followed by another one starting with a slash. Here's an example: ```JSON -"p1": "coinos is an open source bitcoin web wallet, point of sale, ecommerce marketplace and exchange platform. Development started in Vancouver in September 2012 as a way to provide local merchants with a convenient way to accept bitcoin payments.", +"p1": "hashme is an open source bitcoin web wallet, point of sale, ecommerce marketplace and exchange platform. Development started in Vancouver in September 2012 as a way to provide local merchants with a convenient way to accept bitcoin payments.", ``` -These apply a certain style to the text between them. For example, the tags above will make "coinos" and "open source" bold, leaving the rest non-bold. +These apply a certain style to the text between them. For example, the tags above will make "hashme" and "open source" bold, leaving the rest non-bold. When translating strings containing tags, don't change the tags. Do translate the text between them, and don't be afraid to move them around - just make sure they contain the same part of the sentence, and that the one without the slash is always before the one with the slash. Not all of the localizable strings support HTML tags, so you shouldn't use them if they aren't in the original string you're translating. @@ -109,7 +109,7 @@ Follow these steps to create a new translation. You will need a GitHub account t ![Creating a new translation in GitHub](./img/create_locale_github.png) 3. Copy the text from `en.json` into this new file. 4. Translate all of the pieces of text on the right. **Do not translate or alter in any way the pieces of text on the left, or any line that doesn't have two pieces of text!** - _NOTE: "coinos" is a feminine noun in languages with grammatical gender._ + _NOTE: "hashme" is a feminine noun in languages with grammatical gender._ _NOTE: The system will not break if you miss any translation. Instead, it will use the English version of that text._ ![Translating in GitHub](./img/translate_github.png) 5. Scroll down and use the green button to commit the file. @@ -128,7 +128,7 @@ Follow these steps to add to an existing translation. You will also need a GitHu 5. Use the pencil icon on the top-right to edit the file. 6. Add the whole line (both left and right parts) from step 3 to this file, in between the `{}` braces. Make sure the previous line has a comma at the end, and that it is in the same place as before (i.e. inside the same set of `{}` braces - if they don't exist, create them). 7. Translate the piece of text on the right, keeping the quotes surrounding it. **Do not translate or alter in any way the piece of text on the left, or any line that doesn't have two pieces of text!** - _NOTE: "coinos" is a feminine noun in languages with grammatical gender._ + _NOTE: "hashme" is a feminine noun in languages with grammatical gender._ 8. Repeat steps 3-7 for every piece of text you want to translate (you should probably open `en.json` in another tab, so that your changes from step 6 aren't erased). 9. Scroll down and use the green button to commit the file. @@ -141,4 +141,4 @@ There is also a program that helps you translate automatically - all you have to The script also shows you the ID of each bit of text you are translating, so that you can know where it is. `A.B` means string `B` in section `A`, `A.B.C` means string `C` in subsection `B` in section `A`, etc. -Clone the repository, then use the guided translation script (at `src/locales/guided_translation.py`) to update the translation files. You will need to pull before running, and commit/push your changes in order for them to be applied to coinos. +Clone the repository, then use the guided translation script (at `src/locales/guided_translation.py`) to update the translation files. You will need to pull before running, and commit/push your changes in order for them to be applied to hashme. -- cgit v1.2.3