Hello community,
here is the log from the commit of package yast2-ruby-bindings for
openSUSE:Factory checked in at 2014-06-01 18:56:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-ruby-bindings (Old)
and /work/SRC/openSUSE:Factory/.yast2-ruby-bindings.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-ruby-bindings"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-ruby-bindings/yast2-ruby-bindings.changes
2014-05-17 22:01:54.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.yast2-ruby-bindings.new/yast2-ruby-bindings.changes
2014-06-01 18:56:08.000000000 +0200
@@ -1,0 +2,7 @@
+Thu May 29 15:03:23 UTC 2014 - [email protected]
+
+- fix translation if mixture of textdomain are used in included
+ files (bnc#877687)
+- 3.1.18
+
+-------------------------------------------------------------------
Old:
----
yast2-ruby-bindings-3.1.17.tar.bz2
New:
----
yast2-ruby-bindings-3.1.18.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-ruby-bindings.spec ++++++
--- /var/tmp/diff_new_pack.OXSl3p/_old 2014-06-01 18:56:09.000000000 +0200
+++ /var/tmp/diff_new_pack.OXSl3p/_new 2014-06-01 18:56:09.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-ruby-bindings
-Version: 3.1.17
+Version: 3.1.18
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: yast2-ruby-bindings-%{version}.tar.bz2
++++++ yast2-ruby-bindings-3.1.17.tar.bz2 -> yast2-ruby-bindings-3.1.18.tar.bz2
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-ruby-bindings-3.1.17/package/yast2-ruby-bindings.changes
new/yast2-ruby-bindings-3.1.18/package/yast2-ruby-bindings.changes
--- old/yast2-ruby-bindings-3.1.17/package/yast2-ruby-bindings.changes
2014-05-15 12:36:47.000000000 +0200
+++ new/yast2-ruby-bindings-3.1.18/package/yast2-ruby-bindings.changes
2014-05-30 10:26:45.000000000 +0200
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Thu May 29 15:03:23 UTC 2014 - [email protected]
+
+- fix translation if mixture of textdomain are used in included
+ files (bnc#877687)
+- 3.1.18
+
+-------------------------------------------------------------------
Wed May 14 13:13:09 UTC 2014 - [email protected]
- Mechanically converted the remaining test/unit tests to RSpec
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-ruby-bindings-3.1.17/package/yast2-ruby-bindings.spec
new/yast2-ruby-bindings-3.1.18/package/yast2-ruby-bindings.spec
--- old/yast2-ruby-bindings-3.1.17/package/yast2-ruby-bindings.spec
2014-05-15 12:36:47.000000000 +0200
+++ new/yast2-ruby-bindings-3.1.18/package/yast2-ruby-bindings.spec
2014-05-30 10:26:45.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-ruby-bindings
-Version: 3.1.17
+Version: 3.1.18
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: yast2-ruby-bindings-%{version}.tar.bz2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-ruby-bindings-3.1.17/src/ruby/yast/i18n.rb
new/yast2-ruby-bindings-3.1.18/src/ruby/yast/i18n.rb
--- old/yast2-ruby-bindings-3.1.17/src/ruby/yast/i18n.rb 2014-05-15
12:36:47.000000000 +0200
+++ new/yast2-ruby-bindings-3.1.18/src/ruby/yast/i18n.rb 2014-05-30
10:26:45.000000000 +0200
@@ -18,7 +18,9 @@
# FastGettext does not track which file/class uses which text domain,
# it has just single global text domain (the current one),
# remember the requested text domain here
- @my_textdomain = domain
+ # One object can have multiple text domains via multiple Yast.include
(bnc#877687).
+ @my_textdomain ||= []
+ @my_textdomain << domain unless @my_textdomain.include? domain
# initialize available locales at first use or when the current language
is changed
if FastGettext.available_locales.nil? || current_language !=
FastGettext.locale
@@ -42,7 +44,15 @@
return str unless @my_textdomain
old_text_domain = FastGettext.text_domain
- FastGettext.text_domain = @my_textdomain
+ # Switching textdomain clears gettext caches so avoid it if possible.
+ if !@my_textdomain.include?(old_text_domain) ||
+ !FastGettext.key_exist?(str)
+ # Set domain where key is defined.
+ @my_textdomain.each do |domain|
+ FastGettext.text_domain = domain
+ break if FastGettext.key_exist?(str)
+ end
+ end
FastGettext::Translation::_ str
ensure
FastGettext.text_domain = old_text_domain
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]