Fix pluralization issues in translations
This commit is contained in:
parent
808c0beae7
commit
9e28f4dbe0
5 changed files with 108 additions and 60 deletions
|
@ -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));
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue