When displaying objects in /browse/* and in the JavaScript "Data"
feature use the name key corresponding to the user's locale. E.g. "name:is" for Icelandic. This will fall back on "name". The interface will be equivalent unless the user has selected another language than English in the preferences and objects with localized name:* tags corresponding to the user's language are being displayed.
This commit is contained in:
parent
619cacba7c
commit
658a34714f
2 changed files with 20 additions and 4 deletions
|
@ -8,7 +8,9 @@ module BrowseHelper
|
|||
if version
|
||||
name = t 'printable_name.with_version', :id => name, :version => object.version.to_s
|
||||
end
|
||||
if object.tags.include? 'name'
|
||||
if object.tags.include? "name:#{I18n.locale}"
|
||||
name = t 'printable_name.with_name', :name => object.tags["name:#{I18n.locale}"].to_s, :id => name
|
||||
elsif object.tags.include? 'name'
|
||||
name = t 'printable_name.with_name', :name => object.tags['name'].to_s, :id => name
|
||||
end
|
||||
return name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue