build(deps): bump slang_flutter and slang (#2374)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pun Butrach <pun.butrach@gmail.com>
This commit is contained in:
dependabot[bot] 2025-01-15 21:15:30 +07:00 committed by GitHub
parent b3ba0fcd6a
commit dfb3fe3749
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
91 changed files with 41 additions and 453 deletions

View File

@ -25,10 +25,10 @@ jobs:
uses: subosito/flutter-action@v2
with:
cache: true
flutter-version: 3.24.x
flutter-version: 3.27.x
- name: Sync translations from Crowdin
uses: crowdin/github-action@v1
uses: crowdin/github-action@v2
with:
config: crowdin.yml
upload_sources: true
@ -47,20 +47,25 @@ jobs:
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
# There has to be a better way to do this
- name: Normalization of Translation Strings
- name: Validation of synced translations
run: |
dart pub get
cd assets/i18n
sudo chmod 766 *.json
cd ../..
dart run slang validate
- name: Normalization of Translation Strings
run: |
sudo chmod 766 assets/i18n/*.i18n.json
dart run slang analyze
dart run slang clean
dart run slang normalize
cd assets/i18n
dart nuke.dart >> $GITHUB_STEP_SUMMARY
cd ../..
dart run slang
flutter analyze lib/gen/strings.g.dart --no-fatal-infos --no-fatal-warnings
- name: Commit translations
@ -68,5 +73,5 @@ jobs:
git config user.name revanced-bot
git config user.email github@revanced.app
sudo chown -R $USER:$USER .git
git commit -m "chore: Remove empty values from JSON" assets/i18n/strings_*.json
git commit -m "chore: Remove empty values from JSON" assets/i18n/*.i18n.json
git push origin HEAD:feat/translations

View File

@ -1,14 +0,0 @@
# Nuke:tm:
> ![CAUTION]
> Some of the code are licensed under BSD 3-Clause License, please check inside the code file for more information.
## Usage
Move to your desire directory and run
```bash
dart nuke.dart
```
and it will remove all the empty keys from the JSON files in the current folder.

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

@ -43,11 +43,16 @@ T? removeBlankEntries<T>(T? json) {
if (json is List) {
json.removeWhere((e) => e == null);
json.forEach(removeBlankEntries);
// If the list is empty after removing nulls, return null to remove it.
return json.isEmpty ? null : json;
} else if (json is Map) {
json.removeWhere(
(key, value) => key == null || value == null || value == '',
);
json.values.forEach(removeBlankEntries);
// If the map is empty after removing blank entries, return null to remove it.
return json.isEmpty ? null : json;
}
return json;
}
@ -62,12 +67,22 @@ Future<void> processJsonFiles() async {
final String contents = await file.readAsString();
final dynamic json = jsonDecode(contents);
final dynamic processedJson = removeBlankEntries(json);
bool isEmpty = false;
file.writeAsString(
if (processedJson is Map) {
isEmpty = processedJson.values.every((value) => value is Map && value.isEmpty);
}
if (processedJson == null || isEmpty) {
await file.delete();
print('🗑️ File deleted: ${file.path}');
} else {
await file.writeAsString(
const JsonEncoder.withIndent(' ').convert(processedJson),
);
print('🥞 Task successful on: ${file.path}');
}
}
} catch (e) {
print('💥 Task failed on: ${file.path}: $e');
}

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

@ -1,19 +0,0 @@
{
"navigationView": {},
"homeView": {},
"applicationItem": {},
"latestCommitCard": {},
"patcherView": {},
"appSelectorCard": {},
"patchSelectorCard": {},
"socialMediaCard": {},
"appSelectorView": {},
"patchesSelectorView": {},
"patchOptionsView": {},
"patchItem": {},
"installerView": {},
"settingsView": {},
"appInfoView": {},
"contributorsView": {},
"installErrorDialog": {}
}

View File

@ -1,19 +0,0 @@
{
"navigationView": {},
"homeView": {},
"applicationItem": {},
"latestCommitCard": {},
"patcherView": {},
"appSelectorCard": {},
"patchSelectorCard": {},
"socialMediaCard": {},
"appSelectorView": {},
"patchesSelectorView": {},
"patchOptionsView": {},
"patchItem": {},
"installerView": {},
"settingsView": {},
"appInfoView": {},
"contributorsView": {},
"installErrorDialog": {}
}

View File

@ -1,19 +0,0 @@
{
"navigationView": {},
"homeView": {},
"applicationItem": {},
"latestCommitCard": {},
"patcherView": {},
"appSelectorCard": {},
"patchSelectorCard": {},
"socialMediaCard": {},
"appSelectorView": {},
"patchesSelectorView": {},
"patchOptionsView": {},
"patchItem": {},
"installerView": {},
"settingsView": {},
"appInfoView": {},
"contributorsView": {},
"installErrorDialog": {}
}

View File

@ -1,19 +0,0 @@
{
"navigationView": {},
"homeView": {},
"applicationItem": {},
"latestCommitCard": {},
"patcherView": {},
"appSelectorCard": {},
"patchSelectorCard": {},
"socialMediaCard": {},
"appSelectorView": {},
"patchesSelectorView": {},
"patchOptionsView": {},
"patchItem": {},
"installerView": {},
"settingsView": {},
"appInfoView": {},
"contributorsView": {},
"installErrorDialog": {}
}

View File

@ -1,19 +0,0 @@
{
"navigationView": {},
"homeView": {},
"applicationItem": {},
"latestCommitCard": {},
"patcherView": {},
"appSelectorCard": {},
"patchSelectorCard": {},
"socialMediaCard": {},
"appSelectorView": {},
"patchesSelectorView": {},
"patchOptionsView": {},
"patchItem": {},
"installerView": {},
"settingsView": {},
"appInfoView": {},
"contributorsView": {},
"installErrorDialog": {}
}

View File

@ -1,19 +0,0 @@
{
"navigationView": {},
"homeView": {},
"applicationItem": {},
"latestCommitCard": {},
"patcherView": {},
"appSelectorCard": {},
"patchSelectorCard": {},
"socialMediaCard": {},
"appSelectorView": {},
"patchesSelectorView": {},
"patchOptionsView": {},
"patchItem": {},
"installerView": {},
"settingsView": {},
"appInfoView": {},
"contributorsView": {},
"installErrorDialog": {}
}

View File

@ -1,19 +0,0 @@
{
"navigationView": {},
"homeView": {},
"applicationItem": {},
"latestCommitCard": {},
"patcherView": {},
"appSelectorCard": {},
"patchSelectorCard": {},
"socialMediaCard": {},
"appSelectorView": {},
"patchesSelectorView": {},
"patchOptionsView": {},
"patchItem": {},
"installerView": {},
"settingsView": {},
"appInfoView": {},
"contributorsView": {},
"installErrorDialog": {}
}

View File

@ -1,19 +0,0 @@
{
"navigationView": {},
"homeView": {},
"applicationItem": {},
"latestCommitCard": {},
"patcherView": {},
"appSelectorCard": {},
"patchSelectorCard": {},
"socialMediaCard": {},
"appSelectorView": {},
"patchesSelectorView": {},
"patchOptionsView": {},
"patchItem": {},
"installerView": {},
"settingsView": {},
"appInfoView": {},
"contributorsView": {},
"installErrorDialog": {}
}

View File

@ -1,19 +0,0 @@
{
"navigationView": {},
"homeView": {},
"applicationItem": {},
"latestCommitCard": {},
"patcherView": {},
"appSelectorCard": {},
"patchSelectorCard": {},
"socialMediaCard": {},
"appSelectorView": {},
"patchesSelectorView": {},
"patchOptionsView": {},
"patchItem": {},
"installerView": {},
"settingsView": {},
"appInfoView": {},
"contributorsView": {},
"installErrorDialog": {}
}

View File

@ -1,19 +0,0 @@
{
"navigationView": {},
"homeView": {},
"applicationItem": {},
"latestCommitCard": {},
"patcherView": {},
"appSelectorCard": {},
"patchSelectorCard": {},
"socialMediaCard": {},
"appSelectorView": {},
"patchesSelectorView": {},
"patchOptionsView": {},
"patchItem": {},
"installerView": {},
"settingsView": {},
"appInfoView": {},
"contributorsView": {},
"installErrorDialog": {}
}

View File

@ -1,19 +0,0 @@
{
"navigationView": {},
"homeView": {},
"applicationItem": {},
"latestCommitCard": {},
"patcherView": {},
"appSelectorCard": {},
"patchSelectorCard": {},
"socialMediaCard": {},
"appSelectorView": {},
"patchesSelectorView": {},
"patchOptionsView": {},
"patchItem": {},
"installerView": {},
"settingsView": {},
"appInfoView": {},
"contributorsView": {},
"installErrorDialog": {}
}

View File

@ -1,19 +0,0 @@
{
"navigationView": {},
"homeView": {},
"applicationItem": {},
"latestCommitCard": {},
"patcherView": {},
"appSelectorCard": {},
"patchSelectorCard": {},
"socialMediaCard": {},
"appSelectorView": {},
"patchesSelectorView": {},
"patchOptionsView": {},
"patchItem": {},
"installerView": {},
"settingsView": {},
"appInfoView": {},
"contributorsView": {},
"installErrorDialog": {}
}

View File

@ -1,19 +0,0 @@
{
"navigationView": {},
"homeView": {},
"applicationItem": {},
"latestCommitCard": {},
"patcherView": {},
"appSelectorCard": {},
"patchSelectorCard": {},
"socialMediaCard": {},
"appSelectorView": {},
"patchesSelectorView": {},
"patchOptionsView": {},
"patchItem": {},
"installerView": {},
"settingsView": {},
"appInfoView": {},
"contributorsView": {},
"installErrorDialog": {}
}

View File

@ -1,19 +0,0 @@
{
"navigationView": {},
"homeView": {},
"applicationItem": {},
"latestCommitCard": {},
"patcherView": {},
"appSelectorCard": {},
"patchSelectorCard": {},
"socialMediaCard": {},
"appSelectorView": {},
"patchesSelectorView": {},
"patchOptionsView": {},
"patchItem": {},
"installerView": {},
"settingsView": {},
"appInfoView": {},
"contributorsView": {},
"installErrorDialog": {}
}

View File

@ -1,19 +0,0 @@
{
"navigationView": {},
"homeView": {},
"applicationItem": {},
"latestCommitCard": {},
"patcherView": {},
"appSelectorCard": {},
"patchSelectorCard": {},
"socialMediaCard": {},
"appSelectorView": {},
"patchesSelectorView": {},
"patchOptionsView": {},
"patchItem": {},
"installerView": {},
"settingsView": {},
"appInfoView": {},
"contributorsView": {},
"installErrorDialog": {}
}

View File

@ -1,19 +0,0 @@
{
"navigationView": {},
"homeView": {},
"applicationItem": {},
"latestCommitCard": {},
"patcherView": {},
"appSelectorCard": {},
"patchSelectorCard": {},
"socialMediaCard": {},
"appSelectorView": {},
"patchesSelectorView": {},
"patchOptionsView": {},
"patchItem": {},
"installerView": {},
"settingsView": {},
"appInfoView": {},
"contributorsView": {},
"installErrorDialog": {}
}

View File

@ -1,19 +0,0 @@
{
"navigationView": {},
"homeView": {},
"applicationItem": {},
"latestCommitCard": {},
"patcherView": {},
"appSelectorCard": {},
"patchSelectorCard": {},
"socialMediaCard": {},
"appSelectorView": {},
"patchesSelectorView": {},
"patchOptionsView": {},
"patchItem": {},
"installerView": {},
"settingsView": {},
"appInfoView": {},
"contributorsView": {},
"installErrorDialog": {}
}

View File

@ -1,19 +0,0 @@
{
"navigationView": {},
"homeView": {},
"applicationItem": {},
"latestCommitCard": {},
"patcherView": {},
"appSelectorCard": {},
"patchSelectorCard": {},
"socialMediaCard": {},
"appSelectorView": {},
"patchesSelectorView": {},
"patchOptionsView": {},
"patchItem": {},
"installerView": {},
"settingsView": {},
"appInfoView": {},
"contributorsView": {},
"installErrorDialog": {}
}

View File

@ -1,19 +0,0 @@
{
"navigationView": {},
"homeView": {},
"applicationItem": {},
"latestCommitCard": {},
"patcherView": {},
"appSelectorCard": {},
"patchSelectorCard": {},
"socialMediaCard": {},
"appSelectorView": {},
"patchesSelectorView": {},
"patchOptionsView": {},
"patchItem": {},
"installerView": {},
"settingsView": {},
"appInfoView": {},
"contributorsView": {},
"installErrorDialog": {}
}

View File

@ -1,19 +0,0 @@
{
"navigationView": {},
"homeView": {},
"applicationItem": {},
"latestCommitCard": {},
"patcherView": {},
"appSelectorCard": {},
"patchSelectorCard": {},
"socialMediaCard": {},
"appSelectorView": {},
"patchesSelectorView": {},
"patchOptionsView": {},
"patchItem": {},
"installerView": {},
"settingsView": {},
"appInfoView": {},
"contributorsView": {},
"installErrorDialog": {}
}

View File

@ -1,19 +0,0 @@
{
"navigationView": {},
"homeView": {},
"applicationItem": {},
"latestCommitCard": {},
"patcherView": {},
"appSelectorCard": {},
"patchSelectorCard": {},
"socialMediaCard": {},
"appSelectorView": {},
"patchesSelectorView": {},
"patchOptionsView": {},
"patchItem": {},
"installerView": {},
"settingsView": {},
"appInfoView": {},
"contributorsView": {},
"installErrorDialog": {}
}

View File

@ -1,19 +0,0 @@
{
"navigationView": {},
"homeView": {},
"applicationItem": {},
"latestCommitCard": {},
"patcherView": {},
"appSelectorCard": {},
"patchSelectorCard": {},
"socialMediaCard": {},
"appSelectorView": {},
"patchesSelectorView": {},
"patchOptionsView": {},
"patchItem": {},
"installerView": {},
"settingsView": {},
"appInfoView": {},
"contributorsView": {},
"installErrorDialog": {}
}

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

@ -3,6 +3,6 @@ api_token_env: "CROWDIN_PERSONAL_TOKEN"
preserve_hierarchy: false
files:
- source: /assets/i18n/strings.i18n.json
translation: /assets/i18n/strings_%locale_with_underscore%.i18n.json
- source: /assets/i18n/en.i18n.json
translation: /assets/i18n/%locale_with_underscore%.i18n.json
skip_untranslated_strings: true

View File

@ -1040,18 +1040,18 @@ packages:
dependency: "direct main"
description:
name: slang
sha256: a466773de768eb95bdf681e0a92e7c8010d44bb247b62130426c83ece33aeaed
sha256: "4cdc3d8f4b384dbc56d94c87a5371d4a584460d82a74e18247ec690a0e369ff2"
url: "https://pub.dev"
source: hosted
version: "3.32.0"
version: "4.4.0"
slang_flutter:
dependency: "direct main"
description:
name: slang_flutter
sha256: "1a98e878673996902fa5ef0b61ce5c245e41e4d25640d18af061c6aab917b0c7"
sha256: "819637a23348adbc4f4e8faee3f274d8908f9af31d57bf1e277cd730b14bacde"
url: "https://pub.dev"
source: hosted
version: "3.32.0"
version: "4.4.0"
source_gen:
dependency: transitive
description:

View File

@ -61,8 +61,8 @@ dependencies:
git: # remove once https://github.com/badjio/skeletons/pull/11 is merged
url: https://github.com/Ofceab-Studio/skeletons
ref: 326fbb4223ac4d8a6301cc2f16b6112ecd308c71 # Branch: master
slang: ^3.30.2
slang_flutter: ^3.30.0
slang: ^4.4.0
slang_flutter: ^4.4.0
stacked: ^3.4.2
stacked_generator: ^1.6.0
stacked_services: ^1.6.0