File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
packages/internal/catalyst_voices_localization/lib/src Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ void main(List<String> args) {
2525 ).process ();
2626}
2727
28+ const _ciRootDir = '/frontend' ;
29+ const _localRootDir = '/catalyst_voices' ;
30+
2831class ArbManager {
2932 final bool clean;
3033 final bool sort;
@@ -149,12 +152,12 @@ class ArbManager {
149152 Directory _findRootDir () {
150153 var current = Directory .current;
151154 while (current.path != current.parent.path) {
152- if (current.path.endsWith ('catalyst_voices' )) {
155+ if (current.path.endsWith (_localRootDir) || current.path. endsWith (_ciRootDir )) {
153156 return current;
154157 }
155158 current = current.parent;
156159 }
157- throw Exception ('Could not find catalyst_voices directory' );
160+ throw Exception ('Could not find root directory, searched for [$ _localRootDir , $ _ciRootDir ] ' );
158161 }
159162
160163 List <File > _getAllDartFiles (Directory dir) {
Original file line number Diff line number Diff line change @@ -73,19 +73,20 @@ melos:
7373
7474 l10n :
7575 run : |
76+ melos exec --scope="catalyst_voices_localization" -- dart lib/src/manage_l10n.dart --sort && \
7677 melos exec --scope="catalyst_voices_localization" -- flutter gen-l10n
7778 description : |
7879 Run `flutter gen-l10n` in catalyst_voices_localization package to generate l10n bindings.
7980
8081 l10n-check :
8182 run : |
82- cd packages/internal/ catalyst_voices_localization && dart lib/src/manage_l10n.dart --check
83+ melos exec --scope=" catalyst_voices_localization" -- dart lib/src/manage_l10n.dart --check
8384 description : |
8485 Check for unused translation keys in .arb files without modifying them, and check if translation keys are sorted.
8586
8687 l10n-clean :
8788 run : |
88- cd packages/internal/ catalyst_voices_localization && dart lib/src/manage_l10n.dart --clean --sort
89+ melos exec --scope=" catalyst_voices_localization" -- dart lib/src/manage_l10n.dart --clean --sort
8990 description : |
9091 Clean up unused translation keys and sort them alphabetically in .arb files.
9192
You can’t perform that action at this time.
0 commit comments