esskar / vscode-flutter-i18n-json

VS Code extension to create a binding between your translations from .json files and your Flutter app.
92 stars 21 forks source link

Add command to add an entry #27

Open escamoteur opened 4 years ago

escamoteur commented 4 years ago

Hi,

I really like the idea of this plugin. What would it make perfect if you would add a VS code command that lets you add a new entry directly from the editor.

Like at the position where you want to add a new localized String you call the command Add localized String which would then ask for an identifier and the default text and then adds a new entry to the JSON file and add I18n.of(context).newEntryName at the cursor position. That would improve productivity much.

Also one thought wouldn't it make more sense to express nested resources as Maps so that you can dynamically switch between them instead of long names?

Cheers Thomas

esskar commented 4 years ago

@escamoteur

Also one thought wouldn't it make more sense to express nested resources as Maps so that you can dynamically switch between them instead of long names?

how is this possible for functions?

escamoteur commented 4 years ago

How do you mean that?

mrkpatchaa commented 4 years ago

For reference, this plugin has the ability to add a new string directly from code editor... https://github.com/long1eu/flutter_i18n You can see a screenshot from my comment here : https://github.com/long1eu/flutter_i18n/issues/63#issuecomment-535963796