Skip to content

Commit d6b554d

Browse files
committed
Use "stamps" instead of "items" and also respect a plural form.
User visible improvement for English language. No functional changes.
1 parent 524a9b3 commit d6b554d

File tree

9 files changed

+31
-29
lines changed

9 files changed

+31
-29
lines changed

src/main/resources/ru/mystamps/i18n/Messages.properties

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ t_add = Add
1414
t_add_country = add country
1515
t_create_category = add category
1616
t_issue_date = Date of release
17-
t_items = item(s)
17+
t_stamp = stamp
18+
t_stamps = stamps
1819
t_wo_perforation_short = without perforation
1920
t_open_my_collection = Open my collection
2021
t_name_in_english = Name (in English)

src/main/resources/ru/mystamps/i18n/Messages_ru.properties

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ t_add_country = добавить страну
1515
t_create_category = добавить категорию
1616
t_issue_date = Дата выпуска
1717
t_wo_perforation_short = б/з
18-
t_items = шт.
18+
t_stamp = шт.
19+
t_stamps = шт.
1920
t_open_my_collection = Открыть мою коллекцию
2021
t_name_in_english = Название (на английском)
2122
t_name_in_russian = Название (на русском)

src/main/webapp/WEB-INF/views/category/info.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,22 +85,22 @@ <h3 id="page-header" th:text="${categoryName}">
8585

8686
<a href="../series/info.html" th:href="@{${INFO_SERIES_PAGE}(id=${series.id})}">
8787
<span th:remove="tag" th:if="${series.releaseYear != null}" th:text="|${series.releaseYear}, |">1980, </span>
88-
<span th:remove="tag" th:text="|${series.quantity}&nbsp;#{t_items}|">10&nbsp;item(s)</span>
88+
<span th:remove="tag" th:text="|${series.quantity}&nbsp;${series.quantity != 1 ? '__#{t_stamps}__' : '__#{t_stamp}__'}|">10&nbsp;stamps</span>
8989
<span th:remove="tag" th:if="${not series.perforated}" th:text="|(#{t_wo_perforation_short})|">(without perforation)</span>
9090
</a>
9191
</li>
9292
<li>
9393
<a href="../country/info.html">Italy</a>&nbsp;&raquo;
9494

9595
<a href="../series/info.html">
96-
22&nbsp;item(s)
96+
22&nbsp;stamps
9797
</a>
9898
</li>
9999
<li>
100100
<a href="../country/info.html">Italy</a>&nbsp;&raquo;
101101

102102
<a href="../series/info.html">
103-
1983, 5&nbsp;item(s)
103+
1983, stamps
104104
</a>
105105
</li>
106106
</ul>

src/main/webapp/WEB-INF/views/collection/estimation.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ <h3 class="text-center" th:text="#{t_collection_of(${ownerName})}">
8585
<a href="../series/info.html" th:href="@{${INFO_SERIES_PAGE}(id=${series.id})}">
8686
<span th:remove="tag" th:if="${series.countryName != null}" th:text="|${series.countryName}, |">Italy, </span>
8787
<span th:remove="tag" th:if="${series.releaseYear != null}" th:text="|${series.releaseYear}, |">1999, </span>
88-
<span th:remove="tag" th:text="|${series.quantity}&nbsp;#{t_items}|">7&nbsp;item(s)</span>
88+
<span th:remove="tag" th:text="|${series.quantity}&nbsp;${series.quantity != 1 ? '__#{t_stamps}__' : '__#{t_stamp}__'}|">7&nbsp;stamps</span>
8989
<span th:remove="tag" th:if="${not series.perforated}" th:text="|(#{t_wo_perforation_short})|">(without perforation)</span>
9090
</a>
9191
<!--/*/
@@ -102,14 +102,14 @@ <h3 class="text-center" th:text="#{t_collection_of(${ownerName})}">
102102
</tr>
103103
<tr>
104104
<td>
105-
<a href="../series/info.html">Italy, 22&nbsp;item(s)</a>
105+
<a href="../series/info.html">Italy, 22&nbsp;stamps</a>
106106
<span class="label label-default">20 out of 22</span>
107107
</td>
108108
<td>14.4 RUB</td>
109109
</tr>
110110
<tr>
111111
<td>
112-
<a href="../series/info.html">Italy, 1983, 5&nbsp;item(s)</a>
112+
<a href="../series/info.html">Italy, 1983, 5&nbsp;stamps</a>
113113
</td>
114114
<td>2 USD</td>
115115
</tr>

src/main/webapp/WEB-INF/views/collection/info.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ <h3 class="text-center" th:text="#{t_collection_of(${ownerName})}">
102102

103103
<a href="../series/info.html" th:href="@{${INFO_SERIES_PAGE}(id=${series.id})}">
104104
<span th:remove="tag" th:if="${series.releaseYear != null}" th:text="|${series.releaseYear}, |">1999, </span>
105-
<span th:remove="tag" th:text="|${series.quantity}&nbsp;#{t_items}|">7&nbsp;item(s)</span>
105+
<span th:remove="tag" th:text="|${series.quantity}&nbsp;${series.quantity != 1 ? '__#{t_stamps}__' : '__#{t_stamp}__'}|">7&nbsp;stamps</span>
106106
<span th:remove="tag" th:if="${not series.perforated}" th:text="|(#{t_wo_perforation_short})|">(without perforation)</span>
107107
</a>
108108
<!--/*/
@@ -118,7 +118,7 @@ <h3 class="text-center" th:text="#{t_collection_of(${ownerName})}">
118118
<a href="../country/info.html">Italy</a>&nbsp;&raquo;
119119

120120
<a href="../series/info.html">
121-
22&nbsp;item(s)
121+
22&nbsp;stamps
122122
</a>
123123
<span class="label label-default">20 out of 22</span>
124124
</li>
@@ -128,7 +128,7 @@ <h3 class="text-center" th:text="#{t_collection_of(${ownerName})}">
128128
<a href="../country/info.html">Italy</a>&nbsp;&raquo;
129129

130130
<a href="../series/info.html">
131-
1983, 5&nbsp;item(s)
131+
1983, 5&nbsp;stamps
132132
</a>
133133
</li>
134134
</ul>

src/main/webapp/WEB-INF/views/country/info.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,22 +85,22 @@ <h3 id="page-header" th:text="${#strings.capitalize(header)}">
8585

8686
<a href="../series/info.html" th:href="@{${INFO_SERIES_PAGE}(id=${series.id})}">
8787
<span th:remove="tag" th:if="${series.releaseYear != null}" th:text="|${series.releaseYear}, |">1980, </span>
88-
<span th:remove="tag" th:text="|${series.quantity}&nbsp;#{t_items}|">10&nbsp;item(s)</span>
88+
<span th:remove="tag" th:text="|${series.quantity}&nbsp;${series.quantity != 1 ? '__#{t_stamps}__' : '__#{t_stamp}__'}|">10&nbsp;stamps</span>
8989
<span th:remove="tag" th:if="${not series.perforated}" th:text="|(#{t_wo_perforation_short})|">(without perforation)</span>
9090
</a>
9191
</li>
9292
<li>
9393
<a href="../category/info.html">Animals</a>&nbsp;&raquo;
9494

9595
<a href="../series/info.html">
96-
22&nbsp;item(s)
96+
22&nbsp;stamps
9797
</a>
9898
</li>
9999
<li>
100100
<a href="../category/info.html">Animals</a>&nbsp;&raquo;
101101

102102
<a href="../series/info.html">
103-
1983, 5&nbsp;item(s)
103+
1983, 5&nbsp;stamps
104104
</a>
105105
</li>
106106
</ul>

src/main/webapp/WEB-INF/views/series/search_result.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,22 +87,22 @@ <h3 class="text-center" th:text="${#strings.capitalize(search_results)}">
8787
</span>
8888
<a href="../series/info.html" th:href="@{${INFO_SERIES_PAGE}(id=${series.id})}">
8989
<span th:remove="tag" th:if="${series.releaseYear != null}" th:text="|${series.releaseYear}, |">1999, </span>
90-
<span th:remove="tag" th:text="|${series.quantity}&nbsp;#{t_items}|">7&nbsp;item(s)</span>
90+
<span th:remove="tag" th:text="|${series.quantity}&nbsp;${series.quantity != 1 ? '__#{t_stamps}__' : '__#{t_stamp}__'}|">7&nbsp;stamps</span>
9191
<span th:remove="tag" th:if="${not series.perforated}" th:text="|(#{t_wo_perforation_short})|">(without perforation)</span>
9292
</a>
9393
</li>
9494
<li>
9595
<a href="../category/info.html">Animals</a>&nbsp;&raquo;
9696
<a href="../country/info.html">Italy</a>&nbsp;&raquo;
9797
<a href="../series/info.html">
98-
22&nbsp;item(s)
98+
22&nbsp;stamps
9999
</a>
100100
</li>
101101
<li>
102102
<a href="../category/info.html">Animals</a>&nbsp;&raquo;
103103
<a href="../country/info.html">Italy</a>&nbsp;&raquo;
104104
<a href="../series/info.html">
105-
1983, 5&nbsp;item(s)
105+
1983, 5&nbsp;stamps
106106
</a>
107107
</li>
108108
</ul>

src/main/webapp/WEB-INF/views/site/index.html

+10-10
Original file line numberDiff line numberDiff line change
@@ -144,71 +144,71 @@ <h4 class="panel-title" th:text="#{t_recently_added_series}">Recently added seri
144144

145145
<a href="../series/info.html" th:href="@{${INFO_SERIES_PAGE}(id=${series.id})}">
146146
<span th:remove="tag" th:if="${series.releaseYear != null}" th:text="|${series.releaseYear}, |">1999, </span>
147-
<span th:remove="tag" th:text="|${series.quantity}&nbsp;#{t_items}|">7&nbsp;item(s)</span>
147+
<span th:remove="tag" th:text="|${series.quantity}&nbsp;${series.quantity != 1 ? '__#{t_stamps}__' : '__#{t_stamp}__'}|">7&nbsp;stamps</span>
148148
<span th:remove="tag" th:if="${not series.perforated}" th:text="|(#{t_wo_perforation_short})|">(without perforation)</span>
149149
</a>
150150
</p>
151151
<p>
152152
<a href="../category/info.html">Animals</a>&nbsp;&raquo;
153153
<a href="../country/info.html">Italy</a>&nbsp;&raquo;
154154
<a href="../series/info.html">
155-
1997, 8&nbsp;item(s)
155+
1997, 8&nbsp;stamps
156156
</a>
157157
</p>
158158
<p>
159159
<a href="../category/info.html">Animals</a>&nbsp;&raquo;
160160
<a href="../country/info.html">Italy</a>&nbsp;&raquo;
161161
<a href="../series/info.html">
162-
2009, 10&nbsp;item(s)
162+
2009, 10&nbsp;stamps
163163
</a>
164164
</p>
165165
<p>
166166
<a href="../category/info.html">Animals</a>&nbsp;&raquo;
167167
<a href="../country/info.html">Italy</a>&nbsp;&raquo;
168168
<a href="../series/info.html">
169-
4&nbsp;item(s)
169+
4&nbsp;stamps
170170
</a>
171171
</p>
172172
<p>
173173
<a href="../category/info.html">Animals</a>&nbsp;&raquo;
174174
<a href="../country/info.html">Italy</a>&nbsp;&raquo;
175175
<a href="../series/info.html">
176-
2002, 12&nbsp;item(s)
176+
2002, 12&nbsp;stamps
177177
</a>
178178
</p>
179179
<p>
180180
<a href="../category/info.html">Animals</a>&nbsp;&raquo;
181181
<a href="../country/info.html">Italy</a>&nbsp;&raquo;
182182
<a href="../series/info.html">
183-
1993, 19&nbsp;item(s)
183+
1993, 19&nbsp;stamps
184184
</a>
185185
</p>
186186
<p>
187187
<a href="../category/info.html">Animals</a>&nbsp;&raquo;
188188
<a href="../country/info.html">Italy</a>&nbsp;&raquo;
189189
<a href="../series/info.html">
190-
4&nbsp;item(s)
190+
4&nbsp;stamps
191191
</a>
192192
</p>
193193
<p>
194194
<a href="../category/info.html">Animals</a>&nbsp;&raquo;
195195
<a href="../country/info.html">Italy</a>&nbsp;&raquo;
196196
<a href="../series/info.html">
197-
11&nbsp;item(s) (without perforation)
197+
11&nbsp;stamps (without perforation)
198198
</a>
199199
</p>
200200
<p>
201201
<a href="../category/info.html">Animals</a>&nbsp;&raquo;
202202
<a href="../country/info.html">Italy</a>&nbsp;&raquo;
203203
<a href="../series/info.html">
204-
2014, 1&nbsp;item(s)
204+
2014, 1&nbsp;stamp
205205
</a>
206206
</p>
207207
<p>
208208
<a href="../category/info.html">Animals</a>&nbsp;&raquo;
209209
<a href="../country/info.html">Italy</a>&nbsp;&raquo;
210210
<a href="../series/info.html">
211-
1996, 16&nbsp;item(s) (without perforation)
211+
1996, 16&nbsp;stamps (without perforation)
212212
</a>
213213
</p>
214214
</div>

src/test/java/ru/mystamps/web/test/integration/cucumber/step/StepDefinitions.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ public void loginAsUser() {
5050
@When("^I add series to my collection$")
5151
public void addSeriesToCollection() {
5252
driver.get(Url.SITE);
53-
driver.findElement(By.linkText("1 item(s)")).click();
53+
driver.findElement(By.linkText("1 stamp")).click();
5454
if (driver.findElements(By.id("series-danger")).size() != 0) {
5555
driver.findElement(By.id("series-danger")).click();
5656
driver.get(Url.SITE);
57-
driver.findElement(By.linkText("1 item(s)")).click();
57+
driver.findElement(By.linkText("1 stamp")).click();
5858
}
5959
driver.findElement(By.id("series-success")).click();
6060
}

0 commit comments

Comments
 (0)