pike.git / lib / modules / Calendar.pmod / Language.pmod

version» Context lines:

pike.git/lib/modules/Calendar.pmod/Language.pmod:487:         // ========================================================================            // now the real classes:      // this should probably be called UK_en or something:    - constant cENGLISH=cISO; - constant cENG=cISO; - constant cEN=cISO; +    class cISO   {    inherit _ymd_base;       constant month_names=    ({"January","February","March","April","May","June","July","August",    "September","October","November","December"});       constant week_day_names=    ({"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"});
pike.git/lib/modules/Calendar.pmod/Language.pmod:525:    if (sscanf(s,"%d",w)) return w;    return 0;    }       string year_name_from_number(int y)    {    if (y<1) return sprintf("%d BC",1-y);    return (string)y;    }   }; + constant cENGLISH=cISO; + constant cENG=cISO; + constant cEN=cISO;      // swedish (note: all name as cLANG where LANG is in caps)    - constant cSE_SV=cSWEDISH; - constant cSV=cSWEDISH; - constant cSWE=cSWEDISH; +    class cSWEDISH   {    inherit _ymd_base;       protected private constant month_names=    ({"januari","februari","mars","april","maj","juni","juli","augusti",    "september","oktober","november","december"});       protected private constant week_day_names=    ({"måndag","tisdag","onsdag","torsdag",
pike.git/lib/modules/Calendar.pmod/Language.pmod:624:    if (sscanf(s,"v%d",int w)) return w;    return ::week_number_from_name(s);    }       string year_name_from_number(int y)    {    if (y<1) return sprintf("%d fk",1-y);    return (string)y;    }   } + constant cSE_SV=cSWEDISH; + constant cSV=cSWEDISH; + constant cSWE=cSWEDISH;      // austrian   // source: Martin Baehr <mbaehr@email.archlab.tuwien.ac.at>    - constant cDE_AT=cAUSTRIAN; // this is a german dialect, appearantly +    class cAUSTRIAN   {    inherit _ymd_base;       protected private constant month_names=    ({"jänner","feber","märz","april","mai","juni","juli","august",    "september","oktober","november","dezember"});       protected private constant week_day_names=    ({"montag","dienstag","mittwoch","donnerstag",    "freitag","samstag","sonntag"});       void create()    {    SETUPSTUFF;    }   } -  + constant cDE_AT=cAUSTRIAN; // this is a german dialect, appearantly      // Welsh   // source: book    - constant cCY=cWELSH; - constant cCYM=cWELSH; +    class cWELSH   {    inherit _ymd_base;       protected private constant month_names=    ({"ionawr","chwefror","mawrth","ebrill","mai","mehefin",    "gorffenaf","awst","medi","hydref","tachwedd","rhagfyr"});       protected private constant week_day_names=    ({"Llun","Mawrth","Mercher","Iau","Gwener","Sadwrn","Sul"});
pike.git/lib/modules/Calendar.pmod/Language.pmod:679:    {    sscanf(name,"dydd %s",name);    return week_day_number_from_name(name);    }       void create()    {    SETUPSTUFF;    }   } + constant cCY=cWELSH; + constant cCYM=cWELSH;      // Spanish   // Julio César Gázquez <jgazquez@dld.net>    - constant cES=cSPANISH; - constant cSPA=cSPANISH; +    class cSPANISH   {    inherit _ymd_base;       protected private constant month_names=    ({"enero","febrero","marzo","abril","mayo","junio",    "julio","agosto","setiembre","octubre","noviembre","diciembre"});       protected private constant week_day_names=    ({"lunes","martes","miércoles","jueves",
pike.git/lib/modules/Calendar.pmod/Language.pmod:726:    "Holy Saturday":"Sãbado de gloria",    "Easter":"Domingo de resurrección",    "Corpus Christi":"Corpus Christi"    ]);       void create()    {    SETUPSTUFF;    }   } + constant cES=cSPANISH; + constant cSPA=cSPANISH;      // portugese   // source: Sérgio Araújo <sergio@projecto-oasis.cx>    - constant cPT=cPORTUGESE; // Portugese (Brasil) - constant cPOR=cPORTUGESE; +    class cPORTUGESE   {    inherit _ymd_base;       protected private constant month_names=    ({    "Janeiro",    "Fevereiro",    "Março",    "Abril",
pike.git/lib/modules/Calendar.pmod/Language.pmod:785:    "Restoration of the Independence":"Restauração da Independência",    "Immaculate Conception":"Imaculada Conceição",    "Christmas":"Natal"    ]);       void create()    {    SETUPSTUFF;    }   } + constant cPT=cPORTUGESE; // Portugese (Brasil) + constant cPOR=cPORTUGESE;      // Hungarian   // Csongor Fagyal <concept@conceptonline.hu>      constant cHU=cHUNGARIAN;   constant cHUN=cHUNGARIAN;   class cHUNGARIAN   {    inherit _ymd_base;   
pike.git/lib/modules/Calendar.pmod/Language.pmod:2149:    "sreda",    "\415etvrtak",    "petak",    "subota",    "nedelja",    });       void create() { SETUPSTUFF; }   }    +  + constant cEL=cGREEK_UNICODE; //Greek Ellinika + constant cGR=cGREEK_UNICODE; + class cGREEK_UNICODE + { +  inherit _ymd_base; +  +  static private constant month_names= +  ({ +  "\u0399\u03b1\u03bd\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2", +  "\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2", +  "\u039c\u03ac\u03c1\u03c4\u03b9\u03bf\u03c2", +  "\u0391\u03c0\u03c1\u03af\u03bb\u03b9\u03bf\u03c2", +  "\u039c\u03ac\u03b9\u03bf\u03c2", +  "\u0399\u03bf\u03cd\u03bd\u03b9\u03bf\u03c2", +  "\u0399\u03bf\u03cd\u03bb\u03b9\u03bf\u03c2", +  "\u0391\u03cd\u03b3\u03bf\u03c5\u03c3\u03c4\u03bf\u03c2", +  "\u03a3\u03b5\u03c0\u03c4\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2", +  "\u039f\u03ba\u03c4\u03ce\u03b2\u03c1\u03b9\u03bf\u03c2", +  "\u039d\u03bf\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2", +  "\u0394\u03b5\u03ba\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2", +  }); +  +  static private constant week_day_names= +  ({ +  "\u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1", +  "\u03a4\u03c1\u03af\u03c4\u03b7", +  "\u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7", +  "\u03a0\u03ad\u03bc\u03c0\u03c4\u03b7", +  "\u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae", +  "\u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf", +  "\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae", +  }); +  +  void create() { SETUPSTUFF; } + } +  +    // ----------------------------------------------------------------      // find & compile language      protected mapping _cache=([]);      Calendar.Rule.Language `[](string lang)   {    lang=upper_case(lang);    Calendar.Rule.Language l=_cache[lang];