dart-lang / linter

Linter for Dart.
https://dart.dev/tools/linter-rules
BSD 3-Clause "New" or "Revised" License
630 stars 170 forks source link

Hard code check #2376

Open SixSheeppp opened 3 years ago

SixSheeppp commented 3 years ago

I am going to make Flutter project more international.

Docs: https://flutter.dev/docs/development/accessibility-and-localization/internationalization

But in this way, I have to check thousands of lines in source code. ex: Text("hello world")

So a rule to help check hard code is kind to developer :)

It should work like this. The hard code should be defined in cn_localization.dart

image

pq commented 3 years ago

@kevmoo @davidmorgan

amr-eniou-3r commented 3 years ago

any updates?

amr-eniou-3r commented 3 years ago

reference https://github.com/flutter/flutter/issues/42227

dpss77 commented 2 years ago

Hi, any update?

dpss77 commented 2 years ago

I found this as workaround, it's not perfect but it helps: https://nabil6391.medium.com/easy-way-to-extract-all-strings-to-arb-in-flutter-777cf8365b15