KingWu / gen_lang

gen_lang is a dart library for internationalization. Extracts messages to generate dart files required by Intl, inspired by Intl_translation and Flutter i18n
BSD 2-Clause "Simplified" License
100 stars 23 forks source link

Avoid using braces in interpolation when not needed #9

Closed areille closed 4 years ago

areille commented 4 years ago

Hello,

I am using last version of this package alongside with dart 2.6.1 :

dart --version output:

Dart VM version: 2.6.1 (Mon Nov 11 13:12:24 2019 +0100) on "macos_x64"

On VSCode, dart linter shows these infos on gen_lang generated files :

Screen Shot 2019-12-02 at 11 07 25

It concerns mostly messages with parameters :

String yearsAgo(val) {
    return Intl.message("${val} years ago", name: 'yearsAgo', args: [val]);
}

This is the link to Dart language specs about string interpolation.

Thanks