Allow translating search bar placeholder

Add `extra.i18n.search` variable.
This commit is contained in:
Bertrand Marron 2016-11-05 13:58:19 +01:00
parent 68b1800d38
commit 34a5779628
No known key found for this signature in database
GPG Key ID: 48AA2E49D78AC764
3 changed files with 8 additions and 8 deletions

View File

@ -175,14 +175,14 @@ extra:
### Localization
The **Previous** and **Next** labels in the footer can easily be changed by
defining the variables `extra.i18n.prev` and `extra.i18n.next`:
The following texts and labels can easily be changed by defining variables:
``` yaml
extra:
i18n:
prev: 'Previous'
next: 'Next'
prev: 'Previous' # "Previous" label in the footer
next: 'Next' # "Next" label in the footer
search: 'Search' # "Search" placeholder in the search bar
```
### Adding a GitHub and Twitter account

View File

@ -44,10 +44,10 @@
</div>
<div class="stretch">
<div class="field">
<input class="query" type="text" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false">
<input class="query" type="text" placeholder="{{ config.extra.get('i18n', {}).search | default('Search') }}" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false">
</div>
</div>
<div class="button button-reset" role="button" aria-label="Search">
<div class="button button-reset" role="button" aria-label="{{ config.extra.get('i18n', {}).search | default('Search') }}">
<button class="toggle-button icon icon-close" id="reset-search"></button>
</div>
</div>

View File

@ -69,14 +69,14 @@
<!-- Search form -->
<div class="stretch">
<div class="field">
<input class="query" type="text" placeholder="Search"
<input class="query" type="text" placeholder="{{ config.extra.get('i18n', {}).search | default('Search') }}"
autocapitalize="off" autocorrect="off" autocomplete="off"
spellcheck="false" />
</div>
</div>
<!-- Empty search -->
<div class="button button-reset" role="button" aria-label="Search">
<div class="button button-reset" role="button" aria-label="{{ config.extra.get('i18n', {}).search | default('Search') }}">
<button class="toggle-button icon icon-close"
id="reset-search"></button>
</div>