Commit graph

20 commits

Author SHA1 Message Date
Tom Hughes
e71355c5bb Fix new rubocop warnings 2024-01-23 18:14:28 +00:00
Anton Khorev
17ba464b1e Use test() instead of define_method() to add locale-specific tests 2024-01-12 15:05:45 +03:00
Tom Hughes
0c2e471708 Fix new rubocop warnings 2023-12-05 18:13:13 +00:00
Tom Hughes
62c68b9f20 Merge remote-tracking branch 'upstream/pull/4077' 2023-07-05 15:10:12 +01:00
Andy Allan
d58cae6ff6 Avoid using the zero key for pluralisation in English
This makes it impossible to translate to other languages that use the
`zero:` key, e.g. for other numbers that end in zero.

An alternative approach would be possible in future, when ruby-i18n
and rails and translatewiki all have full support for `0:` and `1:` keys.

Fixes #3997
2023-07-05 14:47:39 +01:00
Andy Allan
22c137cc0c Expand raw html checks to all translation files
This closes a potential security issue, where unreviewed html could
be added via translation files.
2023-07-05 13:47:12 +01:00
Andy Allan
387d130e87 Add some validations for i18n values
These only apply to the en.yml file for now, but can be expanded
in due course.
2023-04-12 13:58:55 +01:00
Tom Hughes
0e2a66e8de Fix new rubocop warnings 2020-08-06 18:42:16 +01:00
Tom Hughes
a221aabe3c Check that pluralizable translations have an "other" key 2020-06-11 19:21:41 +01:00
Tom Hughes
7a1615bc55 Fix rubocop-minitest warnings 2020-04-15 19:07:13 +01:00
Tom Hughes
4ee60c0f8f Make all translation lookup errors throw exceptions in test mode 2019-12-16 21:54:11 +00:00
Tom Hughes
a83030dab7 Fix new rubocop warnings 2018-01-22 18:55:45 +00:00
Tom Hughes
8dae890a76 Fix rubocop warnings 2017-10-05 19:18:38 +01:00
Tom Hughes
5b33f3f8e3 Fix rubocop warnings 2017-06-02 00:08:30 +01:00
Tom Hughes
5f4dcd34ff Fix some rubocop warnings 2016-09-15 22:41:07 +01:00
Tom Hughes
dc2a2c8ebd Standardise on double quoted strings 2015-02-20 19:47:26 +00:00
Tom Hughes
5cbd4038ed Fix rubocop style issues 2015-02-20 08:56:16 +00:00
Tom Hughes
baf10cd392 Fix rubocop lint issues 2015-02-20 08:56:16 +00:00
Tom Hughes
ef7f3d800c Fix most auto-correctable rubocop issues 2015-02-20 08:56:16 +00:00
Tom Hughes
98184dfb9c Reorganise tests to match modern rails test layout 2014-02-26 00:13:19 +00:00
Renamed from test/unit/i18n_test.rb (Browse further)