MikeMitterer / dart-l10n-gettext

Other
18 stars 7 forks source link

benchmark? #1

Open mathieujobin opened 6 years ago

mathieujobin commented 6 years ago

Personally I have a preference for gettext, since its a long standard and has multiple GUI applications for translators

but lately, its less popular. the flutter internationalization page https://flutter.io/tutorials/internationalization/ propose two alternatives, both I tried and both seems incomplete as far as the documentation goes.

now I wonder what could help this project becomes the defactor standard in the flutter community. That would be the best. I think benchmarks would help preach for this project, people love benchmarks.

i don;t know how we could get those in place. we sure need all 3 methods properly setup. and do a bunch of string search in a project that has several thousands entries?

compare initialization time as well.

my two cents

thanks

MikeMitterer commented 6 years ago

The latest version is a complete rewrite. It generates .arb files out of the box and fully supports Intl.messages and l10n(...) syntax.

Working example: http://l10n4dart.example.mikemitterer.at/ Source for example: https://github.com/MikeMitterer/dart-l10n-gettext/tree/master/example/web

mkl10n -l de . 

...generates the necessary .arb-files in the l10n-folder. Now you can translate the generated intl_de.arb

If you run

mkl10n -l de . 

again you get the generated .dart-files in lib/_l10

Now import messages_all.dart and initialize everything like so: https://github.com/MikeMitterer/dart-l10n-gettext/blob/master/example/web/web/main.dart#L13-L22

This is just a short overview - I'll provide a README in the next few days.