Merge "i18n: Avoid string concatenations to make translation life happier"
This commit is contained in:
commit
c66b905d6a
@ -214,7 +214,8 @@
|
||||
}
|
||||
|
||||
function loadFailed(reason) {
|
||||
toastService.add('error', gettext("resource load failed: " + reason));
|
||||
var msg = interpolate(gettext("resource load failed: %s"), [reason]);
|
||||
toastService.add('error', msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -90,8 +90,8 @@
|
||||
$modalInstance.close(createdKeypair);
|
||||
},
|
||||
function error() {
|
||||
var errorMessage = gettext('Unable to generate') + ' "' + ctrl.keypair + '". ' +
|
||||
gettext('Please try again.');
|
||||
var errorMessage = interpolate(gettext('Unable to generate "%s". Please try again.'),
|
||||
[ctrl.keypair]);
|
||||
toastService.add('error', errorMessage);
|
||||
}
|
||||
);
|
||||
|
@ -144,7 +144,9 @@
|
||||
* @returns {undefined} No return value
|
||||
*/
|
||||
function notifyUserAndAssign(newKeypair) {
|
||||
toastService.add('success', gettext('Created keypair: ' + newKeypair.name));
|
||||
toastService.add('success',
|
||||
interpolate(gettext('Created keypair: %s'),
|
||||
[newKeypair.name]));
|
||||
assignKeypair(newKeypair);
|
||||
ctrl.createdKeypair = newKeypair;
|
||||
ctrl.isKeypairCreated = true;
|
||||
|
Loading…
Reference in New Issue
Block a user