mirror of
https://gitlab.com/Alamantus/Readlebee.git
synced 2025-05-15 06:31:17 +02:00
Add localiation to search options
This commit is contained in:
parent
ebc5c9b06d
commit
c5e73242d0
2 changed files with 32 additions and 7 deletions
|
@ -37,6 +37,15 @@
|
||||||
"header": "Search",
|
"header": "Search",
|
||||||
"placeholder": "Search for Books",
|
"placeholder": "Search for Books",
|
||||||
"button_text": "Search",
|
"button_text": "Search",
|
||||||
|
"search_source_label": "Search Source",
|
||||||
|
"search_source_help_button": "What's This?",
|
||||||
|
"search_source_help_header": "What does \"Search Source\" mean?",
|
||||||
|
"search_source_help_text": "This refers to where the search tries to look for data. Each source can be easily contributed to if you want to add missing books or correct errors.",
|
||||||
|
"search_source_help_inventaire": "Sources and extends data from WikiData, the service structure that powers Wikipedia and the like. Offers as many language options as possible.",
|
||||||
|
"search_source_help_openLibrary": "Sources data from Internet Archive and may provide a digital copy to read. Only offers English unless a work is in another language.",
|
||||||
|
"search_by_label": "Search By",
|
||||||
|
"search_by_title": "Title",
|
||||||
|
"search_by_author": "Author",
|
||||||
"loading": "Loading...",
|
"loading": "Loading...",
|
||||||
"no_results": "None Found",
|
"no_results": "None Found",
|
||||||
"no_results_suggestion": "If you're expecting book data, go and help fill out the Inventaire database!",
|
"no_results_suggestion": "If you're expecting book data, go and help fill out the Inventaire database!",
|
||||||
|
|
|
@ -48,27 +48,38 @@ export const searchView = (state, emit, i18n) => {
|
||||||
<div>
|
<div>
|
||||||
${modal('searchSourceInfo', controller, [
|
${modal('searchSourceInfo', controller, [
|
||||||
html`<p>
|
html`<p>
|
||||||
This refers to where the search tries to look for data.
|
${__('search.search_source_help_text')}
|
||||||
</p>`,
|
</p>`,
|
||||||
html`<ul>
|
html`<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href="https://inventaire.io" target="_blank">
|
<a href="https://inventaire.io" target="_blank">
|
||||||
Inventaire
|
Inventaire
|
||||||
</a>
|
</a>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
${__('search.search_source_help_inventaire')}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="https://openlibrary.org" target="_blank">
|
<a href="https://openlibrary.org" target="_blank">
|
||||||
Open Library
|
Open Library
|
||||||
</a>
|
</a>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
${__('search.search_source_help_openLibrary')}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>`,
|
</ul>`,
|
||||||
], {
|
], {
|
||||||
buttonText: 'What\'s This?',
|
buttonText: __('search.search_source_help_button'),
|
||||||
buttonClasses: 'small marginless pseudo button pull-right',
|
buttonClasses: 'small marginless pseudo button pull-right',
|
||||||
headerText: 'What does "Search Source" mean?',
|
headerText: __('search.search_source_help_header'),
|
||||||
})}
|
})}
|
||||||
<label>
|
<label>
|
||||||
Search Source
|
${__('search.search_source_label')}
|
||||||
|
|
||||||
<select onchange=${event => {
|
<select onchange=${event => {
|
||||||
controller.state.searchSource = event.target.value;
|
controller.state.searchSource = event.target.value;
|
||||||
}}>
|
}}>
|
||||||
|
@ -82,7 +93,8 @@ export const searchView = (state, emit, i18n) => {
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
Search By<br>
|
${__('search.search_by_label')}<br>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
<input type="radio" name="searchBy" value="title"
|
<input type="radio" name="searchBy" value="title"
|
||||||
${controller.state.searchBy === 'title' ? 'checked' : null}
|
${controller.state.searchBy === 'title' ? 'checked' : null}
|
||||||
|
@ -92,7 +104,9 @@ export const searchView = (state, emit, i18n) => {
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<span class="checkable">Title</span>
|
<span class="checkable">
|
||||||
|
${__('search.search_by_title')}
|
||||||
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
<input type="radio" name="searchBy" value="author"
|
<input type="radio" name="searchBy" value="author"
|
||||||
|
@ -103,7 +117,9 @@ export const searchView = (state, emit, i18n) => {
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<span class="checkable">Author</span>
|
<span class="checkable">
|
||||||
|
${__('search.search_by_author')}
|
||||||
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</section>`,
|
</section>`,
|
||||||
|
|
Loading…
Add table
Reference in a new issue