Subject: | PATCH: convert getext parameters to maketext parameters |
Hi, we are carrying a patch to convert gettext parameters to maketext parameters, I was wondering if you could include this?
Cheers, Jeff.
diff -ru Locale-Maketext-Gettext-1.27/lib/Locale/Maketext/Gettext.pm Locale-Maketext-Gettext-1.27-patched/lib/Locale/Maketext/Gettext.pm
--- Locale-Maketext-Gettext-1.27/lib/Locale/Maketext/Gettext.pm 2009-04-28 03:46:23.000000000 +1000
+++ Locale-Maketext-Gettext-1.27-patched/lib/Locale/Maketext/Gettext.pm 2013-03-08 12:31:37.166997436 +1000
@@ -354,6 +354,10 @@
# Translated message
$strt = substr($content, $off, $len);
+ # Convert gettext params %1 to maketext params [_1]
+ $stro =~ s/\%(\d+)/\[_$1\]/g;
+ $strt =~ s/\%(\d+)/\[_$1\]/g;
+
# Hash it
$_{$stro} = $strt;
}