You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
en:
step_2: Once that's done, %{collection_link:go get your collection code here} and copy it.pl:
step_2: Kiedy to się skończy, %{collection_link:weź swój kod kolekcji} i skopiuj go.
Fails the inconsistent interpolations check:
Inconsistent interpolations (1) | i18n-tasks v0.9.31
+--------+--------------------+------------------------------------------------------------------------------+
| Locale | Key | Value |
+--------+--------------------+------------------------------------------------------------------------------+
| pl | static.home.step_2 | Kiedy to się skończy, %{collection_link:weź swój kod kolekcji} i skopiuj go. |
+--------+--------------------+------------------------------------------------------------------------------+
This is because everything between %{ and } is being considered part of the interpolation variable name, but in this case it's only everything up to the :, because I'm using it.
I'm currently working around this by redefining the regex that recognises interpolation variables:
require 'warning'
Warning.ignore(/already initialized constant I18n::Tasks::Interpolations::VARIABLE_REGEX/)
Warning.ignore(/previous definition of VARIABLE_REGEX was here/, %r{.*/i18n-tasks-[0-9.]+/lib/i18n/tasks/interpolations.rb})
module I18n::Tasks
module Interpolations
VARIABLE_REGEX = /%{[^}:]+[}:]/
end
end
But it would be nice if there was a less hacky way to do this.
Perhaps the regex could be configurable?
Or maybe it would be OK for it to terminate at a : out of the box, as I don't think that character can occur in an interpolation variable name anyway?
I would be up for implementing the change, if you agree that it's a good idea and how it should be done.
The text was updated successfully, but these errors were encountered:
For example, this translation:
Fails the inconsistent interpolations check:
This is because everything between
%{
and}
is being considered part of the interpolation variable name, but in this case it's only everything up to the:
, because I'm using it.I'm currently working around this by redefining the regex that recognises interpolation variables:
But it would be nice if there was a less hacky way to do this.
Perhaps the regex could be configurable?
Or maybe it would be OK for it to terminate at a
:
out of the box, as I don't think that character can occur in an interpolation variable name anyway?I would be up for implementing the change, if you agree that it's a good idea and how it should be done.
The text was updated successfully, but these errors were encountered: