diff --git a/addons/website_links/i18n/website_links.pot b/addons/website_links/i18n/website_links.pot index fd5528c860b..d9e72221bd3 100644 --- a/addons/website_links/i18n/website_links.pot +++ b/addons/website_links/i18n/website_links.pot @@ -15,6 +15,27 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: website_links +#. openerp-web +#: code:addons/website_links/static/src/js/website_links_charts.js:53 +#, python-format +msgid " clicks" +msgstr "" + +#. module: website_links +#. openerp-web +#: code:addons/website_links/static/src/js/website_links_charts.js:104 +#, python-format +msgid " countries" +msgstr "" + +#. module: website_links +#. openerp-web +#: code:addons/website_links/static/src/js/website_links_charts.js:57 +#, python-format +msgid "# of clicks" +msgstr "" + #. module: website_links #: model:ir.ui.view,arch_db:website_links.share_page_menu msgid "Track this Page" @@ -137,6 +158,15 @@ msgstr "" msgid "Stats" msgstr "" +#. module: website_links +#. openerp-web +#: code:addons/website_links/static/src/js/website_links_charts.js:210 +#: code:addons/website_links/static/src/js/website_links_charts.js:211 +#: code:addons/website_links/static/src/js/website_links_charts.js:212 +#, python-format +msgid "There is no data to show" +msgstr "" + #. module: website_links #: model:ir.ui.view,arch_db:website_links.create_shorten_url msgid "Those trackers can be used in Google Analytics to track clicks and visitors, or in Odoo reports to track opportunities and related revenues." @@ -154,6 +184,13 @@ msgstr "" msgid "Unable to get recent links" msgstr "" +#. module: website_links +#. openerp-web +#: code:addons/website_links/static/src/js/website_links_charts.js:99 +#, python-format +msgid "Undefined" +msgstr "" + #. module: website_links #. openerp-web #: code:addons/website_links/static/src/js/website_links.js:239 diff --git a/addons/website_links/static/src/js/website_links_charts.js b/addons/website_links/static/src/js/website_links_charts.js index bd8d2e89064..8a39e531ef9 100644 --- a/addons/website_links/static/src/js/website_links_charts.js +++ b/addons/website_links/static/src/js/website_links_charts.js @@ -3,9 +3,11 @@ odoo.define('website_links.charts', function (require) { var Widget = require('web.Widget'); var base = require('web_editor.base'); +var core = require('web.core'); var website = require('website.website'); var Model = require('web.Model'); +var _t = core._t; var exports = {}; if(!$('.o_website_links_chart').length) { @@ -48,11 +50,11 @@ if(!$('.o_website_links_chart').length) { // Set title var nb_clicks = _.reduce(clicks_array, function(total, val) { return total + val[1] ; }, 0); - $(this.$element + ' .title').html(nb_clicks + ' clicks'); + $(this.$element + ' .title').html(nb_clicks + _t(' clicks')); // Fit data into the NVD3 scheme var chart_data = [{}]; - chart_data[0]['key'] = '# of clicks'; + chart_data[0]['key'] = _t('# of clicks'); chart_data[0]['values'] = clicks_array; nv.addGraph(function() { @@ -94,12 +96,12 @@ if(!$('.o_website_links_chart').length) { // Process country data to fit into the NVD3 scheme var processed_data = []; for(var i = 0 ; i < this.data.length ; i++) { - var country_name = this.data[i]['country_id'] ? this.data[i]['country_id'][1] : 'Undefined'; + var country_name = this.data[i]['country_id'] ? this.data[i]['country_id'][1] : _t('Undefined'); processed_data.push({'label':country_name + ' (' + this.data[i]['country_id_count'] + ')', 'value':this.data[i]['country_id_count']}); } // Set title - $(this.$element + ' .title').html(this.data.length + ' countries'); + $(this.$element + ' .title').html(this.data.length + _t(' countries')); nv.addGraph(function() { var chart = nv.models.pieChart() @@ -205,9 +207,9 @@ if(!$('.o_website_links_chart').length) { }); } else { - $('#all_time_charts').prepend('There is no data to show'); - $('#last_month_charts').prepend('There is no data to show'); - $('#last_week_charts').prepend('There is no data to show'); + $('#all_time_charts').prepend(_t('There is no data to show')); + $('#last_month_charts').prepend(_t('There is no data to show')); + $('#last_week_charts').prepend(_t('There is no data to show')); } });