0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-18 02:21:47 -05:00

Merge pull request #6556 from ErisDS/i18n-jsdoc

Fix jsDoc on i18n.t()
This commit is contained in:
Sebastian Gierlinger 2016-02-22 09:33:45 +01:00
commit 62f9bff597

View file

@ -17,10 +17,10 @@ I18n = {
* Helper method to find and compile the given data context with a proper string resource.
*
* @param {string} path Path with in the JSON language file to desired string (ie: "errors.init.jsNotBuilt")
* @param {json} context
* @param {object} [bindings]
* @returns {string}
*/
t: function t(path, context) {
t: function t(path, bindings) {
var string = I18n.findString(path),
msg;
@ -32,11 +32,11 @@ I18n = {
string.forEach(function (s) {
var m = new MessageFormat(s, currentLocale);
msg.push(m.format(context));
msg.push(m.format(bindings));
});
} else {
msg = new MessageFormat(string, currentLocale);
msg = msg.format(context);
msg = msg.format(bindings);
}
return msg;