Hello community,
here is the log from the commit of package yast2-ruby-bindings for
openSUSE:Factory checked in at 2019-01-24 14:01:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-ruby-bindings (Old)
and /work/SRC/openSUSE:Factory/.yast2-ruby-bindings.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-ruby-bindings"
Thu Jan 24 14:01:01 2019 rev:92 rq:667954 version:4.1.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-ruby-bindings/yast2-ruby-bindings.changes
2018-12-31 09:44:43.834298112 +0100
+++
/work/SRC/openSUSE:Factory/.yast2-ruby-bindings.new.28833/yast2-ruby-bindings.changes
2019-01-24 14:01:02.684213678 +0100
@@ -1,0 +2,7 @@
+Tue Jan 22 17:58:53 UTC 2019 - [email protected]
+
+- Support for FastGettext 2.0 (still works with FastGettext 1.6)
+ (bsc#1121865)
+- 4.1.2
+
+-------------------------------------------------------------------
Old:
----
yast2-ruby-bindings-4.1.1.tar.bz2
New:
----
yast2-ruby-bindings-4.1.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-ruby-bindings.spec ++++++
--- /var/tmp/diff_new_pack.GKCeMz/_old 2019-01-24 14:01:03.112213191 +0100
+++ /var/tmp/diff_new_pack.GKCeMz/_new 2019-01-24 14:01:03.112213191 +0100
@@ -1,7 +1,7 @@
#
# spec file for package yast2-ruby-bindings
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 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
@@ -17,7 +17,7 @@
Name: yast2-ruby-bindings
-Version: 4.1.1
+Version: 4.1.2
Release: 0
Url: https://github.com/yast/yast-ruby-bindings
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -29,13 +29,13 @@
BuildRequires: yast2-core-devel
BuildRequires: yast2-devtools >= 3.1.10
%if 0%{suse_version} == 1310
-BuildRequires: rubygem-fast_gettext
+BuildRequires: rubygem-fast_gettext < 3.0
BuildRequires: rubygem-rspec
-Requires: rubygem-fast_gettext
+Requires: rubygem-fast_gettext < 3.0
%else
-BuildRequires: rubygem(%{rb_default_ruby_abi}:fast_gettext)
+BuildRequires: rubygem(%{rb_default_ruby_abi}:fast_gettext) < 3.0
BuildRequires: rubygem(%{rb_default_ruby_abi}:rspec)
-Requires: rubygem(%{rb_default_ruby_abi}:fast_gettext)
+Requires: rubygem(%{rb_default_ruby_abi}:fast_gettext) < 3.0
%endif
BuildRequires: ruby-devel
Requires: yast2-core >= 3.2.2
++++++ yast2-ruby-bindings-4.1.1.tar.bz2 -> yast2-ruby-bindings-4.1.2.tar.bz2
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-ruby-bindings-4.1.1/package/yast2-ruby-bindings.changes
new/yast2-ruby-bindings-4.1.2/package/yast2-ruby-bindings.changes
--- old/yast2-ruby-bindings-4.1.1/package/yast2-ruby-bindings.changes
2018-12-19 09:24:47.000000000 +0100
+++ new/yast2-ruby-bindings-4.1.2/package/yast2-ruby-bindings.changes
2019-01-23 10:06:13.000000000 +0100
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Tue Jan 22 17:58:53 UTC 2019 - [email protected]
+
+- Support for FastGettext 2.0 (still works with FastGettext 1.6)
+ (bsc#1121865)
+- 4.1.2
+
+-------------------------------------------------------------------
Tue Dec 18 15:30:14 UTC 2018 - [email protected]
- Configure $PATH environment variable to execute external commands
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-ruby-bindings-4.1.1/package/yast2-ruby-bindings.spec
new/yast2-ruby-bindings-4.1.2/package/yast2-ruby-bindings.spec
--- old/yast2-ruby-bindings-4.1.1/package/yast2-ruby-bindings.spec
2018-12-19 09:24:47.000000000 +0100
+++ new/yast2-ruby-bindings-4.1.2/package/yast2-ruby-bindings.spec
2019-01-23 10:06:13.000000000 +0100
@@ -17,7 +17,7 @@
Name: yast2-ruby-bindings
-Version: 4.1.1
+Version: 4.1.2
Url: https://github.com/yast/yast-ruby-bindings
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -29,13 +29,13 @@
BuildRequires: yast2-core-devel
BuildRequires: yast2-devtools >= 3.1.10
%if 0%{suse_version} == 1310
-BuildRequires: rubygem-fast_gettext
+BuildRequires: rubygem-fast_gettext < 3.0
BuildRequires: rubygem-rspec
-Requires: rubygem-fast_gettext
+Requires: rubygem-fast_gettext < 3.0
%else
-BuildRequires: rubygem(%{rb_default_ruby_abi}:fast_gettext)
+BuildRequires: rubygem(%{rb_default_ruby_abi}:fast_gettext) < 3.0
BuildRequires: rubygem(%{rb_default_ruby_abi}:rspec)
-Requires: rubygem(%{rb_default_ruby_abi}:fast_gettext)
+Requires: rubygem(%{rb_default_ruby_abi}:fast_gettext) < 3.0
%endif
BuildRequires: ruby-devel
Requires: yast2-core >= 3.2.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-ruby-bindings-4.1.1/src/ruby/yast/builtins.rb
new/yast2-ruby-bindings-4.1.2/src/ruby/yast/builtins.rb
--- old/yast2-ruby-bindings-4.1.1/src/ruby/yast/builtins.rb 2018-12-19
09:24:47.000000000 +0100
+++ new/yast2-ruby-bindings-4.1.2/src/ruby/yast/builtins.rb 2019-01-23
10:06:13.000000000 +0100
@@ -784,7 +784,7 @@
@textdomain_mapping[domain.dup] = dirname.dup
end
FastGettext.text_domain = domain
- return FastGettext::Translation._(text)
+ return Translation._(text)
ensure
FastGettext.text_domain = old_text_domain
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-ruby-bindings-4.1.1/src/ruby/yast/i18n.rb
new/yast2-ruby-bindings-4.1.2/src/ruby/yast/i18n.rb
--- old/yast2-ruby-bindings-4.1.1/src/ruby/yast/i18n.rb 2018-12-19
09:24:47.000000000 +0100
+++ new/yast2-ruby-bindings-4.1.2/src/ruby/yast/i18n.rb 2019-01-23
10:06:13.000000000 +0100
@@ -1,6 +1,8 @@
require "fast_gettext"
require "logger"
+require "yast/translation"
+
module Yast
# Provides translation wrapper.
module I18n
@@ -58,7 +60,7 @@
key_exist?(str)
end
end
- found ? FastGettext::Translation._(str) : str
+ found ? Translation._(str) : str
end
# No translation, only marks the text to be found by gettext when creating
POT file,
@@ -120,7 +122,7 @@
cached_plural_find(singular, plural)
end
end
- found ? FastGettext::Translation.n_(singular, plural, num) :
fallback_n_(singular, plural, num)
+ found ? Translation.n_(singular, plural, num) : fallback_n_(singular,
plural, num)
end
private
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-ruby-bindings-4.1.1/src/ruby/yast/translation.rb
new/yast2-ruby-bindings-4.1.2/src/ruby/yast/translation.rb
--- old/yast2-ruby-bindings-4.1.1/src/ruby/yast/translation.rb 1970-01-01
01:00:00.000000000 +0100
+++ new/yast2-ruby-bindings-4.1.2/src/ruby/yast/translation.rb 2019-01-23
10:06:13.000000000 +0100
@@ -0,0 +1,9 @@
+require "fast_gettext"
+
+module Yast
+ # Just a wrapper around FastGettext::Translation, we cannot include it
+ # directly because we define our own _() and n_() methods.
+ module Translation
+ extend FastGettext::Translation
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-ruby-bindings-4.1.1/src/ruby/yast.rb
new/yast2-ruby-bindings-4.1.2/src/ruby/yast.rb
--- old/yast2-ruby-bindings-4.1.1/src/ruby/yast.rb 2018-12-19
09:24:47.000000000 +0100
+++ new/yast2-ruby-bindings-4.1.2/src/ruby/yast.rb 2019-01-23
10:06:13.000000000 +0100
@@ -41,6 +41,7 @@
require "yast/path"
require "yast/scr"
require "yast/term"
+require "yast/translation"
require "yast/ui"
require "yast/ui_shortcuts"
require "yast/wfm"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-ruby-bindings-4.1.1/tests/CMakeLists.txt
new/yast2-ruby-bindings-4.1.2/tests/CMakeLists.txt
--- old/yast2-ruby-bindings-4.1.1/tests/CMakeLists.txt 2018-12-19
09:24:47.000000000 +0100
+++ new/yast2-ruby-bindings-4.1.2/tests/CMakeLists.txt 2019-01-23
10:06:13.000000000 +0100
@@ -11,3 +11,4 @@
endforeach(test)
ADD_TEST("integration" ruby ${CMAKE_CURRENT_SOURCE_DIR}/integration/run.rb)
+ADD_TEST("translations" rspec --format doc
${CMAKE_CURRENT_SOURCE_DIR}/integration/translations_spec.rb)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-ruby-bindings-4.1.1/tests/i18n_spec.rb
new/yast2-ruby-bindings-4.1.2/tests/i18n_spec.rb
--- old/yast2-ruby-bindings-4.1.1/tests/i18n_spec.rb 2018-12-19
09:24:47.000000000 +0100
+++ new/yast2-ruby-bindings-4.1.2/tests/i18n_spec.rb 2019-01-23
10:06:13.000000000 +0100
@@ -38,7 +38,7 @@
it "returns the translated string" do
allow(FastGettext).to receive(:key_exist?).and_return(true)
- expect(FastGettext::Translation).to receive(:_).with(SINGULAR)
+ expect(Yast::Translation).to receive(:_).with(SINGULAR)
.and_return(TRANSLATED)
expect(_(SINGULAR)).to eq(TRANSLATED)
end
@@ -71,7 +71,7 @@
it "returns the translated string" do
allow(FastGettext).to receive(:cached_plural_find)
.and_return(true)
- expect(FastGettext::Translation).to receive(:n_)
+ expect(Yast::Translation).to receive(:n_)
.with(SINGULAR, PLURAL, 1).and_return(TRANSLATED)
expect(n_(SINGULAR, PLURAL, 1)).to eq(TRANSLATED)
end
Binary files
old/yast2-ruby-bindings-4.1.1/tests/integration/locale/cs/LC_MESSAGES/example.mo
and
new/yast2-ruby-bindings-4.1.2/tests/integration/locale/cs/LC_MESSAGES/example.mo
differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-ruby-bindings-4.1.1/tests/integration/locale/cs/example.po
new/yast2-ruby-bindings-4.1.2/tests/integration/locale/cs/example.po
--- old/yast2-ruby-bindings-4.1.1/tests/integration/locale/cs/example.po
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-ruby-bindings-4.1.2/tests/integration/locale/cs/example.po
2019-01-23 10:06:13.000000000 +0100
@@ -0,0 +1,34 @@
+# Example translation file
+# Copyright (C) 2019 SuSE Linux Products GmbH, Nuernberg
+# This file is distributed under the same license as the yast2-ruby-bindings
package.
+# Ladislav Slezák <[email protected]>, 2019
+#
+# Run this command to compile into an .mo file:
+# msgfmt -o LC_MESSAGES/example.mo example.po
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2019-01-22 14:06+0100\n"
+"PO-Revision-Date: 2019-01-22 14:06+0100\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <[email protected]>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
+
+#. set the Czech language for these tests
+#: tests/integration/translations.rb:18 tests/integration/translations.rb:26
+msgid "Example"
+msgstr "Příklad"
+
+#: tests/integration/translations.rb:22
+msgid "%s Example"
+msgid_plural "%s Examples"
+msgstr[0] "%s Příklad"
+msgstr[1] "%s Příklady"
+msgstr[2] "%s Příkladů"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-ruby-bindings-4.1.1/tests/integration/translations_spec.rb
new/yast2-ruby-bindings-4.1.2/tests/integration/translations_spec.rb
--- old/yast2-ruby-bindings-4.1.1/tests/integration/translations_spec.rb
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-ruby-bindings-4.1.2/tests/integration/translations_spec.rb
2019-01-23 10:06:13.000000000 +0100
@@ -0,0 +1,79 @@
+#! /usr/bin/env rspec
+
+require_relative "../test_helper"
+
+require "yast"
+
+# remember the current locale
+old_locale = ENV["LC_ALL"]
+
+class TranslationExample
+ include Yast::I18n
+
+ def initialize
+ textdomain "example"
+ end
+
+ def translation_simple
+ _("Example")
+ end
+
+ def translation_plural(n)
+ format(n_("%s Example", "%s Examples", n), n)
+ end
+
+ def translation_mark
+ N_("Example")
+ end
+
+ def translation_mark_plural(n)
+ Nn_("%s Example", "%s Examples", n)
+ end
+end
+
+describe "translations in YaST" do
+ subject { TranslationExample.new }
+
+ before(:all) do
+ # set the Czech language for all tests
+ ENV["LC_ALL"] = "cs_CZ.UTF-8"
+ end
+
+ after(:all) do
+ # revert the original locale at the end
+ ENV["LC_ALL"] = old_locale
+ end
+
+ before do
+ # override the default path with translations
+ stub_const("Yast::I18n::LOCALE_DIR", File.expand_path("../locale",
__FILE__))
+ end
+
+ it "translates string using _()" do
+ expect(subject.translation_simple).to eq("Příklad")
+ end
+
+ it "translates plural string using n_() with 0 value" do
+ expect(subject.translation_plural(0)).to eq("0 Příkladů")
+ end
+
+ it "translates plural string using n_() with 1 value" do
+ expect(subject.translation_plural(1)).to eq("1 Příklad")
+ end
+
+ it "translates plural string using n_() with 2 value" do
+ expect(subject.translation_plural(2)).to eq("2 Příklady")
+ end
+
+ it "translates plural string using n_() with 5 value" do
+ expect(subject.translation_plural(5)).to eq("5 Příkladů")
+ end
+
+ it "does not translate string using N_()" do
+ expect(subject.translation_mark).to eq("Example")
+ end
+
+ it "does not translate string using Nn_()" do
+ expect(subject.translation_mark_plural(0)).to eq(["%s Example", "%s
Examples", 0])
+ end
+end