chore: update l10n workflow
This commit is contained in:
4
.github/workflows/l10n.yml
vendored
4
.github/workflows/l10n.yml
vendored
@@ -21,8 +21,8 @@ jobs:
|
|||||||
- run: flutter pub run build_runner build --delete-conflicting-outputs
|
- run: flutter pub run build_runner build --delete-conflicting-outputs
|
||||||
- name: Generate localizations
|
- name: Generate localizations
|
||||||
run: flutter gen-l10n --arb-dir=lib/l10n --output-dir=lib/l10n --template-arb-file=app_en.arb --output-localization-file=app_localizations.dart
|
run: flutter gen-l10n --arb-dir=lib/l10n --output-dir=lib/l10n --template-arb-file=app_en.arb --output-localization-file=app_localizations.dart
|
||||||
- name: Analyze
|
- name: Analyze (non-fatal infos/warnings)
|
||||||
run: flutter analyze
|
run: flutter analyze --no-fatal-warnings --no-fatal-infos
|
||||||
- name: Verify ARB descriptions
|
- name: Verify ARB descriptions
|
||||||
run: dart run tool/verify_arb_descriptions.dart
|
run: dart run tool/verify_arb_descriptions.dart
|
||||||
- name: Validate ARB locales and placeholders
|
- name: Validate ARB locales and placeholders
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import 'dart:io';
|
|||||||
/// - Ensures each non-meta key in EN exists in other locales.
|
/// - Ensures each non-meta key in EN exists in other locales.
|
||||||
/// - Ensures placeholder names match between EN and other locales.
|
/// - Ensures placeholder names match between EN and other locales.
|
||||||
/// - Reports unused keys (best-effort) by scanning lib/ for usages of
|
/// - Reports unused keys (best-effort) by scanning lib/ for usages of
|
||||||
/// AppLocalizations.of(context)!.<key>. Unused keys are WARNINGS by default.
|
/// AppLocalizations.of(context)!.someKey. Unused keys are WARNINGS by default.
|
||||||
///
|
///
|
||||||
/// Exit codes:
|
/// Exit codes:
|
||||||
/// 0 = success (no hard errors; warnings may be printed)
|
/// 0 = success (no hard errors; warnings may be printed)
|
||||||
|
|||||||
16
weblate.yaml
16
weblate.yaml
@@ -4,7 +4,10 @@ projects:
|
|||||||
components:
|
components:
|
||||||
- name: Mobile App
|
- name: Mobile App
|
||||||
slug: app
|
slug: app
|
||||||
# Weblate will use the repository connected via the UI.
|
# Repository configuration
|
||||||
|
repository: https://github.com/cogwheel0/conduit.git
|
||||||
|
push: git@github.com:cogwheel0/conduit.git
|
||||||
|
branch: main
|
||||||
# Configure file discovery for Flutter ARB localization files.
|
# Configure file discovery for Flutter ARB localization files.
|
||||||
filemask: lib/l10n/app_*.arb
|
filemask: lib/l10n/app_*.arb
|
||||||
template: lib/l10n/app_en.arb
|
template: lib/l10n/app_en.arb
|
||||||
@@ -14,6 +17,15 @@ projects:
|
|||||||
monolingual: true
|
monolingual: true
|
||||||
# Prefer PRs from Weblate instead of direct pushes
|
# Prefer PRs from Weblate instead of direct pushes
|
||||||
pull_request: true
|
pull_request: true
|
||||||
|
pull_request_title: "chore(l10n): {component} ({language_code})"
|
||||||
|
pull_request_body: |
|
||||||
|
Automated translation updates via Weblate for {component} ({language}).
|
||||||
|
|
||||||
|
- Source: {project}
|
||||||
|
- Component: {component}
|
||||||
|
- Language: {language} ({language_code})
|
||||||
|
|
||||||
|
This PR was generated automatically by Weblate.
|
||||||
|
commit_message: "chore(l10n): {component} ({language_code})"
|
||||||
# Optional: auto-add new languages when enabled in Weblate
|
# Optional: auto-add new languages when enabled in Weblate
|
||||||
add_new_languages: true
|
add_new_languages: true
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user