Your message dated Thu, 09 Apr 2015 11:19:34 +0000
with message-id <[email protected]>
and subject line Bug#774044: fixed in ruby-gettext-i18n-rails 1.2.3-1
has caused the Debian Bug report #774044,
regarding Rake task incompatible with ruby-gettext 3.x
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
774044: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=774044
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: ruby-gettext-i18n-rails
Version: 0.9.4-1
Severity: grave
Debian Release: 8.0
Tags: patch

The rake task is incompatible with with ruby-gettext version 3.

This was fixed in v1.0.0.

commit d1b02f734f9e0c96de50d1a58e8170ce6ec457ac
Author: Kouhei Sutou <[email protected]>
Date:   Mon Sep 16 18:42:13 2013 +0900

    Use GetText::Tools::Task introduced since gettext 3.0.0

and

commit 6c83ce9255122ddb0c28ec5ca96e5a1975a8e0c8
Author: grosser <[email protected]>
Date:   Sun Sep 29 17:47:38 2013 -0700

    bump gettext requirement

Attached is a squashed and (kind of) minimized patch of both commits.

As a site notice: the package needs to be rebuild for compatibility with
Ruby 2.1, as it just provides GEM specs for Ruby 1.9.1 and 1.8.

Jan-Marek
diff --git a/lib/gettext_i18n_rails/tasks.rb b/lib/gettext_i18n_rails/tasks.rb
index 4d1a0d0..2f7121f 100644
--- a/lib/gettext_i18n_rails/tasks.rb
+++ b/lib/gettext_i18n_rails/tasks.rb
@@ -1,55 +1,48 @@
+require "gettext/tools/task"
+gem "gettext", ">= 3.0.2"
+
 namespace :gettext do
-  def load_gettext
-    require 'gettext'
-    require 'gettext/utils'
+  def locale_path
+    path = FastGettext.translation_repositories[text_domain].instance_variable_get(:@options)[:path] rescue nil
+    path || File.join(Rails.root, "locale")
   end
 
-  desc "Create mo-files for L10n"
-  task :pack => :environment do
-    load_gettext
-    GetText.create_mofiles(true, locale_path, locale_path)
+  def text_domain
+    # if your textdomain is not 'app': require the environment before calling e.g. gettext:find OR add TEXTDOMAIN=my_domain
+    ENV['TEXTDOMAIN'] || (FastGettext.text_domain rescue nil) || "app"
   end
 
-  desc "Update pot/po files."
-  task :find => :environment do
-    load_gettext
-    $LOAD_PATH << File.join(File.dirname(__FILE__),'..','..','lib') # needed when installed as plugin
-
-    require "gettext_i18n_rails/haml_parser"
-    require "gettext_i18n_rails/slim_parser"
+  # do not rename, gettext_i18n_rails_js overwrites this to inject coffee + js
+  def files_to_translate
+    Dir.glob("{app,lib,config,#{locale_path}}/**/*.{rb,erb,haml,slim}")
+  end
 
-    if GetText.respond_to? :update_pofiles_org
-      if defined?(Rails.application)
-        msgmerge = Rails.application.config.gettext_i18n_rails.msgmerge
-      end
-      msgmerge ||= %w[--sort-output --no-location --no-wrap]
+  $LOAD_PATH << File.join(File.dirname(__FILE__),'..','..','lib') # needed when installed as plugin
+
+  require "gettext_i18n_rails/haml_parser"
+  require "gettext_i18n_rails/slim_parser"
+
+  GetText::Tools::Task.define do |task|
+    task.package_name = text_domain
+    task.package_version = "1.0.0"
+    task.domain = text_domain
+    task.po_base_directory = locale_path
+    task.mo_base_directory = locale_path
+    task.files = files_to_translate
+    task.enable_description = false
+    if defined?(Rails.application)
+      msgmerge = Rails.application.config.gettext_i18n_rails.msgmerge
+    end
+    msgmerge ||= %w[--sort-output --no-location --no-wrap]
+    task.msgmerge_options = msgmerge
+  end
 
-      GetText.update_pofiles_org(
-        text_domain,
-        files_to_translate,
-        "version 0.0.1",
-        :po_root => locale_path,
-        :msgmerge => msgmerge
-      )
-    else #we are on a version < 2.0
-      puts "install new GetText with gettext:install to gain more features..."
-      #kill ar parser...
-      require 'gettext/parser/active_record'
-      module GetText
-        module ActiveRecordParser
-          module_function
-          def init(x);end
-        end
-      end
+  desc "Create mo-files for L10n"
+  task :pack => [:environment, "gettext:gettext:mo:update"] do
+  end
 
-      #parse files.. (models are simply parsed as ruby files)
-      GetText.update_pofiles(
-        text_domain,
-        files_to_translate,
-        "version 0.0.1",
-        locale_path
-      )
-    end
+  desc "Update pot/po files."
+  task :find => [:environment, "gettext:gettext:po:update"] do
   end
 
   # This is more of an example, ignoring
@@ -92,35 +84,9 @@ namespace :gettext do
       puts "You need to specify the language to add. Either 'LANGUAGE=eo rake gettext:add_languange' or 'rake gettext:add_languange[eo]'"
       next
     end
-    pot = File.join(locale_path, "#{text_domain}.pot")
-    if !File.exists? pot
-      puts "You don't have a pot file yet, you probably should run 'rake gettext:find' at least once. Tried '#{pot}'."
-      next
-    end
-
-    # Create the directory for the new language.
-    dir = File.join(locale_path, language)
-    puts "Creating directory #{dir}"
-    Dir.mkdir dir
-
-    # Create the po file for the new language.
-    new_po = File.join(locale_path, language, "#{text_domain}.po")
-    puts "Initializing #{new_po} from #{pot}."
-    system "msginit --locale=#{language} --input=#{pot} --output=#{new_po}"
-  end
 
-  def locale_path
-    path = FastGettext.translation_repositories[text_domain].instance_variable_get(:@options)[:path] rescue nil
-    path || File.join(Rails.root, "locale")
-  end
-
-  def text_domain
-    # if your textdomain is not 'app': require the environment before calling e.g. gettext:find OR add TEXTDOMAIN=my_domain
-    ENV['TEXTDOMAIN'] || (FastGettext.text_domain rescue nil) || "app"
-  end
-
-  # do not rename, gettext_i18n_rails_js overwrites this to inject coffee + js
-  def files_to_translate
-    Dir.glob("{app,lib,config,#{locale_path}}/**/*.{rb,erb,haml,slim}")
+    language_path = File.join(locale_path, language)
+    mkdir_p(language_path)
+    ruby($0, "gettext:find")
   end
 end
diff --git a/Gemfile b/Gemfile
index 5e9255d..904b67b 100644
--- a/Gemfile
+++ b/Gemfile
@@ -3,7 +3,7 @@ gemspec
 
 gem 'appraisal'
 gem 'bump'
-gem 'gettext'
+gem 'gettext', '>= 3.0.2'
 gem 'haml'
 gem 'rails'
 gem 'rake'
diff --git a/Gemfile.lock b/Gemfile.lock
index 2f253c5..570ec89 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -43,7 +43,7 @@ GEM
     diff-lcs (1.1.3)
     erubis (2.7.0)
     fast_gettext (0.7.0)
-    gettext (2.3.7)
+    gettext (3.0.2)
       levenshtein
       locale
     haml (3.1.7)
@@ -119,7 +119,7 @@ PLATFORMS
 DEPENDENCIES
   appraisal
   bump
-  gettext
+  gettext (>= 3.0.2)
   gettext_i18n_rails!
   haml
   rails
diff --git a/Readme.md b/Readme.md
index 8e2c5c9..53d56df 100644
--- a/Readme.md
+++ b/Readme.md
@@ -31,7 +31,7 @@ Add `gettext` if you want to find translations or build .mo files<br/>
 Add `ruby_parser` if you want to find translations inside haml/slim files
 
     # Gemfile
-    gem 'gettext', '>=1.9.3', :require => false, :group => :development
+    gem 'gettext', '>=3.0.2', :require => false, :group => :development
     gem 'ruby_parser', :require => false, :group => :development
 
 #### Rails 2

--- End Message ---
--- Begin Message ---
Source: ruby-gettext-i18n-rails
Source-Version: 1.2.3-1

We believe that the bug you reported is fixed in the latest version of
ruby-gettext-i18n-rails, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sebastien Badia <[email protected]> (supplier of updated ruby-gettext-i18n-rails 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Thu, 09 Apr 2015 11:29:21 +0200
Source: ruby-gettext-i18n-rails
Binary: ruby-gettext-i18n-rails
Architecture: source all
Version: 1.2.3-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Ruby Extras Maintainers 
<[email protected]>
Changed-By: Sebastien Badia <[email protected]>
Description:
 ruby-gettext-i18n-rails - Simple FastGettext Rails integration
Closes: 774044
Changes:
 ruby-gettext-i18n-rails (1.2.3-1) unstable; urgency=medium
 .
   * Team upload.
   * New upstream release, thanks Jan-Marek Glogowski (Closes: #774044).
   * d/watch: Use Github directly (instead of gemwatch webservice)
   * d/control:
     - Bump Standards-Version (no changes)
     - Use cgit for VCS-Browser fields and switch to HTTPS
Checksums-Sha1:
 0b178e179d8a813018f581a1623787d1f7a8c8d8 2144 
ruby-gettext-i18n-rails_1.2.3-1.dsc
 c9c23f0fc618689b04539d86eb6d48f0a9b516e3 20252 
ruby-gettext-i18n-rails_1.2.3.orig.tar.gz
 ab7994c0121be39b006ec5fbf954dfff7983be7e 2468 
ruby-gettext-i18n-rails_1.2.3-1.debian.tar.xz
 adf5dac27684f5d32fe21c3980813adc701f499c 10480 
ruby-gettext-i18n-rails_1.2.3-1_all.deb
Checksums-Sha256:
 ad3f710a789dea42258593838fe62e63162dd89bb93bd8e5f75c4fde1317a6bf 2144 
ruby-gettext-i18n-rails_1.2.3-1.dsc
 48af9946c8165ece5c1c94c01045596e25f00bc679e3eb835e45992663444fd7 20252 
ruby-gettext-i18n-rails_1.2.3.orig.tar.gz
 ab4a9f798ec647ffca828651c472926a8a4b6758971b9f94ae48326f177a39b3 2468 
ruby-gettext-i18n-rails_1.2.3-1.debian.tar.xz
 4ac8d4fd408c123d7ad97148ef913bf983a68f89e24e2c80b0cdb18b14bc846b 10480 
ruby-gettext-i18n-rails_1.2.3-1_all.deb
Files:
 2869af7cbc6887c4048d9f443f3ea126 2144 ruby optional 
ruby-gettext-i18n-rails_1.2.3-1.dsc
 d3045016f3fb4bc101b1db64b8de5cda 20252 ruby optional 
ruby-gettext-i18n-rails_1.2.3.orig.tar.gz
 b1c1e91349305e23afc75aaa78834a64 2468 ruby optional 
ruby-gettext-i18n-rails_1.2.3-1.debian.tar.xz
 9c3c9bf876ff2704810e1fdb37bdbef7 10480 ruby optional 
ruby-gettext-i18n-rails_1.2.3-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJVJl9dAAoJEFwT1tuTBS4DOR0P/1UKWCr015Z7l6EfeTbJl21S
FAb+uGJ3YfaknvJtjMTlh4WCPRRBNlRxLM32KlscLvcgv+hkRHBupAPMj3oCWKiI
eNhVfDZ+VxZ//Zp8y6Tq4lJttTApbBBuNFgwh12fupeyFL3dfv7AZlK9nqiO0ale
DDOvO6KfkCnLu8VdW89gVZKTBsNRzV3UEzjiw+8KAbNzXyyJo2KJNVRkIRqFpV6n
twZJvgmbLlEal+Ajco2s0bBYeV4ka/RcdIEwFVYrIYai3zkJGQD3Bh1hinYTB7qC
4jybXs+34b7iNEmugvKF7KVkB96EvxF/+y8g29fFvbexTQZ7CnJDGFvYI60fbBI+
Q9Dxpks3iZ9IDTKvad6x+WEG8eis5bFPHtNf5ywP91MC0oB5wJqiNlGwMYwswWO1
ynApaXy175pwICRJ3ZAEQviF9suwTEIido3E9DwAhH6FRLHYehkEoKALX5XwfeJJ
30KrxHNqFejBz41f/5yvxLrvs4BWH9VaVJKftMhNx7HKSj5g8Yx3q+/mGPL+TP1x
YxyWDeL9lZVDa5EaXeOZGI2mMKO8N/0JbP3Y9dfuZpNRXcllWGBCImvCTxc96Xdt
zeIxaHMCZOV3p45TdPxSLnb5P7fsQLFMkVIctqrYIi7wUOyb5kckQtAfy9ENMxTz
BLQETrnOyTHKr7ZK8ybV
=Ud3d
-----END PGP SIGNATURE-----

--- End Message ---
_______________________________________________
Pkg-ruby-extras-maintainers mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ruby-extras-maintainers

Reply via email to