Closed mosuem closed 1 year ago
I'm not sure I understand this change (but this may be because I don't understand the arb format :) ). The description at #41 reads like a bug (like a false warning is generated), but this PR just allows disabling the check entirely. Is it not possible to have the check, but allow valid quotes as given in the example (eg., is this not just a bug in the unbalanced quote detection?).
The arb format uses ICU MessageFormat syntax, which specifies single quotes for escaping. Flutter, which uses the arb format, allows to disable escaping by single quotes (which goes against ICU syntax...). So the extension should respect the YAML file in some way.
Oh, thanks for the pointer - I thought this was a new yaml file you'd created for this, it makes more sense now :-)
Although, presumably this means that it's important it goes in the project root now (next to pubspec.yaml) for Flutter projects, so I think the workspace folder mentioned above might not be appropriate (because the workspace may have multiple nested projects).
I will take a look at how the pubspec.yaml
is handled in the Dart-Code extension and go from there, thanks!
If you need to find all projects, Dart-Code does this in the findProjectFolders
although there are some options for search depth and exclusions. If you know the arb file you're editing, it might be simpler to walk up and find the nearest project instead (this avoids searching the down the tree which can be quite large), which the Dart-Code extension does in locateBestProjectRoot
.
I tried to keep it somehow Flutter-agnostic, while still supporting Flutter.
Fixes #41.