[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/common/src/FormatMasks BaseMask.py DateMas...
From: |
Arturas Kriukovas |
Subject: |
gnue/common/src/FormatMasks BaseMask.py DateMas... |
Date: |
Mon, 15 Jul 2002 04:22:02 -0400 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Arturas Kriukovas <address@hidden> 02/07/15 04:22:02
Modified files:
common/src/FormatMasks: BaseMask.py DateMask.py NumberMask.py
TextMask.py
Log message:
Some code optimizations for i18n.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/FormatMasks/BaseMask.py.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/FormatMasks/DateMask.py.diff?tr1=1.22&tr2=1.23&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/FormatMasks/NumberMask.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/FormatMasks/TextMask.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
Patches:
Index: gnue/common/src/FormatMasks/BaseMask.py
diff -c gnue/common/src/FormatMasks/BaseMask.py:1.15
gnue/common/src/FormatMasks/BaseMask.py:1.16
*** gnue/common/src/FormatMasks/BaseMask.py:1.15 Mon May 6 12:50:44 2002
--- gnue/common/src/FormatMasks/BaseMask.py Mon Jul 15 04:22:02 2002
***************
*** 29,34 ****
--- 29,100 ----
from gnue.common import GDebug
from FormatExceptions import *
+ # TODO: i18n
+ # import locale
+ # locale.nl_langinfo( option)
+ #
+ # Return some locale-specific information as a string. This function is
+ # not available on all systems, and the set of possible options might
+ # also vary across platforms. The possible argument values are numbers,
+ # for which symbolic constants are available in the locale module.
+ #
+ # DAY_1 ... DAY_7
+ # Return name of the n-th day of the week.
+ #
+ # ABDAY_1 ... ABDAY_7
+ # Return abbreviated name of the n-th day of the week.
+ #
+ # MON_1 ... MON_12
+ # Return name of the n-th month.
+ #
+ # ABMON_1 ... ABMON_12
+ # Return abbreviated name of the n-th month.
+
+ monthNames = [_('January'),
+ _('February'),
+ _('March'),
+ _('April'),
+ _('May'),
+ _('June'),
+ _('July'),
+ _('August'),
+ _('September'),
+ _('October'),
+ _('November'),
+ _('December')]
+
+ monthAbbrevNames = [_('Jan'),
+ _('Feb'),
+ _('Mar'),
+ _('Apr'),
+ _('May'),
+ _('Jun'),
+ _('Jul'),
+ _('Aug'),
+ _('Sep'),
+ _('Oct'),
+ _('Nov'),
+ _('Dec')]
+
+ weekdayNames = [_('Sunday'),
+ _('Monday'),
+ _('Tuesday'),
+ _('Wednesday'),
+ _('Thursday'),
+ _('Friday'),
+ _('Saturday')]
+
+ weekdayAbbrevNames = [_('Sun'),
+ _('Mon'),
+ _('Tue'),
+ _('Wed'),
+ _('Thu'),
+ _('Fri'),
+ _('Sat')]
+
+ predefinedDateLiterals = "-./: ,"
+
+
# This is a class for a mask literal element
class Literal:
def __init__(self, literal):
Index: gnue/common/src/FormatMasks/DateMask.py
diff -c gnue/common/src/FormatMasks/DateMask.py:1.22
gnue/common/src/FormatMasks/DateMask.py:1.23
*** gnue/common/src/FormatMasks/DateMask.py:1.22 Mon May 6 22:27:04 2002
--- gnue/common/src/FormatMasks/DateMask.py Mon Jul 15 04:22:02 2002
***************
*** 58,111 ****
from gnue.common.GDateTime import GDateTime, InvalidDate
from FormatExceptions import *
- # TODO: This is obviously not Internationalized!
- # TODO (after some time...): will have to check whether it works...
- monthNames = [ _('January'),
- _('February'),
- _('March'),
- _('April'),
- _('May'),
- _('June'),
- _('July'),
- _('August'),
- _('September'),
- _('October'),
- _('November'),
- _('December')]
-
- monthAbbrevNames = [_('Jan'),
- _('Feb'),
- _('Mar'),
- _('Apr'),
- _('May'),
- _('Jun'),
- _('Jul'),
- _('Aug'),
- _('Sep'),
- _('Oct'),
- _('Nov'),
- _('Dec')]
-
- weekdayNames = [_('Sunday'),
- _('Monday'),
- _('Tuesday'),
- _('Wednesday'),
- _('Thursday'),
- _('Friday'),
- _('Saturday')]
-
- weekdayAbbrevNames = [_('Sun'),
- _('Mon'),
- _('Tue'),
- _('Wed'),
- _('Thu'),
- _('Fri'),
- _('Sat')]
-
-
- predefinedDateLiterals = "-./: ,"
-
-
class DateLiteral (Literal):
def addSelfToDate(self, value, date):
pass
--- 58,63 ----
Index: gnue/common/src/FormatMasks/NumberMask.py
diff -c gnue/common/src/FormatMasks/NumberMask.py:1.2
gnue/common/src/FormatMasks/NumberMask.py:1.3
*** gnue/common/src/FormatMasks/NumberMask.py:1.2 Mon May 6 12:50:44 2002
--- gnue/common/src/FormatMasks/NumberMask.py Mon Jul 15 04:22:02 2002
***************
*** 56,109 ****
from gnue.common.GDateTime import GDateTime, InvalidDate
from FormatExceptions import *
- # TODO: This is obviously not Internationalized!
- # TODO (after some time): this should go...
- monthNames = [_('January'),
- _('February'),
- _('March'),
- _('April'),
- _('May'),
- _('June'),
- _('July'),
- _('August'),
- _('September'),
- _('October'),
- _('November'),
- _('December')]
-
- monthAbbrevNames = [_('Jan'),
- _('Feb'),
- _('Mar'),
- _('Apr'),
- _('May'),
- _('Jun'),
- _('Jul'),
- _('Aug'),
- _('Sep'),
- _('Oct'),
- _('Nov'),
- _('Dec')]
-
- weekdayNames = [_('Sunday'),
- _('Monday'),
- _('Tuesday'),
- _('Wednesday'),
- _('Thursday'),
- _('Friday'),
- _('Saturday')]
-
- weekdayAbbrevNames = [_('Sun'),
- _('Mon'),
- _('Tue'),
- _('Wed'),
- _('Thu'),
- _('Fri'),
- _('Sat')]
-
-
- predefinedDateLiterals = "-./: ,"
-
-
class DateLiteral (Literal):
def addSelfToDate(self, value, date):
pass
--- 56,61 ----
Index: gnue/common/src/FormatMasks/TextMask.py
diff -c gnue/common/src/FormatMasks/TextMask.py:1.3
gnue/common/src/FormatMasks/TextMask.py:1.4
*** gnue/common/src/FormatMasks/TextMask.py:1.3 Mon May 6 12:50:44 2002
--- gnue/common/src/FormatMasks/TextMask.py Mon Jul 15 04:22:02 2002
***************
*** 45,98 ****
from gnue.common.GDateTime import GDateTime, InvalidDate
from FormatExceptions import *
- # TODO: This is obviously not Internationalized!
- # TODO (after some time): ahhhh, again these....
- monthNames = [_('January'),
- _('February'),
- _('March'),
- _('April'),
- _('May'),
- _('June'),
- _('July'),
- _('August'),
- _('September'),
- _('October'),
- _('November'),
- _('December')]
-
- monthAbbrevNames = [_('Jan'),
- _('Feb'),
- _('Mar'),
- _('Apr'),
- _('May'),
- _('Jun'),
- _('Jul'),
- _('Aug'),
- _('Sep'),
- _('Oct'),
- _('Nov'),
- _('Dec')]
-
- weekdayNames = [_('Sunday'),
- _('Monday'),
- _('Tuesday'),
- _('Wednesday'),
- _('Thursday'),
- _('Friday'),
- _('Saturday')]
-
- weekdayAbbrevNames = [_('Sun'),
- _('Mon'),
- _('Tue'),
- _('Wed'),
- _('Thu'),
- _('Fri'),
- _('Sat')]
-
-
- predefinedDateLiterals = "-./: ,"
-
-
class DateLiteral (Literal):
def addSelfToDate(self, value, date):
pass
--- 45,50 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/common/src/FormatMasks BaseMask.py DateMas...,
Arturas Kriukovas <=