Commit 1956f756 authored by Tristan Cavelier's avatar Tristan Cavelier

erp5_xhtml_style: translate all titles in breadcrumb

parent fce99a63
...@@ -190,27 +190,19 @@ portal = utool.getPortalObject()\n ...@@ -190,27 +190,19 @@ portal = utool.getPortalObject()\n
\n \n
obj = portal\n obj = portal\n
now = []\n now = []\n
module = True\n
for name in relative:\n for name in relative:\n
obj = obj.restrictedTraverse(name)\n obj = obj.restrictedTraverse(name)\n
now.append(name)\n now.append(name)\n
if module:\n title = (\n
title = (\n getattr(obj, "getCompactTranslatedTitle", lambda: None)() or\n
getattr(obj, "getCompactTranslatedTitle", lambda: None)() or\n obj.getTitle() or obj.getId()\n
obj.getTitle() or obj.getId()\n )\n
)\n
else:\n
title = (\n
getattr(obj, "getShortTitle", lambda: None)() or\n
obj.getTitle() or obj.getId()\n
)\n
if not name == \'talkback\':\n if not name == \'talkback\':\n
result.append( { \'id\' : name\n result.append( { \'id\' : name\n
, \'title\' : title\n , \'title\' : title\n
, \'url\' : \'%s/%s/view%s\' % (portal_url, \'/\'.join(now), param)\n , \'url\' : \'%s/%s/view%s\' % (portal_url, \'/\'.join(now), param)\n
}\n }\n
)\n )\n
module = False\n
\n \n
return result\n return result\n
</string> </value> </string> </value>
......
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