README.markdown in grosser-fast_gettext-0.3.6 vs README.markdown in grosser-fast_gettext-0.3.7

- old
+ new

@@ -1,8 +1,8 @@ FastGettext =========== -GetText but 7 times faster, simple, clean namespace (7 vs 34) and threadsave! +GetText but 8 x faster, 72 x less memory, simple, clean namespace (7 vs 34) and threadsave! [Example Rails application](https://github.com/grosser/gettext_i18n_rails_example) Setup ===== @@ -37,26 +37,27 @@ Performance =========== 50_000 translations speed / memory small translation file <-> large translation file Baseline: (doing nothing in a loop) - 0.460000s / 2904K + 0.420000s / 0K <-> Ideal: (primitive Hash lookup) - 1.180000s / 3016K <-> 1.140000s / 3016K + 1.170000s / 112K <-> 1.170000s / 112K FastGettext: - 2.180000s / 3036K <-> 2.430000s / 3152K + 1.960000s / 136K <-> 1.950000s / 268K GetText 2.0: - 15.250000s / 11784K <-> 15.640000s / 12192K + 15.490000s / 8872K <-> 15.510000s / 9336K ActiveSupport I18n::Backend::Simple : - 32.670000s / 12488K + 32.470000s / 9484K <-> + Thread Safety and Rails ======================= Parsed `text_domains` are not stored thread-save, so that they can be added inside the `environment.rb`, and do not need to be readded for every thread (parsing takes time...). @@ -86,11 +87,12 @@ include FastGettext::Translation ... Updating translations ===================== -ATM you have to use the [original GetText](http://github.com/mutoh/gettext) to create and manage your po/mo-files. +ATM you have to use the [original GetText](http://github.com/mutoh/gettext) to create and manage your po/mo-files. +I already started work on a po/mo parser & reader that is easier to use, contributions welcome @ [pomo](http://github.com/grosser/pomo) Advanced features ================= ###Abnormal pluralisation Pluralisation rules can be set directly via a lambda (see code/specs), or by using the Gettext @@ -113,13 +115,17 @@ define initialize(name,options), available_locales, [key], plural(*msgids) end end end +FAQ +=== + - [Problems with ActiveRecord messages?](http://wiki.github.com/grosser/fast_gettext/activerecord) + TODO ==== - - default_locale=(x) #atm the default is available_locales.first || 'en' - - default_text_domain=(x) #atm default is nil... + - use `default_locale=(x)` internally, atm the default is available_locales.first || 'en' + - use `default_text_domain=(x)` internally, atm default is nil... Author ====== Mo/Po-file parsing from Masao Mutoh, see vendor/README