Commit dcf7b2d5 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

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
parent 11e715e3
No related merge requests found
......@@ -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
......
......@@ -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
......
438
\ No newline at end of file
439
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment