I get an error "RuntimeError (Current textdomain (nil) was not added, use
FastGettext.add_text_domain !" during a call to hammer.run() from w/in
another hammer command. Effectively 'hammer csv subscriptions' is calling
'hammer subscription upload' from w/in itself. If I add this code[1] prior
to calling hammer.run() then things work as expected (and as it had
previously).
What is the proper way to config FastGettext in hammer module?
Opened a PR that works but I'd like to understand the problem and what
changed, if anyone has any insights.
···
On Fri, Sep 2, 2016 at 1:14 PM, Tom McKay wrote:
I get an error “RuntimeError (Current textdomain (nil) was not added, use
FastGettext.add_text_domain !” during a call to hammer.run() from w/in
another hammer command. Effectively ‘hammer csv subscriptions’ is calling
‘hammer subscription upload’ from w/in itself. If I add this code[1] prior
to calling hammer.run() then things work as expected (and as it had
previously).
What is the proper way to config FastGettext in hammer module?
Recently there were some changes in how the translation domains are handled
in hammer with new fast_gettext. See the PR [1] for more details. There was
hammer 0.8.0 gem released last week containing the changes.
What hammer version anf fast_gettext do you use?
I checked the hammer-cli-csv PR and I'm not sure why are you adding the
domain manualy for the second time and not only with HammerCLI::I18n.add_domain
but it was not necessary for hammer-cli-foreman.
I get an error “RuntimeError (Current textdomain (nil) was not added, use
FastGettext.add_text_domain !” during a call to hammer.run() from w/in
another hammer command. Effectively ‘hammer csv subscriptions’ is calling
’hammer subscription upload’ from w/in itself. If I add this code[1] prior
to calling hammer.run() then things work as expected (and as it had
previously).
What is the proper way to config FastGettext in hammer module?
Without the lines add_text_domain the errors happen. Could be that katello
is not initialized at the time I am calling hammer.run() for one of its
commands? I'm just guessing at things at this point.
I am on ruby-2.3.1 w/ fast_gettext-1.2.0
···
On Mon, Sep 5, 2016 at 4:13 AM, Martin Bačovský wrote:
Recently there were some changes in how the translation domains are
handled in hammer with new fast_gettext. See the PR [1] for more details.
There was hammer 0.8.0 gem released last week containing the changes.
What hammer version anf fast_gettext do you use?
I checked the hammer-cli-csv PR and I’m not sure why are you adding the
domain manualy for the second time and not only with HammerCLI::I18n.add_domain
but it was not necessary for hammer-cli-foreman.
I get an error “RuntimeError (Current textdomain (nil) was not added,
use FastGettext.add_text_domain !” during a call to hammer.run() from w/in
another hammer command. Effectively ‘hammer csv subscriptions’ is calling
’hammer subscription upload’ from w/in itself. If I add this code[1] prior
to calling hammer.run() then things work as expected (and as it had
previously).
What is the proper way to config FastGettext in hammer module?
This is blocking me now as it happens in lots of commands. Any suggestions
welcome. Maybe I need to create some mo files or something?
···
On Tue, Sep 6, 2016 at 10:06 AM, Tom McKay wrote:
Without the lines add_text_domain the errors happen. Could be that katello
is not initialized at the time I am calling hammer.run() for one of its
commands? I’m just guessing at things at this point.
Recently there were some changes in how the translation domains are
handled in hammer with new fast_gettext. See the PR [1] for more details.
There was hammer 0.8.0 gem released last week containing the changes.
What hammer version anf fast_gettext do you use?
I checked the hammer-cli-csv PR and I’m not sure why are you adding the
domain manualy for the second time and not only with HammerCLI::I18n.add_domain
but it was not necessary for hammer-cli-foreman.
I get an error “RuntimeError (Current textdomain (nil) was not added,
use FastGettext.add_text_domain !” during a call to hammer.run() from w/in
another hammer command. Effectively ‘hammer csv subscriptions’ is calling
’hammer subscription upload’ from w/in itself. If I add this code[1] prior
to calling hammer.run() then things work as expected (and as it had
previously).
What is the proper way to config FastGettext in hammer module?
Seems it has to do with threads. hammer-cli-csv supports processing the
input file divided equally between N number of threads. Is there some init
functionality required for fast_gettext per thread?
···
On Tue, Sep 6, 2016 at 8:07 PM, Tom McKay wrote:
This is blocking me now as it happens in lots of commands. Any suggestions
welcome. Maybe I need to create some mo files or something?
Without the lines add_text_domain the errors happen. Could be that
katello is not initialized at the time I am calling hammer.run() for one of
its commands? I’m just guessing at things at this point.
Recently there were some changes in how the translation domains are
handled in hammer with new fast_gettext. See the PR [1] for more details.
There was hammer 0.8.0 gem released last week containing the changes.
What hammer version anf fast_gettext do you use?
I checked the hammer-cli-csv PR and I’m not sure why are you adding the
domain manualy for the second time and not only with HammerCLI::I18n.add_domain
but it was not necessary for hammer-cli-foreman.
I get an error “RuntimeError (Current textdomain (nil) was not added,
use FastGettext.add_text_domain !” during a call to hammer.run() from w/in
another hammer command. Effectively ‘hammer csv subscriptions’ is calling
’hammer subscription upload’ from w/in itself. If I add this code[1] prior
to calling hammer.run() then things work as expected (and as it had
previously).
What is the proper way to config FastGettext in hammer module?