diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index e1bc703a..49216e03 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -19,8 +19,8 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v2
- - name: force Xcode 12.2
- run: sudo xcode-select -switch /Applications/Xcode_12.2.app
+ - name: force Xcode 12.4
+ run: sudo xcode-select -switch /Applications/Xcode_12.4.app
- name: setup
run: exec ./.github/scripts/setup.sh
- name: build
diff --git a/Localization/README.md b/Localization/README.md
index b6baf178..ac32319c 100644
--- a/Localization/README.md
+++ b/Localization/README.md
@@ -1,20 +1,23 @@
# Localization
+[![Crowdin](https://badges.crowdin.net/mastodon-for-ios/localized.svg)](https://crowdin.com/project/mastodon-for-ios)
Mastodon localization template file
## How to contribute?
-TBD
+Please use the [Crodwin](https://crowdin.com/project/mastodon-for-ios) to contribute. If your language is not in the list. Please feel free to open the issue.
## How to maintains
+The project use a script to generate Xcode localized strings files.
+
```zsh
// enter workdir
cd Mastodon
-// edit i18n json
-open ./Localization/app.json
-// update resource
-update_localization.sh
+// merge PR from Crowdin bot
+
+// update resource
+./update_localization.sh
```
\ No newline at end of file
diff --git a/Mastodon.xcodeproj/project.pbxproj b/Mastodon.xcodeproj/project.pbxproj
index 6451fdac..49027642 100644
--- a/Mastodon.xcodeproj/project.pbxproj
+++ b/Mastodon.xcodeproj/project.pbxproj
@@ -2037,7 +2037,6 @@
DB427DC925BAA00100D1B89D = {
isa = PBXGroup;
children = (
- DB0009A926AEE5DC009B9D2D /* Intents.intentdefinition */,
DBF53F5F25C14E88008AAC7B /* Mastodon.xctestplan */,
DBF53F6025C14E9D008AAC7B /* MastodonSDK.xctestplan */,
DB3D0FED25BAA42200EAA174 /* MastodonSDK */,
@@ -2603,6 +2602,7 @@
DB8FABC826AEC7B2008E5AF4 /* MastodonIntent */ = {
isa = PBXGroup;
children = (
+ DB0009A926AEE5DC009B9D2D /* Intents.intentdefinition */,
DB8FABD626AEC864008E5AF4 /* MastodonIntent.entitlements */,
DB8FABC926AEC7B2008E5AF4 /* IntentHandler.swift */,
DBB8AB4526AECDE200F6D281 /* SendPostIntentHandler.swift */,
diff --git a/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist b/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist
index 88e42553..0dd2f785 100644
--- a/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist
+++ b/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -7,12 +7,12 @@
AppShared.xcscheme_^#shared#^_
orderHint
- 26
+ 24
CoreDataStack.xcscheme_^#shared#^_
orderHint
- 24
+ 23
Mastodon - ASDK.xcscheme_^#shared#^_
@@ -37,7 +37,7 @@
MastodonIntent.xcscheme_^#shared#^_
orderHint
- 25
+ 26
MastodonIntents.xcscheme_^#shared#^_
@@ -57,7 +57,7 @@
ShareActionExtension.xcscheme_^#shared#^_
orderHint
- 23
+ 25
SuppressBuildableAutocreation
diff --git a/Base.lproj/Intents.intentdefinition b/MastodonIntent/Base.lproj/Intents.intentdefinition
similarity index 100%
rename from Base.lproj/Intents.intentdefinition
rename to MastodonIntent/Base.lproj/Intents.intentdefinition
diff --git a/ar.lproj/Intents.strings b/MastodonIntent/ar.lproj/Intents.strings
similarity index 100%
rename from ar.lproj/Intents.strings
rename to MastodonIntent/ar.lproj/Intents.strings
diff --git a/en.lproj/Intents.strings b/MastodonIntent/en.lproj/Intents.strings
similarity index 100%
rename from en.lproj/Intents.strings
rename to MastodonIntent/en.lproj/Intents.strings
diff --git a/Podfile b/Podfile
index b976556b..868af1a9 100644
--- a/Podfile
+++ b/Podfile
@@ -55,4 +55,12 @@ plugin 'cocoapods-keys', {
"notification_endpoint",
"notification_endpoint_debug"
]
-}
\ No newline at end of file
+}
+
+post_install do |installer|
+ installer.pods_project.targets.each do |target|
+ target.build_configurations.each do |config|
+ config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
+ end
+ end
+end
\ No newline at end of file
diff --git a/README.md b/README.md
index 35ea4694..d8f7a9c6 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,7 @@
# Mastodon
+[![CI](https://github.com/mastodon/mastodon-ios/actions/workflows/main.yml/badge.svg)](https://github.com/mastodon/mastodon-ios/actions/workflows/main.yml) [![Crowdin](https://badges.crowdin.net/mastodon-for-ios/localized.svg)](https://crowdin.com/project/mastodon-for-ios)
+
+
## Requirements
@@ -8,7 +11,7 @@
- iOS 14.0+
## Setup
-We needs the latest version Xcode from App Store. And use Cocoapods for dependency management.
+We need the latest version of Xcode from App Store. And use Cocoapods for dependency management.
### CocoaPods
diff --git a/crowdin.yml b/crowdin.yml
new file mode 100644
index 00000000..4b5310c7
--- /dev/null
+++ b/crowdin.yml
@@ -0,0 +1,35 @@
+#
+# Files configuration
+#
+files: [
+ {
+ #
+ # Source files filter
+ # e.g. "/resources/en/*.json"
+ #
+ "source" : "/Localization/app.json",
+
+ #
+ # Where translations will be placed
+ # e.g. "/resources/%two_letters_code%/%original_file_name%"
+ #
+ "translation" : "/Localization/StringsConvertor/input/%locale_with_underscore%/%original_file_name%",
+
+ #
+ # The parameter "update_option" is optional. If it is not set, after the files update the translations for changed strings will be removed. Use to fix typos and for minor changes in the source strings
+ # e.g. "update_as_unapproved" or "update_without_changes"
+ #
+ "update_option" : "update_as_unapproved",
+ #
+ },
+ {
+ "source" : "/Localization/ios-infoPlist.json",
+ "translation" : "/Localization/StringsConvertor/input/%locale_with_underscore%/%original_file_name%",
+ "update_option" : "update_as_unapproved",
+ },
+ {
+ "source" : "/MastodonIntent/en.lproj/Intents.strings",
+ "translation" : "/Localization/StringsConvertor/Intents/input/%locale_with_underscore%/%original_file_name%",
+ "update_option" : "update_as_unapproved",
+ }
+]
\ No newline at end of file