Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Description
This PR is a proposal to incorporate (a fork of) the
i18n-ally
plugin for VS Code. The main motivation here is the plugin's ability to refactor straight from the code to the.arb
file. For me, that is one of the biggest pain points when writing new code. You can see a neat demo below. It's smart enough to recognize if the string already exists and even search for similar ones. Otherwise, it will create a new entry and initiate the code gen. It doesn't sort or add metadata, but we can run still usearb_utils
for that (as you can see in my demo). (Maybe in the future we could use something like Run on Save to do that part automatically too!)Background: The original
i18n-ally
plugin actually seems to predate the built-inl10n-gen
plugin and integrates better with theflutter_i18n
project. However, this fork was created specifically to integrate well withgen-l10n
, and seems to work very well! It is available on the VS Code extension store.Demo
You'll see in the demo that I have to add the null suppression operator. In a future update, I would like to add
nullable-getter: false
tol10n.yaml
to avoid this behavior. Of course, per our style, we would prefer defining the localizations once and usingl10n
anyway. I may open a PR to their repo to support our style! Also keep in mind that the cool inline annotations only work with the full default style.i18n-ally-demo.mp4
P.S. I also removed the empty
dependency_overrides
section frompubspec.yaml
. While it never caused build issues, it did cause a persistent error for me in VS Code.