1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- 'use strict';
- const hasInterpolation = require('../utils/hasInterpolation');
- module.exports = function (value) {
- let normalizedValue = value;
-
- if (/^[-+*/]/.test(value.charAt(0))) {
- normalizedValue = normalizedValue.slice(1);
- }
-
- if (normalizedValue.startsWith('$')) {
- return false;
- }
-
- if (/^.+\.\$/.test(value)) {
- return false;
- }
-
- if (normalizedValue.startsWith('@')) {
- return false;
- }
-
- if (hasInterpolation(normalizedValue)) {
- return false;
- }
-
-
-
- if (/__MSG_\S+__/.test(value)) {
- return false;
- }
- return true;
- };
|