コード例 #1
0
def produce():
    
    #logging.info('start')
    first_update()
    obj = tvslist_updating.mysql_loging()
    obj.tvsou_update_log      
    catalog.update()
    update_catalog()
コード例 #2
0
ファイル: __init__.py プロジェクト: thraxil/gtreed
 def google_translate(self,code,from_lang,to_lang,args):
     path = os.path.join(self.locales_directory(),code,'LC_MESSAGES','messages.po')
     for arg in args:
         if not 'text_' in arg: continue
         msg_id = args[arg]
         msg_id = msg_id.decode('utf-8')
         translated = turbogears.i18n.utils.google_translate(from_lang,to_lang,msg_id)
         translated = translated.encode('utf-8')
         catalog.update(path,msg_id,translated)
コード例 #3
0
 def google_translate(self, code, from_lang, to_lang, args):
     path = os.path.join(self.locales_directory(),
         code, 'LC_MESSAGES', 'messages.po')
     for arg in args:
         if not 'text_' in arg:
             continue
         msg_id = args[arg].strip()
         if '\r' in msg_id:
             msg_id = '\n'.join(msg_id.splitlines())
         translated = i18n.utils.google_translate(
                 from_lang, to_lang, msg_id)
         catalog.update(path, msg_id, translated)
コード例 #4
0
 def UpdateCatalog(self, request, context):
     logging.info("=========================[%s]", request.description)
     logging.info("=========================[%s]", request.name)
     return catalog.update(self.client, context, request.old_name,
                           request.name, request.description)
コード例 #5
0
ファイル: __init__.py プロジェクト: thraxil/gtreed
    def update_catalog(self,code,msg_id,msg_text):
        path = os.path.join(self.locales_directory(),code,'LC_MESSAGES','messages.po')
        catalog.update(path,msg_id,msg_text)

        return 'ok'
コード例 #6
0
 def UpdateCatalog(self, request, context):
     logging.info("=========================[%s]", request.description)
     logging.info("=========================[%s]", request.name)
     return catalog.update(self.client, context, request.old_name,
                           request.name, request.description)
コード例 #7
0
 def update_catalog(self, code, msg_id, msg_text):
     path = os.path.join(self.locales_directory(),
             code, 'LC_MESSAGES', 'messages.po')
     catalog.update(path, msg_id, msg_text)
     return 'ok'