mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2024-12-28 17:51:21 +01:00
0a9689c67f
* Basic fake language picker support * Recognize languages from post text * Exclude suggested languages from recents * Load recent languages from Settings object * Send the language to the API * Persist the used language to settings * Always show the currently selected language in the list * Fix crash * Add support for picking arbitrary lanuages * Fix display of 3 letter language codes * Improve label to include endonym too * Limit to 3 recent languages * Reduce lower bound for displaying language suggestions * Fix saving recent language when publishing * Fix tint color of language picker button * Add a badge to prompt users to change language * Dismiss the badge even if you pick the same language * Read language names in the language if possible * Use a compressed font for 3-letter codes Also use `minimumScaleFactor` to shrink troublesome codes to fit Co-Authored-By: samhenrigold <49251320+samhenrigold@users.noreply.github.com> * Remove .vscode/launch.json * Add message to fatalError() Co-authored-by: samhenrigold <49251320+samhenrigold@users.noreply.github.com> |
||
---|---|---|
.. | ||
StringsConvertor | ||
app.json | ||
Intents.stringsdict | ||
ios-infoPlist.json | ||
Localizable.stringsdict | ||
README.md |
Localization
We use Crowdin for translations and some automation.
How to contribute
Help with translations
Head over Crowdin for that. To help with translations, select your language and translate :-) If your language is not in the list, please feel free to open a topic on Crowdin.
Please note: You need to have an account on Crowdin to help with translations.
Add new strings
This is mainly for developers.
- Add new strings in
Localization/app.json
and theLocalizable.strings
for English. - Run
swiftgen
to generate theStrings.swift
-file or have Xcode build the app (swiftgen
is a Build phase, too). - Use
import MastodonLocalization
and its (new)L10n
-enum and its properties where ever you need them in the app. - Once the updated
Localization/app.json
hitsdevelop
, it gets synced to Crowdin, where people can help with translations.Localization/app.json
must be a valid json.
How to update translations
If there are new translations, Crowdin pushes new commits to a branch called l10n_develop
and creates a new Pull Request. Both, the branch and the PR might be updated once an hour. The project itself uses a script to generate the various Localizable.strings
-files etc. for Xcode.
To update or add new translations, the workflow is as follows:
- Merge the PR with
l10n_develop
intodevelop
. It's usually calledNew Crowdin Updates
- Run
update_localization.sh
on your computer. - Commit the changes and push
develop
.