diff --git a/CHANGELOG.md b/CHANGELOG.md index c43d718..5b28482 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.6.19 + +* [L10n] `from_xml` added missing double quotes for validator checking. + ## 1.6.18 * [L10n] `from_xml` added missing characters for validator checking. diff --git a/lib/src/l10n/validators/require_latin_validator.dart b/lib/src/l10n/validators/require_latin_validator.dart index eb257c0..a1062cb 100644 --- a/lib/src/l10n/validators/require_latin_validator.dart +++ b/lib/src/l10n/validators/require_latin_validator.dart @@ -2,7 +2,7 @@ import 'package:alex/src/l10n/validators/l10n_validator.dart'; class RequireLatinValidator implements L10nValidator { static late final _pattern = RegExp( - r'^[a-z0-9\s​​!¡<=>?¿()*+,\-–—’^_`·./:;@"#$%&\[\\\]{|}~' + r'^[a-z0-9\s​​!¡<=>?¿()*+,\-–—’“”„”«»^_`·./:;@"#$%&\[\\\]{|}~' r"'àāáåäãăâậąấạảắầặằẫẩæßçčćďđèéěêëęẽềếểẹễệẻğïíîìịıỉĩİłľňñńòóöôőỏõổỗờồợởọơớốộøřŕšśșşťțţúùüůűủừửữứûụựưýỹỳỷżźž]+$", unicode: true, caseSensitive: false, diff --git a/lib/src/version.dart b/lib/src/version.dart index 29f343b..7109685 100644 --- a/lib/src/version.dart +++ b/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '1.6.18'; +const packageVersion = '1.6.19'; diff --git a/test/src/l10n/validators/require_latin_validator_test.dart b/test/src/l10n/validators/require_latin_validator_test.dart index 759c18f..d05b93c 100644 --- a/test/src/l10n/validators/require_latin_validator_test.dart +++ b/test/src/l10n/validators/require_latin_validator_test.dart @@ -54,12 +54,28 @@ void main() { expect(validator.validate(r'Day\nWeekday'), true); }); - test('should return true for string with quotes', () { + test('should return true for string with double quotes ""', () { final validator = RequireLatinValidator(); expect(validator.validate('Tap "Allow" button'), true); }); + test('should return true for string with double quotes “”', () { + final validator = RequireLatinValidator(); + + expect(validator.validate('Tap “Allow” button'), true); + }); + test('should return true for string with double quotes „”', () { + final validator = RequireLatinValidator(); + + expect(validator.validate('Tap „Allow” button'), true); + }); + test('should return true for string with double quotes «»', () { + final validator = RequireLatinValidator(); + + expect(validator.validate('Tap «Allow» button'), true); + }); + test('should return true for string with single quotes', () { final validator = RequireLatinValidator();