diff --git a/.crowdin.yml b/.crowdin.yml new file mode 100644 index 0000000..730f22c --- /dev/null +++ b/.crowdin.yml @@ -0,0 +1,9 @@ +"project_id_env": "CROWDIN_PROJECT_ID" +"api_token_env" : "CROWDIN_PERSONAL_TOKEN" +"base_path": "brain-marks/Localization" +"files": [ + { + "source": "en.lproj/Localizable.strings", #source files filter + "translation": "%two_letters_code%.lproj/Localizable.strings" #where translations are stored + } +] diff --git a/.github/workflows/localization.yml b/.github/workflows/localization.yml new file mode 100644 index 0000000..da68e8e --- /dev/null +++ b/.github/workflows/localization.yml @@ -0,0 +1,50 @@ +name: Localization Action + +on: + push: + branches: + - 'dev' + paths: + - 'brain-marks/Localization/en.lproj/Localizable.strings' + +jobs: + synchronize-with-crowdin: + runs-on: ubuntu-latest + + steps: + + - name: Checkout + uses: actions/checkout@v3 + + - name: crowdin action + uses: crowdin/github-action@1.4.14 + with: + # upload options + upload_sources: true + upload_translations: true + + # download options + download_translations: true + + # Commit message for download translations + commit_message: "chore: New Crowdin translations by Github Action" + + # Create pull request after pushing to branch + create_pull_request: true + + # The title of the new pull request + pull_request_title: "chore: New Crowdin translations to review and merge" + + # To add labels for created pull request + pull_request_labels: "translations" + + + # global options + + # Specify a path to the configuration file, without / at the beginning' + config: '.crowdin.yml' + + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} diff --git a/brain-marks.xcodeproj/project.pbxproj b/brain-marks.xcodeproj/project.pbxproj index a235da3..a30f11f 100644 --- a/brain-marks.xcodeproj/project.pbxproj +++ b/brain-marks.xcodeproj/project.pbxproj @@ -29,7 +29,6 @@ DB64F8A52726BD5D00361E86 /* Contributor.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB64F8A42726BD5D00361E86 /* Contributor.swift */; }; DB64F8A727270A9B00361E86 /* ContributorProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB64F8A627270A9B00361E86 /* ContributorProfileView.swift */; }; DB8D63F92767B83B0065A429 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = DB8D63FB2767B83B0065A429 /* Localizable.strings */; }; - DB8D63FE2767C3D20065A429 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = DB8D64002767C3D20065A429 /* Localizable.strings */; }; DBF50B54272467CF000D8B25 /* ContributorsListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBF50B51272467CF000D8B25 /* ContributorsListView.swift */; }; DBF50B55272467CF000D8B25 /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBF50B52272467CF000D8B25 /* SettingsView.swift */; }; DBF50B56272467CF000D8B25 /* SettingsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBF50B53272467CF000D8B25 /* SettingsViewModel.swift */; }; @@ -87,6 +86,7 @@ 91739DEA2622D2A7000F982A /* AddURLView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddURLView.swift; sourceTree = ""; }; 91C8958826228D1500689196 /* Tweet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tweet.swift; sourceTree = ""; }; 940E3C61272648310038D6AC /* CategorySheetViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CategorySheetViewModel.swift; sourceTree = ""; }; + 9FD3920B28EC242800C70DDB /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = ""; }; A205CD412622A3EB00517DB5 /* TweetList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TweetList.swift; sourceTree = ""; }; A224A9E52622BCED00AC12AF /* TweetCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TweetCard.swift; sourceTree = ""; }; A2F4498B2622802B00725FEA /* CategoryRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CategoryRow.swift; sourceTree = ""; }; @@ -101,7 +101,6 @@ DB64F8A42726BD5D00361E86 /* Contributor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Contributor.swift; sourceTree = ""; }; DB64F8A627270A9B00361E86 /* ContributorProfileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContributorProfileView.swift; sourceTree = ""; }; DB8D63FA2767B83B0065A429 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; - DB8D63FF2767C3D20065A429 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = ""; }; DBF50B51272467CF000D8B25 /* ContributorsListView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContributorsListView.swift; sourceTree = ""; }; DBF50B52272467CF000D8B25 /* SettingsView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = ""; }; DBF50B53272467CF000D8B25 /* SettingsViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsViewModel.swift; sourceTree = ""; }; @@ -223,7 +222,6 @@ isa = PBXGroup; children = ( DB8D63FB2767B83B0065A429 /* Localizable.strings */, - DB8D64002767C3D20065A429 /* Localizable.strings */, ); path = Localization; sourceTree = ""; @@ -509,7 +507,6 @@ buildActionMask = 2147483647; files = ( DB8D63F92767B83B0065A429 /* Localizable.strings in Resources */, - DB8D63FE2767C3D20065A429 /* Localizable.strings in Resources */, FFEBBB4126223F7E000F475F /* Preview Assets.xcassets in Resources */, FFEBBB3E26223F7E000F475F /* Assets.xcassets in Resources */, 20636BDDDBEF4EAE9CCE9D9E /* amplifyconfiguration.json in Resources */, @@ -638,14 +635,7 @@ children = ( DB8D63FA2767B83B0065A429 /* en */, D3CD6EE028E92BD700F5EC76 /* fr */, - ); - name = Localizable.strings; - sourceTree = ""; - }; - DB8D64002767C3D20065A429 /* Localizable.strings */ = { - isa = PBXVariantGroup; - children = ( - DB8D63FF2767C3D20065A429 /* de */, + 9FD3920B28EC242800C70DDB /* de */, ); name = Localizable.strings; sourceTree = "";