diff options
| -rw-r--r-- | app/helpers/application_helper.rb | 7 | ||||
| -rw-r--r-- | config/locales/en.yml | 1 | ||||
| -rw-r--r-- | config/locales/fr.yml | 1 |
3 files changed, 6 insertions, 3 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index da293905f..2ce1de497 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,3 +1,4 @@ + module ApplicationHelper include NewapplicationHelper @@ -15,9 +16,9 @@ module ApplicationHelper def page_header_meta(object) info = t('last_update', time: l(object.updated_at, format: :short)) - if object.try(:versions) && object.versions.last - author = object.versions.last.try(:whodunnit) - info = "#{info} #{t('whodunnit', author: author)}" if author + if object.try(:versions) + author = object.versions.try(:last).try(:whodunnit) || t('default_whodunnit') + info = "#{info} #{t('whodunnit', author: author)}" end content_tag :div, info.html_safe, class: 'small' end diff --git a/config/locales/en.yml b/config/locales/en.yml index 58259a1d4..4834ceef4 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -49,6 +49,7 @@ en: last_update: 'Last update on<br>%{time}' whodunnit: 'By %{author}' + default_whodunnit: 'web service' last_sync: 'Last sync on %{time}' validity_range: '%{debut} > %{end}' bounding_dates: '%{debut} > %{end}' diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 98231787f..24482166c 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -49,6 +49,7 @@ fr: last_update: 'Dernière mise à jour<br>le %{time}' whodunnit: 'Par %{author}' + default_whodunnit: 'web service' last_sync: 'Dernière mise à jour le %{time}' validity_range: '%{debut} > %{end}' bounding_dates: '%{debut} > %{end}' |
