yast / yast-ruby-bindings

YaST module ruby-bindings
http://en.opensuse.org/Portal:YaST
GNU General Public License v2.0
6 stars 14 forks source link

Support for FastGettext 2.0 (bsc#1121865) #225

Closed lslezak closed 5 years ago

lslezak commented 5 years ago

Summary

Testing

Manual Tests

Simple testing script which prints the FastGettext version and prints a translated string from YaST. ```ruby require "yast" include Yast::I18n puts "FastGettext version: #{FastGettext::VERSION}" textdomain "base" msg = "Updating system configuration..." puts "Message: #{msg}" puts "Translation: #{_(msg)}" ```


When running the script with the original Leap 15.0 package it prints this (in the Czech locale):

FastGettext version: 1.6.0
Message:     Updating system configuration...
Translation: Probíhá aktualizace konfigurace systému...

After updating the package to version 2.0 from the devel:languages:ruby:extensions it prints this:

FastGettext version: 2.0.0
Message:     Updating system configuration...
Translation: Probíhá aktualizace konfigurace systému...

So it works correctly with both FastGettext versions.

Integration Tests

We already have some unit tests for translation in tests/i18n_spec.rb, but these tests basically mock everything so they do not test that the translation process really work.

Therefore I have added a an integration test with some real translations (provided in the attached po/mo files).

lslezak commented 5 years ago

This is for SLE15-GA, we agreed to release it with the next real fix as we do not expect that SLE15/Leap15.0 used would use some external newer gems.

For TW (master) I'll release a new version.

archon810 commented 5 years ago

Sorry, how can I get this fix on OpenSUSE 15.0? zypper update shows no updates currently, and yast is still failing like here https://bugzilla.opensuse.org/show_bug.cgi?id=1121865.

Thanks.