Hello community, here is the log from the commit of package rubygem-i18n for openSUSE:Factory checked in at 2018-11-10 17:00:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-i18n (Old) and /work/SRC/openSUSE:Factory/.rubygem-i18n.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-i18n" Sat Nov 10 17:00:28 2018 rev:21 rq:646833 version:1.1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-i18n/rubygem-i18n.changes 2018-08-18 00:04:00.343057981 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-i18n.new/rubygem-i18n.changes 2018-11-10 17:02:18.627538613 +0100 @@ -1,0 +2,9 @@ +Tue Nov 6 07:46:20 UTC 2018 - mschnit...@suse.com + +- updated to version 1.1.1 + + * Expose translations with an option to perform initialization (if it hasn't been done already) (#353 / #254) + * Removed un-used Kernel core extension #436 + * Added project metadata for RubyGems #434 + +------------------------------------------------------------------- Old: ---- i18n-1.1.0.gem New: ---- i18n-1.1.1.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-i18n.spec ++++++ --- /var/tmp/diff_new_pack.UmgIXA/_old 2018-11-10 17:02:19.187537929 +0100 +++ /var/tmp/diff_new_pack.UmgIXA/_new 2018-11-10 17:02:19.191537925 +0100 @@ -24,7 +24,7 @@ # Name: rubygem-i18n -Version: 1.1.0 +Version: 1.1.1 Release: 0 %define mod_name i18n %define mod_full_name %{mod_name}-%{version} ++++++ i18n-1.1.0.gem -> i18n-1.1.1.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2018-08-08 00:15:04.000000000 +0200 +++ new/README.md 2018-10-14 11:15:52.000000000 +0200 @@ -4,9 +4,52 @@ Ruby Internationalization and localization solution. -[See the Rails Guide](http://guides.rubyonrails.org/i18n.html) for an example of its usage. (Note: This library can be used independently from Rails.) +Currently maintained by @radar. -Features: +## Usage + +### Rails + +You will most commonly use this library within a Rails app. + +[See the Rails Guide](http://guides.rubyonrails.org/i18n.html) for an example of its usage. + +### Ruby (without Rails) + +If you want to use this library without Rails, you can simply add `i18n` to your `Gemfile`: + +```ruby +gem 'i18n' +``` + +Then configure I18n with some translations, and a default locale: + +```ruby +I18n.load_path << Dir[File.expand_path("config/locales") + "/*.yml"] +I18n.default_locale = :en # (note that `en` is already the default!) +``` + +A simple translation file in your project might live at `config/locales/en.yml` and look like: + +```yml +en: + test: "This is a test" +``` + +You can then access this translation by doing: + +```ruby +I18n.t(:test) +``` + +You can switch locales in your project by setting `I18n.locale` to a different value: + +```ruby +I18n.locale = :de +I18n.t(:test) # => "Dies ist ein Test" +``` + +## Features * translation and localization * interpolation of values to translations (Ruby 1.9 compatible syntax) @@ -19,7 +62,7 @@ * custom exception handlers * extensible architecture with a swappable backend -Pluggable features: +## Pluggable Features * Cache * Pluralization: lambda pluralizers stored as translation data @@ -27,7 +70,7 @@ * [Gettext support](https://github.com/svenfuchs/i18n/wiki/Gettext) * Translation metadata -Alternative backends: +## Alternative Backend * Chain * ActiveRecord (optionally: ActiveRecord::Missing and ActiveRecord::StoreProcs) @@ -35,12 +78,6 @@ For more information and lots of resources see [the 'Resources' page on the wiki](https://github.com/svenfuchs/i18n/wiki/Resources). -## Installation - -``` -gem install i18n -``` - ## Tests You can run tests both with Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/i18n/backend/base.rb new/lib/i18n/backend/base.rb --- old/lib/i18n/backend/base.rb 2018-08-08 00:15:04.000000000 +0200 +++ new/lib/i18n/backend/base.rb 2018-10-14 11:15:52.000000000 +0200 @@ -2,7 +2,6 @@ require 'yaml' require 'i18n/core_ext/hash' -require 'i18n/core_ext/kernel/suppress_warnings' module I18n module Backend diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/i18n/backend/simple.rb new/lib/i18n/backend/simple.rb --- old/lib/i18n/backend/simple.rb 2018-08-08 00:15:04.000000000 +0200 +++ new/lib/i18n/backend/simple.rb 2018-10-14 11:15:52.000000000 +0200 @@ -59,6 +59,14 @@ super end + def translations(do_init: false) + # To avoid returning empty translations, + # call `init_translations` + init_translations if do_init && !initialized? + + @translations ||= {} + end + protected def init_translations @@ -66,10 +74,6 @@ @initialized = true end - def translations - @translations ||= {} - end - # Looks up a translation from the translations hash. Returns nil if # either key is nil, or locale, scope or key do not exist as a key in the # nested translations hash. Splits keys or scopes containing dots diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/i18n/core_ext/kernel/suppress_warnings.rb new/lib/i18n/core_ext/kernel/suppress_warnings.rb --- old/lib/i18n/core_ext/kernel/suppress_warnings.rb 2018-08-08 00:15:04.000000000 +0200 +++ new/lib/i18n/core_ext/kernel/suppress_warnings.rb 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -module Kernel - def suppress_warnings - original_verbosity, $VERBOSE = $VERBOSE, nil - yield - ensure - $VERBOSE = original_verbosity - end -end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/i18n/version.rb new/lib/i18n/version.rb --- old/lib/i18n/version.rb 2018-08-08 00:15:04.000000000 +0200 +++ new/lib/i18n/version.rb 2018-10-14 11:15:52.000000000 +0200 @@ -1,5 +1,5 @@ # frozen_string_literal: true module I18n - VERSION = "1.1.0" + VERSION = "1.1.1" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2018-08-08 00:15:04.000000000 +0200 +++ new/metadata 2018-10-14 11:15:52.000000000 +0200 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: i18n version: !ruby/object:Gem::Version - version: 1.1.0 + version: 1.1.1 platform: ruby authors: - Sven Fuchs @@ -13,7 +13,7 @@ autorequire: bindir: bin cert_chain: [] -date: 2018-08-07 00:00:00.000000000 Z +date: 2018-10-14 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: concurrent-ruby @@ -62,7 +62,6 @@ - lib/i18n/backend/transliterator.rb - lib/i18n/config.rb - lib/i18n/core_ext/hash.rb -- lib/i18n/core_ext/kernel/suppress_warnings.rb - lib/i18n/core_ext/string/interpolate.rb - lib/i18n/exceptions.rb - lib/i18n/gettext.rb @@ -135,7 +134,11 @@ homepage: http://github.com/svenfuchs/i18n licenses: - MIT -metadata: {} +metadata: + bug_tracker_uri: https://github.com/svenfuchs/i18n/issues + changelog_uri: https://github.com/svenfuchs/i18n/releases + documentation_uri: https://guides.rubyonrails.org/i18n.html + source_code_uri: https://github.com/svenfuchs/i18n post_install_message: rdoc_options: [] require_paths: @@ -152,7 +155,7 @@ version: 1.3.5 requirements: [] rubyforge_project: "[none]" -rubygems_version: 2.7.3 +rubygems_version: 2.7.6 signing_key: specification_version: 4 summary: New wave Internationalization support for Ruby