openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #00184
[Merge] lp:~openerp-dev/openobject-client-web/trunk-i18n into lp:openobject-client-web
Olivier (Open ERP) has proposed merging lp:~openerp-dev/openobject-client-web/trunk-i18n into lp:openobject-client-web.
Requested reviews:
OpenERP SA's Web Client R&D (openerp-dev-web)
Localized some strings in the interface
--
https://code.launchpad.net/~openerp-dev/openobject-client-web/trunk-i18n/+merge/39123
Your team OpenERP SA's Web Client R&D is requested to review the proposed merge of lp:~openerp-dev/openobject-client-web/trunk-i18n into lp:openobject-client-web.
=== modified file 'addons/openerp/controllers/templates/index.mako'
--- addons/openerp/controllers/templates/index.mako 2010-10-18 15:12:50 +0000
+++ addons/openerp/controllers/templates/index.mako 2010-10-22 08:02:49 +0000
@@ -102,7 +102,7 @@
<a class="cta-a" href="http://www.openerp.com/services/subscribe-onsite" target="_blank">
<span>
<strong>${_('Use On-Site')}</strong>
- Get the openERP Warranty
+ ${_("Get the OpenERP Warranty")}
</span>
</a>
</li>
@@ -110,7 +110,7 @@
<a class="cta-a" href="http://www.openerp.com/online" target="_blank">
<span>
<strong>${_('Use Online')}</strong>
- Subscribe and start
+ ${_("Subscribe and start")}
</span>
</a>
</li>
=== modified file 'addons/openerp/controllers/templates/login.mako'
--- addons/openerp/controllers/templates/login.mako 2010-10-18 09:57:13 +0000
+++ addons/openerp/controllers/templates/login.mako 2010-10-22 08:02:49 +0000
@@ -81,7 +81,7 @@
<div style="margin-top: 10px">
<table cellpadding="0" cellspacing="0" width="100%" style="border:none;">
<tr>
- <td style="padding-left:0;"><h3> Top Contributor:</h3></td>
+ <td style="padding-left:0;"><h3> ${_("Top Contributor:")}</h3></td>
</tr>
<tr>
<td style="padding-left:0;"><img src="/openerp/static/images/axelor_logo.png"/></td>
@@ -91,8 +91,8 @@
</td>
<td style="padding:55px 35px 5px 10px; min-width: 200px;" valign="top">
- <p>We think that daily job activities can be more intuitive, efficient, automated, .. and even fun.</p>
- <h3>OpenERP's vision to be:</h3>
+ <p>${_("We think that daily job activities can be more intuitive, efficient, automated, .. and even fun.")}</p>
+ <h3>${_("OpenERP's vision to be:")}</h3>
<table cellpadding="0" cellspacing="0" width="100%" style="border:none;">
<tr>
@@ -100,8 +100,8 @@
<img src="/openerp/static/images/icons/product.png"/>
</td>
<td class="feature-description">
- <strong>Full featured</strong><br/>
- Today's enterprise challenges are multiple. We provide one module for each need.
+ <strong>${_("Full featured")}</strong><br/>
+ ${_("Today's enterprise challenges are multiple. We provide one module for each need.")}
</td>
</tr>
<tr>
@@ -109,8 +109,8 @@
<img src="/openerp/static/images/icons/accessories-archiver.png"/>
</td>
<td class="feature-description">
- <strong>Open Source</strong><br/>
- To Build a great product, we rely on the knowledge of thousands of contributors.
+ <strong>${_("Open Source")}</strong><br/>
+ ${_("To Build a great product, we rely on the knowledge of thousands of contributors.")}
</td>
</tr>
<tr>
@@ -118,8 +118,8 @@
<img src="/openerp/static/images/icons/partner.png"/>
</td>
<td class="feature-description">
- <strong>User Friendly</strong><br/>
- In order to be productive, people need clean and easy to use interface.
+ <strong>${_("User Friendly")}</strong><br/>
+ ${_("In order to be productive, people need clean and easy to use interface.")}
</td>
</tr>
</table>
=== modified file 'addons/openerp/controllers/templates/translator.mako'
--- addons/openerp/controllers/templates/translator.mako 2010-10-13 12:26:08 +0000
+++ addons/openerp/controllers/templates/translator.mako 2010-10-22 08:02:49 +0000
@@ -31,7 +31,7 @@
<option value="fields" ${py.selector(translate=='fields')}>${_("Fields")}</option>
<option value="labels" ${py.selector(translate=='labels')}>${_("Labels")}</option>
<option value="relates" ${py.selector(translate=='relates')}>${_("Relates")}</option>
- <option value="view" ${py.selector(translate=='view')}>View</option>
+ <option value="view" ${py.selector(translate=='view')}>${_("View")}</option>
</select>
</td>
<td width="100%"> </td>
=== modified file 'addons/openerp/static/javascript/form.js'
--- addons/openerp/static/javascript/form.js 2010-10-20 11:59:30 +0000
+++ addons/openerp/static/javascript/form.js 2010-10-22 08:02:49 +0000
@@ -1036,7 +1036,7 @@
*/
function removeAttachment() {
var $attachment_line = jQuery(this).parent();
- if(!confirm('Do you really want to delete the attachment {' +
+ if(!confirm(_('Do you really want to delete the attachment')+' {' +
jQuery.trim($attachment_line.find('> a.attachment').text()) +
'} ?')) {
return false;
=== modified file 'addons/openerp/static/javascript/openerp/openerp.ui.tips.js'
--- addons/openerp/static/javascript/openerp/openerp.ui.tips.js 2010-09-29 08:29:07 +0000
+++ addons/openerp/static/javascript/openerp/openerp.ui.tips.js 2010-10-22 08:02:49 +0000
@@ -56,8 +56,8 @@
this.toolText = P({'class': 'tipText'});
this.toolModel = SPAN({'class': 'tipExtra'});
this.toolField = SPAN({'class': 'tipExtra'});
- this. modelTitle = SPAN({'style': 'font-weight:bold;'}, 'Object :: ')
- this.fieldTitle = SPAN({'style': 'font-weight:bold;'}, 'Field :: ')
+ this. modelTitle = SPAN({'style': 'font-weight:bold;'}, _('Object')+' :: ')
+ this.fieldTitle = SPAN({'style': 'font-weight:bold;'}, _('Field')+' :: ')
this.toolTip = TABLE({'class': 'tooltip'},
TBODY(null,
TR(null,
=== modified file 'addons/openerp/widgets/search.py'
--- addons/openerp/widgets/search.py 2010-10-22 07:34:21 +0000
+++ addons/openerp/widgets/search.py 2010-10-22 08:02:49 +0000
@@ -75,10 +75,7 @@
if attrs.get('context'):
ctx = expr_eval(attrs.get('context', "{}"), {'self':attrs.get('name', False)})
if ctx.get('group_by'):
- if isinstance(ctx['group_by'], list):
- str_ctx = map(lambda x: 'group_' + x, ctx.get('group_by'))
- else:
- str_ctx = 'group_' + ctx.get('group_by')
+ str_ctx = 'group_' + ctx.get('group_by')
default_val = str_ctx in screen_context.get('group_by', [])
default_search = str_ctx in screen_context.get('group_by', [])
return default_search or default_val
@@ -158,10 +155,7 @@
self.filter_context = eval(filter_context)
self.group_context = self.filter_context.get('group_by', False)
if self.group_context:
- if isinstance(self.group_context, list):
- self.group_context = map(lambda x: 'group_' + x, self.group_context)
- else:
- self.group_context = 'group_' + self.group_context
+ self.group_context = 'group_' + self.group_context
if default_search:
self.def_checked = True
@@ -291,7 +285,7 @@
sorted_filters.append(action)
sorted_filters.sort(lambda x, y: cmp(x[1], y[1]))
- self.filters_list = [("blk", "-- Filters --", "", "")] \
+ self.filters_list = [("blk", "-- "+_("Filters")+" --", "", "")] \
+ sorted_filters
self.operators_map = [
@@ -362,6 +356,12 @@
if name in self.fields_type:
continue
+ if attrs.get('widget'):
+ if attrs['widget'] == 'one2many_list':
+ attrs['widget'] = 'one2many'
+ attrs['type'] = attrs['widget']
+
+
# in search view fields should be writable
attrs.update(readonly=False,
required=False,
@@ -379,13 +379,6 @@
print "-"*30
raise
- if attrs.get('widget'):
- if attrs['widget'] == 'one2many_list':
- fields[name]['widget'] = 'one2many'
-
- fields[name]['type2'] = fields[name]['type']
- fields[name]['type'] = attrs['widget']
-
kind = fields[name]['type']
if kind not in WIDGETS:
@@ -413,8 +406,6 @@
defval = default_search
if defval:
model = fields[name].get('relation')
- type2 = fields[name].get('type2')
-
if kind == 'many2one' and model:
try:
value = rpc.name_get(model, default_search)
@@ -426,15 +417,15 @@
if attrs.get('filter_domain'):
domain = expr_eval(attrs['filter_domain'], {'self': defval})
else:
- if field.kind in ('selection') and type2 == 'many2one':
- domain = [(name, '=', int(defval))]
-
- elif field.kind in ('selection'):
+ if field.kind in ('selection'):
domain = [(name, '=', defval)]
+<<<<<<< TREE
elif field.kind in ('date','datetime'):
domain = [(name, '>=', defval)]
+=======
+>>>>>>> MERGE-SOURCE
else:
domain = [(name,fields[name].get('comparator','ilike'), defval)]
=== modified file 'addons/view_calendar/static/javascript/calendar_box.js'
--- addons/view_calendar/static/javascript/calendar_box.js 2010-09-28 12:02:18 +0000
+++ addons/view_calendar/static/javascript/calendar_box.js 2010-10-22 08:02:49 +0000
@@ -84,11 +84,11 @@
var desc = SPAN(null, this.params.description, BR(), desc);
var log = DIV({'class': 'calLogInfo'},
- DIV(null,'ID:', this.params.event_id),
- DIV(null,'Creation User:', this.params.create_uid),
- DIV(null,'Creation Date:', this.params.create_date),
- DIV(null,'Latest Modification by: ', this.params.write_uid),
- DIV(null,'Latest Modification Date: ', this.params.write_date)
+ DIV(null, 'ID:', this.params.event_id),
+ DIV(null, _('Creation User: '), this.params.create_uid),
+ DIV(null, _('Creation Date: '), this.params.create_date),
+ DIV(null, _('Latest Modification by: '), this.params.write_uid),
+ DIV(null, _('Latest Modification Date: '), this.params.write_date)
);
var info = DIV(null,
DIV({'class': 'calInfoTitle'}, title),
=== modified file 'addons/view_calendar/static/javascript/calendar_week.js'
--- addons/view_calendar/static/javascript/calendar_week.js 2010-09-28 12:02:18 +0000
+++ addons/view_calendar/static/javascript/calendar_week.js 2010-10-22 08:02:49 +0000
@@ -97,6 +97,24 @@
e = new Date(e);
var self = this;
+
+ // test
+ //window.console.log('start: ' + toISOTimestamp(dt));
+ //window.console.log('end: ' + toISOTimestamp(e));
+ //window.console.log('h: '+String(h));
+ //window.console.log(String(getFormData(1)));
+
+ // _terp_callback onchange_dates(date,False,date_deadline)
+ // _terp_caller date_deadline
+ // _terp_model crm.meeting
+ // _terp_value 10/20/2010 17:00:45
+ // _terp_context {'lang': u'en_US', 'search_default_section_id': False, 'active_ids': [265], 'tz': False,
+ // 'search_view': 568, 'active_model': 'ir.ui.menu', 'department_id': False, '_terp_view_name': u'Meetings',
+ // 'section_id': False, 'search_default_user_id': 1, 'client': 'web', 'project_id': False, 'active_id': 265}
+
+
+ // test
+
var req = saveCalendarRecord(id, toISOTimestamp(dt), toISOTimestamp(e));
req.addCallback(function(obj) {
@@ -522,10 +540,7 @@
appendChildNodes('calBodySect', tbl);
for (var i = 0; i < 24; i++) {
- var h = i % 12;
-
- h = h == 0 ? 12 : h;
- h = i > 11 ? h + ':00 PM' : h + ':00 AM';
+ var h = i + ':00';
appendChildNodes('calTimeCol', DIV(null, h));
}
=== modified file 'addons/view_calendar/widgets/widgets.py'
--- addons/view_calendar/widgets/widgets.py 2010-10-14 10:29:45 +0000
+++ addons/view_calendar/widgets/widgets.py 2010-10-22 08:02:49 +0000
@@ -32,6 +32,7 @@
import xml.dom.minidom
from openobject.widgets import JSLink, CSSLink
+from openobject.i18n.format import format_date_custom
from openerp.utils import rpc, node_attributes
from openerp.widgets import TinyWidget
@@ -254,7 +255,7 @@
self.selected_day = day
self.headers = [(48, ustr(day))]
- self.subheaders = [time.strftime('%I %P', (y, m, d, i, 0, 0, 1, 1, 0)) for i in range(24)]
+ self.subheaders = [time.strftime('%H', (y, m, d, i, 0, 0, 1, 1, 0)) for i in range(24)]
elif self.mode == '3days':
dp = day - 1
@@ -264,7 +265,7 @@
self.selected_day = day
self.headers = [(24, ustr(dp)), (24, ustr(day)), (24, ustr(dn))]
- self.subheaders = [time.strftime('%I %P', (y, 1, 1, i, 0, 0, 1, 1, 0)) for i in range(0, 24, 6)]
+ self.subheaders = [time.strftime('%H', (y, 1, 1, i, 0, 0, 1, 1, 0)) for i in range(0, 24, 6)]
elif self.mode == 'week':
self.days = [d for d in Week(day)]
@@ -273,8 +274,8 @@
self.headers = [(12, u"%s %s" % (d.month2.name, d.day)) for d in self.days]
self.subheaders = []
for x in self.days:
- for i in [0, 23]:
- self.subheaders.append(time.strftime('%I %P', (y, 1, 1, i, 0, 0, 1, 1, 0)))
+ for i in [0, 12]:
+ self.subheaders.append(time.strftime('%H', (y, 1, 1, i, 0, 0, 1, 1, 0)))
elif self.mode == '3weeks':
w = Week(day)
@@ -284,7 +285,7 @@
self.title = _(u"%s - %s") % (ustr(self.days[0]), ustr(self.days[-1]))
self.selected_day = _get_selection_day(day, self.selected_day, 'week')
self.headers = [(7, _("Week %s") % w1[0].strftime('%W')) for w1 in [wp, w, wn]]
- self.subheaders = [x.strftime('%a %d') for x in itertools.chain(wp, w, wn)]
+ self.subheaders = [format_date_custom(x, "E d") for x in itertools.chain(wp, w, wn)]
elif self.mode == '3months':
q = 1 + (m - 1) / 3
=== modified file 'addons/view_diagram/controllers/process.py'
--- addons/view_diagram/controllers/process.py 2010-10-12 13:56:00 +0000
+++ addons/view_diagram/controllers/process.py 2010-10-22 08:02:49 +0000
@@ -50,7 +50,7 @@
fields = rpc.RPCProxy(res_model).fields_get([], {})
- help = 'Help: Not Defined'
+ help = _('Help: Not Defined')
help_ids = rpc.session.execute('object', 'execute', 'ir.actions.act_window', 'search', [('res_model','=',res_model)])
for help_id in help_ids:
field = rpc.session.execute('object', 'execute', 'ir.actions.act_window', 'read', help_id)
=== modified file 'addons/view_diagram/controllers/templates/process.mako'
--- addons/view_diagram/controllers/templates/process.mako 2010-10-12 12:16:25 +0000
+++ addons/view_diagram/controllers/templates/process.mako 2010-10-22 08:02:49 +0000
@@ -47,7 +47,7 @@
<table class="view" border="0" width="100%" height="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="75%" valign="top" style="padding-top:10px;">
- <h1>Help: ${title}</h1>
+ <h1>${_("Help:")} ${title}</h1>
<p class="process-links">
<a target="_blank" href="${context_help}">
${_("Online Documentation")}
@@ -110,8 +110,8 @@
<td colspan="2" class="fields collapsed">
<h2 style="padding: 5px 10px; font-weight:bold">
${res_model} ${_("fields")}
- <span class="expand-button">(show)</span>
- <span class="collapse-button">(hide)</span>
+ <span class="expand-button">(${_("show")})</span>
+ <span class="collapse-button">(${_("hide")})</span>
</h2>
<div align="left" style="padding: 5px 10px;">
<table border="0">
=== modified file 'addons/view_diagram/static/javascript/infobox.js'
--- addons/view_diagram/static/javascript/infobox.js 2010-08-10 12:08:29 +0000
+++ addons/view_diagram/static/javascript/infobox.js 2010-10-22 08:02:49 +0000
@@ -140,7 +140,7 @@
onDelete : function() {
this.hide();
- if (!confirm('Do you really want to delete this record?')) {
+ if (!confirm(_('Do you really want to delete this record?'))) {
return false;
}
WORKFLOW.remove_elem(this.source);
=== modified file 'openobject/i18n/format.py'
--- openobject/i18n/format.py 2010-10-19 14:42:31 +0000
+++ openobject/i18n/format.py 2010-10-22 08:02:49 +0000
@@ -55,6 +55,9 @@
"""
return __pat.sub(lambda m: __sub[m.group(1)[0]], format)
+def format_date_custom(dt, fmt="y-M-d"):
+ return dates.format_date(dt, format=fmt, locale=get_locale())
+
def get_datetime_format(kind="datetime"):
"""Get local datetime format.
Follow ups