mirror of
git://jb55.com/damus
synced 2024-09-30 00:40:45 +00:00
parent
08ca484d54
commit
2ed17a2509
36
README.md
36
README.md
@ -91,13 +91,39 @@ damus implements the following [Nostr Implementation Possibilities][nips]
|
|||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
Contributors welcome! [Email patches][git-send-email] to jb55@jb55.com are preferred, but I accept PRs on github as well.
|
Contributors welcome!
|
||||||
|
|
||||||
|
### Code
|
||||||
|
|
||||||
|
[Email patches][git-send-email] to jb55@jb55.com are preferred, but I accept PRs on GitHub as well.
|
||||||
|
|
||||||
[git-send-email]: http://git-send-email.io
|
[git-send-email]: http://git-send-email.io
|
||||||
|
|
||||||
## git log bot
|
### Translations
|
||||||
|
|
||||||
npub1fjtdwclt9lspjy8huu3qklr7eklp5uq90u6yh8mec290pqxraccqlufnas
|
Translators welcome! Join the [Transifex][transifex] project.
|
||||||
|
|
||||||
|
All user-facing strings must have a comment in order to provide context to translators. If a SwiftUI component has a `comment` parameter, use that. Otherwise, wrap your string with `NSLocalizedString` with the `comment` field populated.
|
||||||
|
|
||||||
|
[transifex]: https://explore.transifex.com/damus/damus-ios/
|
||||||
|
|
||||||
|
#### Export Source Translations
|
||||||
|
|
||||||
|
If user-facing strings have been added or changed, please export them for translation as part of your pull request or commit by running:
|
||||||
|
|
||||||
|
```zsh
|
||||||
|
./devtools/export-source-translation.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
This command will export source translations to `translations/en-US.xcloc/Localized Contents/en-US.xliff`, which the Transifex integration will read from the `master` branch and allow translators to translate those strings.
|
||||||
|
|
||||||
|
#### Import Translations
|
||||||
|
|
||||||
|
Once 100% of strings have been translated for a given locale, Transifex will open up a pull request with the `translations/<locale>.xliff` file changed. Currently, it must be manually imported into the project before merging the pull request by running:
|
||||||
|
|
||||||
|
```zsh
|
||||||
|
./devtools/import-translation.sh <locale_code_in_snake_case>
|
||||||
|
```
|
||||||
|
|
||||||
### Awards
|
### Awards
|
||||||
|
|
||||||
@ -107,3 +133,7 @@ First contributors:
|
|||||||
|
|
||||||
1. @randymcmillan
|
1. @randymcmillan
|
||||||
2. @jcarucci27
|
2. @jcarucci27
|
||||||
|
|
||||||
|
### git log bot
|
||||||
|
|
||||||
|
npub1fjtdwclt9lspjy8huu3qklr7eklp5uq90u6yh8mec290pqxraccqlufnas
|
||||||
|
File diff suppressed because it is too large
Load Diff
3
devtools/export-source-translation.sh
Executable file
3
devtools/export-source-translation.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/zsh
|
||||||
|
|
||||||
|
xcodebuild -exportLocalizations -project damus.xcodeproj -localizationPath "translations" -exportLanguage en-US
|
8
devtools/import-translation.sh
Executable file
8
devtools/import-translation.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/zsh
|
||||||
|
|
||||||
|
if [ -z "$*" ]; then
|
||||||
|
echo "Usage: ./devtools/import-translation.sh <locale_code_in_snake_case>"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
find "translations" -name "${1}.xliff" | grep -v "en-US.xliff" | xargs -I % xcodebuild -importLocalizations -project damus.xcodeproj -localizationPath %
|
@ -3,8 +3,8 @@ git:
|
|||||||
- filter_type: file
|
- filter_type: file
|
||||||
file_format: XLIFF
|
file_format: XLIFF
|
||||||
source_language: en_US
|
source_language: en_US
|
||||||
source_file: damus Localizations/en-US.xcloc/Localized Contents/en-US.xliff
|
source_file: translations/en-US.xcloc/Localized Contents/en-US.xliff
|
||||||
translation_files_expression: damus Localizations/<lang>.xcloc/Localized Contents/<lang>.xliff
|
translation_files_expression: translations/<lang>.xliff
|
||||||
|
|
||||||
settings:
|
settings:
|
||||||
pr_branch_name: transifex/<br_unique_id>
|
pr_branch_name: transifex/<br_unique_id>
|
Loading…
Reference in New Issue
Block a user