diff --git a/src/Controller/JobsController.php b/src/Controller/JobsController.php index 2d1e678..28779e8 100644 --- a/src/Controller/JobsController.php +++ b/src/Controller/JobsController.php @@ -1,8 +1,4 @@ 'textfield', - '#title' => t('Indeed Publisher ID'), + '#title' => $this->t('Indeed Publisher ID'), '#default_value' => $config->get('indeed_pubid','7681429865724784'), '#required' => TRUE, ); $form['indeed_q'] = array( '#type' => 'textfield', - '#title' => t('Query'), + '#title' => $this->t('Query'), '#default_value' => $config->get('indeed_q'), '#required' => TRUE, ); $form['indeed_l'] = array( '#type' => 'textfield', - '#title' => t('Location'), + '#title' => $this->t('Location'), '#default_value' => $config->get('indeed_l'), ); $form['indeed_radius'] = array( '#type' => 'textfield', - '#title' => t('Radius'), + '#title' => $this->t('Radius'), '#default_value' => $config->get('indeed_radius'), '#rules' => array('rule' => 'numeric', 'error' => 'Must be a number'), '#required' => TRUE, @@ -68,7 +63,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { $form['indeed_limit'] = array( '#type' => 'textfield', - '#title' => t('Limit'), + '#title' => $this->t('Limit'), '#default_value' => $config->get('indeed_limit'), '#required' => TRUE, ); @@ -77,7 +72,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#type' => 'select', '#title' => 'Sort by', '#options' => array('relevance' => t('Relevance'), - 'date' => t('Date'), + 'date' => $this->t('Date'), ), '#default_value' => $config->get('indeed_sort'), ); @@ -85,59 +80,59 @@ public function buildForm(array $form, FormStateInterface $form_state) { $form['indeed_country'] = array( '#type' => 'select', '#title' => 'Country', - '#options' => array('us' => t('United States'), - 'ar' => t('Argentina'), - 'au' => t('Australia'), - 'at' => t('Austria'), - 'bh' => t('Bahrain'), - 'be' => t('Belgium'), - 'br' => t('Brazil'), - 'ca' => t('Canada'), - 'cl' => t('Chile'), - 'cn' => t('China'), - 'co' => t('Colombia'), - 'cz' => t('Czech Republic'), - 'dk' => t('Denmark'), - 'fi' => t('Finland'), - 'fr' => t('France'), - 'de' => t('Germany'), - 'gr' => t('Greece'), - 'hk' => t('Hong Kong'), - 'hu' => t('Hungary'), - 'in' => t('India'), - 'id' => t('Indonesia'), - 'ie' => t('Ireland'), - 'il' => t('Israel'), - 'it' => t('Italy'), - 'jp' => t('Japan'), - 'kr' => t('Korea'), - 'kw' => t('Kuwait'), - 'lu' => t('Luxembourg'), - 'my' => t('Malaysia'), - 'mx' => t('Mexico'), - 'nl' => t('Netherlands'), - 'nz' => t('New Zealand'), - 'no' => t('Norway'), - 'om' => t('Oman'), - 'pk' => t('Pakistan'), - 'pe' => t('Peru'), - 'ph' => t('Philippines'), - 'pl' => t('Poland'), - 'pt' => t('Portugal'), - 'qa' => t('Qatar'), - 'ro' => t('Romania'), - 'ru' => t('Russia'), - 'sa' => t('Saudi Arabia'), - 'sg' => t('Singapore'), - 'za' => t('South Africa'), - 'es' => t('Spain'), - 'se' => t('Sweden'), - 'ch' => t('Switzerland'), - 'tw' => t('Taiwan'), - 'tr' => t('Turkey'), - 'ae' => t('United Arab Emirates'), - 'gb' => t('United Kingdom'), - 've' => t('Venezuela'), + '#options' => array('us' => $this->t('United States'), + 'ar' => $this->t('Argentina'), + 'au' => $this->t('Australia'), + 'at' => $this->t('Austria'), + 'bh' => $this->t('Bahrain'), + 'be' => $this->t('Belgium'), + 'br' => $this->t('Brazil'), + 'ca' => $this->t('Canada'), + 'cl' => $this->t('Chile'), + 'cn' => $this->t('China'), + 'co' => $this->t('Colombia'), + 'cz' => $this->t('Czech Republic'), + 'dk' => $this->t('Denmark'), + 'fi' => $this->t('Finland'), + 'fr' => $this->t('France'), + 'de' => $this->t('Germany'), + 'gr' => $this->t('Greece'), + 'hk' => $this->t('Hong Kong'), + 'hu' => $this->t('Hungary'), + 'in' => $this->t('India'), + 'id' => $this->t('Indonesia'), + 'ie' => $this->t('Ireland'), + 'il' => $this->t('Israel'), + 'it' => $this->t('Italy'), + 'jp' => $this->t('Japan'), + 'kr' => $this->t('Korea'), + 'kw' => $this->t('Kuwait'), + 'lu' => $this->t('Luxembourg'), + 'my' => $this->t('Malaysia'), + 'mx' => $this->t('Mexico'), + 'nl' => $this->t('Netherlands'), + 'nz' => $this->t('New Zealand'), + 'no' => $this->t('Norway'), + 'om' => $this->t('Oman'), + 'pk' => $this->t('Pakistan'), + 'pe' => $this->t('Peru'), + 'ph' => $this->t('Philippines'), + 'pl' => $this->t('Poland'), + 'pt' => $this->t('Portugal'), + 'qa' => $this->t('Qatar'), + 'ro' => $this->t('Romania'), + 'ru' => $this->t('Russia'), + 'sa' => $this->t('Saudi Arabia'), + 'sg' => $this->t('Singapore'), + 'za' => $this->t('South Africa'), + 'es' => $this->t('Spain'), + 'se' => $this->t('Sweden'), + 'ch' => $this->t('Switzerland'), + 'tw' => $this->t('Taiwan'), + 'tr' => $this->t('Turkey'), + 'ae' => $this->t('United Arab Emirates'), + 'gb' => $this->t('United Kingdom'), + 've' => $this->t('Venezuela'), ), '#default_value' => $config->get('indeed_country'), ); diff --git a/src/Form/JobsSearchForm.php b/src/Form/JobsSearchForm.php index 5004ae8..46afcc9 100644 --- a/src/Form/JobsSearchForm.php +++ b/src/Form/JobsSearchForm.php @@ -1,10 +1,5 @@ 'textfield', - '#title' => t('Search Keyword'), + '#title' => $this->t('Search Keyword'), '#default_value' => '', '#size' => 30, '#maxlength' => 128, @@ -41,7 +36,7 @@ class JobsSearchForm extends FormBase { $form['search_location'] = array( '#type' => 'textfield', - '#title' => t('Location'), + '#title' => $this->t('Location'), '#default_value' => '', '#size' => 30, '#maxlength' => 128, @@ -52,8 +47,8 @@ class JobsSearchForm extends FormBase { $form['sort_by'] = array( '#type' => 'radios', - '#title' => t('Sort By'), - '#options'=> array('date' => t('Date'),'relevance' => t('Relevance')), + '#title' => $this->t('Sort By'), + '#options'=> array('date' => $this->t('Date'),'relevance' => $this->t('Relevance')), ); $form['submit'] = array(