From 10f39be7593fc6e9d73a0fe9d1b44899896c72fd Mon Sep 17 00:00:00 2001 From: Andy Hee Date: Fri, 9 Feb 2018 17:02:47 +0700 Subject: [PATCH 1/3] Improved description and displayed text --- blockem/blockem.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/blockem/blockem.php b/blockem/blockem.php index 3f4b8865..45272e00 100644 --- a/blockem/blockem.php +++ b/blockem/blockem.php @@ -1,7 +1,7 @@ * @@ -56,7 +56,8 @@ function blockem_addon_settings(&$a, &$s) $s .= ''; $s .= '
'; - $s .= ''; + $s .= '
'. L10n::t("Hides user's content by collapsing posts. Also replaces their avatar with generic image.") . '
'; + $s .= ''; $s .= ''; $s .= '
'; @@ -136,7 +137,7 @@ function blockem_prepare_body(&$a,&$b) { } if($found) { $rnd = random_string(8); - $b['html'] = ''; + $b['html'] = ''; } } From 51c5650a200a9609b470e9ecbc48c59f149dd52e Mon Sep 17 00:00:00 2001 From: Andy Hee Date: Thu, 29 Mar 2018 20:22:05 +0700 Subject: [PATCH 2/3] modified: lang/C/messages.po modified: langfilter.php --- langfilter/lang/C/messages.po | 43 +++++++++++++++++++++-------------- langfilter/langfilter.php | 6 ++--- 2 files changed, 29 insertions(+), 20 deletions(-) diff --git a/langfilter/lang/C/messages.po b/langfilter/lang/C/messages.po index e4995ec9..b916c1ff 100644 --- a/langfilter/lang/C/messages.po +++ b/langfilter/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-09-22 15:18+0200\n" +"POT-Creation-Date: 2018-03-29 18:54+0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,52 +17,61 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: langfilter.php:44 +#: langfilter.php:57 msgid "Language Filter" msgstr "" -#: langfilter.php:45 +#: langfilter.php:58 msgid "" -"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." +"This addon tries to identify the language posts are writen in. If it does " +"not match any language specifed below, posts will be hidden by collapsing " +"them. (Note: detecting languages is not perfect, especially for short texts.)" msgstr "" -#: langfilter.php:46 +#: langfilter.php:59 msgid "Use the language filter" msgstr "" -#: langfilter.php:47 -msgid "I speak" +#: langfilter.php:60 +msgid "Able to read" msgstr "" -#: langfilter.php:47 +#: langfilter.php:60 msgid "" "List of abbreviations (iso2 codes) for languages you speak, comma separated. " "For example \"de,it\"." msgstr "" -#: langfilter.php:48 +#: langfilter.php:61 msgid "Minimum confidence in language detection" msgstr "" -#: langfilter.php:48 +#: langfilter.php:61 msgid "" "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." msgstr "" -#: langfilter.php:49 +#: langfilter.php:62 +msgid "Minimum length of message body" +msgstr "" + +#: langfilter.php:62 +msgid "" +"Minimum length of message body for language filter to be used. Posts shorter " +"than this number of characters will not be filtered." +msgstr "" + +#: langfilter.php:63 msgid "Save Settings" msgstr "" -#: langfilter.php:73 +#: langfilter.php:104 msgid "Language Filter Settings saved." msgstr "" -#: langfilter.php:123 +#: langfilter.php:181 #, php-format -msgid "unspoken language %s - Click to open/close" +msgid "Hidden content in %s - Click to open/close" msgstr "" diff --git a/langfilter/langfilter.php b/langfilter/langfilter.php index 81f9f6ec..ec52dc62 100644 --- a/langfilter/langfilter.php +++ b/langfilter/langfilter.php @@ -55,9 +55,9 @@ function langfilter_addon_settings(App $a, &$s) $t = get_markup_template("settings.tpl", "addon/langfilter/"); $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.'), + '$intro' => L10n::t('This addon tries to identify the language posts are writen in. If it does not match any language specifed below, posts will be hidden by collapsing them. (Note: detecting languages is not perfect, especially for short texts.)'), '$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".')], + '$languages' => ['langfilter_languages', L10n::t('Able to read'), $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'), @@ -178,6 +178,6 @@ function langfilter_prepare_body(App $a, &$b) if (!$spoken) { $rnd = random_string(8); - $b['html'] = ''; + $b['html'] = ''; } } From d298f3c19c7901338b6d7b19031ac74634b8c53c Mon Sep 17 00:00:00 2001 From: Andy Hee Date: Thu, 29 Mar 2018 22:45:42 +0700 Subject: [PATCH 3/3] modified: lang/C/messages.po modified: langfilter.php --- langfilter/lang/C/messages.po | 9 +++++---- langfilter/langfilter.php | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/langfilter/lang/C/messages.po b/langfilter/lang/C/messages.po index b916c1ff..959efd15 100644 --- a/langfilter/lang/C/messages.po +++ b/langfilter/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-03-29 18:54+0700\n" +"POT-Creation-Date: 2018-03-29 22:43+0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -25,7 +25,7 @@ msgstr "" msgid "" "This addon tries to identify the language posts are writen in. If it does " "not match any language specifed below, posts will be hidden by collapsing " -"them. (Note: detecting languages is not perfect, especially for short texts.)" +"them." msgstr "" #: langfilter.php:59 @@ -59,8 +59,9 @@ msgstr "" #: langfilter.php:62 msgid "" -"Minimum length of message body for language filter to be used. Posts shorter " -"than this number of characters will not be filtered." +"Minimum number of characters in message body for filter to be used. Posts " +"shorter than this will not be filtered. Note: Language detection is " +"unreliable for short content (<200 characters)." msgstr "" #: langfilter.php:63 diff --git a/langfilter/langfilter.php b/langfilter/langfilter.php index ec52dc62..f0d8b15f 100644 --- a/langfilter/langfilter.php +++ b/langfilter/langfilter.php @@ -55,11 +55,11 @@ function langfilter_addon_settings(App $a, &$s) $t = get_markup_template("settings.tpl", "addon/langfilter/"); $s .= replace_macros($t, [ '$title' => L10n::t("Language Filter"), - '$intro' => L10n::t('This addon tries to identify the language posts are writen in. If it does not match any language specifed below, posts will be hidden by collapsing them. (Note: detecting languages is not perfect, especially for short texts.)'), + '$intro' => L10n::t('This addon tries to identify the language posts are writen in. If it does not match any language specifed below, posts will be hidden by collapsing them.'), '$enabled' => ['langfilter_enable', L10n::t('Use the language filter'), $enable_checked, ''], '$languages' => ['langfilter_languages', L10n::t('Able to read'), $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.')], + '$minlength' => ['langfilter_minlength', L10n::t('Minimum length of message body'), $minlength, L10n::t('Minimum number of characters in message body for filter to be used. Posts shorter than this will not be filtered. Note: Language detection is unreliable for short content (<200 characters).')], '$submit' => L10n::t('Save Settings'), ]);