From 8bf0bdc508ca1668e14dc4c5e36f89d8a1e3d9b4 Mon Sep 17 00:00:00 2001 From: f Date: Thu, 1 Aug 2019 13:26:47 -0300 Subject: [PATCH] el mensaje de commit sale con el idioma de le usuarie --- app/models/site/config.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/models/site/config.rb b/app/models/site/config.rb index 1fc459cc..8ed79d96 100644 --- a/app/models/site/config.rb +++ b/app/models/site/config.rb @@ -31,9 +31,11 @@ class Site def write(usuarie = nil) return if persisted? - Site::Writer.new(site: site, file: path, - content: content.to_yaml, usuarie: usuarie, - message: I18n.t('sites.repository.config')).save + I18n.with_locale(usuarie.try(:lang) || I18n.default_locale) do + Site::Writer.new(site: site, file: path, + content: content.to_yaml, usuarie: usuarie, + message: I18n.t('sites.repository.config')).save + end # Actualizar el hash para no escribir dos veces @hash = content.hash end