Spree Commerce missing translation es-MX

286 views Asked by At

Hi im new to spree and im building an online ecommerce solution for a client in Mexico, i need all translations working properly, the issue appears when I hit SignOut or Cerrar Sesion, which logs the user out, i get the following: translation missing: es-MX.devise.sessions.spree_user.signed_out, I cannot locate a solution for this, please help.

1

There are 1 answers

1
mroach On BEST ANSWER

I encountered the same problem when setting up a store in Danish. The keys at this path are missing from the translation files. My quick fix was editing my config/locales/da.yml and adding a devise section:

da:
  devise:
    sessions:
      signed_in: Du er nu logget ind.
      signed_out: Du er nu logget ud.

You don't need the sub-key spree_user (resource name) since translation finder will automatically move "up" the tree when not found. You can read into devise_controller from the devise gem if interested.

You can find the Mexican Spanish terms you need from here: https://github.com/spree-contrib/spree_i18n/blob/master/config/locales/es-MX.yml#L319

For some reason the files in spree_i18n call the node user_sessions rather than sessions. This seems to be the root cause of the problem.