An open API service indexing awesome lists of open source software.

https://github.com/scribe-org/scribe-i18n

Application text localization files for Scribe apps
https://github.com/scribe-org/scribe-i18n

app education hacktoberfest i18n internationalization l10n language language-learning learning localization open-source weblate

Last synced: 3 months ago
JSON representation

Application text localization files for Scribe apps

Awesome Lists containing this project

README

          


Scribe Logo

[![weblate](https://img.shields.io/badge/Weblate-144D3F.svg?logo=weblate&logoColor=ffffff)](https://hosted.weblate.org/projects/scribe/scribe-i18n)
[![issues](https://img.shields.io/github/issues/scribe-org/Scribe-i18n?label=%20&logo=github)](https://github.com/scribe-org/Scribe-i18n/issues)
[![license](https://img.shields.io/github/license/scribe-org/Scribe-i18n.svg?label=%20)](https://github.com/scribe-org/Scribe-i18n/blob/main/LICENSE.txt)
[![coc](https://img.shields.io/badge/Contributor%20Covenant-ff69b4.svg)](https://github.com/scribe-org/Scribe-i18n/blob/main/.github/CODE_OF_CONDUCT.md)
[![mastodon](https://img.shields.io/badge/Mastodon-6364FF.svg?logo=mastodon&logoColor=ffffff)](https://wikis.world/@scribe)
[![matrix](https://img.shields.io/badge/Matrix-000000.svg?logo=matrix&logoColor=ffffff)](https://matrix.to/#/#scribe_community:matrix.org)

### Application text localization files for Scribe apps

**Scribe-i18n** is the home of the localization files that are included in each Scribe application. Scribe uses [Weblate](https://weblate.org/en/) for localization! Head over to [weblate.org/projects/scribe/scribe-i18n](https://hosted.weblate.org/projects/scribe/scribe-i18n) to localize the applications. Changes in this directory will be merged into other Scribe applications via this repo being a [Git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules).

> [!NOTE]\
> The [contributing](#contributing) section has information for those interested.

Scribe apps are available on [iOS](https://github.com/scribe-org/Scribe-iOS), [Android](https://github.com/scribe-org/Scribe-Android) and [Desktop](https://github.com/scribe-org/Scribe-Desktop). For the data formatting processes see [Scribe-Data](https://github.com/scribe-org/Scribe-Data) and for our data API see [Scribe-Server](https://github.com/scribe-org/Scribe-Data).

Check out Scribe's [architecture diagrams](https://github.com/scribe-org/Organization/blob/main/ARCHITECTURE.md) for an overview of the organization including our applications, services and processes. It depicts the projects that [Scribe](https://github.com/scribe-org) is developing as well as the relationships between them and the external systems with which they interact.

### **Contents**

- [Localization Coverage](#localization-coverage)
- [Contributing](#contributing)
- [Issues](#issues)
- [Localizing via Weblate](#localizing-via-weblate)
- [Adding Source Strings](#adding-source-strings)
- [File Conversion](#file-conversion)
- [Pull Requests](#pull-requests)
- [Adding to Projects](#adding-to-projects)
- [Check Files](#check-files)
- [Community](#community)

## Localization Coverage [`⇧`](#contents)


Translation status

## Contributing [`⇧`](#contents)

Thank you for your interest in contributing to Scribe-i18n! We look forward to welcoming you to the community and working with you to build tools for language learners to communicate effectively :) The following are some suggested steps for people interested in joining our community.

Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open-source project. In return, and in accordance with this project's [code of conduct](https://github.com/scribe-org/Scribe-i18n/blob/main/.github/CODE_OF_CONDUCT.md), other contributors will reciprocate that respect in addressing your issue or assessing changes and features.

Public Matrix Chat

If you have questions or would like to communicate with the team, please [join us in our public Matrix chat rooms](https://matrix.to/#/#scribe_community:matrix.org). Scribe would suggest that you use the [Element](https://element.io/) client. We'd be happy to hear from you!

### Issues [`⇧`](#contents)

The [issue tracker for Scribe-i18n](https://github.com/scribe-org/Scribe-i18n/issues) is the preferred channel to let the team know if there are problems with localizations or to ask to work on new ones. Those interested in helping can check the [`-next release-`](https://github.com/scribe-org/Scribe-i18n/labels/-next%20release-) and [`-priority-`](https://github.com/scribe-org/Scribe-i18n/labels/-priority-) labels in the [issues](https://github.com/scribe-org/Scribe-i18n/issues) for those that are most important, as well as those marked [`good first issue`](https://github.com/scribe-org/Scribe-i18n/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) that are tailored for first-time contributors. Generally issues in this repository will be marked with the [`localization`](https://github.com/scribe-org/Scribe-i18n/issues?q=is%3Aopen+is%3Aissue+label%3Alocalization) label.

### Localizing via Weblate [`⇧`](#contents)

Visit Weblate project

[Weblate](https://weblate.org/en/) localization is as easy as making an account and jumping into the Scribe-i18n project!

1. First [register at Weblate](https://hosted.weblate.org/accounts/register/) (you can also authenticate with GitHub or other accounts)
- We suggest that you do link your GitHub account so you get credit for the localization commits!

2. Navigate to the Scribe-i18n project at [weblate.org/projects/scribe/scribe-i18n](https://hosted.weblate.org/projects/scribe/scribe-i18n)

3. Click on a language you want to start translating

4. You can browse the available strings or start translating directly
- When translating a word, be sure to check the glossary context if you're not sure what the string's use is

- You can also make use of Automatic suggestions to see machine translations if you need help

5. Hit `Save and continue` when you're ready to move to the next string

6. Maintainers will open up pull requests from [Weblate](https://weblate.org/en/) to the Scribe-i18n repo to bring in the new strings
- Changes are also automatically sent every 24 hours

7. Scribe-i18n directories that are [Git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) in other Scribe application repos are then synched. For each project using Scribe-i18n:
- Navigate to the root of the Scribe project's repo
- To load into the project the latest Scribe-i18n updates, run the following - where `` is the directory within the repo structure with the Scribe-i18n submodule:

```bash
git submodule add git@github.com:scribe-org/Scribe-i18n.git
```

- From the above command, two commits are then auto-generated. Any merge conflicts should be resolved by taking the file as is on Scribe-i18n. Finally, commit the changes to the given project to bring in the Scribe-i18n updates.

8. If the Git submodule does need to be recreated, the submodule can be removed in projects via the following command:

```bash
git rm -r
rm -rf .git/modules/
# Then remake the submodule via the process above.
```

Thanks so much for your interest in supporting Scribe's localization!

### Adding Source Strings [`⇧`](#contents)

The base language for all Scribe applications is US English. If you'd like to edit the [en-US.json](https://github.com/scribe-org/Scribe-i18n/blob/main/Scribe-i18n/en-US.json) file, please [fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the repo, clone your fork, and configure the remotes:

> [!NOTE]
>
> Consider using SSH
>
>


>
> Alternatively to using HTTPS as in the instructions below, consider SSH to interact with GitHub from the terminal. SSH allows you to connect without a user-pass authentication flow.
>
> To run git commands with SSH, remember then to substitute the HTTPS URL, `https://github.com/...`, with the SSH one, `git@github.com:...`.
>
> - e.g. Cloning now becomes `git clone git@github.com:/Scribe-i18n.git`
>
> GitHub also has their documentation on how to [Generate a new SSH key](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) 🔑
>
>


>

```bash
# Clone your fork of the repo into the current directory.
git clone https://github.com//Scribe-i18n.git
# Navigate to the newly cloned directory.
cd Scribe-i18n
# Assign the original repo to a remote called "upstream".
git remote add upstream https://github.com/scribe-org/Scribe-i18n.git
```

- Now, if you run `git remote -v` you should see two remote repositories named:
- `origin` (forked repository)
- `upstream` (Scribe-i18n repository)

If all looks good, then you're ready to start adding localizable key-string pairs via pull requests!

### File Conversion [`⇧`](#contents)

The files in the [i18n/scripts](https://github.com/scribe-org/Scribe-i18n/tree/main/i18n/scripts) directory can be used to convert base localization JSON files into the filetypes that are needed for an application as well as the same in reverse. JSON files are automatically converted to their target files for Scribe applications after commits to the main branch, and their opposites can be used to update the JSON files when strings are first changed in the applications.

### Pull Requests [`⇧`](#contents)

Good pull requests are the foundation of our community making Scribe-i18n. They should remain focused in scope and avoid containing unrelated commits. Note that all contributions to this project will be made under [the specified license](https://github.com/scribe-org/Scribe-i18n/blob/main/LICENSE.txt).

When making a contribution, adhering to the [GitHub flow](https://guides.github.com/introduction/flow/index.html) process is the best way to get your work merged:

1. If you cloned a while ago, get the latest changes from upstream:

```bash
git checkout
git pull upstream
```

2. Create a new topic branch (off the main project development branch) to contain your feature, change, or fix:

```bash
git checkout -b
```

3. Commit your changes in logical chunks, and please try to adhere to [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).

> [!NOTE]
> The following are tools and methods to help you write good commit messages ✨
>
> - [commitlint](https://commitlint.io/) helps write [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
> - Git's [interactive rebase](https://docs.github.com/en/github/getting-started-with-github/about-git-rebase) cleans up commits

4. Locally merge (or rebase) the upstream development branch into your topic branch:

```bash
git pull --rebase upstream
```

5. Push your topic branch up to your fork:

```bash
git push origin
```

6. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) with a clear title and description.

Thank you in advance for your contributions!

## Adding to Projects [`⇧`](#contents)

To use Scribe-i18n within another repository, run the following command from the root directory of the project to add Scribe-i18n as a submodule:

```bash
git submodule add https://github.com/scribe-org/Scribe-i18n
```

In the command, the value for `` is a directory within the repo structure of the project. Which directory to use will be dependent on the stack of the project and how i18n files will be consumed. Typically, this is the path for a directory named `Scribe-i18n` that will be created somewhere in the repo structure upon command execution. Refer to documentation of the tool that will consume the i18n files to determine what it should be.

Other Git commands for Scribe-i18n include:

```bash
# To pull new Scribe-i18n changes in:
cd
git pull origin main

# Get version of Scribe-i18n on main:
cd
git submodule update --init --recursive
```

## Check Files [`⇧`](#contents)

The following sets up the [i18n-check](https://github.com/activist-org/i18n-check) based validation for your local copy of Scribe-i18n:

- Create a virtual environment for i18n-check (Python `>=3.12`), activate it and install dependencies:

> [!NOTE]
> First, install `uv` if you don't already have it by following the [official installation guide](https://docs.astral.sh/uv/getting-started/installation/).

```bash
uv sync --all-extras # create .venv and install all dependencies from uv.lock

# Unix or macOS:
source .venv/bin/activate

# Windows:
.venv\Scripts\activate.bat # .venv\Scripts\activate.ps1 (PowerShell)
```

- You can now run [i18n-check](https://github.com/activist-org/i18n-check) checks to validate the localization files (see [.i18n-check.yaml](./.i18n-check.yaml) for the enabled checks):

```bash
uv run i18n-check --all # (-a)
uv run i18n-check --all --fix # (-a -f)
```

- And finally you can enable the [pre-commit](https://pre-commit.com/) hooks to ensure that each of your commits is properly checked

```bash
pre-commit install
# uv run pre-commit run --all-files # lint and fix common problems in the codebase
```

> [!NOTE]
> Feel free to contact the team in the [i18n room on Matrix](https://matrix.to/#/#scribe-localization:matrix.org) if you're having problems getting your environment setup!

## Community [`⇧`](#contents)

### Joining In [`⇧`](#contents)

After your first few pull requests organization members would be happy to discuss granting you further rights as a contributor, with a maintainer role then being possible after continued interest in the project. Scribe seeks to be an inclusive and supportive organization. We'd love to have you on the team!

### Road Map [`⇧`](#contents)

The Scribe road map can be followed in the organization's [project board](https://github.com/orgs/scribe-org/projects/1) where we list the most important issues along with their priority, status and an indication of which sub projects they're included in (if applicable).

> [!NOTE]\
> Consider joining our [bi-weekly developer syncs](https://etherpad.wikimedia.org/p/scribe-dev-sync)!

## Powered By [`⇧`](#contents)

### Contributors

Many thanks to all the [Scribe-i18n contributors](https://github.com/scribe-org/Scribe-i18n/graphs/contributors)! 🚀