Fix pluralization issues in translations

This commit is contained in:
Jamie Kyle 2023-04-04 12:05:50 -07:00 committed by GitHub
parent 808c0beae7
commit 9e28f4dbe0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 108 additions and 60 deletions

View file

@ -11,7 +11,11 @@ export { Location };
export type Context = {
messageId: string;
report(message: string, location: Location | void): void;
report(
message: string,
location: Location | void,
locationOffset?: number
): void;
};
export type RuleFactory = {
@ -27,7 +31,7 @@ export function rule(id: string, ruleFactory: RuleFactory): Rule {
return {
id,
run(elements, context) {
traverse(elements, ruleFactory(context));
traverse(null, elements, ruleFactory(context));
},
};
}