[theme-my-login]一部日本語化ができない
-
お世話になります。下記事象につき、ぜひ皆様のお力添えを頂きたく存じます。
〇theme-my-login6.3.12
上のプラグインでログイン回数制限機能を使っており、
アカウントがロックされた時のメール送信をONにしたとき、
以下の文を日本語化する方法が分からず、苦戦しております。
①アカウントロック解除リンクを記載したメールの以下の本文
「For your security, your account has been locked because of too many failed login attempts. To unlock your account please click the following link:」
② ①メール記載のリンクをクリックしたときにログインフォームで表示している、
エラーメッセージ欄に出る以下の文
「Your account has been unlocked. You may now log in.」試したこと:
・theme-my-login-ja.pot をpoeditで開き、該当する文言を検索。
=>部分的にしか一致せず、書き換えは断念。
・function.phpに以下を記述したが、表示は変わらず。
#文章の区切りは、いくつか試したがいずれもNG。
②のエラーメッセージに関しては、ユーザー登録時や失敗時の文言は
下記で変更出来ている。
‘function custom_gettext( $translated, $text, $domain ) {
$custom_translates = array(
‘default’ => array(
‘For your security, your account has been locked because of too many failed login attempts.’=>’翻訳1’,
‘To unlock your account please click the following link’=>’翻訳2’,
‘Your account has been unlocked’=>’翻訳3’,
‘You may now log in’=>’翻訳4’
)
);
if ( isset( $custom_translates[$domain] ) ) {
$translated = str_replace( array_keys( $custom_translates[$domain] ), $custom_translates[$domain], $translated );
}
return $translated;
}’
- トピック「[theme-my-login]一部日本語化ができない」には新たに返信することはできません。