X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=langfilter%2Flangfilter.php;h=81f9f6ecb4bf12f772a540a35eabd9f5c952ca96;hb=d1d526001ce7a0ea4fea845e3ae8911c95549e2f;hp=dcf12dfd6e76136277923e30857cb88fa8bdb024;hpb=4045ae6988a4a2e69f29947e9159d620586aba28;p=friendica-addons.git diff --git a/langfilter/langfilter.php b/langfilter/langfilter.php index dcf12dfd..81f9f6ec 100644 --- a/langfilter/langfilter.php +++ b/langfilter/langfilter.php @@ -1,5 +1,4 @@ t("Language Filter"), - '$intro' => t('This addon tries to identify the language of a postings. If it does not match any language spoken by you (see below) the posting will be collapsed. Remember detecting the language is not perfect, especially with short postings.'), - '$enabled' => array('langfilter_enable', t('Use the language filter'), $enable_checked, ''), - '$languages' => array('langfilter_languages', t('I speak'), $languages, t('List of abbreviations (iso2 codes) for languages you speak, comma separated. For example "de,it".')), - '$minconfidence' => array('langfilter_minconfidence', t('Minimum confidence in language detection'), $minconfidence, t('Minimum confidence in language detection being correct, from 0 to 100. Posts will not be filtered when the confidence of language detection is below this percent value.')), - '$minlength' => array('langfilter_minlength', t('Minimum length of message body'), $minlength, t('Minimum length of message body for language filter to be used. Posts shorter than this number of characters will not be filtered.')), - '$submit' => t('Save Settings'), - )); + $s .= replace_macros($t, [ + '$title' => L10n::t("Language Filter"), + '$intro' => L10n::t('This addon tries to identify the language of a postings. If it does not match any language spoken by you (see below) the posting will be collapsed. Remember detecting the language is not perfect, especially with short postings.'), + '$enabled' => ['langfilter_enable', L10n::t('Use the language filter'), $enable_checked, ''], + '$languages' => ['langfilter_languages', L10n::t('I speak'), $languages, L10n::t('List of abbreviations (iso2 codes) for languages you speak, comma separated. For example "de,it".')], + '$minconfidence' => ['langfilter_minconfidence', L10n::t('Minimum confidence in language detection'), $minconfidence, L10n::t('Minimum confidence in language detection being correct, from 0 to 100. Posts will not be filtered when the confidence of language detection is below this percent value.')], + '$minlength' => ['langfilter_minlength', L10n::t('Minimum length of message body'), $minlength, L10n::t('Minimum length of message body for language filter to be used. Posts shorter than this number of characters will not be filtered.')], + '$submit' => L10n::t('Save Settings'), + ]); return; } @@ -100,7 +101,7 @@ function langfilter_addon_settings_post(App $a, &$b) } PConfig::set(local_user(), 'langfilter', 'minlength', $minlength); - info(t('Language Filter Settings saved.') . EOL); + info(L10n::t('Language Filter Settings saved.') . EOL); } } @@ -177,6 +178,6 @@ function langfilter_prepare_body(App $a, &$b) if (!$spoken) { $rnd = random_string(8); - $b['html'] = ''; + $b['html'] = ''; } }