Made legend on the reports graphs translatable

This commit is contained in:
Geert De Deckere 2012-06-11 10:32:57 +02:00
parent 731f588b31
commit 93871ca786
1 changed files with 5 additions and 5 deletions

View File

@ -150,12 +150,12 @@ function woocommerce_tooltip_js() {
jQuery("#tooltip").remove();
if (item.series.label=="Sales amount") {
if (item.series.label=="<?php echo esc_js( __( 'Sales amount', 'woocommerce' ) ) ?>") {
var y = item.datapoint[1].toFixed(2);
showTooltip(item.pageX, item.pageY, item.series.label + " - " + "<?php echo get_woocommerce_currency_symbol(); ?>" + y);
} else if (item.series.label=="Number of sales") {
} else if (item.series.label=="<?php echo esc_js( __( 'Number of sales', 'woocommerce' ) ) ?>") {
var y = item.datapoint[1];
showTooltip(item.pageX, item.pageY, item.series.label + " - " + y);
@ -444,7 +444,7 @@ function woocommerce_sales_overview() {
var placeholder = jQuery("#placeholder");
var plot = jQuery.plot(placeholder, [ { label: "Number of sales", data: d }, { label: "Sales amount", data: d2, yaxis: 2 } ], {
var plot = jQuery.plot(placeholder, [ { label: "<?php echo esc_js( __( 'Number of sales', 'woocommerce' ) ) ?>", data: d }, { label: "<?php echo esc_js( __( 'Sales amount', 'woocommerce' ) ) ?>", data: d2, yaxis: 2 } ], {
series: {
lines: { show: true },
points: { show: true }
@ -634,7 +634,7 @@ function woocommerce_daily_sales() {
var placeholder = jQuery("#placeholder");
var plot = jQuery.plot(placeholder, [ { label: "Number of sales", data: d }, { label: "Sales amount", data: d2, yaxis: 2 } ], {
var plot = jQuery.plot(placeholder, [ { label: "<?php echo esc_js( __( 'Number of sales', 'woocommerce' ) ) ?>", data: d }, { label: "<?php echo esc_js( __( 'Sales amount', 'woocommerce' ) ) ?>", data: d2, yaxis: 2 } ], {
series: {
lines: { show: true },
points: { show: true }
@ -820,7 +820,7 @@ function woocommerce_monthly_sales() {
var placeholder = jQuery("#placeholder");
var plot = jQuery.plot(placeholder, [ { label: "Number of sales", data: d }, { label: "Sales amount", data: d2, yaxis: 2 } ], {
var plot = jQuery.plot(placeholder, [ { label: "<?php echo esc_js( __( 'Number of sales', 'woocommerce' ) ) ?>", data: d }, { label: "<?php echo esc_js( __( 'Sales amount', 'woocommerce' ) ) ?>", data: d2, yaxis: 2 } ], {
series: {
lines: { show: true },
points: { show: true, align: "left" }