Hello community,

here is the log from the commit of package rubygem-fast_gettext for 
openSUSE:Factory checked in at 2015-02-16 21:22:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-fast_gettext (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-fast_gettext.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-fast_gettext"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/rubygem-fast_gettext/rubygem-fast_gettext.changes    
    2014-10-25 08:32:59.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-fast_gettext.new/rubygem-fast_gettext.changes
   2015-02-16 21:22:02.000000000 +0100
@@ -1,0 +2,5 @@
+Tue Feb 10 17:43:28 UTC 2015 - [email protected]
+
+- updated to version 0.9.2
+
+-------------------------------------------------------------------

Old:
----
  fast_gettext-0.9.0.gem

New:
----
  fast_gettext-0.9.2.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-fast_gettext.spec ++++++
--- /var/tmp/diff_new_pack.hjUxp1/_old  2015-02-16 21:22:03.000000000 +0100
+++ /var/tmp/diff_new_pack.hjUxp1/_new  2015-02-16 21:22:03.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-fast_gettext
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-fast_gettext
-Version:        0.9.0
+Version:        0.9.2
 Release:        0
 %define mod_name fast_gettext
 %define mod_full_name %{mod_name}-%{version}
@@ -48,6 +48,7 @@
 
 %install
 %gem_install \
+  --doc-files="CHANGELOG Readme.md" \
   -f
 
 %gem_packages

++++++ fast_gettext-0.9.0.gem -> fast_gettext-0.9.2.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGELOG new/CHANGELOG
--- old/CHANGELOG       1970-01-01 01:00:00.000000000 +0100
+++ new/CHANGELOG       2015-01-11 17:23:46.000000000 +0100
@@ -0,0 +1,9 @@
+0.9.0 -- reworked internals of caching to be plugable
+0.7.0 -- set_locale resets to default locale if none of the available locales 
was tried to set
+0.6.0 -- plurals use singular translations as fallack e.g. you translated 
'Axis' then n_('Axis','Axis',1) would return the translation for 'Axis' if no 
plural translation was found
+0.4.14 -- "" is translated as "", not as gettext meta information
+0.4.0 -- pluralisation_rules is no longer stored in each repository, only 
retrived. Added Chain and Logger repository.
+0.3.6 -- FastGettext.default_locale=
+0.3.5 -- FastGettext.default_text_domain=
+0.3.4 -- Exceptions are thrown, not returned when translating without text 
domain
+0.3 -- pluralisation methods accept/return n plural forms, contrary to 
singular/plural before
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Readme.md new/Readme.md
--- old/Readme.md       1970-01-01 01:00:00.000000000 +0100
+++ new/Readme.md       2015-01-11 17:23:46.000000000 +0100
@@ -0,0 +1,261 @@
+FastGettext
+===========
+GetText but 3.5 x faster, 560 x less memory, simple, clean namespace (7 vs 34) 
and threadsafe!
+
+It supports multiple backends (.mo, .po, .yml files, Database(ActiveRecord + 
any other), Chain, Loggers) and can easily be extended.
+
+[Example Rails 
application](https://github.com/grosser/gettext_i18n_rails_example)
+
+Comparison
+==========
+<table>
+  <tr>
+    <td></td>
+    <td width="100">Hash</td>
+    <td width="150">FastGettext</td>
+    <td width="100">GetText</td>
+    <td width="100">ActiveSupport I18n::Simple</td>
+  </tr>
+  <tr>
+    <td>Speed*</td>
+    <td>0.82s</td>
+    <td>1.36s</td>
+    <td>4.88s</td>
+    <td>21.77s</td>
+  </tr>
+  <tr>
+    <td>RAM*</td>
+    <td>4K</td>
+    <td>8K</td>
+    <td>4480K</td>
+    <td>10100K</td>
+  </tr>
+  <tr>
+    <td>Included backends</td>
+    <td></td>
+    <td>db, yml, mo, po, logger, chain</td>
+    <td>mo</td>
+    <td>yml (db/key-value/po/chain in other I18n backends)</td>
+  </tr>
+</table>
+<small>*50.000 translations with ruby enterprise 1.8.6 through `rake 
benchmark`</small>
+
+Setup
+=====
+### 1. Install
+
+    sudo gem install fast_gettext
+
+### 2. Add a translation repository
+
+From mo files (traditional/default)
+
+    FastGettext.add_text_domain('my_app',:path => 'locale')
+
+Or po files (less maintenance than mo)
+
+    FastGettext.add_text_domain('my_app',:path => 'locale', :type => :po)
+    # :ignore_fuzzy => true to not use fuzzy translations
+    # :report_warning => false to hide warnings about obsolete/fuzzy 
translations
+
+Or yaml files (use I18n syntax/indentation)
+
+    FastGettext.add_text_domain('my_app', :path => 'config/locales', :type => 
:yaml)
+
+Or database (scaleable, good for many locales/translators)
+
+    # db access is cached <-> only first lookup hits the db
+    require "fast_gettext/translation_repository/db"
+    FastGettext::TranslationRepository::Db.require_models #load and include 
default models
+    FastGettext.add_text_domain('my_app', :type => :db, :model => 
TranslationKey)
+
+### 3. Choose text domain and locale for translation
+Do this once in every Thread. (e.g. Rails -> ApplicationController)
+
+    FastGettext.text_domain = 'my_app'
+    FastGettext.available_locales = ['de','en','fr','en_US','en_UK'] # only 
allow these locales to be set (optional)
+    FastGettext.locale = 'de'
+
+### 4. Start translating
+
+    include FastGettext::Translation
+    _('Car') == 'Auto'
+    _('not-found') == 'not-found'
+    s_('Namespace|not-found') == 'not-found'
+    n_('Axis','Axis',3) == 'Achsen' #German plural of Axis
+    _('Hello %{name}!') % {:name => "Pete"} == 'Hello Pete!'
+
+
+Managing translations
+============
+### mo/po-files
+Generate .po or .mo files using GetText parser (example tasks at 
[gettext_i18n_rails](http://github.com/grosser/gettext_i18n_rails))
+
+Tell Gettext where your .mo or .po files lie, e.g. for locale/de/my_app.po and 
locale/de/LC_MESSAGES/my_app.mo
+
+    FastGettext.add_text_domain('my_app',:path=>'locale')
+
+Use the [original GetText](http://github.com/mutoh/gettext) to create and 
manage po/mo-files.
+(Work on a po/mo parser & reader that is easier to use has started, 
contributions welcome @ [get_pomo](http://github.com/grosser/get_pomo) )
+
+###Database
+[Example migration for 
ActiveRecord](http://github.com/grosser/fast_gettext/blob/master/examples/db/migration.rb)<br/>
+The default plural seperator is `||||` but you may overwrite it (or suggest a 
better one..).
+
+This is usable with any model DataMapper/Sequel or any other(non-database) 
backend, the only thing you need to do is respond to the self.translation(key, 
locale) call.
+If you want to use your own models, have a look at the [default 
models](http://github.com/grosser/fast_gettext/tree/master/lib/fast_gettext/translation_repository/db_models)
 to see what you want/need to implement.
+
+To manage translations via a Web GUI, use a [Rails application and the 
translation_db_engine](http://github.com/grosser/translation_db_engine)
+
+Rails
+=======================
+Try the [gettext_i18n_rails 
plugin](http://github.com/grosser/gettext_i18n_rails), it simplifies the 
setup.<br/>
+Try the 
[translation_db_engine](http://github.com/grosser/translation_db_engine), to 
manage your translations in a db.
+
+Setting `available_locales`,`text_domain` or `locale` will not work inside the 
`evironment.rb`,
+since it runs in a different thread then e.g. controllers, so set them inside 
your application_controller.
+
+    #environment.rb after initializers
+    Object.send(:include,FastGettext::Translation)
+    FastGettext.add_text_domain('accounting',:path=>'locale')
+    FastGettext.add_text_domain('frontend',:path=>'locale')
+    ...
+
+    #application_controller.rb
+    class ApplicationController ...
+      include FastGettext::Translation
+      before_filter :set_locale
+      def set_locale
+        FastGettext.available_locales = ['de','en',...]
+        FastGettext.text_domain = 'frontend'
+        FastGettext.set_locale(params[:locale] || session[:locale] || 
request.env['HTTP_ACCEPT_LANGUAGE'])
+        session[:locale] = I18n.locale = FastGettext.locale
+      end
+
+
+Advanced features
+=================
+### Abnormal pluralisation
+Plurals are selected by index, think of it as `['car', 'cars'][index]`<br/>
+A pluralisation rule decides which form to use e.g. in english its `count == 1 
? 0 : 1`.<br/>
+If you have any languages that do not fit this rule, you have to add a custom 
pluralisation rule.
+
+Via Ruby:
+
+    FastGettext.pluralisation_rule = lamda{|count| count > 5 ? 1 : (count > 2 
? 0 : 2)}
+
+Via mo/pofile:
+
+    Plural-Forms: nplurals=2; plural=n==2?3:4;
+
+[Plural expressions for all 
languages](http://translate.sourceforge.net/wiki/l10n/pluralforms).
+
+###default_text_domain
+If you only use one text domain, setting `FastGettext.default_text_domain = 
'app'`
+is sufficient and no more `text_domain=` is needed
+
+###default_locale
+If the simple rule of "first `availble_locale` or 'en'" is not suficcient for 
you, set `FastGettext.default_locale = 'de'`.
+
+###default_available_locales
+Fallback when no available_locales are set
+
+###Chains
+You can use any number of repositories to find a translation. Simply add them 
to a chain and when
+the first cannot translate a given key, the next is asked and so forth.
+
+    repos = [
+      FastGettext::TranslationRepository.build('new', :path=>'....'),
+      FastGettext::TranslationRepository.build('old', :path=>'....')
+    ]
+    FastGettext.add_text_domain 'combined', :type=>:chain, :chain=>repos
+
+###Logger
+When you want to know which keys could not be translated or were used, add a 
Logger to a Chain:
+
+    repos = [
+      FastGettext::TranslationRepository.build('app', :path=>'....')
+      FastGettext::TranslationRepository.build('logger', :type=>:logger, 
:callback=>lamda{|key_or_array_of_ids| ... }),
+    }
+    FastGettext.add_text_domain 'combined', :type=>:chain, :chain=>repos
+
+If the Logger is in position #1 it will see all translations, if it is in 
position #2 it will only see the unfound.
+Unfound may not always mean missing, if you choose not to translate a word 
because the key is a good translation, it will appear nevertheless.
+A lambda or anything that responds to `call` will do as callback. A good 
starting point may be `examples/missing_translations_logger.rb`.
+
+###Plugins
+Want a xml version ?
+Write your own TranslationRepository!
+
+    #fast_gettext/translation_repository/xxx.rb
+    module FastGettext
+      module TranslationRepository
+        class Wtf
+          define initialize(name,options), [key], plural(*keys) and
+          either inherit from TranslationRepository::Base or define 
available_locales and pluralisation_rule
+        end
+      end
+    end
+
+###Multi domain support
+
+If you have more than one gettext domain, there are two sets of functions
+available:
+
+    include FastGettext::TranslationMultidomain
+
+    d_("domainname", "string") # finds 'string' in domain domainname
+    dn_("domainname", "string", "strings", 1) # ditto
+    # etc.
+
+These are helper methods so you don't need to write:
+
+    FastGettext.text_domain = "domainname"
+    _("string")
+
+It is useful in Rails plugins in the views for example. The second set of
+functions are D functions which search for string in _all_ domains. If there
+are multiple translations in different domains, it returns them in random
+order (depends on the Ruby hash implementation):
+
+    include FastGettext::TranslationMultidomain
+
+    D_("string") # finds 'string' in any domain
+    # etc.
+
+FAQ
+===
+ - [Problems with ActiveRecord 
messages?](http://wiki.github.com/grosser/fast_gettext/activerecord)
+ - [Iconv require error in 
1.9.2](http://exceptionz.wordpress.com/2010/02/03/how-to-fix-the-iconv-require-error-in-ruby-1-9)
+
+
+TODO
+====
+ - Add a fallback for Iconv.conv in ruby 1.9.4 -> lib/fast_gettext/vendor/iconv
+ - YML backend that reads ActiveSupport::I18n files
+
+Author
+======
+Mo/Po-file parsing from Masao Mutoh, see vendor/README
+
+### [Contributors](http://github.com/grosser/fast_gettext/contributors)
+ - [geekq](http://www.innoq.com/blog/vd)
+ - [Matt Sanford](http://blog.mzsanford.com)
+ - [Antonio Terceiro](http://softwarelivre.org/terceiro)
+ - [J. Pablo Fernández](http://pupeno.com)
+ - Rudolf Gavlas
+ - [Ramón Cahenzli](http://www.psy-q.ch)
+ - [Rainux Luo](http://rainux.org)
+ - [Dmitry Borodaenko](https://github.com/angdraug)
+ - [Kouhei Sutou](https://github.com/kou)
+ - [Hoang Nghiem](https://github.com/hoangnghiem)
+ - [Costa Shapiro](https://github.com/costa)
+ - [Jamie Dyer](https://github.com/kernow)
+ - [Stephan Kulow](https://github.com/coolo)
+ - [Fotos Georgiadis](https://github.com/fotos)
+ - [Lukáš Zapletal](https://github.com/lzap)
+
+[Michael Grosser](http://grosser.it)<br/>
[email protected]<br/>
+License: MIT, some vendor parts under the same license terms as Ruby (see 
headers)<br/>
+[![Build 
Status](https://travis-ci.org/grosser/fast_gettext.png)](https://travis-ci.org/grosser/fast_gettext)
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/fast_gettext/translation_repository/base.rb 
new/lib/fast_gettext/translation_repository/base.rb
--- old/lib/fast_gettext/translation_repository/base.rb 2014-07-09 
06:53:22.000000000 +0200
+++ new/lib/fast_gettext/translation_repository/base.rb 2015-01-11 
17:23:46.000000000 +0100
@@ -37,7 +37,7 @@
 
       def find_files_in_locale_folders(relative_file_path,path)
         path ||= "locale"
-        raise "path #{path} cound not be found!" unless File.exist?(path)
+        raise "path #{path} could not be found!" unless File.exist?(path)
 
         @files = {}
         Dir[File.join(path,'*')].each do |locale_folder|
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/fast_gettext/version.rb 
new/lib/fast_gettext/version.rb
--- old/lib/fast_gettext/version.rb     2014-07-09 06:53:22.000000000 +0200
+++ new/lib/fast_gettext/version.rb     2015-01-11 17:23:46.000000000 +0100
@@ -1,3 +1,3 @@
 module FastGettext
-  VERSION = Version = '0.9.0'
+  VERSION = Version = '0.9.2'
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2014-07-09 06:53:22.000000000 +0200
+++ new/metadata        2015-01-11 17:23:46.000000000 +0100
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: fast_gettext
 version: !ruby/object:Gem::Version
-  version: 0.9.0
+  version: 0.9.2
 platform: ruby
 authors:
 - Michael Grosser
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2014-07-09 00:00:00.000000000 Z
+date: 2015-01-11 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: rake
@@ -114,6 +114,8 @@
 extensions: []
 extra_rdoc_files: []
 files:
+- CHANGELOG
+- Readme.md
 - lib/fast_gettext.rb
 - lib/fast_gettext/cache.rb
 - lib/fast_gettext/mo_file.rb

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to