Skip to content

Releases: slang-i18n/slang

v4.4.0

15 Dec 00:25
fd736df
Compare
Choose a tag to compare
  • feat: add (fallback) modifier to fallback entries within a map (#268)
  • fix: empty strings in base translations should not be removed when using fallback_strategy: base_locale_empty_string

v4.3.0

29 Nov 15:43
3c4d8af
Compare
Choose a tag to compare
  • feat: simplify file names without namespaces (#267)
  • DEPRECATED: Do not use namespaces in file names when namespaces are disabled: strings_de.json -> de.json
  • DEPRECATED: Always specify the locale in the file name (namespace enabled): strings.json -> strings_en.json, except the locale is specified in the directory name

Note: This might make the files order in your IDE less pleasant if input and output files are in the same directory.
You can specify the output directory to a subdirectory to avoid this.
For example, output_directory: lib/i18n/gen

v4.2.0

15 Nov 19:00
cd22133
Compare
Choose a tag to compare
  • feat: automatically sanitize invalid keys (e.g. continue, 123) (#257)
  • fix: do not override locale in L10n format definition

v4.1.0

23 Oct 13:55
7311f47
Compare
Choose a tag to compare
  • feat: add format config to automatically format generated files (#184)
  • fix: correctly generate with enum_name and class_name different from AppLocale / Translations (#254)

v4.0.0

21 Oct 12:30
9faa29e
Compare
Choose a tag to compare

DateFormat, NumberFormat, and Lazy loading

Format translations with DateFormat and NumberFormat:

Hello {name}, today is {today: yMd}. You have {money: currency(symbol: '€')}.

On web, Deferred loading is used to reduce initial load time.

  • feat: add DateFormat and NumberFormat support (#112)
  • feat: add lazy: true config which is enabled by default (#135)
  • fix: slang analyze should not treat translations as unused if they are used in linked translations (#231)
  • fix: slang analyze should detect missing enums (#234)
  • fix: trim enum keys in compressed format while parsing (e.g. "male, female": "..." to "male,female": "...") (#247)
  • fix: compilation error on web when using large interfaces (#251)
  • fix: correctly transform keys with modifiers when key_case is set (#253)
  • Breaking: Require Dart 3.3 and Flutter 3.19
  • Breaking: setLocale, setLocaleRaw, and useDeviceLocale returns a Future, use -Sync suffix for synchronous calls
  • Breaking: output_format removed, always generates multiple files now
  • Breaking: deprecated functions in LocaleSettings (supportedLocales, supportedLocalesRaw) removed
  • Breaking: defining contexts (enums) is no longer allowed in build.yaml or slang.yaml (deprecated in v3.19.0)
  • Breaking: enums specified in context are no longer transformed into pascal case keeping the original case

You can read the detailed migration guide here.

v3.31.0

23 May 01:08
6b71400
Compare
Choose a tag to compare
  • feat: add dart run slang normalize to normalize translations based on base locale @Tienisto
  • feat: add parameter type support (introduced 3.30.0) to ARB files (#214) @Tienisto
  • feat: sort translation files for reproducible console output (#210) @poppingmoon

v3.30.0

03 Mar 00:20
7e189ee
Compare
Choose a tag to compare
  • feat: add parameter types (e.g. Hello {name: String}, you are {age: int} years old); is Object by default @Tienisto
  • fix: handle nested interfaces (#191) @Tienisto
  • refactor: move code to src folder @Tienisto

v3.29.0

21 Jan 02:26
d5070c8
Compare
Choose a tag to compare
  • feat: dart run slang analyze supports csv files (#185) @nikaera
  • feat: also add linter and coverage ignore to part files (#188) @cmenkemeller
  • fix: generate base translations as fallback when using context enums where some enum values are missing (#182) @Tienisto
  • fix: generate correct part of directive when using a custom dart file extension (#187) @cmenkemeller

v3.28.0

21 Dec 22:25
c0edcc3
Compare
Choose a tag to compare
  • feat: add fallback_strategy: base_locale_empty_string to also treat empty strings as missing translations (#180)
  • fix: special case where linked translations had invalid parenthesis (#181)

v3.27.0

16 Dec 16:46
a7036a1
Compare
Choose a tag to compare
  • feat: add support for ARB files (#179)