Skip to content

Commit

Permalink
Proofread and rework localization documentation (#973)
Browse files Browse the repository at this point in the history
* how-it-works.md update

Rework headers and proofread

* Update how-it-works.md

Refactor in active voice

* Update how-it-works.md

Proofread

* Update how-to-contribute.md

Proofread and refactor to active voice

* Update how-to-contribute.md

Proofread

* Update overview.md

Proofread

* Update translation-style-guide.md

Proofread

* Update translation-style-guide.md

Proofread

* Update translation-style-guide.md

Proofread

* Update translation-style-guide.md

Proofread and active voice

* Update how-to-contribute.md

Link formating

* Update overview.md

Link formating

* short_naming

* update_readme
  • Loading branch information
reveloper authored Feb 20, 2025
1 parent ec4f94d commit b546619
Show file tree
Hide file tree
Showing 6 changed files with 153 additions and 156 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

### Thank you for your interest in contributing!

Please see [our contributing guide on documentation](/v3/contribute/) for the latest information on how to contribute!
Please see [our contributing guide on documentation](https://docs.ton.org/v3/contribute) for the latest information on how to contribute!
29 changes: 12 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
<img align="left" width="300px" src="static\img\readme\about.png">

## TON Blockchain Documentation 📚
## TON documentation 📚

This is the official repository for The Open Network documentation.

Latest documentation release: [docs.ton.org](https://docs.ton.org)

The mission of this documentation is to collect all available information and knowledge that can help TON developers.

You can improve the documentation by following steps below.

---

Expand All @@ -30,29 +26,28 @@ Join TON Docs Club chat in Telegram to join contributors party:

## How to Contribute? 🦄

If you are a developer and faced some difficulties, successfully overcoming them - share this knowledge with future developers!

— Have an issue? [Prepare a solution with TON Docs Wizard](https://t.me/ton_docs_bot).
— Have an idea? [Submit a Feature Request](https://github.com/ton-community/ton-docs/issues/new/choose).
— Want to contribute? [Setup your environment](https://github.com/ton-community/ton-docs#set-up-your-environment-%EF%B8%8F).
— Want to contribute? [How to contribute](https://docs.ton.org/v3/contribute).
— Want to translate? [Localization](https://docs.ton.org/v3/contribute/localization-program/how-to-contribute)


Contributing best practices: [docs/contribute](/v3/contribute)

---

## Set up your Environment ☁️
## Set up your environment ☁️

If you are changing the sidebar or adding media-files, please check that your submission will not break production.
If you're changing the sidebar or adding media-files, links, please make sure that your submission won't break production.

You can do this in two ways:

### Cloud (quick way)
### Cloud

Use Gitpod (a free, online VS code-like IDE) for contributing. It will launch a workspace with a single click:
Use Gitpod for contributing. It'll launch a workspace with a single click:

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/ton-community/ton-docs)

### Local (default way)
### Local

1. Download repository from GitHub with its submodules

Expand Down Expand Up @@ -81,14 +76,14 @@ Use Gitpod (a free, online VS code-like IDE) for contributing. It will launch a
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
## Install Recursive Module
## Install recursive module
If you cloned the repository from GitHub without step 1, you will need to install the submodules to enable local execution.
If you cloned the repository from GitHub without step 1, you'll need to install the submodules to enable local execution.
```
git submodule update --init --recursive
```
## Contributors Wall
## Contributors wall
<a href="https://github.com/ton-community/ton-docs/graphs/contributors">
<img src="https://contrib.rocks/image?repo=ton-community/ton-docs&max=204" />
</a>
Expand Down
64 changes: 33 additions & 31 deletions docs/v3/contribute/localization-program/how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,46 @@

![how it works](/img/localizationProgramGuideline/localization-program.png)

The **TownSquare Labs Localization Program** comprises several key components. This chapter will provide an overview of how the program operates, helping you understand its workings and how to use it effectively.
The TownSquare Labs Localization Program comprises several key components. This chapter provides an overview of localization, helping you understand how it works and how to use it effectively.

Within this system, we integrate several applications to function seamlessly as a unified program:

- **GitHub**: Hosts the documentation, synchronizes docs from the upstream repository, and syncs translations to specific branches.
- **Crowdin**: Manages translation processes, including translating, proofreading, and setting language preferences.
- **AI Systems**: Utilizes advanced AI to assist translators, ensuring smooth workflow.
- **Customized Glossary**: Guides translators and ensures AI generates accurate translations based on the project’s context. Users can also upload their glossaries as needed.
- **Customized Glossary**: This glossary guides translators and ensures AI generates accurate translations based on the project’s context. Users can also upload their glossaries as needed.

:::info
This guide won't cover the entire process in detail, but it will highlight the key components that make the TownSquare Labs Localization Program unique. You can explore the program further on your own.
This guide won't cover the entire process but will highlight the key components that make the TownSquare Labs Localization Program unique. You can explore the program further on your own.
:::

## GitHub Synchronization for Documentation and Translations
## GitHub synchronization for documentation and translations

Our repository utilizes several branches for managing documentation and translations. Below is a detailed explanation of the purpose and function of each special branch:
Our repository utilizes several branches to manage documentation and translations. Below is a detailed explanation of the purpose and function of each special branch:

### Branches Overview
### Branches overview

- **`dev`**
The `dev` branch runs GitHub Actions to handle synchronization tasks. You can find the workflow configurations in the [**`.github/workflows`**](https://github.com/TownSquareXYZ/ton-docs/tree/dev/.github/workflows) directory:

- **`sync-fork.yml`**: This workflow synchronizes documentation from the upstream repository. It runs daily at 00:00.
- **`sync-translations.yml`**: This workflow synchronizes updated translations to the respective language branches for preview purposes on the corresponding language websites.
- **`sync-translations.yml`**: This workflow synchronizes updated translations to the respective language branches for preview purposes on the corresponding websites.

- **`main`**
This branch stays in sync with the upstream repository through GitHub Actions running on the `dev` branch. It is also used for updating certain codes that we intend to propose to the original repository.
This branch stays in sync with the upstream repository through GitHub Actions, which runs on the `dev` branch. It also updates specific codes we intend to propose to the original repository.

- **`l10n_main`**
This branch includes all changes from the `main` branch and translations from Crowdin. All modifications in this branch are periodically committed to the upstream repository by using a new sub-branch named `l10n_main_[some data]`.
This branch includes all changes from the `main` branch and translations from Crowdin. All modifications in this branch are periodically committed to the upstream repository using a new sub-branch named `l10n_main_[some data]`.

- **`l10n_feat` or `l10n_feat_[specific functions]`**
This branch will include changes to code or documentation related to the translation system. Once all content is finalized, the changes in this branch will be merged into `l10_main`.
This branch will include changes to code or documentation related to the translation system. Once you finalize all content, the changes in this branch will be merged into `l10_main`.

- **`[lang]_preview`**
These branches are designated for specific language previews, such as `ko_preview` for Korean and `ja_preview` for Japanese. They allow us to preview the website in different languages.

By maintaining these branches and using GitHub Actions, we efficiently manage the synchronization of our documentation and translation updates, ensuring that our multilingual content is always up to date.

## How to Set Up a New Crowdin Project
## How to set up a new crowdin project

1. Log in to your [**Crowdin account**](https://accounts.crowdin.com/login).
2. Click `Create new project` in the menu.
Expand Down Expand Up @@ -69,64 +69,66 @@ By maintaining these branches and using GitHub Actions, we efficiently manage th
- **preserve_hierarchy**: Maintains the GitHub directory structure on the Crowdin server.
- **source** and **translation**: Specify the paths for the files to upload to Crowdin and where the translated files should be output.
Refer to [**our official config file**](https://github.com/TownSquareXYZ/ton-docs/blob/localization/crowdin.yml) for an example.
More details can be found in the [**Crowdin configuration documentation**](https://developer.crowdin.com/configuration-file/).
For an example, refer to the [**config file**](https://github.com/TownSquareXYZ/ton-docs/blob/localization/crowdin.yml).
Find more in the [**Crowdin configuration documentation**](https://developer.crowdin.com/configuration-file/).
6. Configure Crowdin to connect to your GitHub repo:
1. Click `Add Repository` and select `Source and translation files mode`.
![select-integration-mode](/img/localizationProgramGuideline/howItWorked/select-integration-mode.png)
2. Connect your GitHub account and search for the repo you want to translate.
![search-repo](/img/localizationProgramGuideline/howItWorked/search-repo.png)
3. Select the branch on the left, which will generate a new branch where Crowdin will post the translations.
3. Select the branch on the left to generate a new branch where Crowdin will post the translations.
![setting-branch](/img/localizationProgramGuideline/howItWorked/setting-branch.png)
4. Choose the frequency for updating translations to your GitHub branch. Default settings can be kept for other configurations, then click save to enable the integration.
4. Choose the frequency for updating translations to your GitHub branch, then click save to enable the integration.
![frequency-save](/img/localizationProgramGuideline/howItWorked/frequency-save.png)

Refer to the [**GitHub integration documentation**](https://support.crowdin.com/github-integration/) for more details.
Find more details in the [**GitHub integration documentation**](https://support.crowdin.com/github-integration/).

7. Finally, you can click the `Sync Now` button to sync the repo and translations whenever needed.

## Glossary

### What is a Glossary?
### What is a glossary?

Sometimes, AI translators can't recognize specific terms that shouldn't be translated. For instance, we don't want "Rust" translated when referring to the programming language. To prevent such mistakes, we use a glossary to guide translations.
Sometimes, AI translators can't recognize untranslatable and specific terms. For instance, we don't want "Rust" translated when referring to the programming language. To prevent such mistakes, we use a glossary to guide translations.

A **glossary** allows you to create, store, and manage project-specific terminology in one place, ensuring terms are translated correctly and consistently.
A **glossary** allows you to create, store, and manage project-specific terminology in one place, ensuring that terms are translated correctly and consistently.

You can check our [**ton-i18n-glossary**](https://github.com/TownSquareXYZ/ton-i18n-glossary) for reference.
You can reference our [**ton-i18n-glossary**](https://github.com/TownSquareXYZ/ton-i18n-glossary).
![ton-i18n-glossary](/img/localizationProgramGuideline/howItWorked/ton-i18n-glossary.png)

### How to Set Up a Glossary for a New Language?
### How to set up a glossary for a new language?

Most translation platforms support glossaries. In Crowdin, after setting up a glossary, each term appears as an underlined word in the Editor. Hover over the term to see its translation, part of speech, and definition (if provided).
![github-glossary](/img/localizationProgramGuideline/howItWorked/github-glossary.png)
![crowdin-glossary](/img/localizationProgramGuideline/howItWorked/crowdin-glossary.png)

In DeepL, simply upload your glossary, and it will be used automatically during AI translation.
In DeepL, upload your glossary, which will be used automatically during AI translation.

We have created [**a program for glossary**](https://github.com/TownSquareXYZ/ton-i18n-glossary) that auto-uploads updates.

To add a term to the glossary:
1. If the English term already exists in the glossary, find the corresponding line and column for the language you want to translate, input the translation, and upload it.
2. To upload a new glossary, clone the project and run:

- `npm i`
- `npm run generate -- <glossary name you want>`
```bash
npm i
```
```bash
npm run generate -- <glossary name you want>
```

Repeat step 1 to add the new term.

**Simple and efficient, isn’t it?**

## How to Take Advantage of AI Translation Copilot?
## How to take advantage of AI translation copilot?

AI translation copilot helps break down language barriers with several advantages:

- **Enhanced Consistency**: AI translations are based on up-to-date information, providing the most accurate and current translations.
- **Speed and Efficiency**: AI translation is instantaneous, handling large volumes of content in real-time.
- **Robust Scalability**: AI systems continuously learn and improve, enhancing translation quality over time. With the provided glossary, AI translations can be tailored to the specific needs of different repositories.
- **Robust Scalability**: AI systems continuously learn and improve, enhancing translation quality over time.

To use AI translation in Crowdin (we use DeepL in our project):
We use DeepL for AI translation in our Crowdin project:
1. Select Machine Translation in the Crowdin menu and click edit on the DeepL line.
![select-deepl](/img/localizationProgramGuideline/howItWorked/select-deepl.png)
2. Enable DeepL support and input the DeepL Translator API key.
Expand All @@ -138,7 +140,7 @@ To use AI translation in Crowdin (we use DeepL in our project):

4. In the repo, click Pre-translation and select via Machine Translation.
![pre-translation](/img/localizationProgramGuideline/howItWorked/pre-translation.png)
5. Choose DeepL as the Translation Engine, select the target languages, and select the files to translate.
5. Choose DeepL as the Translation Engine, select the target languages, and select the translated files.
![pre-translate-config](/img/localizationProgramGuideline/howItWorked/pre-translate-config.png)

That's it! Now you can take a break and wait for the pre-translation to complete.
That's it! Now, you can take a break and wait for the pre-translation to complete.
Loading

0 comments on commit b546619

Please sign in to comment.