intl_translation 0.15.0 copy "intl_translation: ^0.15.0" to clipboard
intl_translation: ^0.15.0 copied to clipboard

outdatedDart 1 only

Contains code to deal with internationalized/localized messages, date and number formatting and parsing, bi-directional text, and other internationalization issues.

0.15.0 #

  • Change non-transformer message rewriting to preserve the original message as much as possible. Adds --useStringSubstitution command-line arg.
  • Change non-transformer message rewriting to allow multiple input files to be specified on the command line. Adds --replace flag to ignore --output option and just replace files.
  • Make non-transformer message rewriting also run dartfmt on the output.
  • Make message extraction more robust: error message instead of stack trace when an Intl call is made outside a method, when a prefixed expression is used in an interpolation, and when a non-required example Map is not a literal.
  • Make message extraction more robust: if parsing triggers an exception then report it as an error instead of exiting.
  • Move barback to being a normal rather than a dev dependency.
  • Add a check for invalid select keywords.
  • Added a post-message construction validate, moved IntlMessageExtractionException into intl_message.dart
  • Make use of analyzer's new AstFactory class (requires analyzer version 0.29.1).
  • Fix error in transformer, pass the path instead of the asset id.
  • Prefer an explicit =0/=1/=2 to a ZERO/ONE/TWO if both are present. We don't distinguish the two as Intl.message arguments, we just have the "one" parameter, which we confusingly write out as =1. Tools interpret these differently, and in particular, a ONE clause is used for the zero case if there's no explicit zero. Translation tools may implement this by filling in both ZERO and ONE values with the OTHER clause when there's no ZERO provided, resulting in a translation with both =1 and ONE clauses which are different. We should prefer the explicit =1 in that case. In future we may distinguish the different forms, but that would probably break existing translations.
  • Switch to using package:test
  • Give a more specific type in the generated code to keep lints happy.

0.14.0 #

  • Split message extraction and code generation out into a separate package. Versioned to match the corresponding Intl version.
93
likes
0
pub points
96%
popularity

Publisher

verified publisherdart.dev

Contains code to deal with internationalized/localized messages, date and number formatting and parsing, bi-directional text, and other internationalization issues.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

analyzer, args, barback, dart_style, intl, path, petitparser

More

Packages that depend on intl_translation