Commit 518f64fd authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

include field title and non-editable field description in "Generate POT File" output.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30872 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a8545242
...@@ -60,6 +60,7 @@ def add_message(message, comment):\n ...@@ -60,6 +60,7 @@ def add_message(message, comment):\n
\n \n
if not message:\n if not message:\n
return\n return\n
message = message.decode(\'utf-8\')\n
if message in message_dict:\n if message in message_dict:\n
comment_list = message_dict[message]\n comment_list = message_dict[message]\n
else:\n else:\n
...@@ -122,17 +123,19 @@ for message, path in context.Base_findMessageListFromPythonInProduct(FUNC_NAME_L ...@@ -122,17 +123,19 @@ for message, path in context.Base_findMessageListFromPythonInProduct(FUNC_NAME_L
add_message(message, path)\n add_message(message, path)\n
\n \n
#\n #\n
# ERP5 Form title\n # ERP5 Form title, Field title and editable Field description\n
#\n #\n
for i in form_list:\n for i in form_list:\n
if (i.getId().endswith(\'_viewFieldLibrary\') or\n if (i.getId().endswith(\'FieldLibrary\')):\n
i.getId().endswith(\'_viewDialogFieldLibrary\') or\n
i.getId().endswith(\'_viewReportFieldLibrary\') or\n
i.getId().endswith(\'_FieldLibrary\')\n
):\n
continue\n continue\n
add_message(i.title, portal_url.getRelativeContentURL(i))\n add_message(i.title, portal_url.getRelativeContentURL(i))\n
\n for group, list in i.groups.items():\n
if group == \'hidden\':\n
continue\n
for j in (i[x] for x in list):\n
add_message(j.get_value(\'title\'), portal_url.getRelativeContentURL(j))\n
if j.get_value(\'editable\'):\n
add_message(j.get_value(\'description\'), portal_url.getRelativeContentURL(j))\n
\n \n
#\n #\n
# ListBox title, columns\n # ListBox title, columns\n
...@@ -215,6 +218,10 @@ def format(string):\n ...@@ -215,6 +218,10 @@ def format(string):\n
else:\n else:\n
return \'\\n\'.join([\'""\']+[format(i) for i in line_list])\n return \'\\n\'.join([\'""\']+[format(i) for i in line_list])\n
\n \n
print \'\'\'msgid ""\n
msgstr "Content-Type: text/plain; charset=UTF-8"\n
\n
\'\'\'\n
\n \n
MESSAGE_TEMPLATE = \'\'\'\\\n MESSAGE_TEMPLATE = \'\'\'\\\n
%s\n %s\n
...@@ -295,6 +302,9 @@ return printed\n ...@@ -295,6 +302,9 @@ return printed\n
<string>m</string> <string>m</string>
<string>message</string> <string>message</string>
<string>path</string> <string>path</string>
<string>group</string>
<string>list</string>
<string>j</string>
<string>value</string> <string>value</string>
<string>label</string> <string>label</string>
<string>Base_findStaticTranslationText</string> <string>Base_findStaticTranslationText</string>
......
543 544
\ No newline at end of file \ 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