Gnumed.timelinelib.calendar.bosparanian.monthnames

Package Gnumed :: Package timelinelib :: Package calendar :: Package bosparanian :: Module monthnames |
[frames] | no frames]

# Source Code for Module Gnumed.timelinelib.calendar.bosparanian.monthnames

     1  # Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018  Rickard Lindberg, Roger Lindberg
     2  #
     3  # This file is part of Timeline.
     4  #
     5  # Timeline is free software: you can redistribute it and/or modify
     6  # it under the terms of the GNU General Public License as published by
     7  # the Free Software Foundation, either version 3 of the License, or
     8  # (at your option) any later version.
     9  #
    10  # Timeline is distributed in the hope that it will be useful,
    11  # but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  # GNU General Public License for more details.
    14  #
    15  # You should have received a copy of the GNU General Public License
    16  # along with Timeline.  If not, see <http://www.gnu.org/licenses/>.
    17
    18 -def _(message):
    19      return message  # deferred translation
    20
    21  BOSP_ENGLISH_MONTH_NAMES = [
    22      _("Praios"),
    23      _("Rondra"),
    24      _("Efferd"),
    25      _("Travia"),
    26      _("Boron"),
    27      _("Hesinde"),
    28      _("Firun"),
    29      _("Tsa"),
    30      _("Phex"),
    31      _("Peraine"),
    32      _("Ingerimm"),
    33      _("Rahja"),
    34      _("Nameless Days")
    35  ]
    36
    37
    38  BOSP_ABBREVIATED_ENGLISH_MONTH_NAMES = [
    39      _("PRA"),
    40      _("RON"),
    41      _("EFF"),
    42      _("TRA"),
    43      _("BOR"),
    44      _("HES"),
    45      _("FIR"),
    46      _("TSA"),
    47      _("PHE"),
    48      _("PER"),
    49      _("ING"),
    50      _("RAH"),
    51      _("NL"),
    52  ]
    53  del _
    54
    55
    56 -def bosp_month_from_english_name(month_name):
    57      return BOSP_ENGLISH_MONTH_NAMES.index(month_name) + 1
    58
    59
    60
    61 -def bosp_name_of_month(month):
    62      return _(BOSP_ENGLISH_MONTH_NAMES[month - 1])
    63
    64
    65 -def bosp_abbreviated_name_of_month(month):
    66      return _(BOSP_ABBREVIATED_ENGLISH_MONTH_NAMES[month - 1])
    67
    68 -def bosp_month_from_abbreviated_name(month_name):
    69      i=0
    70      for mn in BOSP_ABBREVIATED_ENGLISH_MONTH_NAMES:
    71          i+=1
    72          if _(mn) == month_name:
    73              return i
    74      return 13
    75