5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 02:11:42 +00:00

el mensaje de commit sale con el idioma de le usuarie

This commit is contained in:
f 2019-08-01 13:26:47 -03:00
parent 9a69edb05b
commit 8bf0bdc508
No known key found for this signature in database
GPG key ID: 2AE5A13E321F953D

View file

@ -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