added missing context param in angular-gettext's gettext.getPlural()

This commit is contained in:
Krzysztof "Bushee" Nowaczyk 2018-08-07 15:49:08 +02:00
parent 480f7557d2
commit 2ddb0343a2
2 changed files with 4 additions and 2 deletions

View File

@ -24,6 +24,8 @@ angular.module("myApp").controller("helloController", function (gettextCatalog:
angular.module("myApp").controller("helloController", function (gettextCatalog: angular.gettext.gettextCatalog) {
var myString2: string = gettextCatalog.getPlural(3, "Bird", "Birds");
var myStringWithScope: string = gettextCatalog.getPlural(4, "{{color}} Bird", "{{color}} Birds", {color: 'Blue'});
var myStringWithContext: string = gettextCatalog.getPlural(5, "pick", "picks", null, 'noun');
});
angular.module("myApp").controller("helloController", function (gettextCatalog: angular.gettext.gettextCatalog) {

View File

@ -1,4 +1,4 @@
// Type definitions for angular-gettext v2.1.0
// Type definitions for angular-gettext v2.1.1
// Project: https://angular-gettext.rocketeer.be/
// Definitions by: Ákos Lukács <https://github.com/AkosLukacs>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@ -66,7 +66,7 @@ declare module 'angular' {
getString(string: string, scope?: any, context?: string): string;
/** Translate a plural string with the given context. */
getPlural(n: number, string: string, stringPlural: string, context?: any): string;
getPlural(n: number, string: string, stringPlural: string, scope?: any, context?: string): string;
/** Load a set of translation strings from a given URL.This should be a JSON catalog generated with grunt-angular-gettext. More details https://angular-gettext.rocketeer.be/dev-guide/lazy-loading/ */
loadRemote(url: string): ng.IHttpPromise<any>;