From: Oleg Broytman Date: Thu, 14 Jun 2007 14:06:32 +0000 (+0000) Subject: /usr/bin/env python X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=2f4077c7be4097e2e4c318cfdb818746cb223b66;p=phdru.name%2Fphdru.name.git /usr/bin/env python Adapted to default locale ru_RU.UTF-8. git-svn-id: file:///home/phd/archive/SVN/phdru.name/scripts@66 7bb0bf08-9e0d-0410-b083-99cee3bf18b8 --- diff --git a/reindex_blog.py b/reindex_blog.py index 8f23ebd..29d58d5 100755 --- a/reindex_blog.py +++ b/reindex_blog.py @@ -1,4 +1,4 @@ -#! /usr/local/bin/python -O +#! /usr/bin/env python # -*- coding: koi8-r -*- __version__ = "$Revision$"[11:-2] @@ -88,15 +88,19 @@ if blog <> old_blog: # Localized month names import locale -locale.setlocale(locale.LC_ALL, '') +locale.setlocale(locale.LC_ALL, "ru_RU.KOI8-R") from calendar import _localized_day, _localized_month locale.setlocale(locale.LC_TIME, 'C') months_names_en = list(_localized_month('%B')) months_abbrs_en = list(_localized_month('%b')) -locale.setlocale(locale.LC_TIME, '') -months_names_ru = [month.lower() for month in _localized_month('%B')] +locale.setlocale(locale.LC_TIME, "ru_RU.KOI8-R") +#months_names_ru = list(_localized_month('%B')) + +months_names_ru = ['', "ÑÎ×ÁÒÑ", "ÆÅ×ÒÁÌÑ", "ÍÁÒÔÁ", "ÁÐÒÅÌÑ", "ÍÁÑ", "ÉÀÎÑ", + "ÉÀÌÑ", "Á×ÇÕÓÔÁ", "ÓÅÎÔÑÂÒÑ", "ÏËÔÑÂÒÑ", "ÎÏÑÂÒÑ", "ÄÅËÁÂÒÑ" +] months_names_ru0 = ['', "ÑÎ×ÁÒØ", "ÆÅ×ÒÁÌØ", "ÍÁÒÔ", "ÁÐÒÅÌØ", "ÍÁÊ", "ÉÀÎØ", "ÉÀÌØ", "Á×ÇÕÓÔ", "ÓÅÎÔÑÂÒØ", "ÏËÔÑÂÒØ", "ÎÏÑÂÒØ", "ÄÅËÁÂÒØ"