Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.6.19 #42

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/l10n/validators/require_latin_validator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/version.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 17 additions & 1 deletion test/src/l10n/validators/require_latin_validator_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Loading