Project

General

Profile

Actions

Patch #20535

closed

CSV importer raises I18n::InvalidLocale exception if current user's language is "(auto)"

Added by Go MAEDA over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Category:
Importers
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

CSV importer inplemented in r14493 raises I18n::InvalidLocale exception after uploading CSV file if if current user's language selection is "(auto)".

This is probably caused by source:trunk/lib/redmine/i18n.rb@14493#L63.

lang = user.try(:language) || Setting.default_language

User#language returns "" (zero length string) when the users's language setting is "(auto)".
I think current_language method should be called instead of language method.


Files

Actions #1

Updated by Jean-Philippe Lang over 8 years ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang

#current_language returns the current I18n locale and does not depend on user. A simple #presence fixed this error r14504.
Thanks for pointing this out.

Actions

Also available in: Atom PDF