Skip to content

Commit

Permalink
Fix some error messages being shown as untranslated
Browse files Browse the repository at this point in the history
The translations for these strings were not being shown even when they had
been translated. The problem was the trailing space character which had got
dropped by the translation tools. Hence, the translation key in
translations.js didn't match exactly the one given to
gettextCatalog.getString().
  • Loading branch information
paulijar committed Mar 16, 2024
1 parent cc5eae2 commit 6c5057c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions js/app/controllers/maincontroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ function ($rootScope, $scope, $timeout, $window, ArtistFactory,
reason = response.status;
break;
}
OC.Notification.showTemporary(
gettextCatalog.getString('Failed to load the collection: ') + reason);
const errMsg = gettextCatalog.getString('Failed to load the collection:');
OC.Notification.showTemporary(errMsg + ' ' + reason);
});

};
Expand Down
4 changes: 2 additions & 2 deletions js/app/controllers/views/radioviewcontroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ angular.module('Music').controller('RadioViewController', [
},
function (error) {
station.busy = false;
OC.Notification.showTemporary(
gettextCatalog.getString('Failed to delete the radio station: ') + error.status);
const errMsg = gettextCatalog.getString('Failed to delete the radio station:');
OC.Notification.showTemporary(errMsg + ' ' + error.status);
}
);
}
Expand Down
12 changes: 6 additions & 6 deletions js/app/controllers/views/settingsviewcontroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ angular.module('Music').controller('SettingsViewController', [
},
function(error) { // error handling
$scope.collectionResetOngoing = false;
OC.Notification.showTemporary(
gettextCatalog.getString('Failed to reset the collection: ') + error.status);
const errMsg = gettextCatalog.getString('Failed to reset the collection:');
OC.Notification.showTemporary(errMsg + ' ' + error.status);
}
);
};
Expand Down Expand Up @@ -208,8 +208,8 @@ angular.module('Music').controller('SettingsViewController', [
},
function(error) { // error handling
$scope.radioResetOngoing = false;
OC.Notification.showTemporary(
gettextCatalog.getString('Failed to reset the radio stations: ') + error.status);
const errMsg = gettextCatalog.getString('Failed to reset the radio stations:');
OC.Notification.showTemporary(errMsg + ' ' + error.status);
}
);
}
Expand Down Expand Up @@ -238,8 +238,8 @@ angular.module('Music').controller('SettingsViewController', [
},
function(error) { // error handling
$scope.podcastsResetOngoing = false;
OC.Notification.showTemporary(
gettextCatalog.getString('Failed to reset the podcast channels: ') + error.status);
const errMsg = gettextCatalog.getString('Failed to reset the podcast channels:');
OC.Notification.showTemporary(errMsg + ' ' + error.status);
}
);
}
Expand Down

0 comments on commit 6c5057c

Please sign in to comment.