Skip to content

Releases: SyberiaK/sl10n

0.3.0.0 - Cleaning and documenting

24 Jan 18:16
Compare
Choose a tag to compare
  • SL10n can now detect unfilled localization strings.
    • Unfilled strings are either empty or equal to their key.
    • warnings.UnfilledLocaleKey propogates when an unfilled key detected.
  • pimpl.ORJSONImpl is now deprecated.
    • According to my benchmarks, orjson makes no significant load/dump speeds difference for our use case. A this point there's no reason to have a dedicated ParsingImpl for it.
      Use pimpl.JSONImpl with one of the supported packages instead (e.g. built-in json).

Also I updated the docs look and added a new "Locale containers" page.

  • Most notably, ParsingImpl methods have been documented.

0.2.0.0

25 Aug 09:04
Compare
Choose a tag to compare
  • Introducing of Parsing Implementations
    • Instead of passing modules directly into SL10n, now you can use parsing implementations:
      from sl10n import SL10n, SLocale
      from sl10n.pimpl import JSONImpl
      import ujson  # not a stdlib
      
      ...
      
      sl10n = Sl10n(MyLocale, parsing_impl=JSONImpl(ujson))
      This allows me to add compatibility with more modules in the future and also you to add custom parsing implementations.
      Just subclass the sl10n.pimpl.ParsingImpl and implement your load and dump methods.
    • json, simplejson and ujson use JSONImpl.
    • python-rapidjson now marked as supported and uses JSONImpl.
    • Added support for orjson - use ORJSONImpl for it.
    • Simple demonstation of each usage:
      from sl10n.pimpl import JSONImpl, ORJSONImpl
      
      JSONImpl(json)
      JSONImpl(simplejson)
      JSONImpl(ujson)
      JSONImpl(rapidjson)  # `python-rapidjson` in pip
      ORJSONImpl()  # for `orjson`
  • New modifier - lang_code
    • Changes lang_code property of respected locale container.
    • Doesn't change the access key in SL10n.locale(key) - be aware!
  • json_impl argument in SL10n.__init__ was renamed to parsing_impl to better mirror new changes
  • UnexpectedLocale warning was renamed to UndefinedLocale

0.1.0.2

21 Aug 20:56
Compare
Choose a tag to compare
0.1.0.2 Pre-release
Pre-release
  • Fixed dynamic key access

0.1.0.1

21 Aug 20:25
Compare
Choose a tag to compare
0.1.0.1 Pre-release
Pre-release
Fixed package not installing