test gen l10n
All checks were successful
Pull Request Pipeline / lint (pull_request) Has been skipped
Pull Request Pipeline / test (pull_request) Has been skipped
Pull Request Pipeline / localizations (pull_request) Has been skipped
Pull Request Pipeline / generate_localizations (pull_request) Successful in 25s

This commit is contained in:
2026-05-22 15:39:00 +02:00
parent 9b7fe20e75
commit c7b4fcd776
2 changed files with 59 additions and 47 deletions

View File

@@ -59,6 +59,7 @@ jobs:
run: flutter test run: flutter test
localizations: localizations:
if: false
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
@@ -100,3 +101,60 @@ jobs:
echo "All messages translated." echo "All messages translated."
generate_localizations:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
# Required for Flutter action
- name: Install jq
run: |
apt-get update
apt-get install -y jq
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: 3.41.0
- name: Get dependencies
run: |
git config --global --add safe.directory /opt/hostedtoolcache/flutter/stable-3.41.0-x64
flutter pub get
- name: Generate localization files
run: flutter gen-l10n --no-use-deferred-loading
- name: Check code format
id: generate_localizations
continue-on-error: true
run: flutter gen-l10n --no-use-deferred-loading
- name: Format code
if: steps.generate_localizations.outcome == 'failure'
env:
GITEA_TOKEN: ${{ secrets.BOT_TOKEN }}
run: |
# git fetch origin ${{ gitea.ref_name }}
git fetch origin ${{ gitea.head_ref }}
# git checkout ${{ gitea.ref_name }}
git checkout ${{ gitea.head_ref }}
if [ -n "$(git status --porcelain lib test)" ]; then
git config --global user.name "Gitea Actions [bot]"
git config --global user.email "actions@yannick-weigert.de"
git config pull.rebase false
# git pull origin ${{ gitea.ref_name }}
git pull origin ${{ gitea.head_ref }}
git add lib/l10n
git commit -m "Generated localizations [skip ci]"
# git push origin HEAD:${{ gitea.ref_name }}
git push origin HEAD:${{ gitea.head_ref }}
else
echo "No changes to commit"
fi

View File

@@ -1,5 +1,6 @@
// ignore: unused_import // ignore: unused_import
import 'package:intl/intl.dart' as intl; import 'package:intl/intl.dart' as intl;
import 'app_localizations.dart'; import 'app_localizations.dart';
// ignore_for_file: type=lint // ignore_for_file: type=lint
@@ -41,53 +42,6 @@ class AppLocalizationsDe extends AppLocalizations {
@override @override
String get color => 'Farbe'; String get color => 'Farbe';
@override
String get color_blue => 'Blau';
@override
String get color_green => 'Grün';
@override
String get color_orange => 'Orange';
@override
String get color_pink => 'Rosa';
@override
String get color_purple => 'Lila';
@override
String get color_red => 'Rot';
@override
String get color_teal => 'Türkis';
@override
String get color_yellow => 'Gelb';
@override
String could_not_add_player(Object playerName) {
return 'Spieler:in $playerName konnte nicht hinzugefügt werden';
}
@override
String get create_game => 'Spielvorlage erstellen';
@override
String get create_group => 'Gruppe erstellen';
@override
String get create_match => 'Spiel erstellen';
@override
String get create_new_group => 'Neue Gruppe erstellen';
@override
String get created_on => 'Erstellt am';
@override
String get create_new_match => 'Neues Spiel erstellen';
@override @override
String get data => 'Daten'; String get data => 'Daten';