Files
Desktop/build/intl-linter/rules/onePlural.std.ts
Fedor Indutny 44076ece79 Rename files
2025-10-16 23:45:44 -07:00

20 lines
424 B
TypeScript

// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { rule } from '../utils/rule.std.js';
export default rule('onePlural', context => {
let plurals = 0;
return {
enterPlural(element) {
plurals += 1;
if (plurals > 1) {
context.report(
'Multiple {plural} is not supported by Smartling',
element.location
);
}
},
};
});