From dcf7b2d52763ffbadb45d85c40d77be59778fec2 Mon Sep 17 00:00:00 2001 From: Kazuhiko Shiozaki <kazuhiko@nexedi.com> Date: Thu, 22 Jan 2009 14:07:52 +0000 Subject: [PATCH] 2009-01-22 Kazuhiko * ignore missing English term in exporting PO file from glossary. * escape double quotes and new lines correctly. * fix a typo. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25269 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../portal_skins/erp5_glossary/GlossaryModule_getPOFile.xml | 5 +++-- .../portal_skins/erp5_svn/BusinessTemplate_doSvnCommit.xml | 2 +- bt5/erp5_forge/bt/revision | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_getPOFile.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_getPOFile.xml index 19d3193959..a81404fade 100644 --- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_getPOFile.xml +++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_getPOFile.xml @@ -72,10 +72,10 @@ msgstr %s\n \n \n def format(string):\n - line_list = string.split(\'\\n\')\n + line_list = string.splitlines(True)\n length = len(line_list)\n if length==1:\n - return \'"%s"\' % string\n + return \'"%s"\' % string.replace(\'"\', \'\\\\"\').replace(\'\\n\', \'\\\\n\')\n else:\n return \'\\n\'.join([\'""\']+[format(i) for i in line_list])\n \n @@ -108,6 +108,7 @@ for i in catalog(portal_type=\'Glossary Term\',\n reference=reference,\n business_field_uid=term.getBusinessFieldUid())\n if english_term is None:\n + continue\n raise ValueError, \'Corresponding English term to "%s" does not exist in glossary.\' % term.Title()\n \n translated_title = term.getTitle()\n diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doSvnCommit.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doSvnCommit.xml index 4081ab0a4d..047a70ec37 100644 --- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doSvnCommit.xml +++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doSvnCommit.xml @@ -124,7 +124,7 @@ except SubversionLoginError, error1 :\n \n return request.RESPONSE.redirect(\'%s/view?%s\' % (\n context.absolute_url(),\n - make_query(portal_status_message=translateString(\'Files commited successfully in revision ${revision}.\',\n + make_query(portal_status_message=translateString(\'Files committed successfully in revision ${revision}.\',\n mapping=dict(revision=revision_string)))))\n diff --git a/bt5/erp5_forge/bt/revision b/bt5/erp5_forge/bt/revision index 9ec873d37d..2738497468 100644 --- a/bt5/erp5_forge/bt/revision +++ b/bt5/erp5_forge/bt/revision @@ -1 +1 @@ -438 \ No newline at end of file +439 \ No newline at end of file -- 2.30.9