7573: implement both "traditional" and "simplified" Chinese

(With thanks to YH Tan, who provided the translations for both
the date handlers, as well as this early-prototype zh_TW.po)
This commit is contained in:
Paul Franklin 2014-06-26 11:24:36 -07:00
parent 65dbb1bd46
commit 9c8cf267e6
7 changed files with 31542 additions and 366 deletions

View File

@ -62,6 +62,8 @@ from . import _date_sl
from . import _date_sr from . import _date_sr
from . import _date_sv from . import _date_sv
from . import _date_uk from . import _date_uk
from . import _date_zh_CN
from . import _date_zh_TW
# Initialize global parser # Initialize global parser
try: try:

View File

@ -26,7 +26,7 @@
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
""" """
Chinese-specific classes for parsing and displaying dates. Simplified-Chinese-specific classes for parsing and displaying dates.
""" """
from __future__ import unicode_literals from __future__ import unicode_literals
import re import re
@ -44,24 +44,20 @@ from ._datehandler import register_datehandler
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
# Chinese parser # Simplified-Chinese parser
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class DateParserZH(DateParser): class DateParserZH_CN(DateParser):
""" """
Convert a text string into a Date object. If the date cannot be Convert a text string into a Date object. If the date cannot be
converted, the text string is assigned. converted, the text string is assigned.
""" """
# translate english strings into chinese # modifiers before the date
modifier_to_int = { modifier_to_int = {
'before' : Date.MOD_BEFORE, 'bef' : Date.MOD_BEFORE, '以前' : Date.MOD_BEFORE,
'bef.' : Date.MOD_BEFORE, 'after' : Date.MOD_AFTER, '以后' : Date.MOD_AFTER,
'aft' : Date.MOD_AFTER, 'aft.' : Date.MOD_AFTER, '大约' : Date.MOD_ABOUT,
'about' : Date.MOD_ABOUT, 'abt.' : Date.MOD_ABOUT,
'abt' : Date.MOD_ABOUT, 'circa' : Date.MOD_ABOUT,
'c.' : Date.MOD_ABOUT, 'around' : Date.MOD_ABOUT,
} }
month_to_int = DateParser.month_to_int month_to_int = DateParser.month_to_int
@ -94,97 +90,82 @@ class DateParserZH(DateParser):
month_to_int["假閏"] = 13 month_to_int["假閏"] = 13
month_to_int["jiǎ rùn yùe"] = 13 month_to_int["jiǎ rùn yùe"] = 13
# translate english strings into chinese
calendar_to_int = { calendar_to_int = {
'gregorian' : Date.CAL_GREGORIAN, '阳历' : Date.CAL_GREGORIAN,
'g' : Date.CAL_GREGORIAN, 'g' : Date.CAL_GREGORIAN,
'julian' : Date.CAL_JULIAN, '儒略历' : Date.CAL_JULIAN,
'j' : Date.CAL_JULIAN, 'j' : Date.CAL_JULIAN,
'hebrew' : Date.CAL_HEBREW, '希伯来历' : Date.CAL_HEBREW,
'h' : Date.CAL_HEBREW, 'h' : Date.CAL_HEBREW,
'islamic' : Date.CAL_ISLAMIC, '伊斯兰历' : Date.CAL_ISLAMIC,
'i' : Date.CAL_ISLAMIC, 'i' : Date.CAL_ISLAMIC,
'french' : Date.CAL_FRENCH, '法国共和历' : Date.CAL_FRENCH,
'french republican': Date.CAL_FRENCH,
'f' : Date.CAL_FRENCH, 'f' : Date.CAL_FRENCH,
'persian' : Date.CAL_PERSIAN, '伊郎历' : Date.CAL_PERSIAN,
'p' : Date.CAL_PERSIAN, 'p' : Date.CAL_PERSIAN,
'swedish' : Date.CAL_SWEDISH, '瑞典历' : Date.CAL_SWEDISH,
's' : Date.CAL_SWEDISH, 's' : Date.CAL_SWEDISH,
} }
# translate english strings into chinese
quality_to_int = { quality_to_int = {
'estimated' : Date.QUAL_ESTIMATED, '据估计' : Date.QUAL_ESTIMATED,
'est.' : Date.QUAL_ESTIMATED, '据计算' : Date.QUAL_CALCULATED,
'est' : Date.QUAL_ESTIMATED,
'calc.' : Date.QUAL_CALCULATED,
'calc' : Date.QUAL_CALCULATED,
'calculated' : Date.QUAL_CALCULATED,
} }
# translate english strings into chinese # FIXME translate these English strings into simplified-Chinese ones
bce = ["before calendar", "negative year"] + DateParser.bce bce = ["before calendar", "negative year"] + DateParser.bce
def init_strings(self): def init_strings(self):
""" """
This method compiles regular expression strings for matching dates. This method compiles regular expression strings for matching dates.
Most of the re's in most languages can stay as is. span and range
most likely will need to change. Whatever change is done, this method
may be called first as DateParser.init_strings(self) so that the
invariant expresions don't need to be repeteadly coded. All differences
can be coded after DateParser.init_strings(self) call, that way they
override stuff from this method. See DateParserRU() as an example.
""" """
DateParser.init_strings(self) DateParser.init_strings(self)
_span_1 = ['']
# day: 日 ; month : 月 ; year : 年 _span_2 = ['']
_range_1 = ['介于']
# See DateParser class; translate english strings (from/to, between/and) into chinese _range_2 = ['']
# do not translate <start> and <stop> self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
('|'.join(_span_1), '|'.join(_span_2)),
self._span = re.compile("(from)\s+(?P<start>.+)\s+to\s+(?P<stop>.+)", re.IGNORECASE)
re.IGNORECASE) self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
self._range = re.compile("(bet|bet.|between)\s+(?P<start>.+)\s+and\s+(?P<stop>.+)", ('|'.join(_range_1), '|'.join(_range_2)),
re.IGNORECASE) re.IGNORECASE)
#def _parse_lunisolar(self, date_val=text):
#text = text.strip() # otherwise spaces can make it a bad date
#date = Date(self._qual_str, self._mod_str, self._cal_str, text, self._ny_str)
#return unicode(text)
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
# Chinese display # Simplified-Chinese display
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class DateDisplayZH(DateDisplay): class DateDisplayZH_CN(DateDisplay):
""" """
Chinese language date display class. Simplified-Chinese language date display class.
""" """
# translate english strings into chinese # this is used to display the 12 gregorian months
long_months = ( "", "正月", "二月", "三月", "四月", "五月",
long_months = ( "", "January", "February", "March", "April", "May", "六月", "七月", "八月", "九月", "十月",
"June", "July", "August", "September", "October", "十一月", "十二月" )
"November", "December" )
short_months = ( "", "Jan", "Feb", "Mar", "Apr", "May", "Jun", short_months = ( "", "一月", "二月", "三月", "四月", "五月", "六月",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ) "七月", "八月", "九月", "十月", "十一月", "十二月" )
formats = (
"年年年年-月月-日日 (ISO)", "数字格式", "月 日,年",
"月 日,年", "日 月 年", "日 月 年",
)
# this must agree with DateDisplayEn's "formats" definition
# (since no locale-specific _display_gregorian exists, here)
calendar = ( calendar = (
"", "Julian", "Hebrew", "French Republican", "", "儒略历", "希伯来历", "法国共和历",
"Persian", "Islamic", "Swedish" "伊郎历", "伊斯兰历", "瑞典历"
) )
_mod_str = ("", "before ", "after ", "around ", "", "", "") _mod_str = ("", "以前 ", "以后 ", "大约 ", "", "", "")
_qual_str = ("", "estimated ", "calculated ", "") _qual_str = ("", "据估计 ", "据计算 ", "")
# FIXME translate these English strings into simplified-Chinese ones
_bce_str = "%s B.C.E." _bce_str = "%s B.C.E."
@ -192,7 +173,6 @@ class DateDisplayZH(DateDisplay):
""" """
Return a text string representing the date. Return a text string representing the date.
""" """
mod = date.get_modifier() mod = date.get_modifier()
cal = date.get_calendar() cal = date.get_calendar()
qual = date.get_quality() qual = date.get_quality()
@ -206,45 +186,27 @@ class DateDisplayZH(DateDisplay):
elif start == Date.EMPTY: elif start == Date.EMPTY:
return "" return ""
elif mod == Date.MOD_SPAN: elif mod == Date.MOD_SPAN:
date1 = self.display_cal[cal](start) d1 = self.display_cal[cal](start)
date2 = self.display_cal[cal](date.get_stop_date()) d2 = self.display_cal[cal](date.get_stop_date())
scal = self.format_extras(cal, newyear) scal = self.format_extras(cal, newyear)
# translate english strings into chinese return "%s%s %s %s %s%s" % (qual_str, '', d1, '', d2, scal)
return "%s%s %s %s %s%s" % (qual_str, 'from', date1, 'to',
date2, scal)
elif mod == Date.MOD_RANGE: elif mod == Date.MOD_RANGE:
date1 = self.display_cal[cal](start) d1 = self.display_cal[cal](start)
date2 = self.display_cal[cal](date.get_stop_date()) d2 = self.display_cal[cal](date.get_stop_date())
scal = self.format_extras(cal, newyear) scal = self.format_extras(cal, newyear)
# translate english strings into chinese return "%s%s %s %s %s%s之间" % (qual_str, '介于', d1, '',
return "%s%s %s %s %s%s" % (qual_str, 'between', date1, 'and', d2, scal)
date2, scal)
else: else:
text = self.display_cal[date.get_calendar()](start) text = self.display_cal[date.get_calendar()](start)
scal = self.format_extras(cal, newyear) scal = self.format_extras(cal, newyear)
return "%s%s%s%s" % (qual_str, (self._mod_str)[mod], text, return "%s%s%s%s" % (qual_str, (self._mod_str)[mod], text,
scal) scal)
#def _display_chinese(self, date_val):
#self._tformat = '%Y年%m月%d日'
#year = self._slash_year(date_val[2], date_val[3])
#if date_val[3]:
#return self.display_iso(date_val)
#else:
#if date_val[0] == date_val[1] == 0:
#value = u'%Y年' % date_val[2]
#else:
#value = self._tformat.replace('%m月', str(self.lunisolar[date_val[1]]))
#value = u'%m月' % date_val[1]
#value = u'%d日' % date_val[0]
#value = u'%Y年' % date_val[2]
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
# Register classes # Register classes
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
register_datehandler(('zh_CN', 'zh_TW', 'zh_SG', 'zh_HK', 'zh', 'chinese', 'Chinese'), register_datehandler(('zh_CN', 'zh_SG', 'zh', 'chinese', 'Chinese'),
DateParserZH, DateDisplayZH) DateParserZH_CN, DateDisplayZH_CN)

View File

@ -0,0 +1,212 @@
# -*- coding: utf-8 -*-
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2004-2006 Donald N. Allingham
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#-------------------------------------------------------------------------
#
# Python modules
#
#-------------------------------------------------------------------------
"""
Traditional-Chinese-specific classes for parsing and displaying dates.
"""
from __future__ import unicode_literals
import re
#-------------------------------------------------------------------------
#
# GRAMPS modules
#
#-------------------------------------------------------------------------
from ..lib.date import Date
from ._dateparser import DateParser
from ._datedisplay import DateDisplay
from ._datehandler import register_datehandler
#-------------------------------------------------------------------------
#
# Traditional-Chinese parser
#
#-------------------------------------------------------------------------
class DateParserZH_TW(DateParser):
"""
Convert a text string into a Date object. If the date cannot be
converted, the text string is assigned.
"""
# modifiers before the date
modifier_to_int = {
'以前' : Date.MOD_BEFORE,
'以後' : Date.MOD_AFTER,
'大約' : Date.MOD_ABOUT,
}
month_to_int = DateParser.month_to_int
month_to_int[""] = 1
month_to_int[""] = 1
month_to_int["zhēngyuè"] = 1
month_to_int[""] = 2
month_to_int["èryuè"] = 2
month_to_int[""] = 3
month_to_int["sānyuè"] = 3
month_to_int[""] = 4
month_to_int["sìyuè"] = 4
month_to_int[""] = 5
month_to_int["wǔyuè"] = 5
month_to_int[""] = 6
month_to_int["liùyuè"] = 6
month_to_int[""] = 7
month_to_int["qīyuè"] = 7
month_to_int[""] = 8
month_to_int["bāyuè"] = 8
month_to_int[""] = 9
month_to_int["jiǔyuè"] = 9
month_to_int[""] = 10
month_to_int["shíyuè"] = 10
month_to_int["十一"] = 11
month_to_int["shíyīyuè"] = 11
month_to_int["十二"] = 12
month_to_int["shí'èryuè"] = 12
month_to_int["假閏"] = 13
month_to_int["jiǎ rùn yùe"] = 13
calendar_to_int = {
'陽曆' : Date.CAL_GREGORIAN,
'g' : Date.CAL_GREGORIAN,
'儒略曆' : Date.CAL_JULIAN,
'j' : Date.CAL_JULIAN,
'希伯來歷' : Date.CAL_HEBREW,
'h' : Date.CAL_HEBREW,
'伊斯蘭曆' : Date.CAL_ISLAMIC,
'i' : Date.CAL_ISLAMIC,
'法國共和歷' : Date.CAL_FRENCH,
'f' : Date.CAL_FRENCH,
'伊郎歷' : Date.CAL_PERSIAN,
'p' : Date.CAL_PERSIAN,
'瑞典歷' : Date.CAL_SWEDISH,
's' : Date.CAL_SWEDISH,
}
quality_to_int = {
'據估計' : Date.QUAL_ESTIMATED,
'據計算' : Date.QUAL_CALCULATED,
}
# FIXME translate these English strings into traditional-Chinese ones
bce = ["before calendar", "negative year"] + DateParser.bce
def init_strings(self):
"""
This method compiles regular expression strings for matching dates.
"""
DateParser.init_strings(self)
_span_1 = ['']
_span_2 = ['']
_range_1 = ['介於']
_range_2 = ['']
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
('|'.join(_span_1), '|'.join(_span_2)),
re.IGNORECASE)
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
('|'.join(_range_1), '|'.join(_range_2)),
re.IGNORECASE)
#-------------------------------------------------------------------------
#
# Traditional-Chinese display
#
#-------------------------------------------------------------------------
class DateDisplayZH_TW(DateDisplay):
"""
Traditional-Chinese language date display class.
"""
# this is used to display the 12 gregorian months
long_months = ( "", "正月", "二月", "三月", "四月", "五月",
"六月", "七月", "八月", "九月", "十月",
"十一月", "十二月" )
short_months = ( "", "一月", "二月", "三月", "四月", "五月", "六月",
"七月", "八月", "九月", "十月", "十一月", "十二月" )
formats = (
"年年年年-月月-日日 (ISO)", "數字格式", "月 日,年",
"月 日,年", "日 月 年", "日 月 年"
)
# this must agree with DateDisplayEn's "formats" definition
# (since no locale-specific _display_gregorian exists, here)
calendar = (
"", "儒略曆", "希伯來歷", "法國共和歷",
"伊郎歷", "伊斯蘭曆", "瑞典歷"
)
_mod_str = ("", "以前 ", "以後 ", "大約 ", "", "", "")
_qual_str = ("", "據估計 ", "據計算 ", "")
# FIXME translate these English strings into traditional-Chinese ones
_bce_str = "%s B.C.E."
def display(self, date):
"""
Return a text string representing the date.
"""
mod = date.get_modifier()
cal = date.get_calendar()
qual = date.get_quality()
start = date.get_start_date()
newyear = date.get_new_year()
qual_str = (self._qual_str)[qual]
if mod == Date.MOD_TEXTONLY:
return date.get_text()
elif start == Date.EMPTY:
return ""
elif mod == Date.MOD_SPAN:
d1 = self.display_cal[cal](start)
d2 = self.display_cal[cal](date.get_stop_date())
scal = self.format_extras(cal, newyear)
return "%s%s %s %s %s%s" % (qual_str, '', d1, '', d2, scal)
elif mod == Date.MOD_RANGE:
d1 = self.display_cal[cal](start)
d2 = self.display_cal[cal](date.get_stop_date())
scal = self.format_extras(cal, newyear)
return "%s%s %s %s %s%s之間" % (qual_str, '介於', d1, '',
d2, scal)
else:
text = self.display_cal[date.get_calendar()](start)
scal = self.format_extras(cal, newyear)
return "%s%s%s%s" % (qual_str, (self._mod_str)[mod], text,
scal)
#-------------------------------------------------------------------------
#
# Register classes
#
#-------------------------------------------------------------------------
register_datehandler(('zh_TW', 'zh_HK'),
DateParserZH_TW, DateDisplayZH_TW)

View File

@ -84,10 +84,6 @@ LANG_TO_DISPLAY = {
'en' : DateDisplayEn, 'en' : DateDisplayEn,
'en_GB' : DateDisplayEn, 'en_GB' : DateDisplayEn,
'English_United States' : DateDisplayEn, 'English_United States' : DateDisplayEn,
'zh_CN' : DateDisplay,
'zh_TW' : DateDisplay,
'zh_SG' : DateDisplay,
'zh_HK' : DateDisplay,
'ja_JP' : DateDisplay, 'ja_JP' : DateDisplay,
'ko_KR' : DateDisplay, 'ko_KR' : DateDisplay,
'nb_NO' : DateDisplay, 'nb_NO' : DateDisplay,

View File

@ -1,5 +1,4 @@
# Chinese (PRC) translation for Gramps # Chinese (simplified) translation for Gramps
# $Id$
# This file is distributed under the same license as the Gramps package. # This file is distributed under the same license as the Gramps package.
# Copyright (C) YEAR ORGANIZATION # Copyright (C) YEAR ORGANIZATION
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
@ -1140,41 +1139,6 @@ msgstr ""
msgid "Date displayer for '%s' not available, using default" msgid "Date displayer for '%s' not available, using default"
msgstr "" msgstr ""
#. format 0 - must always be ISO
#: ../gramps/gen/datehandler/_datedisplay.py:62
msgid "YYYY-MM-DD (ISO)"
msgstr ""
#. format # 1 - must always be locale-preferred numerical format
#. such as YY.MM.DD, MM-DD-YY, or whatever your locale prefers.
#. This should be the format that is used under the locale by
#. strftime() for '%x'.
#. You may translate this string as "Numerical", "System preferred", or similar.
#: ../gramps/gen/datehandler/_datedisplay.py:69
#, fuzzy
msgid "date format|Numerical"
msgstr "日期格式"
#. Full month name, day, year
#: ../gramps/gen/datehandler/_datedisplay.py:72
msgid "Month Day, Year"
msgstr ""
#. Abbreviated month name, day, year
#: ../gramps/gen/datehandler/_datedisplay.py:75
msgid "MON DAY, YEAR"
msgstr ""
#. Day, full month name, year
#: ../gramps/gen/datehandler/_datedisplay.py:78
#, fuzzy
msgid "Day Month Year"
msgstr "一年中的一天"
#. Day, abbreviated month name, year
#: ../gramps/gen/datehandler/_datedisplay.py:81
msgid "DAY MON YEAR"
msgstr ""
#. TRANSLATORS: see #. TRANSLATORS: see
#. http://gramps-project.org/wiki/index.php?title=Translating_Gramps#Translating_dates #. http://gramps-project.org/wiki/index.php?title=Translating_Gramps#Translating_dates
@ -1285,9 +1249,6 @@ msgstr ""
msgid "to-date|" msgid "to-date|"
msgstr "日期" msgstr "日期"
#: ../gramps/gen/datehandler/_datedisplay.py:348
msgid "{date_quality}from {date_start} to {date_stop}{nonstd_calendar_and_ny}"
msgstr ""
#. If there is no special inflection for "between <Month>" in your #. If there is no special inflection for "between <Month>" in your
#. language, don't translate this string. #. language, don't translate this string.
@ -1309,9 +1270,6 @@ msgstr "在...之间"
msgid "and-date|" msgid "and-date|"
msgstr "日期" msgstr "日期"
#: ../gramps/gen/datehandler/_datedisplay.py:370
msgid "{date_quality}between {date_start} and {date_stop}{nonstd_calendar_and_ny}"
msgstr ""
#. If there is no special inflection for "before/after/around <Month>" in your #. If there is no special inflection for "before/after/around <Month>" in your
#. language, don't translate this string. #. language, don't translate this string.
@ -1361,146 +1319,6 @@ msgstr ""
msgid "today" msgid "today"
msgstr "" msgstr ""
# zhēngyuè, 一
#. TRANSLATORS: see
#. http://gramps-project.org/wiki/index.php?title=Translating_Gramps#Translating_dates
#. to learn how to select proper inflection to be used in your localized
#. DateDisplayer code!
#: ../gramps/gen/datehandler/_datestrings.py:65
msgid "localized lexeme inflections||January"
msgstr "正"
# èryuè
#: ../gramps/gen/datehandler/_datestrings.py:66
msgid "localized lexeme inflections||February"
msgstr "二"
# sānyuè
#: ../gramps/gen/datehandler/_datestrings.py:67
msgid "localized lexeme inflections||March"
msgstr "三"
# sìyuè
#: ../gramps/gen/datehandler/_datestrings.py:68
msgid "localized lexeme inflections||April"
msgstr "四"
# wǔyuè
#: ../gramps/gen/datehandler/_datestrings.py:69
msgid "localized lexeme inflections||May"
msgstr "五"
# liùyuè
#: ../gramps/gen/datehandler/_datestrings.py:70
msgid "localized lexeme inflections||June"
msgstr "六"
# qīyuè
#: ../gramps/gen/datehandler/_datestrings.py:71
msgid "localized lexeme inflections||July"
msgstr "七"
# bāyuè
#: ../gramps/gen/datehandler/_datestrings.py:72
msgid "localized lexeme inflections||August"
msgstr "八"
# jiǔyuè
#: ../gramps/gen/datehandler/_datestrings.py:73
msgid "localized lexeme inflections||September"
msgstr "九"
# shíyuè
#: ../gramps/gen/datehandler/_datestrings.py:74
msgid "localized lexeme inflections||October"
msgstr "十"
# shíyīyuè
#: ../gramps/gen/datehandler/_datestrings.py:75
msgid "localized lexeme inflections||November"
msgstr "十一"
# shí'èryuè
#: ../gramps/gen/datehandler/_datestrings.py:76
msgid "localized lexeme inflections||December"
msgstr "十二"
# liùyuè
#. TRANSLATORS: see
#. http://gramps-project.org/wiki/index.php?title=Translating_Gramps#Translating_dates
#. to learn how to select proper inflection to be used in your localized
#. DateDisplayer code!
#: ../gramps/gen/datehandler/_datestrings.py:83
#, fuzzy
msgid "localized lexeme inflections - short month form||Jan"
msgstr "六"
# èryuè
#: ../gramps/gen/datehandler/_datestrings.py:84
#, fuzzy
msgid "localized lexeme inflections - short month form||Feb"
msgstr "二"
# sānyuè
#: ../gramps/gen/datehandler/_datestrings.py:85
#, fuzzy
msgid "localized lexeme inflections - short month form||Mar"
msgstr "三"
# sìyuè
#: ../gramps/gen/datehandler/_datestrings.py:86
#, fuzzy
msgid "localized lexeme inflections - short month form||Apr"
msgstr "四"
# wǔyuè
#: ../gramps/gen/datehandler/_datestrings.py:87
#, fuzzy
msgid "localized lexeme inflections - short month form||May"
msgstr "五"
# liùyuè
#: ../gramps/gen/datehandler/_datestrings.py:88
#, fuzzy
msgid "localized lexeme inflections - short month form||Jun"
msgstr "六"
# qīyuè
#: ../gramps/gen/datehandler/_datestrings.py:89
#, fuzzy
msgid "localized lexeme inflections - short month form||Jul"
msgstr "七"
# bāyuè
#: ../gramps/gen/datehandler/_datestrings.py:90
#, fuzzy
msgid "localized lexeme inflections - short month form||Aug"
msgstr "八"
# jiǔyuè
#: ../gramps/gen/datehandler/_datestrings.py:91
#, fuzzy
msgid "localized lexeme inflections - short month form||Sep"
msgstr "九"
# shíyuè
#: ../gramps/gen/datehandler/_datestrings.py:92
#, fuzzy
msgid "localized lexeme inflections - short month form||Oct"
msgstr "十"
# shíyīyuè
#: ../gramps/gen/datehandler/_datestrings.py:93
#, fuzzy
msgid "localized lexeme inflections - short month form||Nov"
msgstr "十一"
# shí'èryuè
#: ../gramps/gen/datehandler/_datestrings.py:94
#, fuzzy
msgid "localized lexeme inflections - short month form||Dec"
msgstr "十二"
#. TRANSLATORS: see #. TRANSLATORS: see
#. http://gramps-project.org/wiki/index.php?title=Translating_Gramps#Translating_dates #. http://gramps-project.org/wiki/index.php?title=Translating_Gramps#Translating_dates
#. to learn how to add proper alternatives to be recognized in your localized #. to learn how to add proper alternatives to be recognized in your localized
@ -1565,35 +1383,6 @@ msgstr "用于十一月的笔记"
msgid "alternative month names for December||" msgid "alternative month names for December||"
msgstr "用于十二月的笔记" msgstr "用于十二月的笔记"
#. Must appear in the order indexed by Date.CAL_... numeric constants
#: ../gramps/gen/datehandler/_datestrings.py:117 ../gramps/gen/lib/date.py:590
msgid "calendar|Gregorian"
msgstr "阳历"
#: ../gramps/gen/datehandler/_datestrings.py:118 ../gramps/gen/lib/date.py:591
msgid "calendar|Julian"
msgstr "儒略历"
#: ../gramps/gen/datehandler/_datestrings.py:119 ../gramps/gen/lib/date.py:592
msgid "calendar|Hebrew"
msgstr "希伯来日历"
#: ../gramps/gen/datehandler/_datestrings.py:120 ../gramps/gen/lib/date.py:593
msgid "calendar|French Republican"
msgstr "法属圭亚那日历"
#: ../gramps/gen/datehandler/_datestrings.py:121 ../gramps/gen/lib/date.py:594
msgid "calendar|Persian"
msgstr "波斯日历"
#: ../gramps/gen/datehandler/_datestrings.py:122 ../gramps/gen/lib/date.py:595
msgid "calendar|Islamic"
msgstr "伊斯兰历"
#: ../gramps/gen/datehandler/_datestrings.py:123 ../gramps/gen/lib/date.py:596
msgid "calendar|Swedish"
msgstr "瑞典日历"
#. TRANSLATORS: see #. TRANSLATORS: see
#. http://gramps-project.org/wiki/index.php?title=Translating_Gramps#Translating_dates #. http://gramps-project.org/wiki/index.php?title=Translating_Gramps#Translating_dates
#. to learn how to select proper inflection to be used in your localized #. to learn how to select proper inflection to be used in your localized
@ -1810,58 +1599,6 @@ msgstr ""
msgid "Persian month lexeme|Esfand" msgid "Persian month lexeme|Esfand"
msgstr "" msgstr ""
#: ../gramps/gen/datehandler/_datestrings.py:209
msgid "date modifier|before "
msgstr ""
#: ../gramps/gen/datehandler/_datestrings.py:210
#, fuzzy
msgid "date modifier|after "
msgstr "上次修订"
#: ../gramps/gen/datehandler/_datestrings.py:211
#, fuzzy
msgid "date modifier|about "
msgstr "上次修订"
#: ../gramps/gen/datehandler/_datestrings.py:215
#, fuzzy
msgid "date quality|estimated "
msgstr "添加估算日期"
#: ../gramps/gen/datehandler/_datestrings.py:216
msgid "date quality|calculated "
msgstr ""
#: ../gramps/gen/datehandler/_datestrings.py:222
msgid "Sunday"
msgstr ""
#: ../gramps/gen/datehandler/_datestrings.py:223
#, fuzzy
msgid "Monday"
msgstr "次要的"
#: ../gramps/gen/datehandler/_datestrings.py:224
msgid "Tuesday"
msgstr ""
#: ../gramps/gen/datehandler/_datestrings.py:225
msgid "Wednesday"
msgstr ""
#: ../gramps/gen/datehandler/_datestrings.py:226
msgid "Thursday"
msgstr ""
#: ../gramps/gen/datehandler/_datestrings.py:227
msgid "Friday"
msgstr ""
#: ../gramps/gen/datehandler/_datestrings.py:228
msgid "Saturday"
msgstr ""
#: ../gramps/gen/db/base.py:1635 #: ../gramps/gen/db/base.py:1635
msgid "Add child to family" msgid "Add child to family"
msgstr "添加孩子到家庭" msgstr "添加孩子到家庭"
@ -31404,6 +31141,254 @@ msgstr "至少一条规则必须满足"
msgid "Exactly one rule must apply" msgid "Exactly one rule must apply"
msgstr "至少一条规则必须满足" msgstr "至少一条规则必须满足"
#. format 0 - must always be ISO
#: ../gramps/gen/datehandler/_datedisplay.py:62
msgid "YYYY-MM-DD (ISO)"
msgstr "年年年年-月月-日日 (ISO)"
#. format # 1 - must always be locale-preferred numerical format
#. such as YY.MM.DD, MM-DD-YY, or whatever your locale prefers.
#. This should be the format that is used under the locale by
#. strftime() for '%x'.
#. You may translate this string as "Numerical", "System preferred", or similar.
#: ../gramps/gen/datehandler/_datedisplay.py:69
msgid "date format|Numerical"
msgstr "数字格式"
#. Full month name, day, year
#: ../gramps/gen/datehandler/_datedisplay.py:72
msgid "Month Day, Year"
msgstr "月 日,年"
#. Abbreviated month name, day, year
#: ../gramps/gen/datehandler/_datedisplay.py:75
msgid "MON DAY, YEAR"
msgstr "月 日,年"
#. Day, full month name, year
#: ../gramps/gen/datehandler/_datedisplay.py:78
msgid "Day Month Year"
msgstr "日 月 年"
#. Day, abbreviated month name, year
#: ../gramps/gen/datehandler/_datedisplay.py:81
msgid "DAY MON YEAR"
msgstr "日 月 年 "
#: ../gramps/gen/datehandler/_datedisplay.py:348
msgid "{date_quality}from {date_start} to {date_stop}{nonstd_calendar_and_ny}"
msgstr "{date_quality}自{date_start} 至{date_stop}{nonstd_calendar_and_ny}"
#: ../gramps/gen/datehandler/_datedisplay.py:370
msgid ""
"{date_quality}between {date_start} and {date_stop}{nonstd_calendar_and_ny}"
msgstr ""
"{date_quality}介于{date_start}与{date_stop}{nonstd_calendar_and_ny}之间"
# zhēngyuè, 一
#. TRANSLATORS: see
#. http://gramps-project.org/wiki/index.php?title=Translating_Gramps#Translating_dates
#. to learn how to select proper inflection to be used in your localized
#. DateDisplayer code!
#: ../gramps/gen/datehandler/_datestrings.py:65
msgid "localized lexeme inflections||January"
msgstr "正月"
# èryuè
#: ../gramps/gen/datehandler/_datestrings.py:66
msgid "localized lexeme inflections||February"
msgstr "二月"
# sānyuè
#: ../gramps/gen/datehandler/_datestrings.py:67
msgid "localized lexeme inflections||March"
msgstr "三月"
# sìyuè
#: ../gramps/gen/datehandler/_datestrings.py:68
msgid "localized lexeme inflections||April"
msgstr "四月"
# wǔyuè
#: ../gramps/gen/datehandler/_datestrings.py:69
msgid "localized lexeme inflections||May"
msgstr "五月"
# liùyuè
#: ../gramps/gen/datehandler/_datestrings.py:70
msgid "localized lexeme inflections||June"
msgstr "六月"
# qīyuè
#: ../gramps/gen/datehandler/_datestrings.py:71
msgid "localized lexeme inflections||July"
msgstr "七月"
# bāyuè
#: ../gramps/gen/datehandler/_datestrings.py:72
msgid "localized lexeme inflections||August"
msgstr "八月"
# jiǔyuè
#: ../gramps/gen/datehandler/_datestrings.py:73
msgid "localized lexeme inflections||September"
msgstr "九月"
# shíyuè
#: ../gramps/gen/datehandler/_datestrings.py:74
msgid "localized lexeme inflections||October"
msgstr "十月"
# shíyīyuè
#: ../gramps/gen/datehandler/_datestrings.py:75
msgid "localized lexeme inflections||November"
msgstr "十一月"
# shí'èryuè
#: ../gramps/gen/datehandler/_datestrings.py:76
msgid "localized lexeme inflections||December"
msgstr "十二月"
# liùyuè
#. TRANSLATORS: see
#. http://gramps-project.org/wiki/index.php?title=Translating_Gramps#Translating_dates
#. to learn how to select proper inflection to be used in your localized
#. DateDisplayer code!
#: ../gramps/gen/datehandler/_datestrings.py:83
msgid "localized lexeme inflections - short month form||Jan"
msgstr "一月"
# èryuè
#: ../gramps/gen/datehandler/_datestrings.py:84
msgid "localized lexeme inflections - short month form||Feb"
msgstr "二月"
# sānyuè
#: ../gramps/gen/datehandler/_datestrings.py:85
msgid "localized lexeme inflections - short month form||Mar"
msgstr "三月"
# sìyuè
#: ../gramps/gen/datehandler/_datestrings.py:86
msgid "localized lexeme inflections - short month form||Apr"
msgstr "四月"
# wǔyuè
#: ../gramps/gen/datehandler/_datestrings.py:87
msgid "localized lexeme inflections - short month form||May"
msgstr "五月"
# liùyuè
#: ../gramps/gen/datehandler/_datestrings.py:88
msgid "localized lexeme inflections - short month form||Jun"
msgstr "六月"
# qīyuè
#: ../gramps/gen/datehandler/_datestrings.py:89
msgid "localized lexeme inflections - short month form||Jul"
msgstr "七月"
# bāyuè
#: ../gramps/gen/datehandler/_datestrings.py:90
msgid "localized lexeme inflections - short month form||Aug"
msgstr "八月"
# jiǔyuè
#: ../gramps/gen/datehandler/_datestrings.py:91
msgid "localized lexeme inflections - short month form||Sep"
msgstr "九月"
# shíyuè
#: ../gramps/gen/datehandler/_datestrings.py:92
msgid "localized lexeme inflections - short month form||Oct"
msgstr "十月"
# shíyīyuè
#: ../gramps/gen/datehandler/_datestrings.py:93
msgid "localized lexeme inflections - short month form||Nov"
msgstr "十一月"
# shí'èryuè
#: ../gramps/gen/datehandler/_datestrings.py:94
msgid "localized lexeme inflections - short month form||Dec"
msgstr "十二月"
#. Must appear in the order indexed by Date.CAL_... numeric constants
#: ../gramps/gen/datehandler/_datestrings.py:117 ../gramps/gen/lib/date.py:590
msgid "calendar|Gregorian"
msgstr "阳历"
#: ../gramps/gen/datehandler/_datestrings.py:118 ../gramps/gen/lib/date.py:591
msgid "calendar|Julian"
msgstr "儒略历"
#: ../gramps/gen/datehandler/_datestrings.py:119 ../gramps/gen/lib/date.py:592
msgid "calendar|Hebrew"
msgstr "希伯来历"
#: ../gramps/gen/datehandler/_datestrings.py:120 ../gramps/gen/lib/date.py:593
msgid "calendar|French Republican"
msgstr "法国共和历"
#: ../gramps/gen/datehandler/_datestrings.py:121 ../gramps/gen/lib/date.py:594
msgid "calendar|Persian"
msgstr "伊郎历"
#: ../gramps/gen/datehandler/_datestrings.py:122 ../gramps/gen/lib/date.py:595
msgid "calendar|Islamic"
msgstr "伊斯兰历"
#: ../gramps/gen/datehandler/_datestrings.py:123 ../gramps/gen/lib/date.py:596
msgid "calendar|Swedish"
msgstr "瑞典历"
#: ../gramps/gen/datehandler/_datestrings.py:209
msgid "date modifier|before "
msgstr "以前 "
#: ../gramps/gen/datehandler/_datestrings.py:210
msgid "date modifier|after "
msgstr "以后 "
#: ../gramps/gen/datehandler/_datestrings.py:211
msgid "date modifier|about "
msgstr "大约 "
#: ../gramps/gen/datehandler/_datestrings.py:215
msgid "date quality|estimated "
msgstr "据估计 "
#: ../gramps/gen/datehandler/_datestrings.py:216
msgid "date quality|calculated "
msgstr "据计算 "
#: ../gramps/gen/datehandler/_datestrings.py:222
msgid "Sunday"
msgstr "星期天"
#: ../gramps/gen/datehandler/_datestrings.py:223
msgid "Monday"
msgstr "星期一"
#: ../gramps/gen/datehandler/_datestrings.py:224
msgid "Tuesday"
msgstr "星期二"
#: ../gramps/gen/datehandler/_datestrings.py:225
msgid "Wednesday"
msgstr "星期三"
#: ../gramps/gen/datehandler/_datestrings.py:226
msgid "Thursday"
msgstr "星期四"
#: ../gramps/gen/datehandler/_datestrings.py:227
msgid "Friday"
msgstr "星期五"
#: ../gramps/gen/datehandler/_datestrings.py:228
msgid "Saturday"
msgstr "星期六"
#~ msgid "State/Province:" #~ msgid "State/Province:"
#~ msgstr "州/省:" #~ msgstr "州/省:"

31018
po/zh_TW.po Normal file

File diff suppressed because it is too large Load Diff

View File

@ -49,9 +49,10 @@ import io
from gramps.version import VERSION from gramps.version import VERSION
import unittest import unittest
ALL_LINGUAS = ('ar', 'bg', 'ca', 'cs', 'da', 'de', 'el', 'en_GB', 'es', 'fi', 'fr', ALL_LINGUAS = ('ar', 'bg', 'ca', 'cs', 'da', 'de', 'el', 'en_GB', 'es',
'he', 'hr', 'hu', 'it', 'ja', 'lt', 'nb', 'nl', 'nn', 'pl', 'pt_BR', 'fi', 'fr', 'he', 'hr', 'hu', 'it', 'ja', 'lt', 'nb', 'nl',
'pt_PT', 'ru', 'sk', 'sl', 'sq', 'sv', 'uk', 'vi', 'zh_CN') 'nn', 'pl', 'pt_BR', 'pt_PT', 'ru', 'sk', 'sl', 'sq', 'sv',
'uk', 'vi', 'zh_CN', 'zh_TW')
INTLTOOL_FILES = ('data/tips.xml', 'gramps/plugins/lib/holidays.xml') INTLTOOL_FILES = ('data/tips.xml', 'gramps/plugins/lib/holidays.xml')
server = False server = False