From 9ec8effed8ada4ff745211aac869a0d3d61cce46 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Fri, 5 Feb 2016 13:46:51 +0400 Subject: [PATCH] Allow localising the separator Some languages (e.g. Arabic) use a different comma. --- src/forecast_io.js | 4 ++-- src/openweathermap_org.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/forecast_io.js b/src/forecast_io.js index 92a7198..5178381 100644 --- a/src/forecast_io.js +++ b/src/forecast_io.js @@ -170,9 +170,9 @@ function parseWeatherCurrent() { if (this._text_in_panel) weatherInfoT = temperature; - this._weatherInfo.text = weatherInfoC + ((weatherInfoC && weatherInfoT) ? ", " : "") + weatherInfoT; + this._weatherInfo.text = weatherInfoC + ((weatherInfoC && weatherInfoT) ? _(", ") : "") + weatherInfoT; - this._currentWeatherSummary.text = comment + ", " + temperature; + this._currentWeatherSummary.text = comment + _(", ") + temperature; this._currentWeatherLocation.text = location; this._currentWeatherCloudiness.text = parseInt(json.cloudCover * 100) + ' %'; this._currentWeatherHumidity.text = parseInt(json.humidity * 100) + ' %'; diff --git a/src/openweathermap_org.js b/src/openweathermap_org.js index 69749b6..3c7849d 100644 --- a/src/openweathermap_org.js +++ b/src/openweathermap_org.js @@ -362,9 +362,9 @@ function parseWeatherCurrent() { if (this._text_in_panel) weatherInfoT = temperature; - this._weatherInfo.text = weatherInfoC + ((weatherInfoC && weatherInfoT) ? ", " : "") + weatherInfoT; + this._weatherInfo.text = weatherInfoC + ((weatherInfoC && weatherInfoT) ? _(", ") : "") + weatherInfoT; - this._currentWeatherSummary.text = comment + ", " + temperature; + this._currentWeatherSummary.text = comment + _(", ") + temperature; this._currentWeatherLocation.text = location; this._currentWeatherCloudiness.text = json.clouds.all + ' %'; this._currentWeatherHumidity.text = json.main.humidity + ' %';