Skip to content

Commit

Permalink
I18n config
Browse files Browse the repository at this point in the history
  • Loading branch information
bnolens committed Mar 4, 2024
1 parent 6cffec9 commit 37e07fc
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 14 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/crowdin-download.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Crowdin Download
name: Crowdin manual download

on:
workflow_dispatch:

jobs:
crowdin:
download-from-crowdin:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -15,8 +15,9 @@ jobs:
with:
upload_sources: false
upload_translations: false
download_translations: true
localization_branch_name: l10n
download_translations: false
download_bundle: 2
localization_branch_name: l10n_translations

create_pull_request: true
pull_request_title: 'MAM-translations'
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/crowdin-manual-upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Crowdin manual upload

on:
workflow_dispatch:

jobs:
upload-to-crowdin:
if: contains('["bdcrem","bnolens", "derspyy", "rileyhCode", "jtomchak"]', github.actor)
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Crowdin push
uses: crowdin/github-action@v1
with:
upload_sources: true
upload_translations: false
download_translations: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
9 changes: 5 additions & 4 deletions .github/workflows/crowdin-upload.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: Crowdin Upload
name: Crowdin auto-upload

on:
push:
paths: [ '*.xcstring' ]
branches: [ main ]
paths:
- '**/*.xcstrings'

jobs:
synchronize-with-crowdin:
upload-to-crowdin:
runs-on: ubuntu-latest

steps:
Expand All @@ -16,7 +17,7 @@ jobs:
uses: crowdin/github-action@v1
with:
upload_sources: true
upload_translations: true
upload_translations: false
download_translations: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Crowdin](https://badges.crowdin.net/mammoth-app/localized.svg)](https://crowdin.com/project/mammoth-app)

## Welcome

This repository contains the source code for the [Mammoth app](https://getmammoth.app) for iOS, iPadOS and MacOS, released under the [GNU Affero General Public License](https://www.gnu.org/licenses/agpl-3.0.html).
Expand Down
12 changes: 6 additions & 6 deletions crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@
files: [
{
"source": "Mammoth/Localizable.xcstrings",
"translation": "Mammoth/Localizable.xcstrings"
"translation": ".i18n/%locale%/Mammoth/%original_file_name%"
},
{
"source": "Mammoth/Screens/Registration/mul.lproj/SignUpView.xcstrings",
"translation": "Mammoth/Screens/Registration/mul.lproj/SignUpView.xcstrings"
"translation": ".i18n/%locale%/Mammoth/Screens/Registration/mul.lproj/%original_file_name%"
},
{
"source": "Mammoth/Screens/Registration/mul.lproj/SetupProfile.xcstrings",
"translation": "Mammoth/Screens/Registration/mul.lproj/SetupProfile.xcstrings"
"translation": ".i18n/%locale%/Mammoth/Screens/Registration/mul.lproj/%original_file_name%"
},
{
"source": "Mammoth/Screens/Registration/mul.lproj/SetupInstructionsCell.xcstrings",
"translation": "Mammoth/Screens/Registration/mul.lproj/SetupInstructionsCell.xcstrings"
"translation": ".i18n/%locale%/Mammoth/Screens/Registration/mul.lproj/%original_file_name%"
},
{
"source": "Mammoth/Screens/Registration/mul.lproj/IntroViewController.xcstrings",
"translation": "Mammoth/Screens/Registration/mul.lproj/IntroViewController.xcstrings"
"translation": ".i18n/%locale%/Mammoth/Screens/Registration/mul.lproj/%original_file_name%"
},
{
"source": "Mammoth/Screens/Registration/mul.lproj/EmailVerificationView.xcstrings",
"translation": "Mammoth/Screens/Registration/mul.lproj/EmailVerificationView.xcstrings"
"translation": ".i18n/%locale%/Mammoth/Screens/Registration/mul.lproj/%original_file_name%"
}
]

0 comments on commit 37e07fc

Please sign in to comment.