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
There is a mixup or singular/plural _state/_states forms in views.
I have config.action_view.raise_on_missing_translations = true
When accessing order state_changes ( e.g. /admin/orders/R074278336/state_changes) I get an error:
I18n::MissingTranslationData in Spree::Admin::StateChanges#index
Showing /home/leemour/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/spree_backend-3.4.1/app/views/spree/admin/state_changes/index.html.erb where line 25 raised:
translation missing: ru.spree.shipment_state.backorder
In locale files, shipment_state is a string, not a hash containing backorder and translates to the equivalent of 'Shipment State'.
There is shipment_states (plural form) entry in locale files that contains backorder and this is the right I18n scope that should be used. The same is with payment_states.
Singular forms (_state) are used in views for translation and are supposed to have string value as in locale files. While plural forms (_states) are used as scopes to translated nested entries (states). There is just another mixup with order_state though, it should be changed to order_states in locale files to be consistent.
I'll include a PR with fixes that make this I18n scopes consistent. I hope you will accept it. #8512
The text was updated successfully, but these errors were encountered:
@damianlegawiec and @leemour: After having worked on #854 in spree_i18n, I really think that resolving this issue would be of great value to all the translation contributers out there.
There is a mixup or singular/plural
_state
/_states
forms in views.I have
config.action_view.raise_on_missing_translations = true
When accessing order state_changes ( e.g.
/admin/orders/R074278336/state_changes
) I get an error:In locale files,
shipment_state
is a string, not a hash containingbackorder
and translates to the equivalent of 'Shipment State'.There is
shipment_states
(plural form) entry in locale files that containsbackorder
and this is the right I18n scope that should be used. The same is withpayment_states
.Singular forms (
_state
) are used in views for translation and are supposed to have string value as in locale files. While plural forms (_states
) are used as scopes to translated nested entries (states). There is just another mixup withorder_state
though, it should be changed toorder_states
in locale files to be consistent.I'll include a PR with fixes that make this I18n scopes consistent. I hope you will accept it.
#8512
The text was updated successfully, but these errors were encountered: