[Kde-bindings] KDE/kdebindings/ruby/korundum
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Mon Aug 3 13:39:14 UTC 2009
SVN commit 1006328 by rdale:
* Added Ruby versions of the i18n(), i18nc(), i18np() and i18ncp() methods
with variable numbers of arguments that replace the '%1, '%2' place
holders in the main strings. Thanks to Robert Riemann for reporting them
missing.
CCMAIL: kde-bindings at kde.org
M +6 -0 ChangeLog
M +24 -0 src/lib/KDE/korundum4.rb
--- trunk/KDE/kdebindings/ruby/korundum/ChangeLog #1006327:1006328
@@ -1,3 +1,9 @@
+2009-08-03 Richard Dale <richard.j.dale at gmail.com>
+ * Added Ruby versions of the i18n(), i18nc(), i18np() and i18ncp() methods
+ with variable numbers of arguments that replace the '%1, '%2' place
+ holders in the main strings. Thanks to Robert Riemann for reporting them
+ missing.
+
2009-06-16 Richard Dale <richard.j.dale at gmail.com>
* Add a marshaller for KIO::UDSEntryList. Fixes problem reported by David
Palacio
--- trunk/KDE/kdebindings/ruby/korundum/src/lib/KDE/korundum4.rb #1006327:1006328
@@ -22,6 +22,30 @@
require 'Qt'
module KDE
+ def KDE.i18n(text, *args)
+ str = ki18n(text)
+ args.inject(str) { |str, arg| str = str.subs(arg) }
+ return str.toString
+ end
+
+ def KDE.i18nc(context, text, *args)
+ str = ki18nc(context, text)
+ args.inject(str) { |str, arg| str = str.subs(arg) }
+ return str.toString
+ end
+
+ def KDE.i18np(singular, plural, *args)
+ str = ki18np(singular, plural)
+ args.inject(str) { |str, arg| str = str.subs(arg) }
+ return str.toString
+ end
+
+ def KDE.i18ncp(context, singular, plural, *args)
+ str = ki18ncp(context, singular, plural)
+ args.inject(str) { |str, arg| str = str.subs(arg) }
+ return str.toString
+ end
+
class Application < Qt::Base
def initialize(*k)
super
More information about the Kde-bindings
mailing list