Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Updated i18n process (#7684)

* Update documentation

* Update crowdin.yml for cli usage

* Add more info about crowdin cli setup

* Add intl:pull and intl:push commands

authored by

Paul Frazee and committed by
GitHub
b12d39b4 be1285ea

+78 -11
+20 -3
crowdin.yml
··· 1 - files: 2 - - source: /src/locale/locales/en/messages.po 3 - translation: /src/locale/locales/%two_letters_code%/messages.po 1 + { 2 + "project_id": "664276", 3 + "base_path": ".", 4 + "preserve_hierarchy": true, 5 + "files": [ 6 + { 7 + "source": "/src/locale/locales/en/messages.po", 8 + "translation": "/src/locale/locales/%two_letters_code%/messages.po", 9 + "languages_mapping": { 10 + "two_letters_code": { 11 + "pt-BR": "pt-BR", 12 + "en-GB": "en-GB", 13 + "zh-CN": "zh-CN", 14 + "zh-TW": "zh-TW", 15 + "zh-HK": "zh-HK" 16 + } 17 + } 18 + } 19 + ] 20 + }
+55 -7
docs/localization.md
··· 3 3 We want the official Bluesky app to be supported in as many languages as possible. If you want to help us translate the app, please open a PR or issue on the [Bluesky app repo on GitHub](https://github.com/bluesky-social/social-app) 4 4 5 5 ## Tools 6 - We are using Lingui to manage translations. You can find the documentation [here](https://lingui.dev/). 6 + 7 + - We use Lingui to implement translations. You can find the documentation [here](https://lingui.dev/). 8 + - We use Crowdin to manage translations. 9 + - Bluesky Crowdin: https://crowdin.com/project/bluesky-social 10 + - Introduction to Crowdin: https://support.crowdin.com/for-translators/ 11 + 12 + ## Translators 13 + 14 + Much of the app is translated by community contributions. (We <3 our translators!) If you want to participate in the translation of the app, read this section. 15 + 16 + ### Using Crowdin 17 + 18 + [Crowdin](https://crowdin.com/project/bluesky-social) is our primary tool for managing translations. There are two roles: 19 + 20 + - **Proof-readers**. Can create new translations and approve submitted translations. 21 + - **Translators**. Can create new translations. 22 + 23 + All translations must be approved by proof-readers before they are accepted into the app. 24 + 25 + ### Using other platforms 26 + 27 + You may contribute PRs separately from Crowdin, however we strongly recommend using Crowdin to avoid conflicts. 28 + 29 + ### Code of conduct on Crowdin 30 + 31 + Please treat everyone with respect. Proof-readers are given final say on translations. Translators who frequently come into conflict with other translators, or who contribute noticably incorrect translations, will have their membership to the Crowdin project revoked. 32 + 33 + ### Adding a new language 34 + 35 + Create a new [Crowdin discussion](https://crowdin.com/project/bluesky-social/discussions) or [GitHub issue](https://github.com/bluesky-social/social-app/issues) requesting the new language be added to the project. 36 + 37 + Please only request a new language when you are certain you will be able to contribute a substantive portion of translations for the language. 38 + 39 + ## Maintainers 40 + 41 + Install the [Crowdin CLI](https://crowdin.github.io/crowdin-cli/). You will need to [configure your API token](https://crowdin.github.io/crowdin-cli/configuration) to access the project. 42 + 43 + ### Release process 44 + 45 + 1. Pull main and create a branch. 46 + 1. Run `yarn intl:pull` to fetch all translation updates from Crowdin. 47 + 1. Create a PR, ensure the translations all look correct, and merge. 48 + 1. Merge all approved translation PRs (contributions from outside crowdin). 49 + 1. Pull main. 50 + 1. Run `yarn intl:extract` to sync the english `.po` file with the state of the app. 51 + 1. Run `yarn intl:push` to sync Crowdin with the state of the repo. 52 + 1. Commit the updated english `.po` and push to GitHub. 53 + 54 + ### Testing the translations in Crowdin 55 + 56 + You can run `yarn intl:pull` to pull the currently-approved translations from Crowdin. 57 + 58 + ## Developers 7 59 8 60 ### Adding new strings 61 + 9 62 When adding a new string, do it as follows: 10 63 ```jsx 11 64 // Before ··· 61 114 6. Enjoy translated app! 62 115 63 116 ### Common pitfalls 117 + 64 118 These pitfalls are memoization pitfalls that will cause the components to not re-render when the locale is changed -- causing stale translations to be shown. 65 119 66 120 ```jsx ··· 111 165 return <div>{welcome}</div>; 112 166 } 113 167 ``` 114 - 115 - 116 - ### Credits 117 - Please check each individual `messages.po` file for the credits of the translators. We are very grateful for their help! 118 - 119 - If you would like to translate the Bluesky app into your language, please open a PR or issue on this repo.
+3 -1
package.json
··· 43 43 "perf:test:results": "NODE_ENV=test flashlight report .perf/results.json", 44 44 "perf:measure": "NODE_ENV=test flashlight measure", 45 45 "intl:build": "yarn intl:extract && yarn intl:compile", 46 - "intl:extract": "lingui extract", 46 + "intl:extract": "lingui extract --clean", 47 47 "intl:compile": "lingui compile", 48 + "intl:pull": "crowdin download translations --verbose -b main", 49 + "intl:push": "crowdin push translations --verbose -b main", 48 50 "nuke": "rm -rf ./node_modules && rm -rf ./ios && rm -rf ./android", 49 51 "update-extensions": "bash scripts/updateExtensions.sh", 50 52 "export": "npx expo export",