Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New translation system fix #15

Merged
merged 1 commit into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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