CC: | <kent [...] c2group.net> |
Subject: | Acme::LOLCAT Patch for "I HAS A BUKKET" |
Date: | Fri, 22 Feb 2008 12:47:06 -0900 |
To: | <bug-Acme-LOLCAT [...] rt.cpan.org> |
From: | "Vonnahme, Nathan" <nathan.vonnahme [...] bannerhealth.com> |
Playing with your cool Ajax LOLCAT translator, I noticed it didn't
produce the right translation for the original LOLRUS
(http://icanhascheezburger.com/2007/01/14/i-has-a-bucket/)
"I have a bucket" translates to "I HAVE BUKKIT." but I expect "I HAZ A
BUKKET" at least sometimes.
So I patched the test script:
--- t/lols.t 2007-10-25 18:03:57.000000000 -0800
+++ /cygdrive/c/Documents and
Settings/nvonnahm/.cpan/build/Acme-LOLCAT-0.0.4-BTX6XO/t/lols.t
2008-02-22 12:33:08.785754700 -0900
@@ -29,7 +29,7 @@
"translated domination phrase: $p" );
like( $p = translate( "i think that is a nice bucket" ),
- qr/I THINK THAT AR (?:TEH )?NICE BUKKIT/,
+ qr/I THINK THAT AR (?:TEH )?NICE BUKK/,
"translated bucket phrase: $p" );
like( $p = translate( "hello, i want to ask you a question" ),
@@ -43,3 +43,8 @@
like( $p = translate( "free parties, events & more! what's happening?
who's going?" ),
qr/FREE PARTIE$Z?, EVENT$Z? & MOAR! WH?UT$Z HAPPENIN$Z?\? HOO$Z
GOIN$Z?\?/,
"translated party ad text: $p" );
+
+like( $p = translate( "I have a bucket." ),
+ qr/I HA[SVZ] ?A? BUKK/,
+ "translated bucket having phrase: $p" );
+
And I patched the module to behave better. The tests pass.
--- lib/Acme/LOLCAT.pm 2007-10-25 18:05:22.000000000 -0800
+++ /cygdrive/c/Documents and
Settings/nvonnahm/.cpan/build/Acme-LOLCAT-0.0.4-BTX6XO/lib/Acme/LOLCAT.p
m 2008-02-22 12:32:31.311495700 -0900
@@ -27,11 +27,12 @@
eady => 'eddy', 'ome\b' => 'um',
'of\b' => [qw/of ov of/], 'uestion' => 'wesjun',
want => 'wants', 'ead\b' => 'edd',
- ucke => 'ukki', sion => 'shun',
+ ucke => [qw/ukki ukke/], sion => 'shun',
oth => 'udd', '\boh\b' => [qw/o ohs/],
eak => 'ekk', age => 'uj',
like => [qw/likes liek/], love => [qw/loves lub lubs luv/],
- 'have a' => 'has', '\bis\b' => ['ar teh','ar'],
+ 'have' => ['has','hav', 'haz a'],
+ '\bis\b' => ['ar teh','ar'],
who => 'hoo', q(') => q(),
'ese\b' => 'eez', outh => 'owf',
scio => 'shu', esque => 'esk',
Cheers,
nathan
--
nathan vonnahme, web programmer at fairbanks memorial hospital
1650 cowles street, fairbanks alaska 99701. 907-458-5464
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.