Changed <br> and <br/> tags to <br />, for XHTML compliance, as per
[lhc/web/wiklou.git] / languages / LanguageIs.php
index 367248f..c34c753 100644 (file)
 # encapsulates some of the magic-ness.
 #
 
+# Most of this was written by is:Notandi:Ævar Arnfjörð Bjarmason,
+# See:
+# http://is.wikipedia.org/wiki/Wikipedia:%C3%9E%C3%BD%C3%B0ing_%C3%A1_MediaWiki_hugb%C3%BAna%C3%B0inum
+# for the Icelandic translation collabaration page.
+
 require_once( "LanguageUtf8.php" );
 
 if($wgMetaNamespace === FALSE)
@@ -23,12 +28,12 @@ if($wgMetaNamespace === FALSE)
   NS_TALK             => 'Spjall', # Talk
   NS_USER             => 'Notandi',
   NS_USER_TALK        => 'Notandaspjall',
-  NS_WIKIPEDIA        => $wgMetaNamespace,
-  NS_WIKIPEDIA_TALK   => $wgMetaNamespace . 'spjall',
+  NS_PROJECT          => $wgMetaNamespace,
+  NS_PROJECT_TALK     => $wgMetaNamespace . 'spjall',
   NS_IMAGE            => 'Mynd',
   NS_IMAGE_TALK       => 'Myndaspjall',
-  NS_MEDIAWIKI        => 'MediaWiki',
-  NS_MEDIAWIKI_TALK   => 'MediaWikispjall',
+  NS_MEDIAWIKI        => 'Kerfisskilaboð',
+  NS_MEDIAWIKI_TALK   => 'Kerfisskilaboðaspjall',
   NS_TEMPLATE         => 'Snið',
   NS_TEMPLATE_TALK    => 'Sniðaspjall',
   NS_HELP             => 'Hjálp',
@@ -38,8 +43,10 @@ if($wgMetaNamespace === FALSE)
 ) + $wgNamespaceNamesEn;
 
 /* private */ $wgDefaultUserOptionsIs = array(
-       "date" => 2
-);
+       'date' => 2,
+  # The Icelandic Wikipedia wishes to use PNG rendering by default.
+  'math' => 0,
+) + $wgDefaultUserOptionsEn;
 
 # Note to translators:
 #   Please include the English words as synonyms.  This allows people
@@ -53,33 +60,33 @@ if($wgMetaNamespace === FALSE)
   MAG_TOC                  => array( 0,    '__TOC__'                ),
   MAG_NOEDITSECTION        => array( 0,    '__NOEDITSECTION__'      ),
   MAG_START                => array( 0,    '__START__'              ),
-  MAG_CURRENTMONTH         => array( 1,    'CURRENTMONTH'           ),
-  MAG_CURRENTMONTHNAME     => array( 1,    'CURRENTMONTHNAME'       ),
-  MAG_CURRENTDAY           => array( 1,    'CURRENTDAY'             ),
-  MAG_CURRENTDAYNAME       => array( 1,    'CURRENTDAYNAME'         ),
-  MAG_CURRENTYEAR          => array( 1,    'CURRENTYEAR'            ),
-  MAG_CURRENTTIME          => array( 1,    'CURRENTTIME'            ),
-  MAG_NUMBEROFARTICLES     => array( 1,    'NUMBEROFARTICLES'       ),
+  MAG_CURRENTMONTH         => array( 1,    'CURRENTMONTH', 'MÁNUÐUR'),
+  MAG_CURRENTMONTHNAME     => array( 1,    'CURRENTMONTHNAME', 'MÁNÐARNAFN'       ),
+  MAG_CURRENTDAY           => array( 1,    'CURRENTDAY', 'DAGUR'        ),
+  MAG_CURRENTDAYNAME       => array( 1,    'CURRENTDAYNAME', 'DAGANAFN' ),
+  MAG_CURRENTYEAR          => array( 1,    'CURRENTYEAR', 'ÁR'      ),
+  MAG_CURRENTTIME          => array( 1,    'CURRENTTIME', 'KLUKKAN'            ),
+  MAG_NUMBEROFARTICLES     => array( 1,    'NUMBEROFARTICLES', 'GREINATAL'       ),
   MAG_CURRENTMONTHNAMEGEN  => array( 1,    'CURRENTMONTHNAMEGEN'    ),
-  MAG_PAGENAME             => array( 1,    'PAGENAME'               ),
-  MAG_NAMESPACE            => array( 1,    'NAMESPACE'              ),
-  MAG_MSG                  => array( 0,    'MSG:'                   ),
-  MAG_SUBST                => array( 0,    'SUBST:'                 ),
+  MAG_PAGENAME             => array( 1,    'PAGENAME', 'SÍÐA'       ),
+  MAG_NAMESPACE            => array( 1,    'NAMESPACE', 'NAFNRÝMI'  ),
+  MAG_MSG                  => array( 0,    'MSG:', 'SKILABOÐ:'                  ),
+  MAG_SUBST                => array( 0,    'SUBST:', 'INNSETJA:'                ),
   MAG_MSGNW                => array( 0,    'MSGNW:'                 ),
   MAG_END                  => array( 0,    '__END__'                ),
-  MAG_IMG_THUMBNAIL        => array( 1,    'thumbnail', 'thumb'     ),
-  MAG_IMG_RIGHT            => array( 1,    'right'                  ),
-  MAG_IMG_LEFT             => array( 1,    'left'                   ),
+  MAG_IMG_THUMBNAIL        => array( 1,    'thumbnail', 'thumb', 'smámynd', 'örmynd'     ),
+  MAG_IMG_RIGHT            => array( 1,    'right', 'hægri'         ),
+  MAG_IMG_LEFT             => array( 1,    'left', 'vinstri'        ),
   MAG_IMG_NONE             => array( 1,    'none'                   ),
   MAG_IMG_WIDTH            => array( 1,    '$1px'                   ),
-  MAG_IMG_CENTER           => array( 1,    'center', 'centre'       ),
-  MAG_IMG_FRAMED           => array( 1,    'framed', 'enframed', 'frame' ),
+  MAG_IMG_CENTER           => array( 1,    'center', 'centre', 'miðja', 'miðju'       ),
+  MAG_IMG_FRAMED           => array( 1,    'framed', 'enframed', 'frame', 'römmuð', 'innrömmuð', 'rammi' ),
   MAG_INT                  => array( 0,    'INT:'                   ),
   MAG_SITENAME             => array( 1,    'SITENAME'               ),
-  MAG_NS                   => array( 0,    'NS:'                    ),
-  MAG_LOCALURL             => array( 0,    'LOCALURL:'              ),
-  MAG_LOCALURLE            => array( 0,    'LOCALURLE:'             ),
-  MAG_SERVER               => array( 0,    'SERVER'                 )
+  MAG_NS                   => array( 0,    'NS:', 'NR:'             ),
+  MAG_LOCALURL             => array( 0,    'LOCALURL:', 'SLÓÐ:'     ),
+  MAG_LOCALURLE            => array( 0,    'LOCALURLE:'             ), 
+  MAG_SERVER               => array( 0,    'SERVER', 'NETÞJÓNN', 'LÉN'  )
 );
 
 
@@ -168,6 +175,8 @@ if($wgMetaNamespace === FALSE)
 # hyphen (-). If you need more characters, you may be able to change
 # the regex in MagicWord::initRegex
 $wgAllMessagesIs = array(
+'special_version_prefix' => '',
+'special_version_postfix' => '',
 # User Toggles
 
 "tog-hover"            => "Sýna hjálpartexta á wiki hlekkjum",
@@ -278,7 +287,7 @@ ta['ca-nstab-help'] = new Array('c','Sýna hjálparsíðuna');
 ta['ca-nstab-category'] = new Array('c','Sýna efnisflokkasíðuna');",
 'about' => "Um",
 'aboutpage' => "Wikipedia:Um",
-'aboutwikipedia' => "Um Wikipedia",
+'aboutsite'      => "Um Wikipedia",
 #'accesskey-compareselectedversions' => "v",
 #'accesskey-minoredit' => "i",
 #'accesskey-preview' => "p",
@@ -485,7 +494,7 @@ Please follow this link: $2 to the description page and fill
 in information about the file, such as where it came from, when it was
 created and by whom, and anything else you may know about it.",
 #'formerror' => "Error: could not submit form",
-'fromwikipedia' => "Úr Wikipedia, frjálsu alfræðiorðabókinni",
+'tagline'       => "Úr Wikipedia, frjálsu alfræðiorðabókinni",
 'fundraising_notice' => "Ef þú vilt styðja wikipedia getur þú gert það í verki með að <a href=\"http://wikimediafoundation.org/fundraising\">láta fé af hendi rakna</a>. Verið er að safna fyrir <a href=\"http://meta.wikimedia.org/wiki/What_we_use_the_money_for\">ýmsum hlutum</a>.",
 #'getimagelist' => "fetching image list",
 'go' => "Áfram",
@@ -793,7 +802,7 @@ You should log in and change your password now.",
 # $1<br />
 # $2 List redirects &nbsp; Search for $3 $9",
 'preferences' => "Stillingar",
-'prefs-help-userdata' => "* <strong>Real name</strong> (optional): if you choose to provide it this will be used for giving you attribution for your work.<br/>
+'prefs-help-userdata' => "* <strong>Real name</strong> (optional): if you choose to provide it this will be used for giving you attribution for your work.<br />
 * <strong>Email</strong> (optional): Enables people to contact you through the website without you having to reveal your 
 email address to them, and it can be used to send you a new password if you forget it.",
 #'prefs-misc' => "Misc settings",
@@ -815,7 +824,7 @@ to set user preferences.",
 'printsubtitle' => "(From http://is.wikipedia.org)",
 'protect' => "Vernda",
 #'protectcomment' => "Reason for protecting",
-#'protectedarticle' => "protected [[$1]]",
+#'protectedarticle' => "protected $1",
 #'protectedpage' => "Protected page",
 'protectedpagewarning' => "WARNING:  This page has been locked so that only
 users with sysop privileges can edit it. Be sure you are following the
@@ -898,12 +907,10 @@ See [[Wikipedia:Protected page]] for more information.",
 #'saveprefs' => "Save preferences",
 'search' => "Leit",
 #'searchdisabled' => "<p>Sorry! Full text search has been disabled temporarily, for performance reasons. In the meantime, you can use the Google search below, which may be out of date.</p>",
-'searchhelppage' => "Wikipedia:Searching",
-'searchingwikipedia' => "Searching Wikipedia",
 #'searchquery' => "For query \"$1\"",
 #'searchresults' => "Search results",
 #'searchresultshead' => "Search result settings",
-'searchresulttext' => "For more information about searching Wikipedia, see $1.",
+'searchresulttext' => "For more information about searching {{SITENAME}}, see [[Project:Searching|Searching {{SITENAME}}]].",
 #'sectionedit' => " (section)",
 #'selectnewerversionfordiff' => "Select a newer version for comparison",
 #'selectolderversionfordiff' => "Select an older version for comparison",
@@ -1011,7 +1018,7 @@ See [[Wikipedia:Deletion_log]] for a record of recent deletions and restorations
 #'unlockdbtext' => "Unlocking the database will restore the ability of all users to edit pages, change their preferences, edit their watchlists, and other things requiring changes in the database.  Please confirm that this is what you intend to do.",
 'unprotect' => "Afvernda",
 #'unprotectcomment' => "Reason for unprotecting",
-#'unprotectedarticle' => "unprotected [[$1]]",
+#'unprotectedarticle' => "unprotected $1",
 #'unprotectsub' => "(Unprotecting \"$1\")",
 #'unprotectthispage' => "Unprotect this page",
 'unusedimages' => "Ónotaðar skrár",
@@ -1033,34 +1040,6 @@ See [[Wikipedia:Deletion_log]] for a record of recent deletions and restorations
 'uploadnologin' => "Óinnskráð(ur)",
 'uploadnologintext' => "You must be <a href=\"/wiki/Special:Userlogin\">logged in</a>
 to upload files.",
-'uploadtext' => "<strong>STOP!</strong> Before you upload here,
-make sure to read and follow the <a href=\"/wiki/Special:Image_use_policy\">image use policy</a>.
-<p>If a file with the name you are specifying already
-exists on the wiki, it'll be replaced without warning.
-So unless you mean to update a file, it's a good idea
-to first check if such a file exists.
-<p>To view or search previously uploaded images,
-go to the <a href=\"/wiki/Special:Imagelist\">list of uploaded images</a>.
-Uploads and deletions are logged on the <a href=\"/wiki/Wikipedia:Upload_log\">upload log</a>.
-</p><p>Use the form below to upload new image files for use in
-illustrating your pages.
-On most browsers, you will see a \"Browse...\" button, which will
-bring up your operating system's standard file open dialog.
-Choosing a file will fill the name of that file into the text
-field next to the button.
-You must also check the box affirming that you are not
-violating any copyrights by uploading the file.
-Press the \"Upload\" button to finish the upload.
-This may take some time if you have a slow internet connection.
-<p>The preferred formats are JPEG for photographic images, PNG
-for drawings and other iconic images, and OGG for sounds.
-Please name your files descriptively to avoid confusion.
-To include the image in a page, use a link in the form
-<b>[[Image:file.jpg]]</b> or <b>[[Image:file.png|alt text]]</b>
-or <b>[[Media:file.ogg]]</b> for sounds.
-<p>Please note that as with wiki pages, others may edit or
-delete your uploads if they think it serves the project, and
-you may be blocked from uploading if you abuse the system.",
 #'uploadwarning' => "Upload warning",
 #'usenewcategorypage' => "1
 #
@@ -1144,7 +1123,7 @@ class LanguageIs extends LanguageUtf8 {
        function getDefaultUserOptions () {
                global $wgDefaultUserOptionsIs;
                return $wgDefaultUserOptionsIs;
-               }
+       }
 
        function getBookstoreList () {
                global $wgBookstoreListIs;
@@ -1170,10 +1149,6 @@ class LanguageIs extends LanguageUtf8 {
                return false;
        }
 
-       function specialPage( $name ) {
-               return $this->getNsText( Namespace::getSpecial() ) . ":" . $name;
-       }
-
        function getQuickbarSettings() {
                global $wgQuickbarSettingsIs;
                return $wgQuickbarSettingsIs;
@@ -1189,179 +1164,39 @@ class LanguageIs extends LanguageUtf8 {
                return $wgDateFormatsIs;
        }
 
-       function userAdjust( $ts )
-       {
-               global $wgUser, $wgLocalTZoffset;
-
-               $diff = $wgUser->getOption( "timecorrection" );
-               if ( ! is_numeric( $diff ) ) {
-                       $diff = isset( $wgLocalTZoffset ) ? $wgLocalTZoffset : 0;
-               }
-               if ( 0 == $diff ) { return $ts; }
-
-               $t = mktime( ( (int)substr( $ts, 8, 2) ) + $diff,
-                 (int)substr( $ts, 10, 2 ), (int)substr( $ts, 12, 2 ),
-                 (int)substr( $ts, 4, 2 ), (int)substr( $ts, 6, 2 ),
-                 (int)substr( $ts, 0, 4 ) );
-               return date( "YmdHis", $t );
-       }
-       function date( $ts, $adj = false )
-       {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $d = (0 + substr( $ts, 6, 2 )) . ". " .
-               $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
-               " " .
-               substr( $ts, 0, 4 );
-               return $d;
-       }
-
-       function time( $ts, $adj = false )
-       {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 );
-               return $t;
-       }
-
-       function timeanddate( $ts, $adj = false )
-       {
-               return $this->time( $ts, $adj ) . ", " . $this->date( $ts, $adj );
-       }
-
-       function rfc1123( $ts )
-       {
-               return date( "D, d M Y H:i:s T", $ts );
-       }
-
-       function getValidSpecialPages()
-       {
+       function getValidSpecialPages() {
                global $wgValidSpecialPagesIs;
                return $wgValidSpecialPagesIs;
        }
 
-       function getSysopSpecialPages()
-       {
+       function getSysopSpecialPages() {
                global $wgSysopSpecialPagesIs;
                return $wgSysopSpecialPagesIs;
        }
 
-       function getDeveloperSpecialPages()
-       {
+       function getDeveloperSpecialPages() {
                global $wgDeveloperSpecialPagesIs;
                return $wgDeveloperSpecialPagesIs;
        }
 
-       function getMessage( $key )
-       {
+       function getMessage( $key ) {
                global $wgAllMessagesIs;
-               return $wgAllMessagesIs[$key];
+               if( isset( $wgAllMessagesIs[$key] ) ) {
+                       return $wgAllMessagesIs[$key];
+               } else {
+                       return Language::getMessage( $key );
+               }
        }
        
-       function getAllMessages()
-       {
+       function getAllMessages() {
                global $wgAllMessagesIs;
                return $wgAllMessagesIs;
        }
 
-       function iconv( $in, $out, $string ) {
-               # For most languages, this is a wrapper for iconv
-               return iconv( $in, $out, $string );
-       }
-       
-       function ucfirst( $string ) {
-               # For most languages, this is a wrapper for ucfirst()
-               return ucfirst( $string );
-       }
-       
-       function checkTitleEncoding( $s ) {
-        global $wgInputEncoding;
-               
-        # Check for UTF-8 URLs; Internet Explorer produces these if you
-               # type non-ASCII chars in the URL bar or follow unescaped links.
-               $ishigh = preg_match( '/[\x80-\xff]/', $s);
-               $isutf = ($ishigh ? preg_match( '/^([\x00-\x7f]|[\xc0-\xdf][\x80-\xbf]|' .
-                '[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xf7][\x80-\xbf]{3})+$/', $s ) : true );
-
-               if( ($wgInputEncoding != "utf-8") and $ishigh and $isutf )
-                       return iconv( "UTF-8", $wgInputEncoding, $s );
-               
-               if( ($wgInputEncoding == "utf-8") and $ishigh and !$isutf )
-                       return utf8_encode( $s );
-               
-               # Other languages can safely leave this function, or replace
-               # it with one to detect and convert another legacy encoding.
-               return $s;
-       }
-       
-       function stripForSearch( $in ) {
-               # Some languages have special punctuation to strip out
-               # or characters which need to be converted for MySQL's
-               # indexing to grok it correctly. Make such changes here.
-               return $in;
-       }
-
-
-       function setAltEncoding() {
-               # Some languages may have an alternate char encoding option
-               # (Esperanto X-coding, Japanese furigana conversion, etc)
-               # If 'altencoding' is checked in user prefs, this gives a
-               # chance to swap out the default encoding settings.
-               #global $wgInputEncoding, $wgOutputEncoding, $wgEditEncoding;
-       }
-
-       function recodeForEdit( $s ) {
-               # For some languages we'll want to explicitly specify
-               # which characters make it into the edit box raw
-               # or are converted in some way or another.
-               # Note that if wgOutputEncoding is different from
-               # wgInputEncoding, this text will be further converted
-               # to wgOutputEncoding.
-               global $wgInputEncoding, $wgEditEncoding;
-               if( $wgEditEncoding == "" or
-                 $wgEditEncoding == $wgInputEncoding ) {
-                       return $s;
-               } else {
-                       return $this->iconv( $wgInputEncoding, $wgEditEncoding, $s );
-               }
-       }
-
-       function recodeInput( $s ) {
-               # Take the previous into account.
-               global $wgInputEncoding, $wgOutputEncoding, $wgEditEncoding;
-               if($wgEditEncoding != "") {
-                       $enc = $wgEditEncoding;
-               } else {
-                       $enc = $wgOutputEncoding;
-               }
-               if( $enc == $wgInputEncoding ) {
-                       return $s;
-               } else {
-                       return $this->iconv( $enc, $wgInputEncoding, $s );
-               }
-       }
-
-       # For right-to-left language support
-       function isRTL() { return false; }
-
-       function getMagicWords() 
-       {
+       function getMagicWords() {
                global $wgMagicWordsIs;
                return $wgMagicWordsIs;
        }
-
-       # Fill a MagicWord object with data from here
-       function getMagic( &$mw )
-       {
-               $raw = $this->getMagicWords(); # don't worry, it's reference counted not deep copy
-               $rawEntry = $raw[$mw->mId];
-               $mw->mCaseSensitive = $rawEntry[0];
-               $mw->mSynonyms = array_slice( $rawEntry, 1 );
-       }
 }
 
-# @include_once( "Language" . ucfirst( $wgLanguageCode ) . ".php" );
-
 ?>
-