Normalize placeholder names for search results

This commit is contained in:
squidfunk 2017-03-16 16:04:43 +01:00 committed by Martin Donath
parent c4c7beaefa
commit 675a75e000
7 changed files with 21 additions and 21 deletions

View File

@ -151,7 +151,7 @@
{% endblock %} {% endblock %}
</div> </div>
{% block scripts %} {% block scripts %}
<script src="{{ base_url }}/assets/javascripts/application-95c175e0e2.js"></script> <script src="{{ base_url }}/assets/javascripts/application-1380e43b15.js"></script>
<script>app.initialize({url:{base:"{{ base_url }}"}})</script> <script>app.initialize({url:{base:"{{ base_url }}"}})</script>
{% for path in extra_javascript %} {% for path in extra_javascript %}
<script src="{{ path }}"></script> <script src="{{ path }}"></script>

View File

@ -5,10 +5,10 @@
"meta.comments": "Comments", "meta.comments": "Comments",
"meta.source": "Source", "meta.source": "Source",
"search.placeholder": "Search", "search.placeholder": "Search",
"search.message.placeholder": "Type to start searching", "search.result.placeholder": "Type to start searching",
"search.message.none": "No matching documents", "search.result.none": "No matching documents",
"search.message.one": "1 matching document", "search.result.one": "1 matching document",
"search.message.other": "# matching documents", "search.result.other": "# matching documents",
"source.link.title": "Go to repository", "source.link.title": "Go to repository",
"toc.title": "Table of contents" "toc.title": "Table of contents"
}[key] }}{% endmacro %} }[key] }}{% endmacro %}

View File

@ -9,8 +9,8 @@
<div class="md-search__output"> <div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="result"> <div class="md-search-result" data-md-component="result">
<div class="md-search-result__meta" data-md-message-none="{{ lang.t('search.message.none') }}" data-md-message-one="{{ lang.t('search.message.one') }}" data-md-message-other="{{ lang.t('search.message.other') }}"> <div class="md-search-result__meta" data-md-lang-result-none="{{ lang.t('search.result.none') }}" data-md-lang-result-one="{{ lang.t('search.result.one') }}" data-md-lang-result-other="{{ lang.t('search.result.other') }}">
{{ lang.t('search.message.placeholder') }} {{ lang.t('search.result.placeholder') }}
</div> </div>
<ol class="md-search-result__list"></ol> <ol class="md-search-result__list"></ol>
</div> </div>

View File

@ -62,9 +62,9 @@ export default class Result {
/* Load messages for metadata display */ /* Load messages for metadata display */
this.message_ = { this.message_ = {
none: this.meta_.dataset.mdMessageNone, none: this.meta_.dataset.mdLangResultNone,
one: this.meta_.dataset.mdMessageOne, one: this.meta_.dataset.mdLangResultOne,
other: this.meta_.dataset.mdMessageOther other: this.meta_.dataset.mdLangResultOther
} }
} }

View File

@ -28,10 +28,10 @@
"meta.comments": "Comments", "meta.comments": "Comments",
"meta.source": "Source", "meta.source": "Source",
"search.placeholder": "Search", "search.placeholder": "Search",
"search.message.placeholder": "Type to start searching", "search.result.placeholder": "Type to start searching",
"search.message.none": "No matching documents", "search.result.none": "No matching documents",
"search.message.one": "1 matching document", "search.result.one": "1 matching document",
"search.message.other": "# matching documents", "search.result.other": "# matching documents",
"source.link.title": "Go to repository", "source.link.title": "Go to repository",
"toc.title": "Table of contents" "toc.title": "Table of contents"
}[key] }}{% endmacro %} }[key] }}{% endmacro %}

View File

@ -37,10 +37,10 @@
<div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="result"> <div class="md-search-result" data-md-component="result">
<div class="md-search-result__meta" <div class="md-search-result__meta"
data-md-message-none="{{ lang.t('search.message.none') }}" data-md-lang-result-none="{{ lang.t('search.result.none') }}"
data-md-message-one="{{ lang.t('search.message.one') }}" data-md-lang-result-one="{{ lang.t('search.result.one') }}"
data-md-message-other="{{ lang.t('search.message.other') }}"> data-md-lang-result-other="{{ lang.t('search.result.other') }}">
{{ lang.t('search.message.placeholder') }} {{ lang.t('search.result.placeholder') }}
</div> </div>
<ol class="md-search-result__list"></ol> <ol class="md-search-result__list"></ol>
</div> </div>