mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
added missing context param in angular-gettext's gettext.getPlural()
This commit is contained in:
parent
480f7557d2
commit
2ddb0343a2
@ -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) {
|
||||
|
||||
4
types/angular-gettext/index.d.ts
vendored
4
types/angular-gettext/index.d.ts
vendored
@ -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>;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user