|
Bugzilla – Full Text Bug Listing |
| Summary: | undefined method `_' for FastGettext::Translation:Module | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE Tumbleweed | Reporter: | Alexander Graul <alexander.graul> |
| Component: | YaST2 | Assignee: | Ladislav Slezák <lslezak> |
| Status: | RESOLVED FIXED | QA Contact: | Jiri Srain <jsrain> |
| Severity: | Normal | ||
| Priority: | P1 - Urgent | CC: | alexander.graul, fcrozat, jreidinger, locilka, Mathias.Homann, mvidner, snwint |
| Version: | Current | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| URL: | https://trello.com/c/uL36NReV | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
save_y2logs output
output of ls -l /usr/lib64/ruby/gems/2.5.0/gems/ |
||
I could not reproduce this with a fresh TW-20190110 install. My initial thought was that there had been some yast version mixup during your upgrade process. But I couldn't spot any difference between your setup and my fresh install. (I might have missed something, though.) Josef, Martin, any idea what could cause this? (In reply to Alexander Graul from comment #0) > Created attachment 794369 [details] > save_y2logs output > > Upon starting the YaST TUI or any Qt YaST module (the Qt Control Center > works fine), I am greeted with the following error message: > > Internal error. Please report a bug report with logs. > Run save_y2logs to get complete logs. > Details: undefined method `_' for FastGettext::Translation:Module > Caller: /usr/lib64/ruby/vendor_ruby/2.5.0/yast/builtins.rb:787:in > `dpgettext' > > Today was the first time I ran into this issue, I am running Tumbleweed > (20190110). my wild guess is inconsistency in ruby and rubygems installation. or some strange fastgettext version. Can you please post here content of ls -l /usr/lib64/ruby/gems/2.5.0/gems/ ? Created attachment 794461 [details]
output of ls -l /usr/lib64/ruby/gems/2.5.0/gems/
Some weird rubygem interaction would not surprise me either, here is the list you requested.
I see fast_gettext-2.0.0 there - but I don't know if that makes a difference.. hmm, there is a lot of changes in 2.0 in fast gettext in Translation.rb. So steffen for you it works with fast_gettext 2.0 ? For me potential problem can be https://github.com/grosser/fast_gettext/commit/b04659d7a58dfb254a08790851785c2158724232#diff-c57b1d2229b221d6856308a01804b83d as we use it https://github.com/yast/yast-ruby-bindings/blob/master/src/ruby/yast/builtins.rb#L787 directly with module. So without that extend self it probably cannot be called directly. But it is strange if it works for Steffen. > steffen for you it works with fast_gettext 2.0 ?
I do not know. TW comes with 1.8.
Looks like either yast needs to be adjusted or it should require the old gem. Tracking in YaST Scrum board. *** Bug 1122350 has been marked as a duplicate of this bug. *** Or we might need to add "extend FastGettext::Translation" or "include FastGettext::Translation" somewhere, like in this commit: https://github.com/grosser/fast_gettext/commit/b04659d7a58dfb254a08790851785c2158724232#diff-13715f7b8da878de01baf08e02d98a54 module Yast::I18n calls FastGettext::Translation._(...) FastGettext::Translation.n_(...) in its methods, but the F::T module no longer exposes them as module_method's intending the users to instead include the module. We cannot do that directly as Yast::I18n has additional logic in _ and n_, but we could simply introduce Yast::I18n::Translation which does include FastGettext::Translation AND provides the 2 methods as module_method's. That *should* work with both f_g 1.8 and 2.0, we just need to test that. Raising the priority, failing in https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:H/autoyast2/standard/x86_64 Fixed in yast2-ruby-bindings-4.1.2 (https://github.com/yast/yast-ruby-bindings/pull/226, https://build.opensuse.org/request/show/667954). The same fix in the SLE15-GA/Leap15.0 queue (will be released with the next real fix, https://github.com/yast/yast-ruby-bindings/pull/225) |
Created attachment 794369 [details] save_y2logs output Upon starting the YaST TUI or any Qt YaST module (the Qt Control Center works fine), I am greeted with the following error message: Internal error. Please report a bug report with logs. Run save_y2logs to get complete logs. Details: undefined method `_' for FastGettext::Translation:Module Caller: /usr/lib64/ruby/vendor_ruby/2.5.0/yast/builtins.rb:787:in `dpgettext' Today was the first time I ran into this issue, I am running Tumbleweed (20190110).