Skip to content

Commit

Permalink
Merge pull request #15 from Oksydan/translation-fix
Browse files Browse the repository at this point in the history
New translation system fix
  • Loading branch information
Oksydan authored Aug 24, 2023
2 parents 46a5d4a + 66ab254 commit 3fa6210
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 7 additions & 2 deletions is_searchbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,17 @@ public function __construct()

parent::__construct();

$this->displayName = $this->l('Search bar');
$this->description = $this->l('Adds a quick search field to your website.');
$this->displayName = $this->trans('Search bar', [], 'Modules.Issearchbar.Admin');
$this->description = $this->trans('Adds a quick search field to your website.', [], 'Modules.Issearchbar.Admin');

$this->ps_versions_compliancy = ['min' => '8.0.0', 'max' => _PS_VERSION_];
}

public function isUsingNewTranslationSystem()
{
return true;
}

/**
* @return bool
*/
Expand Down
6 changes: 5 additions & 1 deletion views/templates/hook/is_searchbar.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
<form class="search-form js-search-form" data-search-controller-url="{$ajax_search_url}" method="get" action="{$search_controller_url}">
<div class="search-form__form-group">
<input type="hidden" name="controller" value="search">
<input class="js-search-input search-form__input form-control" placeholder="{l s='Enter what you are looking for' d='Modules.Issearchbar.Issearchbar'}" type="text" name="s" value="{$search_string}">
<input class="js-search-input search-form__input form-control"
placeholder="{l s='Enter what you are looking for' d='Modules.Issearchbar.Form'}"
type="text"
name="s"
value="{$search_string}">
<button type="submit" class="search-form__btn btn">
<span class="material-icons">search</span>
</button>
Expand Down

0 comments on commit 3fa6210

Please sign in to comment.