1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-12 01:50:52 +01:00

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 %}
</div>
{% 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>
{% for path in extra_javascript %}
<script src="{{ path }}"></script>

View File

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

View File

@ -9,8 +9,8 @@
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<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') }}">
{{ lang.t('search.message.placeholder') }}
<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.result.placeholder') }}
</div>
<ol class="md-search-result__list"></ol>
</div>

View File

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

View File

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

View File

@ -37,10 +37,10 @@
<div class="md-search__scrollwrap" data-md-scrollfix>
<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') }}">
{{ lang.t('search.message.placeholder') }}
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.result.placeholder') }}
</div>
<ol class="md-search-result__list"></ol>
</div>