Skip to content

Commit

Permalink
Correct localization for "No DrillThrough data"
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitaeverywhere committed Dec 19, 2015
1 parent 13c2aa7 commit e339662
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "LightPivotTable",
"author": "ZitRo",
"version": "1.4.5",
"version": "1.4.6",
"description": "A lightweight pivot table for MDX2JSON source for InterSystems Cache",
"main": "test/testServer.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion source/js/DataSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ DataSource.prototype.getCurrentData = function (callback) {
obj, i, u;

if (!arr.length) return {
error: "No DrillThrough data."
error: pivotLocale.get(4)
};

for (i in arr[0]) {
Expand Down
7 changes: 6 additions & 1 deletion source/js/PivotLocale.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ PivotLocale.prototype.LOCALES = [
"ru": "Возникла ошибка при получении данных с сервера.",
"en": "Error while trying to retrieve data from server.",
"de": "Beim Abrufen der Daten vom Server ist ein Fehler aufgetreten."
},
{ // 4
"ru": "Нет данных для отображения.",
"en": "No data to display.",
"de": "Keine Daten zum anzeigen."
}
];

Expand Down Expand Up @@ -71,7 +76,7 @@ PivotLocale.prototype.setLocale = function (locale) {
*/
PivotLocale.prototype.get = function (index) {

return (this.LOCALES[index] || {})[this.LOCALE] || "{not localized}";
return (this.LOCALES[index] || {})[this.LOCALE] || ("{not localized: " + index + "}");

};

Expand Down

0 comments on commit e339662

Please sign in to comment.