From dbb3b2688e9fa1ebc17ede3decedc34aee24ce1f Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 15 Apr 2020 11:21:53 -0600 Subject: [PATCH] Fix missing translation reported by Stefan Unverricht --- ...ass.addressbook_export_contacts_csv.inc.php | 2 +- api/js/etemplate/et2_extension_customfields.js | 4 ++-- api/js/etemplate/et2_extension_customfields.ts | 4 ++-- api/js/etemplate/et2_widget_date.js | 18 +++++++++--------- api/js/etemplate/et2_widget_date.ts | 18 +++++++++--------- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/addressbook/inc/class.addressbook_export_contacts_csv.inc.php b/addressbook/inc/class.addressbook_export_contacts_csv.inc.php index 4b4f83f08b..ef7b763045 100644 --- a/addressbook/inc/class.addressbook_export_contacts_csv.inc.php +++ b/addressbook/inc/class.addressbook_export_contacts_csv.inc.php @@ -455,7 +455,7 @@ class addressbook_export_contacts_csv implements importexport_iface_export_plugi } $filters['owner'] = array( 'name' => 'owner', - 'label' => 'addressbook', + 'label' => lang('addressbook'), 'type' => 'select', 'rows' => 5, 'tags' => true, diff --git a/api/js/etemplate/et2_extension_customfields.js b/api/js/etemplate/et2_extension_customfields.js index ab21fd1a1f..9581e0744b 100644 --- a/api/js/etemplate/et2_extension_customfields.js +++ b/api/js/etemplate/et2_extension_customfields.js @@ -154,13 +154,13 @@ var et2_customfields_list = /** @class */ (function (_super) { if (!field.type) field.type = 'text";'; var setup_function = '_setup_' + (apps[field.type] ? 'link_entry' : field.type.replace("-", "_")); - var attrs = { + var attrs = jQuery.extend({}, this.options[field_name] ? this.options[field_name] : {}, { 'id': id, 'statustext': field.help, 'needed': field.needed, 'readonly': this.getArrayMgr("readonlys").isReadOnly(id, null, this.options.readonly), 'value': this.options.value[et2_customfields_list.PREFIX + field_name] - }; + }); // Can't have a required readonly, it will warn & be removed later, so avoid the warning if (attrs.readonly === true) delete attrs.needed; diff --git a/api/js/etemplate/et2_extension_customfields.ts b/api/js/etemplate/et2_extension_customfields.ts index 8cd2474903..34a24f2436 100644 --- a/api/js/etemplate/et2_extension_customfields.ts +++ b/api/js/etemplate/et2_extension_customfields.ts @@ -225,13 +225,13 @@ export class et2_customfields_list extends et2_valueWidget implements et2_IDetac if(!field.type) field.type = 'text";'; const setup_function = '_setup_' + (apps[field.type] ? 'link_entry' : field.type.replace("-", "_")); - const attrs: any = { + const attrs: any = jQuery.extend({},this.options[field_name] ? this.options[field_name] : {}, { 'id': id, 'statustext': field.help, 'needed': field.needed, 'readonly': this.getArrayMgr("readonlys").isReadOnly(id, null, this.options.readonly), 'value': this.options.value[et2_customfields_list.PREFIX + field_name] - }; + }); // Can't have a required readonly, it will warn & be removed later, so avoid the warning if(attrs.readonly === true) delete attrs.needed; diff --git a/api/js/etemplate/et2_widget_date.js b/api/js/etemplate/et2_widget_date.js index 9ed30510c5..b79170172e 100644 --- a/api/js/etemplate/et2_widget_date.js +++ b/api/js/etemplate/et2_widget_date.js @@ -1268,12 +1268,12 @@ var et2_date_range = /** @class */ (function (_super) { // or Date objects { value: 'Today', - label: 'Today', + label: egw.lang('Today'), from: function (date) { return date; }, to: function (date) { return date; } }, { - label: 'Yesterday', + label: egw.lang('Yesterday'), value: 'Yesterday', from: function (date) { date.setUTCDate(date.getUTCDate() - 1); @@ -1282,7 +1282,7 @@ var et2_date_range = /** @class */ (function (_super) { to: '' }, { - label: 'This week', + label: egw.lang('This week'), value: 'This week', from: function (date) { return egw.week_start(date); }, to: function (date) { @@ -1291,7 +1291,7 @@ var et2_date_range = /** @class */ (function (_super) { } }, { - label: 'Last week', + label: egw.lang('Last week'), value: 'Last week', from: function (date) { var d = egw.week_start(date); @@ -1304,7 +1304,7 @@ var et2_date_range = /** @class */ (function (_super) { } }, { - label: 'This month', + label: egw.lang('This month'), value: 'This month', from: function (date) { date.setUTCDate(1); @@ -1317,7 +1317,7 @@ var et2_date_range = /** @class */ (function (_super) { } }, { - label: 'Last month', + label: egw.lang('Last month'), value: 'Last month', from: function (date) { date.setUTCMonth(date.getUTCMonth() - 1); @@ -1331,7 +1331,7 @@ var et2_date_range = /** @class */ (function (_super) { } }, { - label: 'Last 3 months', + label: egw.lang('Last 3 months'), value: 'Last 3 months', from: function (date) { date.setUTCMonth(date.getUTCMonth() - 2); @@ -1349,7 +1349,7 @@ var et2_date_range = /** @class */ (function (_super) { 'Last quarter'=> array(0,-4,0,0, 0,-4,0,0), // Just a marker */ { - label: 'This year', + label: egw.lang('This year'), value: 'This year', from: function (d) { d.setUTCMonth(0); @@ -1363,7 +1363,7 @@ var et2_date_range = /** @class */ (function (_super) { } }, { - label: 'Last year', + label: egw.lang('Last year'), value: 'Last year', from: function (d) { d.setUTCMonth(0); diff --git a/api/js/etemplate/et2_widget_date.ts b/api/js/etemplate/et2_widget_date.ts index 84492e8bf1..273f8b98f0 100644 --- a/api/js/etemplate/et2_widget_date.ts +++ b/api/js/etemplate/et2_widget_date.ts @@ -1503,12 +1503,12 @@ export class et2_date_range extends et2_inputWidget // or Date objects { value: 'Today', - label: 'Today', + label: egw.lang('Today'), from(date) {return date;}, to(date) {return date;} }, { - label: 'Yesterday', + label: egw.lang('Yesterday'), value: 'Yesterday', from(date) { date.setUTCDate(date.getUTCDate() - 1); @@ -1517,7 +1517,7 @@ export class et2_date_range extends et2_inputWidget to: '' }, { - label: 'This week', + label: egw.lang('This week'), value: 'This week', from(date) {return egw.week_start(date);}, to(date) { @@ -1526,7 +1526,7 @@ export class et2_date_range extends et2_inputWidget } }, { - label: 'Last week', + label: egw.lang('Last week'), value: 'Last week', from(date) { var d = egw.week_start(date); @@ -1539,7 +1539,7 @@ export class et2_date_range extends et2_inputWidget } }, { - label: 'This month', + label: egw.lang('This month'), value: 'This month', from(date) { @@ -1554,7 +1554,7 @@ export class et2_date_range extends et2_inputWidget } }, { - label: 'Last month', + label: egw.lang('Last month'), value: 'Last month', from(date) { @@ -1570,7 +1570,7 @@ export class et2_date_range extends et2_inputWidget } }, { - label: 'Last 3 months', + label: egw.lang('Last 3 months'), value: 'Last 3 months', from(date) { @@ -1590,7 +1590,7 @@ export class et2_date_range extends et2_inputWidget 'Last quarter'=> array(0,-4,0,0, 0,-4,0,0), // Just a marker */ { - label: 'This year', + label: egw.lang('This year'), value: 'This year', from(d) { d.setUTCMonth(0); @@ -1604,7 +1604,7 @@ export class et2_date_range extends et2_inputWidget } }, { - label: 'Last year', + label: egw.lang('Last year'), value: 'Last year', from(d) { d.setUTCMonth(0);