Commit 077b50f5 authored by Kevin Deldycke's avatar Kevin Deldycke

"default" parameters to translate is not needed when it is equal to the string we want to translate


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5319 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5548163a
......@@ -1210,7 +1210,7 @@ class ListBoxWidget(Widget.Widget):
<td nowrap valign="middle" align="center">
<select name="list_start" title="%s" size="1"
onChange="submitAction(this.form,'%s/portal_selections/setPage')">
""" % (translate('ui', 'Change Page', default='Change Page'), REQUEST.URL1))
""" % (translate('ui', 'Change Page'), REQUEST.URL1))
else:
pages_list_append("""\
<td nowrap valign="middle" align="center">
......@@ -1220,8 +1220,8 @@ class ListBoxWidget(Widget.Widget):
<td nowrap valign="middle" align="center">
<select name="list_start" title="%s" size="1"
onChange="submitAction(this.form,'%s/portal_selections/setPage')">
""" % (portal_url_string, translate('ui', 'Previous Page', default='Previous Page'),
translate('ui', 'Change Page', default='Change Page'), REQUEST.URL1))
""" % (portal_url_string, translate('ui', 'Previous Page'),
translate('ui', 'Change Page'), REQUEST.URL1))
for p in range(0, total_pages):
if p == current_page:
selected = 'selected'
......@@ -1248,7 +1248,7 @@ class ListBoxWidget(Widget.Widget):
<input type="image" src="%s/images/1rightarrowv.png"
title="%s" name="portal_selections/nextPage:method" border="0" />
</td>
""" % (portal_url_string, translate('ui', 'Next Page', default='Next Page')))
""" % (portal_url_string, translate('ui', 'Next Page')))
# Create the header of the table - this should probably become DTML
# Create also View Selector which enables to switch from a view mode
# to another directly from the listbox
......@@ -1258,7 +1258,7 @@ class ListBoxWidget(Widget.Widget):
'portal_url_string' : portal_url_string,
'list_action' : list_action,
'selection_name' : selection_name,
'field_title' : translate('ui', field_title, default = field_title),
'field_title' : translate('ui', field_title),
'pages' : pages,
'record_number' : translate('ui', '${number} record(s)',
default = '%s record(s)' % total_size,
......@@ -1268,11 +1268,9 @@ class ListBoxWidget(Widget.Widget):
len(checked_uids),
mapping = { 'number' : \
str(len(checked_uids)) }),
'flat_list_title': translate('ui', 'Flat List', default='Flat List'),
'report_tree_title': translate('ui', 'Report Tree',
default = 'Report Tree'),
'domain_tree_title': translate('ui', 'Domain Tree',
default = 'Domain Tree'),
'flat_list_title': translate('ui', 'Flat List'),
'report_tree_title': translate('ui', 'Report Tree'),
'domain_tree_title': translate('ui', 'Domain Tree'),
}
header_list = []
header_list_append = header_list.append
......@@ -1368,8 +1366,8 @@ onChange="submitAction(this.form,'%s/portal_selections/setReportRoot')">
format_dict = {
'portal_url_string' : portal_url_string,
'report_popup' : report_popup,
'check_all_title' : translate('ui', 'Check All', default = 'Check All'),
'uncheck_all_title' : translate('ui', 'Uncheck All', default = 'Uncheck All'),
'check_all_title' : translate('ui', 'Check All'),
'uncheck_all_title' : translate('ui', 'Uncheck All'),
}
list_header_list_append("""\
<tr>%(report_popup)s
......@@ -1406,9 +1404,9 @@ onChange="submitAction(this.form,'%s/portal_selections/setReportRoot')">
if cname[0] in sort_columns_id_list:
#LOG('ListBox', 0, 'str(cname[1]) = %s, translate(\'ui\',str(cname[1])) = %s' % (repr(str(cname[1])), repr(translate('ui',str(cname[1])))))
list_header_list_append("<td class=\"Data\"><a href=\"%s/portal_selections/setSelectionQuickSortOrder?selection_name=%s&sort_on=%s\">%s</a> %s</td>\n" %
(here.absolute_url(),str(selection_name),cname[0],translate('ui', cname[1], default = cname[1]),img))
(here.absolute_url(),str(selection_name),cname[0],translate('ui', cname[1]),img))
else:
list_header_list_append("<td class=\"Data\">%s</td>\n" % translate('ui', cname[1], default = cname[1]))
list_header_list_append("<td class=\"Data\">%s</td>\n" % translate('ui', cname[1]))
list_header_list_append("</tr>")
list_header = ''.join(list_header_list)
......@@ -1442,7 +1440,7 @@ onChange="submitAction(this.form,'%s/portal_selections/setReportRoot')">
<td class="Data" width="50" align="center" valign="middle">
<input type="image" src="%s/images/exec16.png" title="%s" alt="Action" name="Base_doSelect:method" />
</td>
""" % (report_search,portal_url_string,translate('ui', 'Action', default = 'Action'))) # XXX Action? Is this word appropriate here?
""" % (report_search,portal_url_string,translate('ui', 'Action'))) # XXX Action? Is this word appropriate here?
else:
list_search_append("""\
<tr >
......@@ -1775,7 +1773,7 @@ onChange="submitAction(this.form,'%s/portal_selections/setReportRoot')">
key = my_field.id + '_%s' % o.uid
if field_errors.has_key(key):
error_css = 'Error'
error_message = "<br/>%s" % translate('ui', field_errors[key].error_text, default = field_errors[key].error_text)
error_message = "<br/>%s" % translate('ui', field_errors[key].error_text)
# Display previous value (in case of error
error_list.append(field_errors.get(key))
display_value = REQUEST.get('field_%s' % key, attribute_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