Commit graph

2 commits

Author SHA1 Message Date
Bob Van Landuyt
23d5501500 Remove unused constant
This removes an unused constant from the
`RubyInterpolationInTranslation`. The constant was used in a first
implementation of this class.
2018-09-19 15:01:27 +02:00
Bob Van Landuyt
08c0a1b852 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' }
2018-08-25 18:43:21 +02:00