public String getOverview() { // TRANSLATOR: This provides an overview of the verses in one or more books. The placeholders here deserve extra comment. // {0,number,integer} is a placeholder for the count of verses. It will be displayed as an integer using the number system of the user's locale. // {0,choice,0#verses|1#verse|1<verses} uses the value of the number of verses to display the correct singular or plural form for the word "verse" // Choices are separated by |. And each choice consists of a number, a comparison and the value to use when the comparison is met. // Choices are ordered from smallest to largest. The numbers represent boundaries that determine when a choice is used. // The comparison # means to match exactly. // The comparison < means that the number on the left is less than the number being evaluated. // Here, 0 is the first boundary specified by a #. So every number less than or equal to 0 get the first choice. // In this situation, we are dealing with counting numbers, so we'll never have negative numbers. // Next choice is 1 with a boundary specified by #. So all numbers greater than 0 (the first choice) but less than or equal to 1 get the second choice. // In this situation, the only number that will match is 1. // The final choice is 1<. This means that every number greater than 1 will get this choice. // Putting the first two placeholders together we get "0 verses", "1 verse" or "n verses" (where n is 2 or more) // The reason to go into this is that this pattern works for English. Other languages might have different ways of representing singular and plurals. // {1,number,integer} is a placeholder for the count of Bible books. It works the same way as the count of verses. // {1,choice,0#books|1#book|1<books} is the placeholder for the singular or plural of "book" return JSMsg.gettext("{0,number,integer} {0,choice,0#verses|1#verse|1<verses} in {1,number,integer} {1,choice,0#books|1#book|1<books}", Integer.valueOf(countVerses()), Integer.valueOf(booksInPassage() )); }