Roxen.git / server / languages / russian.pike

version» Context lines:

Roxen.git/server/languages/russian.pike:1: - #charset iso-8859-5 - constant required_charset = "iso-8859-5"; + /* -*- coding: koi8-r -*- */ + #charset koi8-r + constant required_charset = "koi8-r";   /* Bugs by: Per, jhs */   /*    * name = "Russian language plugin ";    * doc = "Handles the conversion of numbers and dates to Russian. You have to restart the server for updates to take effect.";    */      inherit "abstract.pike";    - constant cvs_version = "$Id: russian.pike,v 1.12 2009/03/23 19:16:56 grubba Exp $"; - constant _id = ({ "ru", "russian", "ÀãááÚØÙ" }); + constant cvs_version = "$Id$"; + constant _id = ({ "ru", "russian", "ÒÕÓÓËÉÊ" });   constant _aliases = ({ "ru", "rus", "russian", "ÒÕÓÓËÉÊ" });    - #define error(x) throw( ({ x, backtrace() }) ) -  +    constant months = ({ -  "ÑÎ×ÁÒØ", "ÆÅÂÒÁÌØ", "ÍÁÒÔ", "ÁÐÒÅÌØ", "ÍÁÊ", -  "ÉÀÎØ", "ÉÀÌØ", "Á×ÇÕÓÔØ", "ÓÅÎÔÑÂÒØ", "ÏËÔÑÂØ", +  "ÑÎ×ÁÒØ", "ÆÅ×ÒÁÌØ", "ÍÁÒÔ", "ÁÐÒÅÌØ", "ÍÁÊ", +  "ÉÀÎØ", "ÉÀÌØ", "Á×ÇÕÓÔ", "ÓÅÎÔÑÂÒØ", "ÏËÔÑÂÒØ",    "ÎÏÑÂÒØ", "ÄÅËÁÂÒØ" });      constant days = ({    "×ÏÓËÒÅÓÅÎØÅ","ÐÏÎÅÄÅÌØÎÉË","×ÔÏÒÎÉË","ÓÒÅÄÁ", "ÞÅÔ×ÅÒË",    "ÐÑÔÎÉÃÁ", "ÓÕÂÂÏÔÁ" });    -  + constant implode_conjunction = "É"; +    string ordered(int i)   {    return (string) i + "-Å";   }    -  + string numbered_month(int m) + { +  string month = months[m-1]; +  switch(month[-1]) { +  case 'Ø': +  case 'Ê': +  return month[..sizeof(month)-2] + "Ñ"; +  case 'Ô': +  return month + "Á"; +  } +  error("Invalid month: %O\n", month); + } +  + string short_month(int m) + { +  return numbered_month(m)[..2]; + } +    string date(int timestamp, mapping m)   {    mapping t1=localtime(timestamp);    mapping t2=localtime(time(0));       if(!m) m=([]);       if(!(m["full"] || m["date"] || m["time"]))    {    if(t1["yday"] == t2["yday"] && t1["year"] == t2["year"])
Roxen.git/server/languages/russian.pike:42:       if(t1["yday"] == t2["yday"]-1 && t1["year"] == t2["year"])    return "×ÞÅÒÁ, v " + ctime(timestamp)[11..15];       if(t1["yday"] == t2["yday"]+1 && t1["year"] == t2["year"])    return "ÚÁ×ÔÒÁ, okolo " + ctime(timestamp)[11..15];       if(t1["year"] != t2["year"])    return month(t1["mon"]+1) + " " + (t1["year"]+1900);    else -  return "" + t1["mday"] + " " + month(t1["mon"]+1); +  return "" + t1["mday"] + " " + numbered_month(t1["mon"]+1);    }    if(m["full"])    return sprintf("%s, %s %s %d",    ctime(timestamp)[11..15],    ordered(t1["mday"]), -  month(t1["mon"]+1), t1["year"]+1900); +  numbered_month(t1["mon"]+1), t1["year"]+1900);    if(m["date"])    return sprintf("%s %s %d", ordered(t1["mday"]), -  month(t1["mon"]+1), t1["year"]+1900); +  numbered_month(t1["mon"]+1), t1["year"]+1900);       if(m["time"])    return ctime(timestamp)[11..15];   }      /* Help funtions */   /* gender is "f", "m" or "n" */   string _number_1(int num, string gender)   {    switch(num)