From 2da2bcdeac40040d9fb1ad8045144e77c830b0e9 Mon Sep 17 00:00:00 2001 From: Anthony Fok Date: Thu, 5 Mar 2015 16:57:46 -0800 Subject: [PATCH] implement both "traditional" and "simplfied" Chinese -- partial --- po/check_po | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/po/check_po b/po/check_po index d60cbec52..3384ead54 100755 --- a/po/check_po +++ b/po/check_po @@ -184,11 +184,19 @@ class Check_last_char( Check ): def __process( self, msg, msgid, msgstr ): msgid_last = msgid[-1:] - msgstr_last = msgstr[-1:] + msgstr_last = unicode(msgstr, encoding='utf-8')[-1:] if msgid_last.isspace() != msgstr_last.isspace(): self.msgs.append( msg ) - elif (msgid_last == '.') != (msgstr_last == '.'): + elif (msgid_last == '.') != (msgstr_last == '.' or + msgstr_last == u'\u3002' ): # Chinese self.msgs.append( msg ) + elif (msgid_last == ':') != (msgstr_last == ':' or + msgstr_last == u'\uff1a' ): # Chinese + self.msgs.append( msg ) + elif (msgid_last == ')') != (msgstr_last == ')' or + msgstr_last == u'\uff09' ): # Chinese + self.msgs.append( msg ) + def process( self, msg ): # Last character of msgid? White space? Period?