diff --git a/languages/en.ini b/languages/en.ini index 5f326bd9d3b95515fe96ecdb9a497ffd53c73e98..c7d9c55e5cdfa80e309a3fcfbe30faa83c44d3b1 100644 --- a/languages/en.ini +++ b/languages/en.ini @@ -175,6 +175,7 @@ channel_add_more = "Add more channels like this" channel_expand = "Explore related channels" channel_explore = "Explore Channels" channel_search = "Show items as search results" +channel_searchbox_label = "Search for more channels:" Check Hold = "Check Hold" Check Recall = "Check Recall" Checked Out = "Checked Out" diff --git a/module/VuFind/src/VuFind/ChannelProvider/Facets.php b/module/VuFind/src/VuFind/ChannelProvider/Facets.php index 6fe9e3e40d99381b6aaae5a53b8bcfec20ddec18..ba027d7e947c8eb7571a717b70e70cdfedbdba8e 100644 --- a/module/VuFind/src/VuFind/ChannelProvider/Facets.php +++ b/module/VuFind/src/VuFind/ChannelProvider/Facets.php @@ -26,6 +26,7 @@ * @link https://vufind.org/wiki/development Wiki */ namespace VuFind\ChannelProvider; +use VuFind\I18n\Translator\TranslatorAwareInterface; use VuFind\RecordDriver\AbstractBase as RecordDriver; use VuFind\Search\Base\Params, VuFind\Search\Base\Results; use VuFind\Search\Results\PluginManager as ResultsManager; @@ -41,7 +42,9 @@ use Zend\Mvc\Controller\Plugin\Url; * @link https://vufind.org/wiki/development Wiki */ class Facets extends AbstractChannelProvider + implements TranslatorAwareInterface { + use \VuFind\I18n\Translator\TranslatorAwareTrait; /** * Facet fields to use (field name => description). * @@ -311,7 +314,7 @@ class Facets extends AbstractChannelProvider return $this->buildChannel( $results, "$field:{$value['value']}", - "{$this->fields[$field]}: {$value['displayText']}", + $this->translate($this->fields[$field]) . ": {$value['displayText']}", $tokenOnly ); } diff --git a/themes/bootstrap3/templates/channels/channelList.phtml b/themes/bootstrap3/templates/channels/channelList.phtml index b1dcfc1ecae7e56dda0cb3b51fcadc6b765fc018..e79e21117849265f52fb4e4d8375fec3ae13a491 100644 --- a/themes/bootstrap3/templates/channels/channelList.phtml +++ b/themes/bootstrap3/templates/channels/channelList.phtml @@ -12,9 +12,9 @@ <? if (empty($token)): ?> <form action="<?=$this->url('channels-search')?>" class="form-inline"> - Search for more channels: + <?=$this->transEsc('channel_searchbox_label')?> <input type="text" name="lookfor" class="form-control" value="<?=$this->escapeHtmlAttr($this->lookfor) ?>"/> - <input type="submit" class="btn btn-default" /> + <input type="submit" value="<?=$this->escapeHtmlAttr($this->translate('Submit'))?>" class="btn btn-default" /> </form> <? endif; ?>