Skip to content

Commit

Permalink
Add translation support via crowdin.com
Browse files Browse the repository at this point in the history
Crowdin has generously granted us an open-source license to support translations.
  • Loading branch information
d4rken committed Mar 4, 2025
1 parent 5510ad2 commit 37fffde
Show file tree
Hide file tree
Showing 8 changed files with 273 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<img src="https://github.com/d4rken-org/octi/raw/main/fastlane/metadata/android/en-US/images/featureGraphic.jpg" width="400">

[![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/d4rken-org/octi?include_prereleases)](https://github.com/d4rken-org/octi/releases/latest)
[![API](https://img.shields.io/badge/API-23%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=23)
[![Code tests & eval](https://github.com/d4rken-org/octi/actions/workflows/code-checks.yml/badge.svg)](https://github.com/d4rken-org/octi/actions/workflows/code-checks.yml)
[![Crowdin](https://badges.crowdin.net/octi/localized.svg)](https://crowdin.com/project/octi)
[![Github Downloads](https://img.shields.io/github/downloads/d4rken-org/octi/total.svg?label=GitHub%20Downloads&logo=github)](https://github.com/d4rken-org/octi/main/README.md#download)
[![Google Play Downloads](https://img.shields.io/endpoint?color=green&logo=google-play&logoColor=green&url=https%3A%2F%2Fplay.cuzi.workers.dev%2Fplay%3Fi%3Deu.darken.octi%26l%3DGoogle%2520Play%26m%3D%24totalinstalls)](https://github.com/d4rken-org/octi/main/README.md#download)
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fplay.cuzi.workers.dev%2Fplay%3Fi%3Deu.darken.octi%26gl%3DUS%26hl%3Den%26l%3D%25E2%25AD%2590%26m%3D%24rating)](https://github.com/d4rken-org/octi/main/README.md#download)
Expand Down Expand Up @@ -48,7 +48,7 @@ Want to chat? Join our [discord server here](https://discord.gg/s7V4C6zuVy).

If you like the app, consider:

* Contributing translations
* [Contributing translations on Crowdin](https://crowdin.com/project/octi)
* Contributing features or bugfixes
* Buying the upgrade on [Google Play](https://play.google.com/store/apps/details?id=eu.darken.octi)
* [Sponsoring the project](https://github.com/sponsors/d4rken)
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/ic_baseline_translate_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M12.87,15.07l-2.54,-2.51 0.03,-0.03c1.74,-1.94 2.98,-4.17 3.71,-6.53L17,6L17,4h-7L10,2L8,2v2L1,4v1.99h11.17C11.5,7.92 10.44,9.75 9,11.35 8.07,10.32 7.3,9.19 6.69,8h-2c0.73,1.63 1.73,3.17 2.98,4.56l-5.09,5.02L4,19l5,-5 3.11,3.11 0.76,-2.04zM18.5,10h-2L12,22h2l1.12,-3h4.75L21,22h2l-4.5,-12zM15.88,17l1.62,-4.33L19.12,17h-3.24z" />
</vector>
9 changes: 9 additions & 0 deletions app/src/main/res/xml/preferences_acknowledgements.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@
android:action="android.intent.action.VIEW"
android:data="https://twitter.com/maxpatchs" />
</eu.darken.octi.common.preferences.IntentPreference>
<eu.darken.octi.common.preferences.IntentPreference
android:key="thanks.crowdin"
android:summary="For supporting translation of open-source projects"
android:title="crowdin.com"
app:iconSpaceReserved="false">
<intent
android:action="android.intent.action.VIEW"
android:data="https://crowdin.com/" />
</eu.darken.octi.common.preferences.IntentPreference>
</PreferenceCategory>
<PreferenceCategory
android:title="@string/settings_licenses_label"
Expand Down
10 changes: 9 additions & 1 deletion app/src/main/res/xml/preferences_index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,15 @@
app:fragment="eu.darken.octi.main.ui.settings.support.SupportFragment"
app:summary="¯\\_(ツ)_/¯"
app:title="@string/settings_support_label" />

<eu.darken.octi.common.preferences.IntentPreference
android:icon="@drawable/ic_baseline_translate_24"
android:key="core.translation"
android:title="@string/help_translate_label"
app:summary="@string/help_translate_description">
<intent
android:action="android.intent.action.VIEW"
android:data="https://crowdin.com/project/octi" />
</eu.darken.octi.common.preferences.IntentPreference>
<Preference
android:icon="@drawable/ic_heart"
app:fragment="eu.darken.octi.main.ui.settings.acks.AcknowledgementsFragment"
Expand Down
Binary file added crowdin-cli.jar
Binary file not shown.
4 changes: 4 additions & 0 deletions crowdin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
export CROWDIN_PERSONAL_TOKEN=`cat ~/.appconfig/eu.darken.octi/crowdin.key`
alias crowdin-cli='java -jar crowdin-cli.jar'
crowdin-cli "$@"
238 changes: 238 additions & 0 deletions crowdin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
"api_token_env": "CROWDIN_PERSONAL_TOKEN"
"project_id": "741615"
"preserve_hierarchy": true

"files": [
{
"source": "/app-common/src/main/res/values/strings.xml",
"dest": "/strings-common.xml",
"translation": "/app-common/src/main/res/values-%android_code%/strings.xml",
# "update_option" : "update_without_changes",
"languages_mapping": &stringmapping {
"android_code": {
"ar": "ar",
"am": "am",
"hy-AM": "hy-rAM",
"az": "az",
"be": "be",
"bn": "bn-rBD",
"bg": "bg",
"ca": "ca",
"cs": "cs",
"da": "da",
"de": "de",
"el": "el",
"es-ES": "es",
"es-AR": "es-rAR",
"es-MX": "es-rMX",
"es-VE": "es-rVE",
"et": "et-rEE",
"eu": "eu-rES",
"fa": "fa",
"fil": "fil",
"fi": "fi",
"fr": "fr",
"gl": "gl-rES",
"hr": "hr",
"hu": "hu",
"is": "is",
"id": "in",
"it": "it",
"he": "iw",
"ja": "ja",
"ka": "ka-rGE",
"km": "km-rKH",
"kn": "kn-rIN",
"ko": "ko",
"ky": "ky-rKG",
"lt": "lt",
"lv": "lv",
"lo": "lo-rLA",
"ms": "ms",
"ml-IN": "ml-rIN",
"mn": "mn-rMN",
"mr": "mr-rIN",
"my": "my-rMM",
"ne-NP": "ne-rNP",
"nl": "nl",
"no": "no",
"pl": "pl",
"pt-PT": "pt",
"pt-BR": "pt-rBR",
"ro": "ro",
"ru": "ru",
"rm-CH": "rm",
"si-LK": "si-rLK",
"sk": "sk",
"sl": "sl",
"sr": "sr",
"sv-SE": "sv",
"sw": "sw",
"th": "th",
"ta": "ta-rIN",
"te": "te-rIN",
"tr": "tr",
"uk": "uk",
"ur-IN": "ur-rIN",
"uz": "uz",
"vi": "vi",
"zh-CN": "zh-rCN",
"zh-HK": "zh-rHK",
"zh-TW": "zh-rTW",
"zu": "zu"
}
}
}, {
"source": "/app/src/gplay/res/values/strings.xml",
"dest": "/strings-app-gplay.xml",
"translation": "/app/src/gplay/res/values-%android_code%/strings.xml",
"languages_mapping": *stringmapping
}, {
"source": "/app/src/foss/res/values/strings.xml",
"dest": "/strings-app-foss.xml",
"translation": "/app/src/foss/res/values-%android_code%/strings.xml",
"languages_mapping": *stringmapping
}, {
"source": "/app/src/main/res/values/strings.xml",
"dest": "/strings-app.xml",
"translation": "/app/src/main/res/values-%android_code%/strings.xml",
"languages_mapping": *stringmapping
}, {
"source": "/module-core/src/main/res/values/strings.xml",
"dest": "/strings-module-core.xml",
"translation": "/module-core/src/main/res/values-%android_code%/strings.xml",
"languages_mapping": *stringmapping
}, {
"source": "/modules-apps/src/main/res/values/strings.xml",
"dest": "/strings-modules-apps.xml",
"translation": "/modules-apps/src/main/res/values-%android_code%/strings.xml",
"languages_mapping": *stringmapping
}, {
"source": "/modules-clipboard/src/main/res/values/strings.xml",
"dest": "/strings-modules-clipboard.xml",
"translation": "/modules-clipboard/src/main/res/values-%android_code%/strings.xml",
"languages_mapping": *stringmapping
}, {
"source": "/modules-meta/src/main/res/values/strings.xml",
"dest": "/strings-modules-meta.xml",
"translation": "/modules-meta/src/main/res/values-%android_code%/strings.xml",
"languages_mapping": *stringmapping
}, {
"source": "/modules-power/src/main/res/values/strings.xml",
"dest": "/strings-modules-power.xml",
"translation": "/modules-power/src/main/res/values-%android_code%/strings.xml",
"languages_mapping": *stringmapping
}, {
"source": "/modules-wifi/src/main/res/values/strings.xml",
"dest": "/strings-modules-wifi.xml",
"translation": "/modules-wifi/src/main/res/values-%android_code%/strings.xml",
"languages_mapping": *stringmapping
}, {
"source": "/sync-core/src/main/res/values/strings.xml",
"dest": "/strings-sync-core.xml",
"translation": "/sync-core/src/main/res/values-%android_code%/strings.xml",
"languages_mapping": *stringmapping
}, {
"source": "/syncs-gdrive/src/main/res/values/strings.xml",
"dest": "/strings-syncs-gdrive.xml",
"translation": "/syncs-gdrive/src/main/res/values-%android_code%/strings.xml",
"languages_mapping": *stringmapping
}, {
"source": "/syncs-kserver/src/main/res/values/strings.xml",
"dest": "/strings-syncs-kserver.xml",
"translation": "/syncs-kserver/src/main/res/values-%android_code%/strings.xml",
"languages_mapping": *stringmapping
}, {
"source": "/fastlane/metadata/android/en-US/full_description.txt",
"dest": "/description.txt",
"translation": "/fastlane/metadata/android/%locale%/full_description.txt",
"languages_mapping": &playstoremapping {
"locale": {
"af": "af",
"ar": "ar",
"am": "am",
"az": "az-AZ",
"be": "be",
"bn": "bn-BD",
"bg": "bg",
"ca": "ca",
"cs": "cs-CZ",
"da": "da-DK",
"de": "de-DE",
"el": "el-GR",
"es-ES": "es-ES",
"es-AR": "es-AR",
"es-MX": "es-419",
"es-VE": "es-VE",
"et": "et",
"eu": "eu-ES",
"fa": "fa",
"fil": "fil",
"fi": "fi-FI",
"fr": "fr-FR",
"fr-CA": "fr-CA",
"gl": "gl-ES",
"hr": "hr",
"hu": "hu-HU",
"hy-AM": "hy-AM",
"is": "is-IS",
"id": "id",
"it": "it-IT",
"he": "iw-IL",
"hi": "hi-IN",
"ja": "ja-JP",
"ka": "ka-GE",
"km": "km-KH",
"kn": "kn-IN",
"ko": "ko-KR",
"ky": "ky-KG",
"lt": "lt",
"lv": "lv",
"lo": "lo-LA",
"mk": "mk-MK",
"ms": "ms",
"ml-IN": "ml-IN",
"mn": "mn-MN",
"mr": "mr-IN",
"my": "my-MM",
"ne-NP": "ne-NP",
"nl": "nl-NL",
"no": "no-NO",
"pl": "pl-PL",
"pt-PT": "pt-PT",
"pt-BR": "pt-BR",
"ro": "ro",
"ru": "ru-RU",
"rm-CH": "rm",
"si-LK": "si-LK",
"sk": "sk",
"sl": "sl",
"sr": "sr",
"sv-SE": "sv-SE",
"sw": "sw",
"th": "th",
"ta": "ta-IN",
"te": "te-IN",
"tr": "tr-TR",
"uk": "uk",
"ur-IN": "ur-IN",
"uz": "uz",
"vi": "vi",
"zh-CN": "zh-CN",
"zh-HK": "zh-HK",
"zh-TW": "zh-TW",
"zu": "zu"
}
}
}, {
"source": "/fastlane/metadata/android/en-US/title.txt",
"dest": "/title.txt",
"translation": "/fastlane/metadata/android/%locale%/title.txt",
"languages_mapping": *playstoremapping
}, {
"source": "/fastlane/metadata/android/en-US/short_description.txt",
"dest": "/short_description.txt",
"translation": "/fastlane/metadata/android/%locale%/short_description.txt",
"languages_mapping": *playstoremapping
}
]
2 changes: 1 addition & 1 deletion fastlane/metadata/android/ja-JP/full_description.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* クリップボードの共有
* などなど... 良いアイデアがあれば教えてください!

情報の同期にはさまざまな方法を選択できます:
情報の同期には様々な方法を選択できます:

* あなたの使用している Google ドライブ
* 私がホストする無料サーバー
Expand Down

0 comments on commit 37fffde

Please sign in to comment.