Skip to content

Commit

Permalink
use language english name in admin panel & fix en.yml, see #18
Browse files Browse the repository at this point in the history
  • Loading branch information
nliautaud committed Oct 22, 2017
1 parent fadbc32 commit cd378dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions p01-contact/lang/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ strings:

captcha_info: "The native anti-spam and anti-error mechanisms should prevent all undesirable submissions. If you need a higher level of security you can create a custom captcha by adding a field with a required answer. Finally, you can insert a Google reCaptcha by using a <em>captcha</em> field with the below settings."
recaptcha_public_key: "reCaptcha public key"
recaptcha_public_key_sub: "Google reCaptcha public key. See <a href="https://www.google.com/recaptcha/admin">reCaptcha admin</a>."
recaptcha_public_key_sub: "Google reCaptcha public key. See <a href=\"https://www.google.com/recaptcha/admin\">reCaptcha admin</a>."
recaptcha_secret_key: "reCaptcha secret key"
recaptcha_secret_key_sub: "Google reCaptcha secret key. See <a href="https://www.google.com/recaptcha/admin">reCaptcha admin</a>."
recaptcha_secret_key_sub: "Google reCaptcha secret key. See <a href=\"https://www.google.com/recaptcha/admin\">reCaptcha admin</a>."

debug: "Debug mode"
debug_sub: "Disable mail sending, display p01-contact data structure, data sent by POST and the email that would have been sent."
Expand Down
6 changes: 3 additions & 3 deletions p01-contact/src/P01contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,11 @@ private function panelContent($system = 'gs')
$lang = $this->config('lang');
$tpl_data->langsoptions = '<option value=""'.($lang==''?' selected="selected" ':'').'>Default</option>';
foreach ($this->langs() as $language) {
$tpl_data->langsoptions .= '<option value="' . $language['lang_key'] . '" ';
if ($lang == $language['lang_key']) {
$tpl_data->langsoptions .= '<option value="' . $language['key'] . '" ';
if ($lang == $language['key']) {
$tpl_data->langsoptions .= 'selected="selected" ';
}
$tpl_data->langsoptions .= '/>' . $language['lang_name'] . '</option>';
$tpl_data->langsoptions .= '/>' . $language['english_name'] . '</option>';
}

$html = $this->renderTemplate($system.'_settings', $tpl_data);
Expand Down

0 comments on commit cd378dc

Please sign in to comment.