Skip to content

0.6.0

Choose a tag to compare

@Minoru Minoru released this 03 Mar 16:34
· 127 commits to master since this release
0.6.0
bc6b043

Added

  • Documentation on when functions will panic (Alexander Batischev)
  • Functions to query gettext configuration. These are wrappers over textdomain(NULL), bindtextdomain(domain, NULL), and bind_textdomain_codeset(domain, NULL) (Alexander Batischev)
  • impl Error for TextDomainError, which makes it easier to use with ? operator (Alexander Batischev)

Changed

  • Users are required to configure gettext for UTF-8, either explicitly with bind_textdomain_codeset(), or implicitly with setlocale() if they understand the consequences. Failure to do this might lead to panics and/or garbled data (Alexander Batischev)
  • Functions now require more specific types, like Into<String> and Into<PathBuf> (Alexander Batischev)
  • Functions that take multiple strings no longer require all strings to be of exact same type (i.e. you can mix String and &str) (Alexander Batischev)
  • Functions that configure gettext (textdomain(), bindtextdomain(), bind_textdomain_codeset()) now return a Result to indicate failures (Alexander Batischev)
  • Macros now behave like format!(gettext(…), …), which is more useful than previous behaviour of gettext(format!(…, …)) (Rasmus Thomsen)
  • On Windows, TextDomain now uses wbindtextdomain (Alexander Batischev)
  • Bump gettext-sys dependency to 0.21 (Alexander Batischev)

Fixed

  • CStrings being dropped while their pointers are in use (Alexander Batischev)

Removed

  • Default instance for TextDomain. Default-constructed instance was useless since it would panic on init() as name is not set (Alexander Batischev)