iipc/openwayback

Toolbar plurality issue when only a single capture

machawk1 opened this issue · 5 comments

If only one capture exists for a URI-R, the web UI toolbar states, "1 captures", an incorrect plurality.
screen shot 2018-02-04 at 12 00 29 am

This stems from wayback-webapp/src/main/webapp/WEB-INF/replay/Toolbar.jsp reading ToolBar.numCapturesTitle from wayback-webapp/src/main/resources/WaybackUI.properties and providing a formatted value that does not affect the "captures" literal of the formatted string.

OpenWayback 2.3.2

Hm, I find ChoiceFormat a bit confusing, but it would seem the syntax we need for this is:

ToolBar.numCapturesText={0} {0,choice,0#captures|1#capture|1<captures} 

n.b. I've not had a chance to test this yet.

ldko commented

Hi @machawk1 , thanks for reporting the issue. Do you want to submit a PR to fix this?

That fix works for me, @anjackson.

screen shot 2018-02-05 at 11 47 52 am

screen shot 2018-02-05 at 11 53 47 am

I'll submit a PR, @ldko .

PR submitted as #373. /cc @ldko

ldko commented

Thanks @machawk1 and @anjackson !