[FIX] translation of advanced filter strings

* Made title of group ('Advanced Filters') available for translation
* Fixed translation mark for advanced filter operators (class level, need to be lazy)
* Re-extracted translation strings

and marked selection strings of boolean search widget while at it

lp bug: https://launchpad.net/bugs/906963 fixed

bzr revid: xmo@openerp.com-20111220175137-r3jeh6q8g4c92xf9
This commit is contained in:
Xavier Morel 2011-12-20 18:51:37 +01:00
parent 765ce8a0db
commit 7049024898
12 changed files with 127 additions and 138 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2011-12-16 13:54+0100\n"
"POT-Creation-Date: 2011-12-20 18:48+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -20,42 +20,42 @@ msgstr ""
#: addons/web/static/src/js/chrome.js:162
#: addons/web/static/src/js/chrome.js:175
#: addons/web/static/src/js/chrome.js:369
#: addons/web/static/src/js/view_form.js:355
#: addons/web/static/src/js/view_form.js:1069
#: addons/web/static/src/js/view_form.js:358
#: addons/web/static/src/js/view_form.js:1078
#: addons/web/static/src/xml/base.xml:0
msgid "Ok"
msgstr ""
#: addons/web/static/src/js/chrome.js:675
#: addons/web/static/src/js/chrome.js:668
msgid "About"
msgstr ""
#: addons/web/static/src/js/chrome.js:755
#: addons/web/static/src/js/chrome.js:748
msgid "Preferences"
msgstr ""
#: addons/web/static/src/js/chrome.js:759
#: addons/web/static/src/js/chrome.js:752
msgid "Change password"
msgstr ""
#: addons/web/static/src/js/chrome.js:760
#: addons/web/static/src/js/chrome.js:753
#: addons/web/static/src/js/search.js:235
#: addons/web/static/src/js/search.js:276
#: addons/web/static/src/js/view_editor.js:97
#: addons/web/static/src/js/view_editor.js:778
#: addons/web/static/src/js/view_editor.js:907
#: addons/web/static/src/js/view_form.js:1076
#: addons/web/static/src/js/view_form.js:1085
#: addons/web/static/src/xml/base.xml:0
msgid "Cancel"
msgstr ""
#: addons/web/static/src/js/chrome.js:761
#: addons/web/static/src/js/chrome.js:754
#: addons/web/static/src/js/view_editor.js:75
#: addons/web/static/src/js/views.js:871 addons/web/static/src/xml/base.xml:0
msgid "Save"
msgstr ""
#: addons/web/static/src/js/chrome.js:781 addons/web/static/src/xml/base.xml:0
#: addons/web/static/src/js/chrome.js:774 addons/web/static/src/xml/base.xml:0
msgid "Change Password"
msgstr ""
@ -67,7 +67,7 @@ msgstr ""
#: addons/web/static/src/js/data_import.js:73
#: addons/web/static/src/js/view_editor.js:49
#: addons/web/static/src/js/view_editor.js:387
#: addons/web/static/src/js/view_form.js:2755
#: addons/web/static/src/js/view_form.js:2775
#: addons/web/static/src/js/views.js:872
msgid "Close"
msgstr ""
@ -114,84 +114,92 @@ msgstr ""
msgid "Incorrect value for field %(fieldname)s: [%(value)s] is %(message)s"
msgstr ""
#: addons/web/static/src/js/search.js:811
#: addons/web/static/src/js/search.js:822
msgid "not a valid integer"
msgstr ""
#: addons/web/static/src/js/search.js:825
#: addons/web/static/src/js/search.js:836
msgid "not a valid number"
msgstr ""
#: addons/web/static/src/js/search.js:1241
#: addons/web/static/src/js/search.js:898
msgid "Yes"
msgstr ""
#: addons/web/static/src/js/search.js:899
msgid "No"
msgstr ""
#: addons/web/static/src/js/search.js:1252
msgid "contains"
msgstr ""
#: addons/web/static/src/js/search.js:1242
#: addons/web/static/src/js/search.js:1253
msgid "doesn't contain"
msgstr ""
#: addons/web/static/src/js/search.js:1243
#: addons/web/static/src/js/search.js:1258
#: addons/web/static/src/js/search.js:1278
#: addons/web/static/src/js/search.js:1298
#: addons/web/static/src/js/search.js:1320
#: addons/web/static/src/js/search.js:1254
#: addons/web/static/src/js/search.js:1269
#: addons/web/static/src/js/search.js:1289
#: addons/web/static/src/js/search.js:1309
#: addons/web/static/src/js/search.js:1331
msgid "is equal to"
msgstr ""
#: addons/web/static/src/js/search.js:1244
#: addons/web/static/src/js/search.js:1259
#: addons/web/static/src/js/search.js:1279
#: addons/web/static/src/js/search.js:1299
#: addons/web/static/src/js/search.js:1321
#: addons/web/static/src/js/search.js:1255
#: addons/web/static/src/js/search.js:1270
#: addons/web/static/src/js/search.js:1290
#: addons/web/static/src/js/search.js:1310
#: addons/web/static/src/js/search.js:1332
msgid "is not equal to"
msgstr ""
#: addons/web/static/src/js/search.js:1245
#: addons/web/static/src/js/search.js:1260
#: addons/web/static/src/js/search.js:1280
#: addons/web/static/src/js/search.js:1300
#: addons/web/static/src/js/search.js:1322
#: addons/web/static/src/js/search.js:1256
#: addons/web/static/src/js/search.js:1271
#: addons/web/static/src/js/search.js:1291
#: addons/web/static/src/js/search.js:1311
#: addons/web/static/src/js/search.js:1333
msgid "greater than"
msgstr ""
#: addons/web/static/src/js/search.js:1246
#: addons/web/static/src/js/search.js:1261
#: addons/web/static/src/js/search.js:1281
#: addons/web/static/src/js/search.js:1301
#: addons/web/static/src/js/search.js:1323
#: addons/web/static/src/js/search.js:1257
#: addons/web/static/src/js/search.js:1272
#: addons/web/static/src/js/search.js:1292
#: addons/web/static/src/js/search.js:1312
#: addons/web/static/src/js/search.js:1334
msgid "less than"
msgstr ""
#: addons/web/static/src/js/search.js:1247
#: addons/web/static/src/js/search.js:1262
#: addons/web/static/src/js/search.js:1282
#: addons/web/static/src/js/search.js:1302
#: addons/web/static/src/js/search.js:1324
#: addons/web/static/src/js/search.js:1258
#: addons/web/static/src/js/search.js:1273
#: addons/web/static/src/js/search.js:1293
#: addons/web/static/src/js/search.js:1313
#: addons/web/static/src/js/search.js:1335
msgid "greater or equal than"
msgstr ""
#: addons/web/static/src/js/search.js:1248
#: addons/web/static/src/js/search.js:1263
#: addons/web/static/src/js/search.js:1283
#: addons/web/static/src/js/search.js:1303
#: addons/web/static/src/js/search.js:1325
#: addons/web/static/src/js/search.js:1259
#: addons/web/static/src/js/search.js:1274
#: addons/web/static/src/js/search.js:1294
#: addons/web/static/src/js/search.js:1314
#: addons/web/static/src/js/search.js:1336
msgid "less or equal than"
msgstr ""
#: addons/web/static/src/js/search.js:1314
#: addons/web/static/src/js/search.js:1339
#: addons/web/static/src/js/search.js:1325
#: addons/web/static/src/js/search.js:1350
msgid "is"
msgstr ""
#: addons/web/static/src/js/search.js:1340
#: addons/web/static/src/js/search.js:1351
msgid "is not"
msgstr ""
#: addons/web/static/src/js/search.js:1353
#: addons/web/static/src/js/search.js:1364
msgid "is true"
msgstr ""
#: addons/web/static/src/js/search.js:1354
#: addons/web/static/src/js/search.js:1365
msgid "is false"
msgstr ""
@ -251,37 +259,37 @@ msgstr ""
msgid "Form"
msgstr ""
#: addons/web/static/src/js/view_form.js:398
#: addons/web/static/src/js/view_form.js:401
msgid "Warning, the record has been modified, your changes will be discarded."
msgstr ""
#: addons/web/static/src/js/view_form.js:606
#: addons/web/static/src/js/view_form.js:612
msgid "Attachments"
msgstr ""
#: addons/web/static/src/js/view_form.js:644
#: addons/web/static/src/js/view_form.js:650
#, python-format
msgid "Do you really want to delete the attachment %s?"
msgstr ""
#: addons/web/static/src/js/view_form.js:1066
#: addons/web/static/src/js/view_form.js:1075
msgid "Confirm"
msgstr ""
#: addons/web/static/src/js/view_form.js:1829
#: addons/web/static/src/js/view_form.js:1838
msgid "<em>   Search More...</em>"
msgstr ""
#: addons/web/static/src/js/view_form.js:1842
#: addons/web/static/src/js/view_form.js:1851
#, python-format
msgid "<em>   Create \"<strong>%s</strong>\"</em>"
msgstr ""
#: addons/web/static/src/js/view_form.js:1848
#: addons/web/static/src/js/view_form.js:1857
msgid "<em>   Create and Edit...</em>"
msgstr ""
#: addons/web/static/src/js/view_form.js:2391
#: addons/web/static/src/js/view_form.js:2404
#: addons/web/static/src/xml/base.xml:0
msgid "Add"
msgstr ""
@ -306,11 +314,11 @@ msgstr ""
msgid "Page"
msgstr ""
#: addons/web/static/src/js/view_page.js:45
#: addons/web/static/src/js/view_page.js:52
msgid "Do you really want to delete this record?"
msgstr ""
#: addons/web/static/src/js/view_page.js:220
#: addons/web/static/src/js/view_page.js:227
msgid "Download"
msgstr ""
@ -637,26 +645,6 @@ msgstr ""
msgid "Delete"
msgstr ""
#: addons/web/static/src/xml/base.xml:0
msgid "First"
msgstr ""
#: addons/web/static/src/xml/base.xml:0
msgid "<"
msgstr ""
#: addons/web/static/src/xml/base.xml:0
msgid ">"
msgstr ""
#: addons/web/static/src/xml/base.xml:0
msgid "Last"
msgstr ""
#: addons/web/static/src/xml/base.xml:0
msgid "<<"
msgstr ""
#: addons/web/static/src/xml/base.xml:0
msgid "0"
msgstr ""
@ -665,10 +653,6 @@ msgstr ""
msgid "/"
msgstr ""
#: addons/web/static/src/xml/base.xml:0
msgid ">>"
msgstr ""
#: addons/web/static/src/xml/base.xml:0
msgid "Duplicate"
msgstr ""
@ -841,6 +825,10 @@ msgstr ""
msgid "Title of new Dashboard item:"
msgstr ""
#: addons/web/static/src/xml/base.xml:0
msgid "Advanced Filters"
msgstr ""
#: addons/web/static/src/xml/base.xml:0
msgid "Any of the following conditions must match"
msgstr ""

View File

@ -1,6 +1,7 @@
openerp.web.search = function(openerp) {
var QWeb = openerp.web.qweb,
_t = openerp.web._t;
_t = openerp.web._t,
_lt = openerp.web._lt;
openerp.web.SearchView = openerp.web.Widget.extend(/** @lends openerp.web.SearchView# */{
template: "EmptyComponent",
@ -894,8 +895,8 @@ openerp.web.search.BooleanField = openerp.web.search.SelectionField.extend(/** @
init: function () {
this._super.apply(this, arguments);
this.attrs.selection = [
['true', 'Yes'],
['false', 'No']
['true', _t("Yes")],
['false', _t("No")]
];
},
/**
@ -1193,7 +1194,7 @@ openerp.web.search.ExtendedSearchProposition = openerp.web.OldWidget.extend(/**
* @param field a field descriptor object (as returned by fields_get, augmented by the field name)
*/
select_field: function(field) {
var _this = this;
var self = this;
if(this.attrs.selected != null) {
this.value.stop();
this.value = null;
@ -1220,9 +1221,9 @@ openerp.web.search.ExtendedSearchProposition = openerp.web.OldWidget.extend(/**
this.value.set_field(field);
}
_.each(this.value.operators, function(operator) {
var option = jQuery('<option>', {value: operator.value})
.text(operator.text)
.appendTo(_this.$element.find('.searchview_extended_prop_op'));
$('<option>', {value: operator.value})
.text(String(operator.text))
.appendTo(self.$element.find('.searchview_extended_prop_op'));
});
this.$element.find('.searchview_extended_prop_value').html(
this.value.render({}));
@ -1248,14 +1249,14 @@ openerp.web.search.ExtendedSearchProposition.Char = openerp.web.search.ExtendedS
template: 'SearchView.extended_search.proposition.char',
identifier_prefix: 'extended-search-proposition-char',
operators: [
{value: "ilike", text: _t("contains")},
{value: "not ilike", text: _t("doesn't contain")},
{value: "=", text: _t("is equal to")},
{value: "!=", text: _t("is not equal to")},
{value: ">", text: _t("greater than")},
{value: "<", text: _t("less than")},
{value: ">=", text: _t("greater or equal than")},
{value: "<=", text: _t("less or equal than")}
{value: "ilike", text: _lt("contains")},
{value: "not ilike", text: _lt("doesn't contain")},
{value: "=", text: _lt("is equal to")},
{value: "!=", text: _lt("is not equal to")},
{value: ">", text: _lt("greater than")},
{value: "<", text: _lt("less than")},
{value: ">=", text: _lt("greater or equal than")},
{value: "<=", text: _lt("less or equal than")}
],
get_value: function() {
return this.$element.val();
@ -1265,12 +1266,12 @@ openerp.web.search.ExtendedSearchProposition.DateTime = openerp.web.search.Exten
template: 'SearchView.extended_search.proposition.empty',
identifier_prefix: 'extended-search-proposition-datetime',
operators: [
{value: "=", text: _t("is equal to")},
{value: "!=", text: _t("is not equal to")},
{value: ">", text: _t("greater than")},
{value: "<", text: _t("less than")},
{value: ">=", text: _t("greater or equal than")},
{value: "<=", text: _t("less or equal than")}
{value: "=", text: _lt("is equal to")},
{value: "!=", text: _lt("is not equal to")},
{value: ">", text: _lt("greater than")},
{value: "<", text: _lt("less than")},
{value: ">=", text: _lt("greater or equal than")},
{value: "<=", text: _lt("less or equal than")}
],
get_value: function() {
return this.datewidget.get_value();
@ -1285,12 +1286,12 @@ openerp.web.search.ExtendedSearchProposition.Date = openerp.web.search.ExtendedS
template: 'SearchView.extended_search.proposition.empty',
identifier_prefix: 'extended-search-proposition-date',
operators: [
{value: "=", text: _t("is equal to")},
{value: "!=", text: _t("is not equal to")},
{value: ">", text: _t("greater than")},
{value: "<", text: _t("less than")},
{value: ">=", text: _t("greater or equal than")},
{value: "<=", text: _t("less or equal than")}
{value: "=", text: _lt("is equal to")},
{value: "!=", text: _lt("is not equal to")},
{value: ">", text: _lt("greater than")},
{value: "<", text: _lt("less than")},
{value: ">=", text: _lt("greater or equal than")},
{value: "<=", text: _lt("less or equal than")}
],
get_value: function() {
return this.datewidget.get_value();
@ -1305,12 +1306,12 @@ openerp.web.search.ExtendedSearchProposition.Integer = openerp.web.search.Extend
template: 'SearchView.extended_search.proposition.integer',
identifier_prefix: 'extended-search-proposition-integer',
operators: [
{value: "=", text: _t("is equal to")},
{value: "!=", text: _t("is not equal to")},
{value: ">", text: _t("greater than")},
{value: "<", text: _t("less than")},
{value: ">=", text: _t("greater or equal than")},
{value: "<=", text: _t("less or equal than")}
{value: "=", text: _lt("is equal to")},
{value: "!=", text: _lt("is not equal to")},
{value: ">", text: _lt("greater than")},
{value: "<", text: _lt("less than")},
{value: ">=", text: _lt("greater or equal than")},
{value: "<=", text: _lt("less or equal than")}
],
get_value: function() {
try {
@ -1321,18 +1322,18 @@ openerp.web.search.ExtendedSearchProposition.Integer = openerp.web.search.Extend
}
});
openerp.web.search.ExtendedSearchProposition.Id = openerp.web.search.ExtendedSearchProposition.Integer.extend({
operators: [{value: "=", text: _t("is")}]
operators: [{value: "=", text: _lt("is")}]
});
openerp.web.search.ExtendedSearchProposition.Float = openerp.web.search.ExtendedSearchProposition.Field.extend({
template: 'SearchView.extended_search.proposition.float',
identifier_prefix: 'extended-search-proposition-float',
operators: [
{value: "=", text: _t("is equal to")},
{value: "!=", text: _t("is not equal to")},
{value: ">", text: _t("greater than")},
{value: "<", text: _t("less than")},
{value: ">=", text: _t("greater or equal than")},
{value: "<=", text: _t("less or equal than")}
{value: "=", text: _lt("is equal to")},
{value: "!=", text: _lt("is not equal to")},
{value: ">", text: _lt("greater than")},
{value: "<", text: _lt("less than")},
{value: ">=", text: _lt("greater or equal than")},
{value: "<=", text: _lt("less or equal than")}
],
get_value: function() {
try {
@ -1346,8 +1347,8 @@ openerp.web.search.ExtendedSearchProposition.Selection = openerp.web.search.Exte
template: 'SearchView.extended_search.proposition.selection',
identifier_prefix: 'extended-search-proposition-selection',
operators: [
{value: "=", text: _t("is")},
{value: "!=", text: _t("is not")}
{value: "=", text: _lt("is")},
{value: "!=", text: _lt("is not")}
],
set_field: function(field) {
this.field = field;
@ -1360,8 +1361,8 @@ openerp.web.search.ExtendedSearchProposition.Boolean = openerp.web.search.Extend
template: 'SearchView.extended_search.proposition.boolean',
identifier_prefix: 'extended-search-proposition-boolean',
operators: [
{value: "=", text: _t("is true")},
{value: "!=", text: _t("is false")}
{value: "=", text: _lt("is true")},
{value: "!=", text: _lt("is false")}
],
get_value: function() {
return true;

View File

@ -1306,7 +1306,7 @@
<t t-name="SearchView.extended_search">
<t t-call="SearchView.util.expand">
<t t-set="expand" t-value="false"/>
<t t-set="label" t-value="'Advanced Filters'"/>
<t t-set="label">Advanced Filters</t>
<t t-set="content">
<div class="searchview_extended_groups_list">
</div>

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2011-12-16 13:54+0100\n"
"POT-Creation-Date: 2011-12-20 18:48+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2011-12-16 13:54+0100\n"
"POT-Creation-Date: 2011-12-20 18:48+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2011-12-16 13:54+0100\n"
"POT-Creation-Date: 2011-12-20 18:48+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2011-12-16 13:54+0100\n"
"POT-Creation-Date: 2011-12-20 18:48+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2011-12-16 13:54+0100\n"
"POT-Creation-Date: 2011-12-20 18:48+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2011-12-16 13:54+0100\n"
"POT-Creation-Date: 2011-12-20 18:48+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2011-12-16 13:54+0100\n"
"POT-Creation-Date: 2011-12-20 18:48+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2011-12-16 13:54+0100\n"
"POT-Creation-Date: 2011-12-20 18:48+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2011-12-16 13:54+0100\n"
"POT-Creation-Date: 2011-12-20 18:48+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"