# HG changeset patch # User bsw # Date 1340570920 -7200 # Node ID 9423b529d5a4b969c909fc99ae2743cc11fff208 # Parent 2d2cd7c7937265c01a7e926e6b98a23f84ae5566 Added plural support to more area and delegation count string on member home page diff -r 2d2cd7c79372 -r 9423b529d5a4 app/main/index/_member_home.lua --- a/app/main/index/_member_home.lua Sun Jun 24 22:40:29 2012 +0200 +++ b/app/main/index/_member_home.lua Sun Jun 24 22:48:40 2012 +0200 @@ -124,7 +124,23 @@ ui.container{ attr = { class = "area" }, content = function() ui.container{ attr = { class = "content" }, content = function() slot.put("
") - 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 } + local text + if more_area_count == 1 then + text = _("One more area in this unit") + else + text = _("#{count} more areas in this unit", { count = more_area_count }) + end + ui.link{ module = "unit", view = "show", id = unit.id, text = text } + if delegated_count > 0 then + slot.put(" · ") + local text + if delegated_count == 1 then + text = _("One of them have an area delegation set", { count = delegated_count }) + else + text = _("#{count} of them have an area delegation set", { count = delegated_count }) + end + ui.tag{ content = text } + end end } end } end