support icu messageformat for translations
This commit is contained in:
parent
b5c514e1d1
commit
6d56f8b8aa
35 changed files with 839 additions and 104 deletions
17
build/intl-linter/rules/noLegacyVariables.ts
Normal file
17
build/intl-linter/rules/noLegacyVariables.ts
Normal 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('noLegacyVariables', context => {
|
||||
return {
|
||||
enterLiteral(element) {
|
||||
if (/(\$.+?\$)/.test(element.value)) {
|
||||
context.report(
|
||||
'String must not contain legacy $variables$',
|
||||
element.location
|
||||
);
|
||||
}
|
||||
},
|
||||
};
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue