slang-i18n / slang

Type-safe i18n for Dart and Flutter
https://pub.dev/packages/slang
MIT License
459 stars 39 forks source link

Support ARB #179

Closed Tienisto closed 9 months ago

Tienisto commented 9 months ago

Motivation Developers might want to use ARB files to avoid risks of technical debt. ARB is a standard set by the Flutter team.

Developer Experience Support ARB files similar to how other file formats are supported. Since ARB files don't have nesting, slang shouldn't nest either.

Implementation Transpile to a slang-native JSON format as an intermediate. Translations only having one plural should be easy to convert but if a translation has multiple plural parts, then slang might need to use "Linked Translations" to combine multiple parts. This is how the migrate script currently works when converting ARB to JSON.

Tienisto commented 9 months ago

Published in v3.27.0