kluge to fix wovel harmony for "MediaWiki" (and other names with a "wiki" suffix...
authorIlmari Karonen <vyznev@users.mediawiki.org>
Sat, 10 Feb 2007 22:03:31 +0000 (22:03 +0000)
committerIlmari Karonen <vyznev@users.mediawiki.org>
Sat, 10 Feb 2007 22:03:31 +0000 (22:03 +0000)
languages/classes/LanguageFi.php

index a7a3835..d736396 100644 (file)
@@ -31,6 +31,13 @@ class LanguageFi extends Language {
                # wovel harmony flag
                $aou = preg_match( '/[aou][^äöy]*$/i', $word );
 
+               # The flag should be false for compounds where the last word has only neutral vowels (e/i).
+               # The general case cannot be handled without a dictionary, but there's at least one notable
+               # special case we should check for:
+
+               if ( preg_match( '/wiki$/i', $word ) )
+                       $aou = false;
+
                # append i after final consonant
                if ( preg_match( '/[bcdfghjklmnpqrstvwxz]$/i', $word ) )
                        $word .= 'i';