[DRE-commits] r5850 - in trunk/liblocale-rails-ruby/debian: . patches
Gunnar Wolf
gwolf at alioth.debian.org
Mon Sep 13 03:04:43 UTC 2010
Author: gwolf
Date: 2010-09-13 03:04:34 +0000 (Mon, 13 Sep 2010)
New Revision: 5850
Added:
trunk/liblocale-rails-ruby/debian/patches/
trunk/liblocale-rails-ruby/debian/patches/fully_qualify_i18n_locale
trunk/liblocale-rails-ruby/debian/patches/series
Modified:
trunk/liblocale-rails-ruby/debian/changelog
trunk/liblocale-rails-ruby/debian/copyright
Log:
Avoid name clash with I18N class
Modified: trunk/liblocale-rails-ruby/debian/changelog
===================================================================
--- trunk/liblocale-rails-ruby/debian/changelog 2010-09-13 02:41:23 UTC (rev 5849)
+++ trunk/liblocale-rails-ruby/debian/changelog 2010-09-13 03:04:34 UTC (rev 5850)
@@ -1,3 +1,10 @@
+liblocale-rails-ruby (2.0.5-3) unstable; urgency=low
+
+ * Fully qualify module calls to avoid name clash with I18N class
+ (Closes: #588757)
+
+ -- Gunnar Wolf <gwolf at debian.org> Sun, 12 Sep 2010 22:02:01 -0500
+
liblocale-rails-ruby (2.0.5-2) unstable; urgency=low
* Missed declaring liblocale-rails-ruby dependency on liblocale-rails-
Modified: trunk/liblocale-rails-ruby/debian/copyright
===================================================================
--- trunk/liblocale-rails-ruby/debian/copyright 2010-09-13 02:41:23 UTC (rev 5849)
+++ trunk/liblocale-rails-ruby/debian/copyright 2010-09-13 03:04:34 UTC (rev 5850)
@@ -25,7 +25,7 @@
Files: debian/*
Copyright: Copyright (c) 2010, Gunnar Wolf <gwolf at debian.org>
-License: Ruby
+License: GPL2
License: GPL2
This program is licensed under the GPL (General Public License:
Added: trunk/liblocale-rails-ruby/debian/patches/fully_qualify_i18n_locale
===================================================================
--- trunk/liblocale-rails-ruby/debian/patches/fully_qualify_i18n_locale (rev 0)
+++ trunk/liblocale-rails-ruby/debian/patches/fully_qualify_i18n_locale 2010-09-13 03:04:34 UTC (rev 5850)
@@ -0,0 +1,65 @@
+Author: "Marc Dequènes (Duck)" <duck at duckcorp.org>
+Origin: other
+Bug-Debian: 588757
+Forwarded: No
+Reviewed-by: Gunnar Wolf <gwolf at debian.org>
+Description: Fully qualify calls to Locale in order to avoid name clashes with I18N
+
+Index: liblocale-rails-ruby-2.0.5/lib/locale_rails/i18n.rb
+===================================================================
+--- liblocale-rails-ruby-2.0.5.orig/lib/locale_rails/i18n.rb 2010-09-12 21:55:11.000000000 -0500
++++ liblocale-rails-ruby-2.0.5/lib/locale_rails/i18n.rb 2010-09-12 21:55:20.000000000 -0500
+@@ -13,35 +13,35 @@
+
+ # Gets the supported locales.
+ def supported_locales
+- Locale.app_language_tags
++ ::Locale.app_language_tags
+ end
+
+ # Sets the supported locales.
+ # I18n.set_supported_locales("ja-JP", "ko-KR", ...)
+ def set_supported_locales(*tags)
+- Locale.set_app_language_tags(*tags)
++ ::Locale.set_app_language_tags(*tags)
+ end
+
+ # Sets the supported locales as an Array.
+ # I18n.supported_locales = ["ja-JP", "ko-KR", ...]
+ def supported_locales=(tags)
+- Locale.set_app_language_tags(*tags)
++ ::Locale.set_app_language_tags(*tags)
+ end
+
+ # Sets the locale.
+ # I18n.locale = "ja-JP"
+ def locale=(tag)
+- Locale.clear
+- tag = Locale::Tag::Rfc.parse(tag.to_s) if tag.kind_of? Symbol
+- Locale.current = tag
+- Thread.current[:locale] = Locale.candidates(:type => :rfc)[0]
++ ::Locale.clear
++ tag = ::Locale::Tag::Rfc.parse(tag.to_s) if tag.kind_of? Symbol
++ ::Locale.current = tag
++ Thread.current[:locale] = ::Locale.candidates(:type => :rfc)[0]
+ end
+
+ # Sets the default locale.
+ # I18n.default_locale = "ja"
+ def default_locale=(tag)
+- tag = Locale::Tag::Rfc.parse(tag.to_s) if tag.kind_of? Symbol
+- Locale.default = tag
++ tag = ::Locale::Tag::Rfc.parse(tag.to_s) if tag.kind_of? Symbol
++ ::Locale.default = tag
+ @@default_locale = tag
+ end
+
+@@ -50,7 +50,7 @@
+ # MissingTranslationData is overrided to fallback messages in candidate locales.
+ def locale_rails_exception_handler(exception, locale, key, options) #:nodoc:
+ ret = nil
+- Locale.candidates(:type => :rfc).each do |loc|
++ ::Locale.candidates(:type => :rfc).each do |loc|
+ begin
+ ret = backend.translate(loc, key, options)
+ break
Added: trunk/liblocale-rails-ruby/debian/patches/series
===================================================================
--- trunk/liblocale-rails-ruby/debian/patches/series (rev 0)
+++ trunk/liblocale-rails-ruby/debian/patches/series 2010-09-13 03:04:34 UTC (rev 5850)
@@ -0,0 +1 @@
+fully_qualify_i18n_locale
More information about the Pkg-ruby-extras-commits
mailing list