liquid_feedback_frontend
changeset 601:9423b529d5a4
Added plural support to more area and delegation count string on member home page
author | bsw |
---|---|
date | Sun Jun 24 22:48:40 2012 +0200 (2012-06-24) |
parents | 2d2cd7c79372 |
children | ae14bf355868 |
files | app/main/index/_member_home.lua |
line diff
1.1 --- a/app/main/index/_member_home.lua Sun Jun 24 22:40:29 2012 +0200 1.2 +++ b/app/main/index/_member_home.lua Sun Jun 24 22:48:40 2012 +0200 1.3 @@ -124,7 +124,23 @@ 1.4 ui.container{ attr = { class = "area" }, content = function() 1.5 ui.container{ attr = { class = "content" }, content = function() 1.6 slot.put("<br />") 1.7 - ui.link{ content = _("#{count} more areas in this unit, #{delegated_count} of them have an area delegation set", { count = more_area_count, delegated_count = delegated_count }), module = "unit", view = "show", id = unit.id } 1.8 + local text 1.9 + if more_area_count == 1 then 1.10 + text = _("One more area in this unit") 1.11 + else 1.12 + text = _("#{count} more areas in this unit", { count = more_area_count }) 1.13 + end 1.14 + ui.link{ module = "unit", view = "show", id = unit.id, text = text } 1.15 + if delegated_count > 0 then 1.16 + slot.put(" · ") 1.17 + local text 1.18 + if delegated_count == 1 then 1.19 + text = _("One of them have an area delegation set", { count = delegated_count }) 1.20 + else 1.21 + text = _("#{count} of them have an area delegation set", { count = delegated_count }) 1.22 + end 1.23 + ui.tag{ content = text } 1.24 + end 1.25 end } 1.26 end } 1.27 end