Project

General

Profile

« Previous | Next » 

Revision 83a04d84

Added by Marc Dequènes over 15 years ago

  • ID 83a04d84853f5c0bbc497d4d1865859c15471058

[evol] added language selection in the Person through a new I18n class providing the link between local available languages and user preferences in the database

View differences:

bin/postman
result_tag = report.ok? ? "SUCCESS" : "FAILURE"
logger.info "Processing result: #{result_tag} (#{report.error})"
if report.user
if report.user.preferredLanguage
logger.debug "User preference for langage: " + report.user.preferredLanguage
set_locale(report.user.preferredLanguage)
else
logger.debug "No user preference for langage, using english"
set_locale("en")
end
else
set_locale("en")
end
i18n = I18n.instance
i18n.set_language_for_user(report.user)
unless report.ok?
if report.warn_sender

Also available in: Unified diff