Skip to content

Commit da08d63

Browse files
committed
/country/{id}/{slug}: enhance header/title to make them more meaningful and SEO friendly.
Addressed to #322
1 parent abdbf33 commit da08d63

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ t_category_list = category list
151151
# country/add.html
152152

153153
# country/info.html
154-
t_country_info = Country info
154+
t_stamps_of = stamps of {0}
155155
t_country_just_added = Country has been added.<br />Now you could <a href="{0}" class="alert-link">proceed with creating series</a>.
156156

157157
# country/list.html

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ t_category_list = список категорий
151151
# country/add.html
152152

153153
# country/info.html
154-
t_country_info = Информация о стране
154+
t_stamps_of = марки страны {0}
155155
t_country_just_added = Страна добавлена. Теперь вы можете <a href="{0}" class="alert-link">создать серию</a>.
156156

157157
# country/list.html

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<meta charset="utf-8" />
88
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
99
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
10-
<title th:text="|#{t_my_stamps}: #{t_country_info}|">My stamps: Country info</title>
10+
<title th:text="|#{t_my_stamps}: #{t_stamps_of(${countryName})}|">My stamps: stamps of Italy</title>
1111
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.ico" th:href="${FAVICON_ICO}" />
1212
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" th:href="${BOOTSTRAP_CSS}" />
1313
<link rel="stylesheet" href="https://cdn.rawgit.com/usrz/bootstrap-languages/3ac2a3d2b27ac43a471cd99e79d378a03b2c6b5f/languages.min.css" th:href="${BOOTSTRAP_LANGUAGE}" />
@@ -88,9 +88,9 @@
8888
</div>
8989
</div>
9090
<div class="row">
91-
<div id="content" class="col-sm-12">
92-
<h3 th:text="${countryName}">
93-
Italy
91+
<div id="content" class="col-sm-12" th:with="header=#{t_stamps_of(${countryName})}">
92+
<h3 th:text="${#strings.capitalize(header)}">
93+
Stamps of Italy
9494
</h3>
9595

9696
<!--/*/

src/test/java/ru/mystamps/web/tests/cases/WhenAdminAddCountry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public void shouldBeRedirectedToPageWithInfoAboutCountryAfterCreation() {
231231
.replace("{slug}", TEST_COUNTRY_NAME_EN.toLowerCase());
232232

233233
assertThat(page.getCurrentUrl()).matches(expectedUrl);
234-
assertThat(page.getHeader()).isEqualTo(TEST_COUNTRY_NAME_EN);
234+
assertThat(page.getHeader()).isEqualTo("Stamps of " + TEST_COUNTRY_NAME_EN);
235235
}
236236

237237
@Test(

0 commit comments

Comments
 (0)