diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-08-16 15:15:54 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-08-25 19:43:21 +0300 |
commit | 08c0a1b8527287457cb8db5f41c368af192c606b (patch) | |
tree | 2534ee8c44c34213d4d82cb8aad0d61fa326b78f /rubocop/spec_helpers.rb | |
parent | 842377ab3c5b80a3758ad8c36dc3358bd265bc10 (diff) |
Reject ruby interpolation in externalized strings
When using ruby interpolation in externalized strings, they can't be
detected. Which means they will never be presented to be translated.
To mix variables into translations we need to use `sprintf`
instead.
Instead of:
_("Hello #{subject}")
Use:
_("Hello %{subject}) % { subject: 'world' }
Diffstat (limited to 'rubocop/spec_helpers.rb')
0 files changed, 0 insertions, 0 deletions