Add noOneChoice icu rule and fix broken string

This commit is contained in:
Jamie Kyle 2023-06-13 12:08:18 -07:00 committed by GitHub
parent 5c1b5dcad8
commit 7c8dec4b21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 6 deletions

View file

@ -0,0 +1,17 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { rule } from '../utils/rule';
export default rule('noOneChoice', context => {
return {
enterPlural(element) {
if (Object.keys(element.options).length < 2) {
context.report(
'{plural} requires multiple options for Smartling',
element.location
);
}
},
};
});