diff --git a/.github/workflows/auth-crowdin.yml b/.github/workflows/auth-crowdin.yml new file mode 100644 index 000000000..e4c77b2de --- /dev/null +++ b/.github/workflows/auth-crowdin.yml @@ -0,0 +1,38 @@ +name: "Sync Crowdin translations (auth)" + +on: + push: + # Run action when auth's intl_en.arb is changed + paths: + - "mobile/lib/l10n/arb/app_en.arb" + branches: [main] + schedule: + # Run every 24 hours - https://crontab.guru/#0_*/24_*_*_* + - cron: "0 */24 * * *" + workflow_dispatch: # Allow manually running the action + +jobs: + synchronize-with-crowdin: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Crowdin's action + uses: crowdin/github-action@v1 + with: + base_path: "auth/" + upload_sources: true + upload_translations: true + download_translations: true + localization_branch_name: crowdin-translations-auth + create_pull_request: true + skip_untranslated_strings: true + pull_request_title: "New translations (auth)" + pull_request_body: "New translations via [Crowdin GH Action](https://github.com/crowdin/github-action)" + pull_request_base_branch_name: "main" + project_id: 575169 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} diff --git a/.github/workflows/auth-lint.yml b/.github/workflows/auth-lint.yml new file mode 100644 index 000000000..ec108e6a9 --- /dev/null +++ b/.github/workflows/auth-lint.yml @@ -0,0 +1,35 @@ +name: "Lint (auth)" + +on: + # Run on every push (this also covers pull requests) + push: + paths: + # - But only if something changes inside auth + - "auth/**" + # - Or if the there is some change in workflow itself + - ".github/workflows/auth-lint.yml" + +jobs: + lint: + runs-on: ubuntu-latest + defaults: + run: + working-directory: auth + steps: + # Checkout our code, including submodules + - uses: actions/checkout@v4 + with: + submodules: recursive + + # Install Flutter + - uses: subosito/flutter-action@v2 + with: + channel: "stable" + flutter-version: "3.13.4" + cache: true + + # Install dependencies + - run: flutter pub get + + # Lint + - run: flutter analyze --no-fatal-infos diff --git a/web/.github/workflows/l18n-crowdin.yml b/.github/workflows/mobile-crowdin.yml similarity index 55% rename from web/.github/workflows/l18n-crowdin.yml rename to .github/workflows/mobile-crowdin.yml index 56dd07775..50ee9f72e 100644 --- a/web/.github/workflows/l18n-crowdin.yml +++ b/.github/workflows/mobile-crowdin.yml @@ -1,13 +1,15 @@ -name: Sync crowdin translation +name: "Sync Crowdin translations (mobile)" on: push: - paths: # run action automatically when en-US/translation.json file is changed - - "apps/photos/public/locales/en-US/translation.json" + # Run action when mobiles's intl_en.arb is changed + paths: + - "mobile/lib/l10n/intl_en.arb" branches: [main] schedule: - - cron: "0 */24 * * *" # Every 24 hours - https://crontab.guru/#0_*/12_*_*_* - workflow_dispatch: # for manually running the action + # Run every 24 hours - https://crontab.guru/#0_*/24_*_*_* + - cron: "0 */24 * * *" + workflow_dispatch: # Allow manually running the action jobs: synchronize-with-crowdin: @@ -15,23 +17,22 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 - with: - ref: main + uses: actions/checkout@v4 - - name: crowdin action + - name: Crowdin's action uses: crowdin/github-action@v1 with: + base_path: "mobile/" upload_sources: true upload_translations: true download_translations: true - localization_branch_name: l10n_translations + localization_branch_name: crowdin-translations-mobile create_pull_request: true skip_untranslated_strings: true - pull_request_title: "New Translations" + pull_request_title: "New translations (mobile)" pull_request_body: "New translations via [Crowdin GH Action](https://github.com/crowdin/github-action)" pull_request_base_branch_name: "main" + project_id: 574741 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} diff --git a/.github/workflows/mobile-lint.yml b/.github/workflows/mobile-lint.yml new file mode 100644 index 000000000..e1ff20ded --- /dev/null +++ b/.github/workflows/mobile-lint.yml @@ -0,0 +1,35 @@ +name: "Lint (mobile)" + +on: + # Run on every push (this also covers pull requests) + push: + paths: + # - But only if something changes inside mobile + - "mobile/**" + # - Or if the there is some change in workflow itself + - ".github/workflows/mobile-lint.yml" + +jobs: + lint: + runs-on: ubuntu-latest + defaults: + run: + working-directory: mobile + steps: + # Checkout our code, including submodules + - uses: actions/checkout@v4 + with: + submodules: recursive + + # Install Flutter + - uses: subosito/flutter-action@v2 + with: + channel: "stable" + flutter-version: "3.13.4" + cache: true + + # Install dependencies + - run: flutter pub get + + # Lint + - run: flutter analyze --no-fatal-infos diff --git a/.github/workflows/web-crowdin.yml b/.github/workflows/web-crowdin.yml new file mode 100644 index 000000000..880b270c7 --- /dev/null +++ b/.github/workflows/web-crowdin.yml @@ -0,0 +1,38 @@ +name: "Sync Crowdin translations (web)" + +on: + push: + # Run action when web's en-US/translation.json is changed + paths: + - "web/apps/photos/public/locales/en-US/translation.json" + branches: [main] + schedule: + # Run every 24 hours - https://crontab.guru/#0_*/24_*_*_* + - cron: "0 */24 * * *" + workflow_dispatch: # Allow manually running the action + +jobs: + synchronize-with-crowdin: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Crowdin's action + uses: crowdin/github-action@v1 + with: + base_path: "web/" + upload_sources: true + upload_translations: true + download_translations: true + localization_branch_name: crowdin-translations-web + create_pull_request: true + skip_untranslated_strings: true + pull_request_title: "New translations (web)" + pull_request_body: "New translations via [Crowdin GH Action](https://github.com/crowdin/github-action)" + pull_request_base_branch_name: "main" + project_id: 569613 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} diff --git a/.github/workflows/web-lint.yml b/.github/workflows/web-lint.yml new file mode 100644 index 000000000..50833e195 --- /dev/null +++ b/.github/workflows/web-lint.yml @@ -0,0 +1,26 @@ +name: "Lint (web)" + +on: + # Run on every push (this also covers pull requests) + push: + paths: + # - But only if something changes inside web + - "web/**" + # - Or if the there is some change in workflow itself + - ".github/workflows/web-lint.yml" + +jobs: + lint: + runs-on: ubuntu-latest + defaults: + run: + working-directory: web + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "yarn" + cache-dependency-path: "web/yarn.lock" + - run: yarn install + - run: yarn lint diff --git a/auth/.github/workflows/l18n-crowdin.yml b/auth/.github/workflows/l18n-crowdin.yml deleted file mode 100644 index bdfd83096..000000000 --- a/auth/.github/workflows/l18n-crowdin.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Sync crowdin translation - -on: - push: - paths: # run action automatically when app_en.arb file is changed - - 'lib/l10n/arb/app_en.arb' - branches: [ main ] - schedule: - - cron: '0 */12 * * *' # Every 12 hours - https://crontab.guru/#0_*/12_*_*_* - workflow_dispatch: # for manually running the action - -jobs: - synchronize-with-crowdin: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: crowdin action - uses: crowdin/github-action@v1 - with: - upload_sources: true - upload_translations: true - download_translations: true - localization_branch_name: l10n_translations - create_pull_request: true - skip_untranslated_strings: true - pull_request_title: 'New Translations' - pull_request_body: 'New translations via [Crowdin GH Action](https://github.com/crowdin/github-action)' - pull_request_base_branch_name: 'main' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} - CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} \ No newline at end of file diff --git a/auth/coverage_badge.svg b/auth/coverage_badge.svg deleted file mode 100644 index 88bfadfb4..000000000 --- a/auth/coverage_badge.svg +++ /dev/null @@ -1,20 +0,0 @@ - \ No newline at end of file diff --git a/auth/crowdin.yml b/auth/crowdin.yml index 87443717a..1d33a339d 100644 --- a/auth/crowdin.yml +++ b/auth/crowdin.yml @@ -1,6 +1,5 @@ -project_id_env: CROWDIN_PROJECT_ID api_token_env: CROWDIN_PERSONAL_TOKEN files: - source: /lib/l10n/arb/app_en.arb - translation: /lib/l10n/arb/app_%two_letters_code%.arb \ No newline at end of file + translation: /lib/l10n/arb/app_%two_letters_code%.arb diff --git a/mobile/.github/workflows/code_quality.yml b/mobile/.github/workflows/code_quality.yml deleted file mode 100644 index c3b654ff2..000000000 --- a/mobile/.github/workflows/code_quality.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Check Linter Rules -on: - pull_request: - types: [review_requested] - branches: - - master -jobs: - test: - name: Check the source code - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v2 - with: - path: ${{ runner.tool_cache }}/flutter - key: flutter-3.0.0-stable - # Setup the flutter environment. - - uses: subosito/flutter-action@v2.3.0 - with: - channel: 'stable' - flutter-version: '3.0.0' - - # Fetch sub modules - - run: git submodule update --init --recursive - - # Get flutter dependencies. - - name: Install packages - run: flutter pub get - - - name: Run Linter - run: flutter analyze --no-fatal-infos - - name: Run Test - run: flutter test diff --git a/mobile/.github/workflows/crowdin.yml b/mobile/.github/workflows/crowdin.yml deleted file mode 100644 index bbb0e32a7..000000000 --- a/mobile/.github/workflows/crowdin.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Sync crowdin translation - -on: - workflow_dispatch: - push: - paths: - - 'lib/l10n/intl_en.arb' - branches: [ main ] - schedule: - - cron: '0 */12 * * *' # Every 12 hours - https://crontab.guru/#0_*/12_*_*_* - -jobs: - synchronize-with-crowdin: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: crowdin action - uses: crowdin/github-action@v1 - with: - upload_sources: true - upload_translations: true - download_translations: true - localization_branch_name: l10n_translations - create_pull_request: true - skip_untranslated_strings: true - pull_request_title: 'New Translations' - pull_request_body: 'New translations via [Crowdin GH Action](https://github.com/crowdin/github-action)' - pull_request_base_branch_name: 'main' - pull_request_reviewers: ashilkn,vishnukvmd,ua741 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} - CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} diff --git a/mobile/crowdin.yml b/mobile/crowdin.yml index 0db85f7cf..27c72a52b 100644 --- a/mobile/crowdin.yml +++ b/mobile/crowdin.yml @@ -1,4 +1,3 @@ -project_id_env: CROWDIN_PROJECT_ID api_token_env: CROWDIN_PERSONAL_TOKEN preserve_hierarchy: true diff --git a/web/.github/workflows/pr.yml b/web/.github/workflows/pr.yml deleted file mode 100644 index 5af6d933b..000000000 --- a/web/.github/workflows/pr.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Lint - -on: - # Run on every push (this also covers pull requests) - push: - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - run: yarn install - - run: yarn lint diff --git a/web/apps/auth/src/components/AuthFooter.tsx b/web/apps/auth/src/components/AuthFooter.tsx index 2ee541629..029103125 100644 --- a/web/apps/auth/src/components/AuthFooter.tsx +++ b/web/apps/auth/src/components/AuthFooter.tsx @@ -12,7 +12,10 @@ export const AuthFooter = () => { }} >
{t("AUTH_DOWNLOAD_MOBILE_APP")}
- + diff --git a/web/crowdin.yml b/web/crowdin.yml index 24e35b795..0079be91d 100644 --- a/web/crowdin.yml +++ b/web/crowdin.yml @@ -1,4 +1,3 @@ -project_id_env: CROWDIN_PROJECT_ID api_token_env: CROWDIN_PERSONAL_TOKEN files: