Mailinglist Archive: opensuse-ruby (3 mails)

< Previous Next >
Re: [opensuse-ruby] rubygem-gettext update to 3.0.1 breaks "rake gettext:pack"
(dropped opensuse-factory from CC list, probably doesn't need the extra
mail ;)

On 10/03/2013 05:01 PM, Ladislav Slezak wrote:
Dne 2.10.2013 17:14, Tim Serong napsal(a):
Hi All,

rubygem-gettext has been updated to version 3.0.1 in openSUSE:Factory, which
seems
to break "rake gettext:pack" with:

rake aborted! cannot load such file -- gettext/utils

AFACIT we need a newer rubygem-gettext_i18n_rails to accommodate recent
changes in
rubygem-gettext.

Yes, I have already looked at it, my pull requested was not accepted,
they changed the gettext API (therefore it was quickly updated to 3.0.1)
for a better solution.

It was recently fixed here:
https://github.com/grosser/gettext_i18n_rails/pull/103

Version 1.0.0 has been released at September 30, so it should be
enough just to update the gem in devel:languages:ruby:extensions from 0.10.1
to 1.0.0.

I've done a local build of gettext_i18n_rails, which turned out to
require gettext 3.0.2, not 3.0.1, so I built that too. This now seems
to mean I need to run:

TEXTDOMAIN=hawk rake gettext:pack

Without setting TEXTDOMAIN=hawk, the text domain defaults to 'app' and
it can't find my hawk.po* files. I traced that back to this commit:

https://github.com/grosser/gettext_i18n_rails/commit/d1b02f734f9e0c96de50d1a58e8170ce6ec457ac

See comment "# if your textdomain is not 'app': require the environment
before calling e.g. gettext:find OR add TEXTDOMAIN=my_domain.

I'm not sure how to "require the environment before calling
gettext:find". config/initializers/fast_gettext.rb does have:

FastGettext.add_text_domain 'hawk', :path => ...
FastGettext.default_text_domain = 'hawk'

But apparently this isn't picked up early enough.

I've also hit two other problems, one is that rake gettext:pack seems to
be mangling my hawk.pot file for some reason, in particular it rewrites
the copyright comment and mangles Project-Id-Version and Plural-Forms:

-# HA Web Konsole (Hawk)
-#
-# Copyright (c) 2009-2013 SUSE LLC
-#
-# This file is distributed under the same license as the Hawk package.
-#
-# Tim Serong <tserong@xxxxxxxx>, 2011.
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the hawk package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: hawk 0.6.0\n"
+"Project-Id-Version: hawk 1.0.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-04-19 21:25+1000\n"
-"PO-Revision-Date: 2009-12-10 02:48+1100\n"
+"POT-Creation-Date: 2013-10-04 05:51+0000\n"
+"PO-Revision-Date: 2013-10-04 05:51+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@xxxxxx>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\n"
+"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"

The other problem is that it dies horribly when trying to update the
french translations (see attached log), but if I run "rake gettext:pack"
a *second* time, it completes successfully.

You wouldn't happen to have any idea what's going on with the above
would you? :)

Thanks,

Tim
--
Tim Serong
Senior Clustering Engineer
SUSE
tserong@xxxxxxxx
vulcan:/home/abuild/rpmbuild/BUILD/hawk-0.6.1+git.1380530147.6917434/hawk>
TEXTDOMAIN=hawk rake --trace gettext:pack

WARNING: Not using Rubinius in 1.9 mode - scanny task skipped

** Invoke gettext:pack (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke gettext:gettext:mo:update (first_time)
** Invoke gettext:gettext:mo:fr:update (first_time)
** Invoke
/home/abuild/rpmbuild/BUILD/hawk-0.6.1+git.1380530147.6917434/hawk/locale/fr/LC_MESSAGES/hawk.mo
(first_time)
** Invoke
/home/abuild/rpmbuild/BUILD/hawk-0.6.1+git.1380530147.6917434/hawk/locale/fr/hawk.po
(first_time)
** Invoke
/home/abuild/rpmbuild/BUILD/hawk-0.6.1+git.1380530147.6917434/hawk/locale/hawk.pot
(first_time)
** Invoke app/controllers/dashboard_controller.rb (first_time, not_needed)
** Invoke app/controllers/orders_controller.rb (first_time, not_needed)
** Invoke app/controllers/tickets_controller.rb (first_time, not_needed)
** Invoke app/controllers/wizard_controller.rb (first_time, not_needed)
** Invoke app/controllers/nodes_controller.rb (first_time, not_needed)
** Invoke app/controllers/constraints_controller.rb (first_time, not_needed)
** Invoke app/controllers/templates_controller.rb (first_time, not_needed)
** Invoke app/controllers/locations_controller.rb (first_time, not_needed)
** Invoke app/controllers/sessions_controller.rb (first_time, not_needed)
** Invoke app/controllers/application_controller.rb (first_time, not_needed)
** Invoke app/controllers/cib_controller.rb (first_time, not_needed)
** Invoke app/controllers/hb_reports_controller.rb (first_time, not_needed)
** Invoke app/controllers/crm_config_controller.rb (first_time, not_needed)
** Invoke app/controllers/primitives_controller.rb (first_time, not_needed)
** Invoke app/controllers/main_controller.rb (first_time, not_needed)
** Invoke app/controllers/resources_controller.rb (first_time, not_needed)
** Invoke app/controllers/clones_controller.rb (first_time, not_needed)
** Invoke app/controllers/colocations_controller.rb (first_time, not_needed)
** Invoke app/controllers/explorer_controller.rb (first_time, not_needed)
** Invoke app/controllers/groups_controller.rb (first_time, not_needed)
** Invoke app/controllers/masters_controller.rb (first_time, not_needed)
** Invoke app/models/clone.rb (first_time, not_needed)
** Invoke app/models/ticket.rb (first_time, not_needed)
** Invoke app/models/primitive.rb (first_time, not_needed)
** Invoke app/models/location.rb (first_time, not_needed)
** Invoke app/models/template.rb (first_time, not_needed)
** Invoke app/models/colocation.rb (first_time, not_needed)
** Invoke app/models/node.rb (first_time, not_needed)
** Invoke app/models/constraint.rb (first_time, not_needed)
** Invoke app/models/cib_object.rb (first_time, not_needed)
** Invoke app/models/order.rb (first_time, not_needed)
** Invoke app/models/crm_config.rb (first_time, not_needed)
** Invoke app/models/cib.rb (first_time, not_needed)
** Invoke app/models/resource.rb (first_time, not_needed)
** Invoke app/models/master.rb (first_time, not_needed)
** Invoke app/models/group.rb (first_time, not_needed)
** Invoke app/helpers/primitives_helper.rb (first_time, not_needed)
** Invoke app/helpers/orders_helper.rb (first_time, not_needed)
** Invoke app/helpers/hb_reports_helper.rb (first_time, not_needed)
** Invoke app/helpers/templates_helper.rb (first_time, not_needed)
** Invoke app/helpers/locations_helper.rb (first_time, not_needed)
** Invoke app/helpers/cib_helper.rb (first_time, not_needed)
** Invoke app/helpers/nodes_helper.rb (first_time, not_needed)
** Invoke app/helpers/application_helper.rb (first_time, not_needed)
** Invoke app/helpers/groups_helper.rb (first_time, not_needed)
** Invoke app/helpers/sessions_helper.rb (first_time, not_needed)
** Invoke app/helpers/resources_helper.rb (first_time, not_needed)
** Invoke app/helpers/masters_helper.rb (first_time, not_needed)
** Invoke app/helpers/constraints_helper.rb (first_time, not_needed)
** Invoke app/helpers/dashboard_helper.rb (first_time, not_needed)
** Invoke app/helpers/clones_helper.rb (first_time, not_needed)
** Invoke app/helpers/explorer_helper.rb (first_time, not_needed)
** Invoke app/helpers/wizard_helper.rb (first_time, not_needed)
** Invoke app/helpers/tickets_helper.rb (first_time, not_needed)
** Invoke app/helpers/crm_config_helper.rb (first_time, not_needed)
** Invoke app/helpers/main_helper.rb (first_time, not_needed)
** Invoke app/helpers/colocations_helper.rb (first_time, not_needed)
** Invoke app/views/dashboard/index.html.erb (first_time, not_needed)
** Invoke app/views/hb_reports/permission_denied.html.erb (first_time,
not_needed)
** Invoke app/views/hb_reports/create.js.erb (first_time, not_needed)
** Invoke app/views/hb_reports/new.html.erb (first_time, not_needed)
** Invoke app/views/crm_config/edit.html.erb (first_time, not_needed)
** Invoke app/views/crm_config/show.html.erb (first_time, not_needed)
** Invoke app/views/crm_config/update.html.erb (first_time, not_needed)
** Invoke app/views/groups/edit.html.erb (first_time, not_needed)
** Invoke app/views/groups/_form.html.erb (first_time, not_needed)
** Invoke app/views/groups/new.html.erb (first_time, not_needed)
** Invoke app/views/shared/_confirm_revert.html.erb (first_time, not_needed)
** Invoke app/views/sessions/new.html.erb (first_time, not_needed)
** Invoke app/views/primitives/edit.html.erb (first_time, not_needed)
** Invoke app/views/primitives/_form.html.erb (first_time, not_needed)
** Invoke app/views/primitives/new.html.erb (first_time, not_needed)
** Invoke app/views/constraints/index.html.erb (first_time, not_needed)
** Invoke app/views/main/_gettext.js.erb (first_time, not_needed)
** Invoke app/views/main/status.html.erb (first_time, not_needed)
** Invoke app/views/main/_menus.html.erb (first_time, not_needed)
** Invoke app/views/layouts/main.html.erb (first_time, not_needed)
** Invoke app/views/orders/edit.html.erb (first_time, not_needed)
** Invoke app/views/orders/_form.html.erb (first_time, not_needed)
** Invoke app/views/orders/new.html.erb (first_time, not_needed)
** Invoke app/views/locations/edit.html.erb (first_time, not_needed)
** Invoke app/views/locations/_form.html.erb (first_time, not_needed)
** Invoke app/views/locations/new.html.erb (first_time, not_needed)
** Invoke app/views/wizard/done.html.erb (first_time, not_needed)
** Invoke app/views/wizard/start.html.erb (first_time, not_needed)
** Invoke app/views/wizard/run.html.erb (first_time, not_needed)
** Invoke app/views/wizard/broken.html.erb (first_time, not_needed)
** Invoke app/views/wizard/_param_row.html.erb (first_time, not_needed)
** Invoke app/views/explorer/permission_denied.html.erb (first_time, not_needed)
** Invoke app/views/explorer/index.js.erb (first_time, not_needed)
** Invoke app/views/explorer/index.html.erb (first_time, not_needed)
** Invoke app/views/explorer/_pe_list.html.erb (first_time, not_needed)
** Invoke app/views/masters/edit.html.erb (first_time, not_needed)
** Invoke app/views/masters/_form.html.erb (first_time, not_needed)
** Invoke app/views/masters/new.html.erb (first_time, not_needed)
** Invoke app/views/nodes/permission_denied.html.erb (first_time, not_needed)
** Invoke app/views/nodes/show.html.erb (first_time, not_needed)
** Invoke app/views/nodes/events.html.erb (first_time, not_needed)
** Invoke app/views/nodes/events.js.erb (first_time, not_needed)
** Invoke app/views/resources/permission_denied.html.erb (first_time,
not_needed)
** Invoke app/views/resources/show.html.erb (first_time, not_needed)
** Invoke app/views/resources/index.html.erb (first_time, not_needed)
** Invoke app/views/resources/events.html.erb (first_time, not_needed)
** Invoke app/views/resources/events.js.erb (first_time, not_needed)
** Invoke app/views/colocations/edit.html.erb (first_time, not_needed)
** Invoke app/views/colocations/_form.html.erb (first_time, not_needed)
** Invoke app/views/colocations/new.html.erb (first_time, not_needed)
** Invoke app/views/clones/edit.html.erb (first_time, not_needed)
** Invoke app/views/clones/_form.html.erb (first_time, not_needed)
** Invoke app/views/clones/new.html.erb (first_time, not_needed)
** Invoke app/views/tickets/edit.html.erb (first_time, not_needed)
** Invoke app/views/tickets/_form.html.erb (first_time, not_needed)
** Invoke app/views/tickets/new.html.erb (first_time, not_needed)
** Invoke lib/fcgi.rb (first_time, not_needed)
** Invoke lib/per_request_cache.rb (first_time, not_needed)
** Invoke lib/util.rb (first_time, not_needed)
** Invoke lib/natcmp.rb (first_time, not_needed)
** Invoke lib/invoker.rb (first_time, not_needed)
** Invoke lib/hb_report.rb (first_time, not_needed)
** Invoke lib/crm_history.rb (first_time, not_needed)
** Invoke config/environment.rb (first_time, not_needed)
** Invoke config/routes.rb (first_time, not_needed)
** Invoke config/environments/test.rb (first_time, not_needed)
** Invoke config/environments/production.rb (first_time, not_needed)
** Invoke config/environments/development.rb (first_time, not_needed)
** Invoke config/initializers/secret_token.rb (first_time, not_needed)
** Invoke config/initializers/session_store.rb (first_time, not_needed)
** Invoke config/initializers/inflections.rb (first_time, not_needed)
** Invoke config/initializers/wrap_parameters.rb (first_time, not_needed)
** Invoke config/initializers/mime_types.rb (first_time, not_needed)
** Invoke config/initializers/hawk.rb (first_time, not_needed)
** Invoke config/initializers/backtrace_silencers.rb (first_time, not_needed)
** Invoke config/initializers/fast_gettext.rb (first_time, not_needed)
** Invoke config/boot.rb (first_time, not_needed)
** Invoke config/application.rb (first_time, not_needed)
** Execute
/home/abuild/rpmbuild/BUILD/hawk-0.6.1+git.1380530147.6917434/hawk/locale/hawk.pot
WARNING: Global access to Rake DSL methods is deprecated. Please include
... Rake::DSL into classes and modules which use the Rake DSL methods.
WARNING: DSL method GetText::RubyLexX#rule called at (eval):1:in `parse'
WARNING: DSL method GetText::RubyLexX#rule called at (eval):1:in `parse'
WARNING: Global access to Rake DSL methods is deprecated. Please include
... Rake::DSL into classes and modules which use the Rake DSL methods.
WARNING: DSL method GetText::RubyLexX#rule called at (eval):1:in `parse'
WARNING: DSL method GetText::RubyLexX#rule called at (eval):1:in `parse'
** Execute
/home/abuild/rpmbuild/BUILD/hawk-0.6.1+git.1380530147.6917434/hawk/locale/fr/hawk.po
** Invoke
/home/abuild/rpmbuild/BUILD/hawk-0.6.1+git.1380530147.6917434/hawk/locale/fr/LC_MESSAGES
(first_time)
** Execute
/home/abuild/rpmbuild/BUILD/hawk-0.6.1+git.1380530147.6917434/hawk/locale/fr/LC_MESSAGES
mkdir -p
/home/abuild/rpmbuild/BUILD/hawk-0.6.1+git.1380530147.6917434/hawk/locale/fr/LC_MESSAGES
** Execute
/home/abuild/rpmbuild/BUILD/hawk-0.6.1+git.1380530147.6917434/hawk/locale/fr/LC_MESSAGES/hawk.mo
** Execute gettext:gettext:mo:fr:update
rake aborted!
undefined method `match' for nil:NilClass
/usr/lib64/ruby/2.0.0/rake/task_manager.rb:131:in `block in
enhance_with_matching_rule'
/usr/lib64/ruby/2.0.0/rake/task_manager.rb:130:in `each'
/usr/lib64/ruby/2.0.0/rake/task_manager.rb:130:in `enhance_with_matching_rule'
/usr/lib64/ruby/2.0.0/rake/task.rb:222:in `execute'
/usr/lib64/ruby/2.0.0/rake/task.rb:166:in `block in invoke_with_call_chain'
/usr/lib64/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
/usr/lib64/ruby/2.0.0/rake/task.rb:159:in `invoke_with_call_chain'
/usr/lib64/ruby/2.0.0/rake/task.rb:187:in `block in invoke_prerequisites'
/usr/lib64/ruby/2.0.0/rake/task.rb:185:in `each'
/usr/lib64/ruby/2.0.0/rake/task.rb:185:in `invoke_prerequisites'
/usr/lib64/ruby/2.0.0/rake/task.rb:165:in `block in invoke_with_call_chain'
/usr/lib64/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
/usr/lib64/ruby/2.0.0/rake/task.rb:159:in `invoke_with_call_chain'
/usr/lib64/ruby/2.0.0/rake/task.rb:187:in `block in invoke_prerequisites'
/usr/lib64/ruby/2.0.0/rake/task.rb:185:in `each'
/usr/lib64/ruby/2.0.0/rake/task.rb:185:in `invoke_prerequisites'
/usr/lib64/ruby/2.0.0/rake/task.rb:165:in `block in invoke_with_call_chain'
/usr/lib64/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
/usr/lib64/ruby/2.0.0/rake/task.rb:159:in `invoke_with_call_chain'
/usr/lib64/ruby/2.0.0/rake/task.rb:152:in `invoke'
/usr/lib64/ruby/2.0.0/rake/application.rb:143:in `invoke_task'
/usr/lib64/ruby/2.0.0/rake/application.rb:101:in `block (2 levels) in top_level'
/usr/lib64/ruby/2.0.0/rake/application.rb:101:in `each'
/usr/lib64/ruby/2.0.0/rake/application.rb:101:in `block in top_level'
/usr/lib64/ruby/2.0.0/rake/application.rb:110:in `run_with_threads'
/usr/lib64/ruby/2.0.0/rake/application.rb:95:in `top_level'
/usr/lib64/ruby/2.0.0/rake/application.rb:73:in `block in run'
/usr/lib64/ruby/2.0.0/rake/application.rb:160:in `standard_exception_handling'
/usr/lib64/ruby/2.0.0/rake/application.rb:70:in `run'
/usr/bin/rake:37:in `<main>'
Tasks: TOP => gettext:pack => gettext:gettext:mo:update =>
gettext:gettext:mo:fr:update

< Previous Next >
List Navigation