Skip to content

Commit

Permalink
Squashed 'Scribe/i18n/' changes from 8dd22be..5fd31d2
Browse files Browse the repository at this point in the history
5fd31d2 Merge pull request scribe-org#18 from Jag-Marcel/github-actions-fix
3b71e3d Slight fix to xcstrings conversion workflow
06027db Merge pull request scribe-org#7 from Jag-Marcel/swift-conversions
6b43924 Minor formatting fixes, add pt back in and fix typo in the .yml file
13c9ced Minor spelling fixes
81f9c11 Merge branch 'main' into swift-conversions
f4041c7 Edited scripts to reflect agreed upon coonfiguration
8a99dba Add basic issue templates to bring people to community channels
33cb640 Reorder Matrix logo placement in contributing of readme
9daccff Add navigation to powered by in readme
b1a2932 Minor edits to readme and maintainer checklist
38d4fa7 scribe-org#1 Update readme with Weblate information and directions
ee1eb47 Move test string to base translation file
5bd6b19 Test webhook
cb06f73 Testing adding language file and adding string to repo
3fd3707 Implemented GitHub action for xcstrings conversion script
9b5f645 Adjusted conversion for new location of Xcode file
b3d8b03 Revert "Adjusted conversion to xcstrings"
3de1788 Adjusted conversion to xcstrings
811fe13 Replaced old placeholder
055453f Changed directory and file names
4982d14 Changed file in accordance with PEP 8 style guide
3051cad Revert "Added current localizations to JSON files"
d165540 Implemented conversion from JSON to files for iOS
1a7b45d Implemented script to convert files for iOS to JSON
d452419 Added current localizations to JSON files

git-subtree-dir: Scribe/i18n
git-subtree-split: 5fd31d28c3e2b29fbf4974226862468288ec846e
  • Loading branch information
Jag-Marcel committed Jun 17, 2024
1 parent 3871fc2 commit 2890070
Show file tree
Hide file tree
Showing 17 changed files with 1,302 additions and 51 deletions.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: 👋 Community discussion channels
url: https://matrix.to/#/#scribe_community:matrix.org
about: Join us in our public Matrix chat rooms!
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/localization.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 🌐 Localization
description: Report issues or offer help for Scribe localizations.
labels: ["localization"]
projects: ["scribe-org/1"]
body:
- type: checkboxes
id: terms
attributes:
label: Terms
options:
- label: I have searched [open localization issues](https://github.com/scribe-org/Scribe-i18n/issues?q=is%3Aissue+is%3Aopen+label%3Alocalization)
required: true
- label: I agree to follow Scribe-i18n's [Code of Conduct](https://github.com/scribe-org/Scribe-i18n/blob/main/.github/CODE_OF_CONDUCT.md)
required: true
- type: textarea
id: support
attributes:
label: Description
placeholder: |
Tell us where Scribe needs localization support, and let us know if you're able to help!
validations:
required: true
- type: markdown
attributes:
value: |
Thanks for your efforts to bring Scribe to other languages!
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: ❓ Questions and everything else
description: We'd love to hear from you!
projects: ["scribe-org/1"]
body:
- type: checkboxes
id: terms
attributes:
label: Terms
options:
- label: I have searched [open and closed issues](https://github.com/scribe-org/Scribe-i18n/issues?q=is%3Aissue)
required: true
- label: I agree to follow Scribe-i18n's [Code of Conduct](https://github.com/scribe-org/Scribe-i18n/blob/main/.github/CODE_OF_CONDUCT.md)
required: true
- type: textarea
id: issue
attributes:
label: Issue
placeholder: Ask a question, start a discussion, create an issue...
validations:
required: true
- type: markdown
attributes:
value: |
Thank you for your contribution!
2 changes: 1 addition & 1 deletion .github/workflows/pr_maintainer_checklist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
The Scribe team will do our best to address your contribution as soon as we can. The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)
If you're not already a member of our [public Matrix community](https://matrix.to/#/#scribe_community:matrix.org), please consider joining! It'd be great to have you!
If you're not already a member of our [public Matrix community](https://matrix.to/#/#scribe_community:matrix.org), please consider joining! We'd suggest using [Element](https://element.io/) as your Matrix client, and definitely join the General and Localization rooms once you're in. Also consider joining our [bi-weekly Saturday dev syncs](https://etherpad.wikimedia.org/p/scribe-dev-sync). It'd be great to have you!
### Maintainer checklist
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/xcstrings_conversion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: xcstrings_conversion.yml

on:
push:
branches:
- main

jobs:
# Check to make sure the localization files have actually changed.
conditional_job_check_files:
runs-on: ubuntu-latest
outputs:
json_changed: ${{ steps.check_file_changed.outputs.json_changed }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- shell: pwsh
id: check_file_changed
run: |
$diff = git diff --name-only HEAD^ HEAD
$SourceDiff = $diff | Where-Object { $_ -match '^Scribe-i18n/' -and $_ -match '.json$' }
$HasDiff = $SourceDiff.Length -gt 0
Write-Host "json_changed=$HasDiff >> $GITHUB_OUTPUT"
# Run xcstrings conversion script if needed.
conditional_job:
runs-on: ubuntu-latest
needs:
- conditional_job_check_files
if: needs.conditional_job_check_files.outputs.json_changed == 'True'
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Execute script to convert JSON to xcstrings
run: |
python convert_to_xcstrings.py
109 changes: 65 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<a href="https://github.com/scribe-org/Scribe-i18n"><img src="https://raw.githubusercontent.com/scribe-org/Organization/main/logo/ScribeGitHubOrgBanner.png" width=1024 alt="Scribe Logo"></a>
</div>

[![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)
Expand All @@ -10,7 +11,7 @@

## Application text localization files for Scribe apps

**Scribe-i18n** is the home of the localization files that are included in each Scribe application.
**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 subtree](https://docs.github.com/en/get-started/using-git/about-git-subtree-merges).

> [!NOTE]\
> The [contributing](#contributing) section has information for those interested.
Expand All @@ -23,16 +24,63 @@ Check out Scribe's [architecture diagrams](https://github.com/scribe-org/Organiz

# **Contents**

- [Setup](#setup)
- [Contributing](#contributing)
- [Localizing Scribe](#localizing-scribe)
- [Localization Coverage](#localization-coverage)
- [Contributing](#contributing)
- [Community](#community)

<a id="localization-coverage"></a>

# Localization Coverage [``](#contents)

<a href="https://hosted.weblate.org/projects/scribe/scribe-i18n">
<img src="https://hosted.weblate.org/widget/scribe/scribe-i18n/multi-auto.svg" alt="Translation status" />
</a>

<a id="contributing"></a>

# 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 an 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.

<a href="https://matrix.to/#/#scribe_community:matrix.org"><img src="https://raw.githubusercontent.com/scribe-org/Organization/main/resources/images/logos/MatrixLogoGrey.png" height="50" alt="Public Matrix Chat" align="right"></a>

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)

<a href="https://hosted.weblate.org/projects/scribe/scribe-i18n"><img src="https://raw.githubusercontent.com/scribe-org/Organization/main/resources/images/logos/WeblateLogo.png" height="100" alt="Visit Weblate project" align="right"></a>

[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

<a id="setup"></a>
- You can also make use of Automatic suggestions to see machine translations if you need help

# Setup [``](#contents)
5. Hit `Save and continue` when you're ready to move to the next string

[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the repo, clone your fork, and configure the remotes:
6. Maintainers will open up pull requests from [Weblate](https://weblate.org/en/) to this repo

7. Scribe-i18n directories that are [Git subtrees](https://docs.github.com/en/get-started/using-git/about-git-subtree-merges) in other Scribe application repos are then synched

### 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]
>
Expand Down Expand Up @@ -64,30 +112,11 @@ git remote add upstream https://github.com/scribe-org/Scribe-i18n.git
- `origin` (forked repository)
- `upstream` (Scribe-i18n repository)

If all looks good, then you're ready to start localizing!

<a id="contributing"></a>

# Contributing [``](#contents)

<a href="https://matrix.to/#/#scribe_community:matrix.org"><img src="https://raw.githubusercontent.com/scribe-org/Organization/main/resources/images/logos/MatrixLogoGrey.png" height="50" alt="Public Matrix Chat" align="right"></a>

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 an 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.

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.
If all looks good, then you're ready to start adding localizable key-string pairs via pull requests!

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

> [!NOTE]\
> Please [open an issue](https://github.com/scribe-org/Scribe-i18n/issues/new) before setting out on a major localization so that the team is aware of what you're working on! If you don't let us know, you risk spending a lot of time working on something that the developers might not want to merge into the project. With that being said, major additions are very appreciated!
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) and should follow the code style standards ([contact us](https://matrix.to/#/#scribe_community:matrix.org) if unsure).
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:

Expand Down Expand Up @@ -128,30 +157,22 @@ When making a contribution, adhering to the [GitHub flow](https://guides.github.

Thank you in advance for your contributions!

### Road Map [``](#contents)
<a id="community"></a>

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).
# Community [``](#contents)

### Joining the 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!

> [!NOTE]\
> Consider joining our [bi-weekly developer sync](https://etherpad.wikimedia.org/p/scribe-dev-sync)!
<a id="localizing-scribe"></a>

# Localizing Scribe [``](#contents)

Specific directions on how Scribe applications should be localized will be included here.

<a id="localization-coverage"></a>
### Road Map [``](#contents)

# Localization Coverage [``](#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).

A diagram showing localization coverage across languages will be added here eventually.
> [!NOTE]\
> Consider joining our [bi-weekly developer syncs](https://etherpad.wikimedia.org/p/scribe-dev-sync)!
# Powered By
# Powered By [``](#contents)

### Contributors

Expand Down
Loading

0 comments on commit 2890070

Please sign in to comment.