From d8ff666d06da2b17345841cf01e6ad0877ed3c9a Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 27 Aug 2026 07:47:36 -0700 Subject: [PATCH 1/3] Update all translations --- language/ar/autogroups_acp.php | 8 +++---- language/ar/autogroups_install.php | 23 +++++++++++++++++++++ language/cs/autogroups_acp.php | 10 ++++----- language/cs/autogroups_install.php | 23 +++++++++++++++++++++ language/da/autogroups_acp.php | 10 ++++----- language/da/autogroups_install.php | 23 +++++++++++++++++++++ language/es/autogroups_acp.php | 8 +++---- language/es/autogroups_install.php | 23 +++++++++++++++++++++ language/et/autogroups_acp.php | 10 ++++----- language/fr/autogroups_install.php | 23 +++++++++++++++++++++ language/hr/autogroups_acp.php | 10 ++++----- language/hr/autogroups_install.php | 23 +++++++++++++++++++++ language/hr_x_vi/autogroups_acp.php | 10 ++++----- language/hr_x_vi/autogroups_install.php | 23 +++++++++++++++++++++ language/it/autogroups_acp.php | 8 +++---- language/pl/autogroups_acp.php | 10 ++++----- language/pl/autogroups_install.php | 23 +++++++++++++++++++++ language/pt_br/autogroups_acp.php | 10 ++++----- language/pt_br/autogroups_install.php | 23 +++++++++++++++++++++ language/ru/autogroups_acp.php | 8 +++---- language/ru/autogroups_install.php | 23 +++++++++++++++++++++ language/sk/autogroups_acp.php | 8 +++---- language/sk/autogroups_install.php | 23 +++++++++++++++++++++ language/tr/autogroups_acp.php | 2 +- language/tr/autogroups_install.php | 23 +++++++++++++++++++++ language/zh_cmn_hans/autogroups_install.php | 23 +++++++++++++++++++++ language/zh_cmn_hant/autogroups_acp.php | 8 +++---- language/zh_cmn_hant/autogroups_install.php | 23 +++++++++++++++++++++ 28 files changed, 382 insertions(+), 60 deletions(-) create mode 100644 language/ar/autogroups_install.php create mode 100644 language/cs/autogroups_install.php create mode 100644 language/da/autogroups_install.php create mode 100644 language/es/autogroups_install.php create mode 100644 language/fr/autogroups_install.php create mode 100644 language/hr/autogroups_install.php create mode 100644 language/hr_x_vi/autogroups_install.php create mode 100644 language/pl/autogroups_install.php create mode 100644 language/pt_br/autogroups_install.php create mode 100644 language/ru/autogroups_install.php create mode 100644 language/sk/autogroups_install.php create mode 100644 language/tr/autogroups_install.php create mode 100644 language/zh_cmn_hans/autogroups_install.php create mode 100644 language/zh_cmn_hant/autogroups_install.php diff --git a/language/ar/autogroups_acp.php b/language/ar/autogroups_acp.php index 90ded00..c10ad45 100644 --- a/language/ar/autogroups_acp.php +++ b/language/ar/autogroups_acp.php @@ -58,10 +58,10 @@ 'ACP_AUTOGROUPS_NOTIFY' => 'إشعار الأعضاء ', 'ACP_AUTOGROUPS_NOTIFY_EXPLAIN' => 'ارسال تنبيه إلى الأعضاء بأنه تم اضافتهم أو حذفهم تلقائياً من هذه المجموعة.', - 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'Excluded groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'Exclude members of these groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'Members belonging to any group selected in this list will be ignored. Leave this field blank if you want this Auto Group applied to all members of your board. Select multiple groups by holding CTRL (or ⌘CMD on Mac) and selecting the groups.', - 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'An error occurred. The group for this condition can not also be selected in the excluded groups field.', + 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'المجموعات المستثناة', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'استثناء أعضاء هذه المجموعات', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'سيتم تجاهل الأعضاء المنتمين إلى أي مجموعة محددة في هذه القائمة. اترك هذا الحقل فارغاً إذا أردت تطبيق المجموعة التلقائية على جميع أعضاء منتداك. لتحديد عدة مجموعات، اضغط باستمرار على CTRL (أو ⌘CMD على نظام Mac) ثم حدد المجموعات.', + 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'حدث خطأ. لا يمكن أيضاً تحديد مجموعة هذا الشرط في حقل المجموعات المستثناة.', 'ACP_AUTOGROUPS_EXEMPT_GROUP' => 'تجاهل المجموعة الإفتراضية ', 'ACP_AUTOGROUPS_EXEMPT_GROUP_EXPLAIN' => 'لن يتم تغيير المجموعة الإفتراضية للعضو بواسطة المجموعة التلقائية إذا تم تحديدها من القائمة هذه. تستطيع تحديد أكثر من مجموعة بواسطة النقر باستمرار على زر الكنترول CTRL (أو ⌘CMD في نظام الماك Mac) ومن ثم التقر بالماوس على المجموعات التي تريدها.', diff --git a/language/ar/autogroups_install.php b/language/ar/autogroups_install.php new file mode 100644 index 0000000..541794d --- /dev/null +++ b/language/ar/autogroups_install.php @@ -0,0 +1,23 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = array(); +} + +$lang = array_merge($lang, array( + 'AUTOGROUPS_NOT_ENABLEABLE' => 'تعذر تفعيل المجموعات التلقائية. لم يتم استيفاء الحد الأدنى من متطلبات phpBB 3.2.0 و/أو PHP 5.5.0.', +)); diff --git a/language/cs/autogroups_acp.php b/language/cs/autogroups_acp.php index f6d5405..2418c27 100644 --- a/language/cs/autogroups_acp.php +++ b/language/cs/autogroups_acp.php @@ -57,10 +57,10 @@ 'ACP_AUTOGROUPS_NOTIFY' => 'Informovat uživatele', 'ACP_AUTOGROUPS_NOTIFY_EXPLAIN' => 'Zaslat oznámení uživateli poté, co byl automaticky přidán nebo odebán z této skupiny.', - 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'Excluded groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'Exclude members of these groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'Members belonging to any group selected in this list will be ignored. Leave this field blank if you want this Auto Group applied to all members of your board. Select multiple groups by holding CTRL (or ⌘CMD on Mac) and selecting the groups.', - 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'An error occurred. The group for this condition can not also be selected in the excluded groups field.', + 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'Vyloučené skupiny', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'Vyloučit členy těchto skupin', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'Členové patřící do kterékoli skupiny vybrané v tomto seznamu budou ignorováni. Pokud chcete tuto automatickou skupinu použít na všechny členy fóra, ponechte toto pole prázdné. Více skupin vyberete přidržením klávesy CTRL (nebo ⌘CMD na Macu) a výběrem skupin.', + 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'Došlo k chybě. Skupinu pro tuto podmínku nelze zároveň vybrat v poli vyloučených skupin.', 'ACP_AUTOGROUPS_EXEMPT_GROUP' => 'Nastavte výchozí skupině výjimky', 'ACP_AUTOGROUPS_EXEMPT_GROUP_EXPLAIN' => 'Auto skupiny nezmění výchozí skupinu uživatele, pokud je zvolena v tomto seznamu. Vyberte několik skupin přidrženímCTRL (nebo ⌘CMD v Mac) a výberte skupiny.', @@ -75,7 +75,7 @@ // Conditions 'AUTOGROUPS_TYPE_BIRTHDAYS' => 'Věk uživatelé', - 'AUTOGROUPS_TYPE_LASTVISIT' => 'Days since last visit', + 'AUTOGROUPS_TYPE_LASTVISIT' => 'Dny od poslední návštěvy', 'AUTOGROUPS_TYPE_MEMBERSHIP' => 'Členem dnů', 'AUTOGROUPS_TYPE_POSTS' => 'Příspěvky', 'AUTOGROUPS_TYPE_WARNINGS' => 'Varování', diff --git a/language/cs/autogroups_install.php b/language/cs/autogroups_install.php new file mode 100644 index 0000000..6803c79 --- /dev/null +++ b/language/cs/autogroups_install.php @@ -0,0 +1,23 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = array(); +} + +$lang = array_merge($lang, array( + 'AUTOGROUPS_NOT_ENABLEABLE' => 'Automatické skupiny se nepodařilo povolit. Nebyly splněny minimální požadavky phpBB 3.2.0 a/nebo PHP 5.5.0.', +)); diff --git a/language/da/autogroups_acp.php b/language/da/autogroups_acp.php index e571ead..9e5b805 100644 --- a/language/da/autogroups_acp.php +++ b/language/da/autogroups_acp.php @@ -57,10 +57,10 @@ 'ACP_AUTOGROUPS_NOTIFY' => 'Informer brugere', 'ACP_AUTOGROUPS_NOTIFY_EXPLAIN' => 'Send en notifikation til brugere efter automatisk tilføjelse eller fjernelse fra gruppen.', - 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'Excluded groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'Exclude members of these groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'Members belonging to any group selected in this list will be ignored. Leave this field blank if you want this Auto Group applied to all members of your board. Select multiple groups by holding CTRL (or ⌘CMD on Mac) and selecting the groups.', - 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'An error occurred. The group for this condition can not also be selected in the excluded groups field.', + 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'Ekskluderede grupper', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'Ekskluder medlemmer af disse grupper', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'Medlemmer, der tilhører en af grupperne valgt på denne liste, ignoreres. Lad feltet stå tomt, hvis autogruppen skal gælde for alle medlemmer af dit forum. Vælg flere grupper ved at holde CTRL (eller ⌘CMD på Mac) nede og vælge grupperne.', + 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'Der opstod en fejl. Gruppen for denne betingelse kan ikke samtidig vælges i feltet med ekskluderede grupper.', 'ACP_AUTOGROUPS_EXEMPT_GROUP' => 'Sæt undtagelser for gruppestandard', 'ACP_AUTOGROUPS_EXEMPT_GROUP_EXPLAIN' => 'Autogrupper ændre ikke en brugers standardgruppe hvis den er valgt i listen. Vælg flere grupper ved at holde CTRL (eller ⌘CMD på Mac) nede og vælg grupperne.', @@ -75,7 +75,7 @@ // Conditions 'AUTOGROUPS_TYPE_BIRTHDAYS' => 'Brugerens alder', - 'AUTOGROUPS_TYPE_LASTVISIT' => 'Days since last visit', + 'AUTOGROUPS_TYPE_LASTVISIT' => 'Dage siden sidste besøg', 'AUTOGROUPS_TYPE_MEMBERSHIP' => 'Dage med medlemsskab', 'AUTOGROUPS_TYPE_POSTS' => 'Indlæg', 'AUTOGROUPS_TYPE_WARNINGS' => 'Advarsler', diff --git a/language/da/autogroups_install.php b/language/da/autogroups_install.php new file mode 100644 index 0000000..4cfb3bf --- /dev/null +++ b/language/da/autogroups_install.php @@ -0,0 +1,23 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = array(); +} + +$lang = array_merge($lang, array( + 'AUTOGROUPS_NOT_ENABLEABLE' => 'Autogrupper kunne ikke aktiveres. Minimumskravene om phpBB 3.2.0 og/eller PHP 5.5.0 blev ikke opfyldt.', +)); diff --git a/language/es/autogroups_acp.php b/language/es/autogroups_acp.php index 95b6961..187d97a 100644 --- a/language/es/autogroups_acp.php +++ b/language/es/autogroups_acp.php @@ -58,10 +58,10 @@ 'ACP_AUTOGROUPS_NOTIFY' => 'Notificar a usuarios', 'ACP_AUTOGROUPS_NOTIFY_EXPLAIN' => 'Enviar una notificación a los usuarios después de ser añadido o eliminado automáticamente de este grupo.', - 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'Excluded groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'Exclude members of these groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'Members belonging to any group selected in this list will be ignored. Leave this field blank if you want this Auto Group applied to all members of your board. Select multiple groups by holding CTRL (or ⌘CMD on Mac) and selecting the groups.', - 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'An error occurred. The group for this condition can not also be selected in the excluded groups field.', + 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'Grupos excluidos', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'Excluir miembros de estos grupos', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'Se ignorarán los miembros que pertenezcan a cualquier grupo seleccionado en esta lista. Deje este campo vacío si desea aplicar este Auto Grupo a todos los miembros de su sitio. Seleccione varios grupos manteniendo pulsada la tecla CTRL (o ⌘CMD en Mac) y seleccionando los grupos.', + 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'Ocurrió un error. El grupo de esta condición no puede seleccionarse también en el campo de grupos excluidos.', 'ACP_AUTOGROUPS_EXEMPT_GROUP' => 'Establecer exenciones predeterminadas del grupo', 'ACP_AUTOGROUPS_EXEMPT_GROUP_EXPLAIN' => 'Auto Grupos no cambiará de grupo predeterminado de un usuario si se ha seleccionado en esta lista. Seleccione varios grupos mediante la pulsación de CTRL (o ⌘CMD en Mac) y seleccione los grupos.', diff --git a/language/es/autogroups_install.php b/language/es/autogroups_install.php new file mode 100644 index 0000000..04f1ea5 --- /dev/null +++ b/language/es/autogroups_install.php @@ -0,0 +1,23 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = array(); +} + +$lang = array_merge($lang, array( + 'AUTOGROUPS_NOT_ENABLEABLE' => 'No se pudo habilitar Auto Grupos. No se cumplieron los requisitos mínimos de phpBB 3.2.0 y/o PHP 5.5.0.', +)); diff --git a/language/et/autogroups_acp.php b/language/et/autogroups_acp.php index 02337e2..64b86ec 100644 --- a/language/et/autogroups_acp.php +++ b/language/et/autogroups_acp.php @@ -58,12 +58,12 @@ 'ACP_AUTOGROUPS_NOTIFY' => 'Teavita liikmeid', 'ACP_AUTOGROUPS_NOTIFY_EXPLAIN' => 'Saada teavitus liikmetele, kui nad on automaatselt lisatud või eemaldatud sellest grupist.', - 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'Excluded groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'Exclude members of these groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'Members belonging to any group selected in this list will be ignored. Leave this field blank if you want this Auto Group applied to all members of your board. Select multiple groups by holding CTRL (or ⌘CMD on Mac) and selecting the groups.', - 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'An error occurred. The group for this condition can not also be selected in the excluded groups field.', + 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'Välistatud grupid', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'Välista nende gruppide liikmed', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'Selles loendis valitud mis tahes gruppi kuuluvad liikmed jäetakse välja. Jäta väli tühjaks, kui soovid automaatset gruppi rakendada foorumi kõigile liikmetele. Mitme grupi valimiseks hoia all klahvi CTRL (Macis ⌘CMD) ja vali grupid.', + 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'Tekkis viga. Selle tingimuse gruppi ei saa valida ka välistatud gruppide väljal.', 'ACP_AUTOGROUPS_EXEMPT_GROUP' => 'Seadista vaikimisi grupile erandid', - 'ACP_AUTOGROUPS_EXEMPT_GROUP_EXPLAIN' => 'Auto-grupp ei muuda liikmete vaikimisi grupi, kui see on valitud sellest nimekirjast. Vali mitu gruppi korraga hoides klaviatuuri klahvi CTRL all (või ⌘CMD Mac\'is) ja vali grupid.', + 'ACP_AUTOGROUPS_EXEMPT_GROUP_EXPLAIN' => 'Auto-grupp ei muuda liikmete vaikimisi grupi, kui see on valitud sellest nimekirjast. Vali mitu gruppi korraga hoides klaviatuuri klahvi CTRL all (või ⌘CMD Mac’is) ja vali grupid.', 'ACP_AUTOGROUPS_CREATE_RULE' => 'Loo uus automaatne grupp', 'ACP_AUTOGROUPS_SUBMIT_SUCCESS' => 'Automaatne grupp edukalt seadistatud.', diff --git a/language/fr/autogroups_install.php b/language/fr/autogroups_install.php new file mode 100644 index 0000000..38800db --- /dev/null +++ b/language/fr/autogroups_install.php @@ -0,0 +1,23 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = array(); +} + +$lang = array_merge($lang, array( + 'AUTOGROUPS_NOT_ENABLEABLE' => 'L’extension Auto Groups n’a pas pu être activée. La configuration minimale requise de phpBB 3.2.0 et/ou PHP 5.5.0 n’est pas satisfaite.', +)); diff --git a/language/hr/autogroups_acp.php b/language/hr/autogroups_acp.php index 6d3db7d..1c6ab6e 100644 --- a/language/hr/autogroups_acp.php +++ b/language/hr/autogroups_acp.php @@ -58,10 +58,10 @@ 'ACP_AUTOGROUPS_NOTIFY' => 'Obavijesti korisnike/ce', 'ACP_AUTOGROUPS_NOTIFY_EXPLAIN' => 'Ukoliko je omogućeno, obavijest, o dodavanju/izbrisivanju u/iz grupu/e, će automatski biti poslana korisnicima/ama.', - 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'Excluded groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'Exclude members of these groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'Members belonging to any group selected in this list will be ignored. Leave this field blank if you want this Auto Group applied to all members of your board. Select multiple groups by holding CTRL (or ⌘CMD on Mac) and selecting the groups.', - 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'An error occurred. The group for this condition can not also be selected in the excluded groups field.', + 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'Izuzete grupe', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'Izuzmi članove/ice ovih grupa', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'Članovi/ice koji pripadaju bilo kojoj grupi odabranoj na ovoj listi bit će zanemareni. Ostavi polje prazno ako želiš automatsko upravljanje grupom primijeniti na sve članove/ice foruma. Odaberi višestruke grupe držeći pritisnutu tipku CTRL [ili ⌘CMD na Macu] i označavajući grupe.', + 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'Došlo je do greške. Grupa za ovaj uvjet ne može istovremeno biti odabrana u polju izuzetih grupa.', 'ACP_AUTOGROUPS_EXEMPT_GROUP' => 'Iznimke za (ne)postavljanje grupe kao zadane', 'ACP_AUTOGROUPS_EXEMPT_GROUP_EXPLAIN' => 'Automatsko upravljanje grupom/ama neće promijeniti zadanu grupu korisnika/ca ukoliko je zadana grupa odabrana na listi. Odaberi višestruke grupe držeći pritisnutu tipku [tipkovnice] CTRL [ili ⌘CMD na Macu] + klikćući [označavajući] [grupe za odabir].', @@ -69,7 +69,7 @@ 'ACP_AUTOGROUPS_SUBMIT_SUCCESS' => 'Automatsko upravljanje izabranom grupom je postavljeno.', 'ACP_AUTOGROUPS_DELETE_CONFIRM' => 'Jesi li siguran/na da želiš izbrisati automatsko upravljanje izabranom grupom?', 'ACP_AUTOGROUPS_DELETE_SUCCESS' => 'Automatsko upravljanje izabranom grupom je izbrisano.', - 'ACP_AUTOGROUPS_EMPTY' => 'There are no auto groups.', + 'ACP_AUTOGROUPS_EMPTY' => 'Nema automatski upravljanih grupa.', 'ACP_AUTOGROUPS_NO_GROUPS' => 'Nema dostupnih grupa', 'ACP_AUTOGROUPS_INVALID_GROUPS' => 'Došlo je do greške: nije izabrana niti jedna grupa.
Automatsko upravljanje grupom/ama može se primijeniti samo na korisnički dodane grupe.', 'ACP_AUTOGROUPS_INVALID_RANGE' => 'Došlo je do greške: minimalna i maksimalna vrijednost ne mogu biti postavljene na istu vrijednost.', diff --git a/language/hr/autogroups_install.php b/language/hr/autogroups_install.php new file mode 100644 index 0000000..26d4474 --- /dev/null +++ b/language/hr/autogroups_install.php @@ -0,0 +1,23 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = array(); +} + +$lang = array_merge($lang, array( + 'AUTOGROUPS_NOT_ENABLEABLE' => 'Automatsko upravljanje grupama nije moglo biti omogućeno. Nisu zadovoljeni minimalni zahtjevi za phpBB 3.2.0 i/ili PHP 5.5.0.', +)); diff --git a/language/hr_x_vi/autogroups_acp.php b/language/hr_x_vi/autogroups_acp.php index bb6c89b..77c3597 100644 --- a/language/hr_x_vi/autogroups_acp.php +++ b/language/hr_x_vi/autogroups_acp.php @@ -58,10 +58,10 @@ 'ACP_AUTOGROUPS_NOTIFY' => 'Obavijestite korisnike/ce', 'ACP_AUTOGROUPS_NOTIFY_EXPLAIN' => 'Ukoliko je omogućeno, obavijest, o dodavanju/izbrisivanju u/iz grupu/e, će automatski biti poslana korisnicima/ama.', - 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'Excluded groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'Exclude members of these groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'Members belonging to any group selected in this list will be ignored. Leave this field blank if you want this Auto Group applied to all members of your board. Select multiple groups by holding CTRL (or ⌘CMD on Mac) and selecting the groups.', - 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'An error occurred. The group for this condition can not also be selected in the excluded groups field.', + 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'Izuzete grupe', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'Izuzmite članove/ice ovih grupa', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'Članovi/ice koji pripadaju bilo kojoj grupi odabranoj na ovoj listi bit će zanemareni. Ostavite polje prazno ako želite automatsko upravljanje grupom primijeniti na sve članove/ice foruma. Odaberite višestruke grupe držeći pritisnutu tipku CTRL [ili ⌘CMD na Macu] i označavajući grupe.', + 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'Došlo je do greške. Grupa za ovaj uvjet ne može istovremeno biti odabrana u polju izuzetih grupa.', 'ACP_AUTOGROUPS_EXEMPT_GROUP' => 'Iznimke za (ne)postavljanje grupe kao zadane', 'ACP_AUTOGROUPS_EXEMPT_GROUP_EXPLAIN' => 'Automatsko upravljanje grupom/ama neće promijeniti zadanu grupu korisnika/ca ukoliko je zadana grupa odabrana na listi. Odaberite višestruke grupe držeći pritisnutu tipku [tipkovnice] CTRL [ili ⌘CMD na Macu] + klikćući [označavajući] [grupe za odabir].', @@ -69,7 +69,7 @@ 'ACP_AUTOGROUPS_SUBMIT_SUCCESS' => 'Automatsko upravljanje izabranom grupom je postavljeno.', 'ACP_AUTOGROUPS_DELETE_CONFIRM' => 'Jeste li siguran/na da želite izbrisati automatsko upravljanje izabranom grupom?', 'ACP_AUTOGROUPS_DELETE_SUCCESS' => 'Automatsko upravljanje izabranom grupom je izbrisano.', - 'ACP_AUTOGROUPS_EMPTY' => 'There are no auto groups.', + 'ACP_AUTOGROUPS_EMPTY' => 'Nema automatski upravljanih grupa.', 'ACP_AUTOGROUPS_NO_GROUPS' => 'Nema dostupnih grupa', 'ACP_AUTOGROUPS_INVALID_GROUPS' => 'Došlo je do greške: nije izabrana niti jedna grupa.
Automatsko upravljanje grupom/ama može se primijeniti samo na korisnički dodane grupe.', 'ACP_AUTOGROUPS_INVALID_RANGE' => 'Došlo je do greške: minimalna i maksimalna vrijednost ne mogu biti postavljene na istu vrijednost.', diff --git a/language/hr_x_vi/autogroups_install.php b/language/hr_x_vi/autogroups_install.php new file mode 100644 index 0000000..26d4474 --- /dev/null +++ b/language/hr_x_vi/autogroups_install.php @@ -0,0 +1,23 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = array(); +} + +$lang = array_merge($lang, array( + 'AUTOGROUPS_NOT_ENABLEABLE' => 'Automatsko upravljanje grupama nije moglo biti omogućeno. Nisu zadovoljeni minimalni zahtjevi za phpBB 3.2.0 i/ili PHP 5.5.0.', +)); diff --git a/language/it/autogroups_acp.php b/language/it/autogroups_acp.php index bcc4ff9..97dda93 100644 --- a/language/it/autogroups_acp.php +++ b/language/it/autogroups_acp.php @@ -57,10 +57,10 @@ 'ACP_AUTOGROUPS_NOTIFY' => 'Notifica utenti', 'ACP_AUTOGROUPS_NOTIFY_EXPLAIN' => 'Invia una notifica agli utenti automaticamente aggiunti o rimossi dal gruppo.', - 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'Excluded groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'Exclude members of these groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'Members belonging to any group selected in this list will be ignored. Leave this field blank if you want this Auto Group applied to all members of your board. Select multiple groups by holding CTRL (or ⌘CMD on Mac) and selecting the groups.', - 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'An error occurred. The group for this condition can not also be selected in the excluded groups field.', + 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'Gruppi esclusi', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'Escludi i membri di questi gruppi', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'I membri appartenenti a qualsiasi gruppo selezionato in questo elenco saranno ignorati. Lascia vuoto questo campo se vuoi applicare questo autogruppo a tutti i membri della tua board. Seleziona più gruppi tenendo premuto CTRL (o ⌘CMD su Mac) e selezionando i gruppi.', + 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'Si è verificato un errore. Il gruppo di questa condizione non può essere selezionato anche nel campo dei gruppi esclusi.', 'ACP_AUTOGROUPS_EXEMPT_GROUP' => 'Imposta eccezioni per gruppo predefinito', 'ACP_AUTOGROUPS_EXEMPT_GROUP_EXPLAIN' => 'Autogruppi non cambierà il gruppo predefinito se fa parte di un gruppo selezionato in questa lista. Per selezionare più gruppi, tenere premuto CTRL (o ⌘CMD su sistemi Mac) e selezionare i gruppi.', diff --git a/language/pl/autogroups_acp.php b/language/pl/autogroups_acp.php index 63e25a0..e338557 100644 --- a/language/pl/autogroups_acp.php +++ b/language/pl/autogroups_acp.php @@ -58,10 +58,10 @@ 'ACP_AUTOGROUPS_NOTIFY' => 'Powiadom użytkownika', 'ACP_AUTOGROUPS_NOTIFY_EXPLAIN' => 'Ustaw Tak, aby powiadomić użytkownika, gdy zostanie automatycznie dodany lub usunięty z grupy.', - 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'Excluded groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'Exclude members of these groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'Members belonging to any group selected in this list will be ignored. Leave this field blank if you want this Auto Group applied to all members of your board. Select multiple groups by holding CTRL (or ⌘CMD on Mac) and selecting the groups.', - 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'An error occurred. The group for this condition can not also be selected in the excluded groups field.', + 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'Wykluczone grupy', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'Wyklucz członków tych grup', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'Członkowie należący do dowolnej grupy wybranej na tej liście zostaną pominięci. Pozostaw to pole puste, jeśli chcesz zastosować automatyczną grupę do wszystkich członków forum. Wybierz kilka grup, przytrzymując klawisz CTRL (lub ⌘CMD na Macu) i zaznaczając grupy.', + 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'Wystąpił błąd. Grupa dla tego warunku nie może być jednocześnie wybrana w polu wykluczonych grup.', 'ACP_AUTOGROUPS_EXEMPT_GROUP' => 'Domyślna grupa', 'ACP_AUTOGROUPS_EXEMPT_GROUP_EXPLAIN' => 'Domyślna grupa użytkownika nie zostanie zmieniona, jeśli zostanie wybrana na liście predefiniowanych grup. Zaznacz kilka grup przy pomocy wciśniętego przycisku CTRL (lub ⌘CMD w systemie iOS) na klawiaturze.', @@ -76,7 +76,7 @@ // Conditions 'AUTOGROUPS_TYPE_BIRTHDAYS' => 'Wiek', - 'AUTOGROUPS_TYPE_LASTVISIT' => 'Days since last visit', + 'AUTOGROUPS_TYPE_LASTVISIT' => 'Dni od ostatniej wizyty', 'AUTOGROUPS_TYPE_MEMBERSHIP' => 'Długość członkostwa (dni)', 'AUTOGROUPS_TYPE_POSTS' => 'Liczba postów', 'AUTOGROUPS_TYPE_WARNINGS' => 'Ostrzeżenia', diff --git a/language/pl/autogroups_install.php b/language/pl/autogroups_install.php new file mode 100644 index 0000000..dbc9234 --- /dev/null +++ b/language/pl/autogroups_install.php @@ -0,0 +1,23 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = array(); +} + +$lang = array_merge($lang, array( + 'AUTOGROUPS_NOT_ENABLEABLE' => 'Nie można było włączyć automatycznych grup. Nie zostały spełnione minimalne wymagania phpBB 3.2.0 i/lub PHP 5.5.0.', +)); diff --git a/language/pt_br/autogroups_acp.php b/language/pt_br/autogroups_acp.php index 7bb3195..c487d27 100644 --- a/language/pt_br/autogroups_acp.php +++ b/language/pt_br/autogroups_acp.php @@ -58,10 +58,10 @@ 'ACP_AUTOGROUPS_NOTIFY' => 'Notificar o usuário', 'ACP_AUTOGROUPS_NOTIFY_EXPLAIN' => 'Enviar uma notificação para usuários depois que foram automaticamente adicionados ou removidos deste grupo.', - 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'Excluded groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'Exclude members of these groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'Members belonging to any group selected in this list will be ignored. Leave this field blank if you want this Auto Group applied to all members of your board. Select multiple groups by holding CTRL (or ⌘CMD on Mac) and selecting the groups.', - 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'An error occurred. The group for this condition can not also be selected in the excluded groups field.', + 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'Grupos excluídos', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'Excluir membros destes grupos', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'Os membros que pertencem a qualquer grupo selecionado nesta lista serão ignorados. Deixe este campo em branco se quiser aplicar este Autogrupo a todos os membros do fórum. Selecione vários grupos mantendo CTRL pressionado (ou ⌘CMD no Mac) e selecionando os grupos.', + 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'Ocorreu um erro. O grupo desta condição não pode também ser selecionado no campo de grupos excluídos.', 'ACP_AUTOGROUPS_EXEMPT_GROUP' => 'Configure as exceções para o grupo padrão', 'ACP_AUTOGROUPS_EXEMPT_GROUP_EXPLAIN' => 'O grupo padrão do usuário não será automaticamente alterado se estiver selecionado nesta lista. Selecione diversos grupos segurando CTRL (ou ⌘CMD no Mac) e clicando sobre o grupo.', @@ -78,6 +78,6 @@ 'AUTOGROUPS_TYPE_BIRTHDAYS' => 'Idade do usuário', 'AUTOGROUPS_TYPE_LASTVISIT' => 'Dias desde a última visita', 'AUTOGROUPS_TYPE_MEMBERSHIP' => 'Dias que o usuário é membro', - 'AUTOGROUPS_TYPE_POSTS' => 'Posts', + 'AUTOGROUPS_TYPE_POSTS' => 'Publicações', 'AUTOGROUPS_TYPE_WARNINGS' => 'Advertência', )); diff --git a/language/pt_br/autogroups_install.php b/language/pt_br/autogroups_install.php new file mode 100644 index 0000000..d0f2482 --- /dev/null +++ b/language/pt_br/autogroups_install.php @@ -0,0 +1,23 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = array(); +} + +$lang = array_merge($lang, array( + 'AUTOGROUPS_NOT_ENABLEABLE' => 'Não foi possível habilitar os Autogrupos. Os requisitos mínimos do phpBB 3.2.0 e/ou PHP 5.5.0 não foram atendidos.', +)); diff --git a/language/ru/autogroups_acp.php b/language/ru/autogroups_acp.php index 51b3bf9..72dab8e 100644 --- a/language/ru/autogroups_acp.php +++ b/language/ru/autogroups_acp.php @@ -57,10 +57,10 @@ 'ACP_AUTOGROUPS_NOTIFY' => 'Уведомить пользователя', 'ACP_AUTOGROUPS_NOTIFY_EXPLAIN' => 'Отправить уведомление пользователю после автоматического добавления/удаления в группу.', - 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'Excluded groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'Exclude members of these groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'Members belonging to any group selected in this list will be ignored. Leave this field blank if you want this Auto Group applied to all members of your board. Select multiple groups by holding CTRL (or ⌘CMD on Mac) and selecting the groups.', - 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'An error occurred. The group for this condition can not also be selected in the excluded groups field.', + 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'Исключённые группы', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'Исключить участников этих групп', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'Участники, состоящие в любой группе, выбранной в этом списке, будут проигнорированы. Оставьте поле пустым, если хотите применить эту АвтоГруппу ко всем участникам форума. Выберите несколько групп, удерживая CTRL (или ⌘CMD на Mac).', + 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'Произошла ошибка. Группу для этого условия нельзя одновременно выбрать в поле исключённых групп.', 'ACP_AUTOGROUPS_EXEMPT_GROUP' => 'Установить исключения для групп по умолчанию', 'ACP_AUTOGROUPS_EXEMPT_GROUP_EXPLAIN' => 'АвтоГруппы не изменят группу пользователя по умолчанию, если она отмечена в этом списке. Выберите несколько групп с нажатой клавишей CTRL (или ⌘CMD на Mac).', diff --git a/language/ru/autogroups_install.php b/language/ru/autogroups_install.php new file mode 100644 index 0000000..4c28f7d --- /dev/null +++ b/language/ru/autogroups_install.php @@ -0,0 +1,23 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = array(); +} + +$lang = array_merge($lang, array( + 'AUTOGROUPS_NOT_ENABLEABLE' => 'АвтоГруппы не удалось включить. Минимальные требования phpBB 3.2.0 и/или PHP 5.5.0 не соблюдены.', +)); diff --git a/language/sk/autogroups_acp.php b/language/sk/autogroups_acp.php index d5796ee..647254d 100644 --- a/language/sk/autogroups_acp.php +++ b/language/sk/autogroups_acp.php @@ -58,10 +58,10 @@ 'ACP_AUTOGROUPS_NOTIFY' => 'Oboznámiť používateľa', 'ACP_AUTOGROUPS_NOTIFY_EXPLAIN' => 'Pošle notifikáciu používateľov po tom, čo budú automaticky pridaní alebo odstránení z tejto skupiny.', - 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'Excluded groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'Exclude members of these groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'Members belonging to any group selected in this list will be ignored. Leave this field blank if you want this Auto Group applied to all members of your board. Select multiple groups by holding CTRL (or ⌘CMD on Mac) and selecting the groups.', - 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'An error occurred. The group for this condition can not also be selected in the excluded groups field.', + 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'Vylúčené skupiny', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'Vylúčiť členov týchto skupín', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'Členovia patriaci do ktorejkoľvek skupiny vybranej v tomto zozname budú ignorovaní. Ak chcete automatickú skupinu použiť na všetkých členov fóra, nechajte toto pole prázdne. Viacero skupín vyberiete podržaním klávesu CTRL (alebo ⌘CMD na Macu) a označením skupín.', + 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'Nastala chyba. Skupinu pre túto podmienku nemožno zároveň vybrať v poli vylúčených skupín.', 'ACP_AUTOGROUPS_EXEMPT_GROUP' => 'Nastaviť výnimky v predvolenej skupine', 'ACP_AUTOGROUPS_EXEMPT_GROUP_EXPLAIN' => 'Automatické skupiny nebudú meniť používateľovu predvolenú skupinu ak bude vybraná v tomto zozname. Vyberte viacero skupín podrčaním CTRL (alebo ⌘CMD na Macu) a vyberte skupiny.', diff --git a/language/sk/autogroups_install.php b/language/sk/autogroups_install.php new file mode 100644 index 0000000..1571c66 --- /dev/null +++ b/language/sk/autogroups_install.php @@ -0,0 +1,23 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = array(); +} + +$lang = array_merge($lang, array( + 'AUTOGROUPS_NOT_ENABLEABLE' => 'Automatické skupiny nebolo možné povoliť. Neboli splnené minimálne požiadavky phpBB 3.2.0 a/alebo PHP 5.5.0.', +)); diff --git a/language/tr/autogroups_acp.php b/language/tr/autogroups_acp.php index df5193e..425440a 100644 --- a/language/tr/autogroups_acp.php +++ b/language/tr/autogroups_acp.php @@ -59,7 +59,7 @@ 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'Hariç tutulan gruplar', 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'Bu grupların üyelerini hariç tut', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'Bu listede seçili herhangi bir grubun üyesi yok sayılacak. Bu Otomatik Grubun panonuzun tüm üyelerine uygulanmasını istiyorsanız bu alanı boş bırakın. CTRL (veya Mac\'te ⌘CMD) tuşunu basılı tutarak ve grupları seçerek birden fazla grup seçin.', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'Bu listede seçili herhangi bir grubun üyesi yok sayılacak. Bu Otomatik Grubun panonuzun tüm üyelerine uygulanmasını istiyorsanız bu alanı boş bırakın. CTRL (veya Mac’te ⌘CMD) tuşunu basılı tutarak ve grupları seçerek birden fazla grup seçin.', 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'Bir hata meydana geldi. Hariç tutulan gruplar alanında da bu koşul için grup seçilemez.', 'ACP_AUTOGROUPS_EXEMPT_GROUP' => 'Grup varsayılan muafiyetlerini ayarla', 'ACP_AUTOGROUPS_EXEMPT_GROUP_EXPLAIN' => 'Eğer o bu listede seçili ise Otomatik Gruplar bir kullanıcının varsayılan grubunu değiştirmeyecek. Çoklu grup seçmek için CTRL (veya MAClerde ⌘CMD) tuşuna basın ve grupları seçin.', diff --git a/language/tr/autogroups_install.php b/language/tr/autogroups_install.php new file mode 100644 index 0000000..ea1992d --- /dev/null +++ b/language/tr/autogroups_install.php @@ -0,0 +1,23 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = array(); +} + +$lang = array_merge($lang, array( + 'AUTOGROUPS_NOT_ENABLEABLE' => 'Otomatik Gruplar etkinleştirilemedi. phpBB 3.2.0 ve/veya PHP 5.5.0 asgari gereksinimleri karşılanmadı.', +)); diff --git a/language/zh_cmn_hans/autogroups_install.php b/language/zh_cmn_hans/autogroups_install.php new file mode 100644 index 0000000..ae10171 --- /dev/null +++ b/language/zh_cmn_hans/autogroups_install.php @@ -0,0 +1,23 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = array(); +} + +$lang = array_merge($lang, array( + 'AUTOGROUPS_NOT_ENABLEABLE' => '无法启用自动分组。未满足 phpBB 3.2.0 和/或 PHP 5.5.0 的最低要求。', +)); diff --git a/language/zh_cmn_hant/autogroups_acp.php b/language/zh_cmn_hant/autogroups_acp.php index 4fd1ed3..3605b61 100644 --- a/language/zh_cmn_hant/autogroups_acp.php +++ b/language/zh_cmn_hant/autogroups_acp.php @@ -57,10 +57,10 @@ 'ACP_AUTOGROUPS_NOTIFY' => '通知用戶', 'ACP_AUTOGROUPS_NOTIFY_EXPLAIN' => '自動添加或刪除該組後,將通知發送給用戶。', - 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => 'Excluded groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => 'Exclude members of these groups', - 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => 'Members belonging to any group selected in this list will be ignored. Leave this field blank if you want this Auto Group applied to all members of your board. Select multiple groups by holding CTRL (or ⌘CMD on Mac) and selecting the groups.', - 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => 'An error occurred. The group for this condition can not also be selected in the excluded groups field.', + 'ACP_AUTOGROUPS_EXCLUDED_GROUPS' => '排除的用戶組', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP' => '排除這些用戶組的成員', + 'ACP_AUTOGROUPS_EXCLUDE_GROUP_EXPLAIN' => '屬於此列表中所選任何用戶組的成員都會被忽略。如果要將此自動分組套用於討論區的所有成員,請將此欄留空。按住 CTRL(Mac 上為 ⌘CMD)並選擇用戶組,即可選擇多個用戶組。', + 'ACP_AUTOGROUPS_INVALID_EXCLUDE_GROUPS' => '發生錯誤。此條件使用的用戶組不能同時在排除的用戶組欄位中選取。', 'ACP_AUTOGROUPS_EXEMPT_GROUP' => '設置豁免預設分組的用戶組', 'ACP_AUTOGROUPS_EXEMPT_GROUP_EXPLAIN' => '此表中已選擇的用戶組將豁免於設置預設分組。按下 CTRL (或 Mac 的 ⌘CMD) 來選擇多過一個用戶組', diff --git a/language/zh_cmn_hant/autogroups_install.php b/language/zh_cmn_hant/autogroups_install.php new file mode 100644 index 0000000..d20f57e --- /dev/null +++ b/language/zh_cmn_hant/autogroups_install.php @@ -0,0 +1,23 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +*/ + +if (!defined('IN_PHPBB')) +{ + exit; +} + +if (empty($lang) || !is_array($lang)) +{ + $lang = array(); +} + +$lang = array_merge($lang, array( + 'AUTOGROUPS_NOT_ENABLEABLE' => '無法啟用自動分組。未符合 phpBB 3.2.0 和/或 PHP 5.5.0 的最低要求。', +)); From 651a8fdc67f19956259d8b366be8224753caa311 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 27 Aug 2026 08:14:23 -0700 Subject: [PATCH 2/3] Fix tests --- tests/controller/admin_controller_base.php | 25 ++++++++++++++++ tests/functional/autogroups_base.php | 34 ++++++++++++++++++++++ tests/functional/lastvisit_test.php | 6 ++-- tests/functional/membership_test.php | 6 ++-- 4 files changed, 63 insertions(+), 8 deletions(-) diff --git a/tests/controller/admin_controller_base.php b/tests/controller/admin_controller_base.php index ff30b61..0ea4565 100644 --- a/tests/controller/admin_controller_base.php +++ b/tests/controller/admin_controller_base.php @@ -97,4 +97,29 @@ protected function setUp(): void 'phpbb_autogroups_types' ); } + + /** + * Expect trigger_error() without PHPUnit's deprecated error expectations + * + * PHPUnit 9 deprecates expecting its E_WARNING/E_USER_WARNING exception + * wrappers. Convert only the requested error level to a regular exception + * and restore PHPUnit's error handler before throwing it. + * + * @param int $errno + * @param string $message + */ + public function setExpectedTriggerError($errno, $message = '') + { + $this->expectException(\RuntimeException::class); + $this->expectExceptionCode($errno); + if ($message) + { + $this->expectExceptionMessage((string) $message); + } + + set_error_handler(function ($error_number, $error_message) { + restore_error_handler(); + throw new \RuntimeException($error_message, $error_number); + }, $errno); + } } diff --git a/tests/functional/autogroups_base.php b/tests/functional/autogroups_base.php index b1f15f6..6e629b1 100644 --- a/tests/functional/autogroups_base.php +++ b/tests/functional/autogroups_base.php @@ -151,4 +151,38 @@ public function reset_cron() $this->purge_cache(); } + + /** + * Run the Auto Groups cron task and wait for post-response execution to finish + */ + public function run_cron() + { + self::request('GET', "cron.php?cron_type=cron.task.autogroups_check&sid={$this->sid}", array(), false); + + $cron_completed = false; + for ($attempt = 0; $attempt < 100; $attempt++) + { + $sql = "SELECT config_name, config_value + FROM phpbb_config + WHERE " . $this->db->sql_in_set('config_name', array('autogroups_last_run', 'cron_lock')); + $result = $this->db->sql_query($sql); + $config = array(); + while ($row = $this->db->sql_fetchrow($result)) + { + $config[$row['config_name']] = $row['config_value']; + } + $this->db->sql_freeresult($result); + + if (!empty($config['autogroups_last_run']) && empty($config['cron_lock'])) + { + $cron_completed = true; + break; + } + + usleep(100000); + } + + self::assertTrue($cron_completed, 'The Auto Groups cron task did not complete within 10 seconds.'); + $this->purge_cache(); + } } diff --git a/tests/functional/lastvisit_test.php b/tests/functional/lastvisit_test.php index 90e9477..9435135 100644 --- a/tests/functional/lastvisit_test.php +++ b/tests/functional/lastvisit_test.php @@ -41,14 +41,12 @@ public function test_autogroups_memberships() // Run the cron job for a user with 20 days since last visit, should add the user to the group $this->update_user_lastvisit($test_user_id, 20)->reset_cron(); - self::request('GET', "cron.php?cron_type=cron.task.autogroups_check&sid={$this->sid}", array(), false); - $this->purge_cache(); + $this->run_cron(); $this->assertInGroup($test_user_id, $test_data['group_name']); // Run the cron job for a user with 2 days since last visit, should remove the user from the group $this->update_user_lastvisit($test_user_id, 2)->reset_cron(); - self::request('GET', "cron.php?cron_type=cron.task.autogroups_check&sid={$this->sid}", array(), false); - $this->purge_cache(); + $this->run_cron(); $this->assertNotInGroup($test_user_id, $test_data['group_name']); } diff --git a/tests/functional/membership_test.php b/tests/functional/membership_test.php index ec89db1..6776719 100644 --- a/tests/functional/membership_test.php +++ b/tests/functional/membership_test.php @@ -39,14 +39,12 @@ public function test_autogroups_memberships() // Run the cron job for a user with 2 days of membership, should add the user to the group $this->update_user_regdate(2, 2)->reset_cron(); - self::request('GET', "cron.php?cron_type=cron.task.autogroups_check&sid={$this->sid}", array(), false); - $this->purge_cache(); + $this->run_cron(); $this->assertInGroup(2, $this->test_data['group_name']); // Run the cron job for a user with 20 days of membership, should remove the user from the group $this->update_user_regdate(2, 20)->reset_cron(); - self::request('GET', "cron.php?cron_type=cron.task.autogroups_check&sid={$this->sid}", array(), false); - $this->purge_cache(); + $this->run_cron(); $this->assertNotInGroup(2, $this->test_data['group_name']); } From 5b282fe3ae138df6a8a777c21c9298fb5e8475c9 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 27 Aug 2026 08:53:51 -0700 Subject: [PATCH 3/3] Add more tests for complete coverage --- tests/acp/autogroups_info_test.php | 31 ++++ tests/acp/autogroups_module_test.php | 159 ++++++++++++++++++ tests/conditions/base.php | 2 - tests/conditions/base_test.php | 79 +++++++++ tests/conditions/birthdays_test.php | 8 + tests/conditions/helper_include_test.php | 52 ++++++ tests/conditions/posts_test.php | 43 +++++ .../controller/submit_autogroup_rule_test.php | 6 +- .../submit_autogroups_options_test.php | 81 +++++++++ tests/extension/ext_test.php | 36 ++++ tests/manager/purge_autogroups_type_test.php | 7 + tests/notification/group_added_test.php | 134 +++++++++++++++ 12 files changed, 633 insertions(+), 5 deletions(-) create mode 100644 tests/acp/autogroups_info_test.php create mode 100644 tests/acp/autogroups_module_test.php create mode 100644 tests/conditions/helper_include_test.php create mode 100644 tests/controller/submit_autogroups_options_test.php create mode 100644 tests/notification/group_added_test.php diff --git a/tests/acp/autogroups_info_test.php b/tests/acp/autogroups_info_test.php new file mode 100644 index 0000000..521e590 --- /dev/null +++ b/tests/acp/autogroups_info_test.php @@ -0,0 +1,31 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + */ + +namespace phpbb\autogroups\tests\acp; + +class autogroups_info_test extends \phpbb_test_case +{ + public function test_module_info() + { + $info = new \phpbb\autogroups\acp\autogroups_info(); + + self::assertSame(array( + 'filename' => '\phpbb\autogroups\acp\autogroups_module', + 'title' => 'ACP_AUTOGROUPS_MANAGE', + 'modes' => array( + 'manage' => array( + 'title' => 'ACP_AUTOGROUPS_MANAGE', + 'auth' => 'ext_phpbb/autogroups && acl_a_group', + 'cat' => array('ACP_GROUPS'), + ), + ), + ), $info->module()); + } +} diff --git a/tests/acp/autogroups_module_test.php b/tests/acp/autogroups_module_test.php new file mode 100644 index 0000000..6a6281c --- /dev/null +++ b/tests/acp/autogroups_module_test.php @@ -0,0 +1,159 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + */ + +namespace phpbb\autogroups\tests\acp; + +class autogroups_module_test extends \phpbb_test_case +{ + /** @var \PHPUnit\Framework\MockObject\MockObject|\phpbb\autogroups\controller\admin_interface */ + protected $controller; + + /** @var \PHPUnit\Framework\MockObject\MockObject|\phpbb\language\language */ + protected $language; + + /** @var \PHPUnit\Framework\MockObject\MockObject|\phpbb\request\request */ + protected $request; + + protected function setUp(): void + { + parent::setUp(); + + global $db, $language, $phpbb_container, $phpbb_dispatcher, $request, $user; + + $this->controller = $this->createMock(\phpbb\autogroups\controller\admin_interface::class); + $this->language = $this->createMock(\phpbb\language\language::class); + $this->request = $this->createMock(\phpbb\request\request::class); + + $phpbb_container = $this->createMock(\Symfony\Component\DependencyInjection\ContainerInterface::class); + $services = array( + 'language' => $this->language, + 'request' => $this->request, + 'phpbb.autogroups.admin_controller' => $this->controller, + ); + $phpbb_container->method('get')->willReturnCallback(function ($id) use ($services) { + return $services[$id]; + }); + + $language = $this->language; + $request = $this->request; + $db = $this->createMock(\phpbb\db\driver\driver_interface::class); + $phpbb_dispatcher = new \phpbb_mock_event_dispatcher(); + $user = new \stdClass(); + $user->data = array( + 'user_id' => 2, + 'user_last_confirm_key' => 'confirm-key', + ); + $user->session_id = 'session-id'; + } + + protected function tearDown(): void + { + unset($_POST['cancel']); + parent::tearDown(); + } + + public function action_data() + { + return array( + 'list' => array('', null, null, 1, 'ACP_AUTOGROUPS_MANAGE'), + 'add' => array('add', 'save_autogroup_rule', 0, 0, 'ACP_AUTOGROUPS_ADD'), + 'edit' => array('edit', 'save_autogroup_rule', 7, 0, 'ACP_AUTOGROUPS_EDIT'), + 'sync' => array('sync', 'resync_autogroup_rule', 7, 1, 'ACP_AUTOGROUPS_MANAGE'), + ); + } + + /** + * @dataProvider action_data + */ + public function test_main_actions($action, $called_method, $autogroups_id, $display_count, $page_title) + { + $this->request->method('variable')->willReturnMap(array( + array('action', '', false, \phpbb\request\request_interface::REQUEST, $action), + array('autogroups_id', 0, false, \phpbb\request\request_interface::REQUEST, $autogroups_id), + )); + $this->request->method('is_set_post')->with('generalsubmit')->willReturn(false); + + if ($called_method) + { + $this->controller->expects(self::once())->method($called_method)->with($autogroups_id); + } + $this->controller->expects(self::exactly($display_count))->method('display_autogroups'); + + $module = $this->run_module(); + + self::assertSame('manage_autogroups', $module->tpl_name); + self::assertSame($page_title, $module->page_title); + } + + public function test_main_submits_general_options() + { + $this->set_request_action(''); + $this->request->expects(self::once())->method('is_set_post')->with('generalsubmit')->willReturn(true); + $this->controller->expects(self::once())->method('submit_autogroups_options'); + $this->controller->expects(self::once())->method('display_autogroups'); + + $this->run_module(); + } + + public function test_main_requests_delete_confirmation() + { + $_POST['cancel'] = true; + $this->set_request_action('delete', 7); + $this->request->method('is_set_post')->with('generalsubmit')->willReturn(false); + $this->controller->expects(self::never())->method('delete_autogroup_rule'); + $this->controller->expects(self::once())->method('display_autogroups'); + $this->language->method('lang')->willReturnArgument(0); + + $this->run_module(); + } + + public function test_main_deletes_confirmed_rule() + { + global $db; + + $this->set_request_action('delete', 7, true); + $this->request->method('is_set_post')->with('generalsubmit')->willReturn(false); + $this->language->method('lang')->willReturnCallback(function ($key) { + return $key; + }); + $db->expects(self::once())->method('sql_query'); + $this->controller->expects(self::once())->method('delete_autogroup_rule')->with(7); + $this->controller->expects(self::once())->method('display_autogroups'); + + $this->run_module(); + } + + private function set_request_action($action, $autogroups_id = 0, $confirm = false) + { + $this->request->method('variable')->willReturnCallback(function ($name, $default) use ($action, $autogroups_id, $confirm) { + $values = array( + 'action' => $action, + 'autogroups_id' => $autogroups_id, + 'confirm' => $confirm ? 'YES' : '', + 'confirm_uid' => 2, + 'sess' => 'session-id', + 'confirm_key' => 'confirm-key', + ); + return array_key_exists($name, $values) ? $values[$name] : $default; + }); + } + + private function run_module() + { + $this->language->expects(self::once())->method('add_lang')->with('autogroups_acp', 'phpbb/autogroups'); + $this->controller->expects(self::once())->method('set_page_url')->with('index.php'); + + $module = new \phpbb\autogroups\acp\autogroups_module(); + $module->u_action = 'index.php'; + $module->main(0, 'manage'); + + return $module; + } +} diff --git a/tests/conditions/base.php b/tests/conditions/base.php index d0485ea..ae6bbad 100644 --- a/tests/conditions/base.php +++ b/tests/conditions/base.php @@ -10,8 +10,6 @@ namespace phpbb\autogroups\tests\conditions; -require_once __DIR__ . '/../../../../../includes/functions_user.php'; - /** * Base class for conditions type tests */ diff --git a/tests/conditions/base_test.php b/tests/conditions/base_test.php index bcb4974..98f92c9 100644 --- a/tests/conditions/base_test.php +++ b/tests/conditions/base_test.php @@ -254,4 +254,83 @@ public function test_remove_users_from_group($user_id_ary, $group_id, $expected) // Assert the user's groups are as expected self::assertEquals($expected, $user_groups); } + + public function test_check_initialises_groups_for_unknown_user() + { + $this->get_condition()->check(array( + 999 => array('user_posts' => 0), + )); + + self::assertSame(array(), $this->helper->get_users_groups(array(999))); + } + + public function test_filter_users_keeps_only_users_failing_other_rule() + { + $other_condition = new filter_condition(); + $this->phpbb_container->set('phpbb.autogroups.type.other', $other_condition); + + $method = new \ReflectionMethod($this->get_condition(), 'filter_users'); + $method->setAccessible(true); + $actual = $method->invoke( + $this->get_condition(), + array(2, 3), + array('autogroups_group_id' => 4, 'autogroups_type_id' => 1), + array(array( + 'autogroups_group_id' => 4, + 'autogroups_type_id' => 2, + 'autogroups_type_name' => 'phpbb.autogroups.type.other', + 'autogroups_min_value' => 10, + 'autogroups_max_value' => 20, + )) + ); + + self::assertSame(array(1 => 3), $actual); + } + + public function timestamp_data() + { + return array( + 'empty timestamp' => array(0, null), + 'five days ago' => array(strtotime('5 days ago'), 5), + ); + } + + /** + * @dataProvider timestamp_data + */ + public function test_timestamp_to_days($timestamp, $expected) + { + $method = new \ReflectionMethod($this->get_condition(), 'timestamp_to_days'); + $method->setAccessible(true); + + self::assertSame($expected, $method->invoke($this->get_condition(), $timestamp)); + } + + public function test_days_to_timestamp() + { + $method = new \ReflectionMethod($this->get_condition(), 'days_to_timestamp'); + $method->setAccessible(true); + + self::assertEqualsWithDelta(strtotime('3 days ago'), $method->invoke($this->get_condition(), 3), 1); + } +} + +class filter_condition extends \phpbb\autogroups\conditions\type\posts +{ + public function __construct() + { + } + + public function get_users_for_condition($options = array()) + { + return array( + 2 => array('user_posts' => 15), + 3 => array('user_posts' => 5), + ); + } + + public function check_user_data($value, $group_rule) + { + return parent::check_user_data($value, $group_rule); + } } diff --git a/tests/conditions/birthdays_test.php b/tests/conditions/birthdays_test.php index 2c2bff9..26b2ea6 100644 --- a/tests/conditions/birthdays_test.php +++ b/tests/conditions/birthdays_test.php @@ -91,4 +91,12 @@ public function helper_update_user_data($user_id, $data) WHERE user_id = " . (int) $user_id; $this->db->sql_query($sql); } + + public function test_invalid_birthday_returns_zero_age() + { + $method = new \ReflectionMethod($this->get_condition(), 'get_user_age'); + $method->setAccessible(true); + + self::assertSame(0, $method->invoke($this->get_condition(), '99-99-2000')); + } } diff --git a/tests/conditions/helper_include_test.php b/tests/conditions/helper_include_test.php new file mode 100644 index 0000000..5a03fe9 --- /dev/null +++ b/tests/conditions/helper_include_test.php @@ -0,0 +1,52 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + */ + +namespace phpbb\autogroups\tests\conditions; + +class helper_include_test extends \phpbb_test_case +{ + /** + * @runInSeparateProcess + * @preserveGlobalState disabled + */ + public function test_send_notifications_loads_user_functions_when_needed() + { + global $db, $phpbb_container, $phpbb_root_path, $phpEx; + + self::assertFalse(function_exists('get_group_name')); + + $db = $this->createMock(\phpbb\db\driver\driver_interface::class); + $db->expects(self::once())->method('sql_query')->willReturn('result'); + $db->expects(self::once())->method('sql_fetchrow')->with('result')->willReturn(array( + 'group_name' => 'ADMINISTRATORS', + 'group_type' => GROUP_SPECIAL, + )); + $db->expects(self::once())->method('sql_freeresult')->with('result'); + + $group_helper = $this->createMock(\phpbb\group\helper::class); + $group_helper->expects(self::once())->method('get_name')->with('ADMINISTRATORS')->willReturn('Administrators'); + $phpbb_container = new \phpbb_mock_container_builder(); + $phpbb_container->set('group_helper', $group_helper); + + $notification_manager = $this->createMock(\phpbb\notification\manager::class); + $notification_manager->expects(self::once()) + ->method('add_notifications') + ->with('phpbb.autogroups.notification.type.group_added', array( + 'user_ids' => array(2), + 'group_id' => 5, + 'group_name' => 'Administrators', + )); + + $helper = new \phpbb\autogroups\conditions\type\helper($db, $notification_manager, $phpbb_root_path, $phpEx); + $helper->send_notifications('group_added', array(2), 5); + + self::assertTrue(function_exists('get_group_name')); + } +} diff --git a/tests/conditions/posts_test.php b/tests/conditions/posts_test.php index 6df9384..259d15b 100644 --- a/tests/conditions/posts_test.php +++ b/tests/conditions/posts_test.php @@ -240,4 +240,47 @@ public function helper_update_user_data($user_id, $data) WHERE user_id = ' . (int) $user_id; $this->db->sql_query($sql); } + + public function test_check_adjusts_post_count_during_deletion() + { + $helper = $this->createMock(\phpbb\autogroups\conditions\type\helper::class); + $helper->expects(self::once()) + ->method('get_users_groups') + ->with(array(1)) + ->willReturn(array(1 => array())); + + $condition = new posts_deletion_test_condition($helper); + $condition->check(array( + 1 => array('user_posts' => 11), + ), array('action' => 'delete')); + + self::assertSame(array(1), $condition->added_users); + } +} + +class posts_deletion_test_condition extends \phpbb\autogroups\conditions\type\posts +{ + public $added_users = array(); + + public function __construct(\phpbb\autogroups\conditions\type\helper $helper) + { + $this->helper = $helper; + } + + public function get_group_rules($type = '') + { + return array(array( + 'autogroups_type_id' => 1, + 'autogroups_type_name' => $this->get_condition_type(), + 'autogroups_min_value' => 10, + 'autogroups_max_value' => 10, + 'autogroups_group_id' => 2, + 'autogroups_excluded_groups' => '', + )); + } + + public function add_users_to_group($user_id_ary, $group_rule_data) + { + $this->added_users = $user_id_ary; + } } diff --git a/tests/controller/submit_autogroup_rule_test.php b/tests/controller/submit_autogroup_rule_test.php index 575a181..49fb116 100644 --- a/tests/controller/submit_autogroup_rule_test.php +++ b/tests/controller/submit_autogroup_rule_test.php @@ -88,7 +88,7 @@ public function submit_autogroup_rule_data() E_USER_WARNING, ), array( - 5, // test error: max = min values + 5, // test error: max = min values array( array('autogroups_type_id', 0, false, \phpbb\request\request_interface::REQUEST, 3), array('autogroups_min_value', 0, false, \phpbb\request\request_interface::REQUEST, 0), @@ -101,11 +101,11 @@ public function submit_autogroup_rule_data() E_USER_WARNING, ), array( - 6, // test error: group id in excluded group ids + 6, // test error: group id in excluded group ids array( array('autogroups_type_id', 0, false, \phpbb\request\request_interface::REQUEST, 3), array('autogroups_min_value', 0, false, \phpbb\request\request_interface::REQUEST, 0), - array('autogroups_max_value', 0, false, \phpbb\request\request_interface::REQUEST, 0), + array('autogroups_max_value', 0, false, \phpbb\request\request_interface::REQUEST, 1), array('autogroups_group_id', 0, false, \phpbb\request\request_interface::REQUEST, 1), array('autogroups_default', false, false, \phpbb\request\request_interface::REQUEST, true), array('autogroups_notify', false, false, \phpbb\request\request_interface::REQUEST, true), diff --git a/tests/controller/submit_autogroups_options_test.php b/tests/controller/submit_autogroups_options_test.php new file mode 100644 index 0000000..dc0b53f --- /dev/null +++ b/tests/controller/submit_autogroups_options_test.php @@ -0,0 +1,81 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + */ + +namespace phpbb\autogroups\tests\controller; + +class submit_autogroups_options_test extends admin_controller_base +{ + protected function tearDown(): void + { + unset($_POST['cancel']); + parent::tearDown(); + } + + public function test_submit_autogroups_options_requests_confirmation() + { + $_POST['cancel'] = true; + $this->request->expects(self::once()) + ->method('variable') + ->with('group_ids', array(0)) + ->willReturn(array(1)); + + $this->admin_controller->submit_autogroups_options(); + + self::assertSame(array(2), $this->get_exempt_group_ids()); + } + + public function test_submit_autogroups_options_updates_selected_groups() + { + global $db, $language, $phpbb_root_path, $phpEx, $request, $user; + + $db = $this->db; + $request = $this->request; + $language = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)); + $user->session_id = 'session-id'; + $user->data['user_last_confirm_key'] = 'confirm-key'; + + $yes = $language->lang('YES'); + $this->request->method('variable')->willReturnCallback(function ($name, $default) use ($yes) { + $values = array( + 'group_ids' => array(1), + 'confirm' => $yes, + 'confirm_uid' => 2, + 'sess' => 'session-id', + 'confirm_key' => 'confirm-key', + ); + return array_key_exists($name, $values) ? $values[$name] : $default; + }); + + $this->admin_controller->submit_autogroups_options(); + + self::assertSame(array(1), $this->get_exempt_group_ids()); + } + + public function test_get_excluded_groups_returns_selected_names() + { + $method = new \ReflectionMethod($this->admin_controller, 'get_excluded_groups'); + $method->setAccessible(true); + + self::assertSame(array(1 => 'GROUP1'), $method->invoke($this->admin_controller, '[1]')); + } + + private function get_exempt_group_ids() + { + $sql = 'SELECT group_id + FROM ' . GROUPS_TABLE . ' + WHERE autogroup_default_exempt = 1 + ORDER BY group_id'; + $result = $this->db->sql_query($sql); + $group_ids = array_map('intval', array_column($this->db->sql_fetchrowset($result), 'group_id')); + $this->db->sql_freeresult($result); + + return $group_ids; + } +} diff --git a/tests/extension/ext_test.php b/tests/extension/ext_test.php index 253fdfa..c218b48 100644 --- a/tests/extension/ext_test.php +++ b/tests/extension/ext_test.php @@ -66,6 +66,29 @@ public function test_steps() $this->assertCount(0, $this->get_notifications()); } + public function test_incompatible_version_returns_localised_error() + { + $language = $this->createMock(\phpbb\language\language::class); + $language->expects(self::once())->method('add_lang')->with('autogroups_install', 'phpbb/autogroups'); + $language->expects(self::once()) + ->method('lang') + ->with('AUTOGROUPS_NOT_ENABLEABLE') + ->willReturn('Not enableable'); + + $container = $this->createMock(\Symfony\Component\DependencyInjection\ContainerInterface::class); + $container->expects(self::once())->method('get')->with('language')->willReturn($language); + + $extension = new incompatible_ext( + $container, + $this->createMock(\phpbb\finder::class), + $this->createMock(\phpbb\db\migrator::class), + self::EXTENSION, + 'ext/phpbb/autogroups/' + ); + + self::assertSame('Not enableable', $extension->is_enableable()); + } + protected function create_extension_manager() { global $phpbb_root_path, $php_ext; @@ -159,3 +182,16 @@ protected function get_notifications() return $notification_type_ids; } } + +class incompatible_ext extends \phpbb\autogroups\ext +{ + protected function check_phpbb_version() + { + return false; + } + + protected function check_php_version() + { + return false; + } +} diff --git a/tests/manager/purge_autogroups_type_test.php b/tests/manager/purge_autogroups_type_test.php index be696f9..1a521f1 100644 --- a/tests/manager/purge_autogroups_type_test.php +++ b/tests/manager/purge_autogroups_type_test.php @@ -52,6 +52,13 @@ public function test_purge_autogroups_type($type_name) self::assertEquals(0, $this->count_rules($type_id)); } + public function test_purge_missing_autogroups_type_is_ignored() + { + $this->manager->purge_autogroups_type('phpbb.autogroups.type.missing'); + + self::assertSame(2, $this->count_types('phpbb.autogroups.type.sample1') + $this->count_types('phpbb.autogroups.type.sample2')); + } + /** * Get a count of type_name in phpbb_autogroups_types * diff --git a/tests/notification/group_added_test.php b/tests/notification/group_added_test.php new file mode 100644 index 0000000..e47b05e --- /dev/null +++ b/tests/notification/group_added_test.php @@ -0,0 +1,134 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + */ + +namespace phpbb\autogroups\tests\notification; + +class group_added_test extends \phpbb_test_case +{ + /** @var \phpbb\autogroups\notification\type\group_added */ + protected $notification; + + /** @var \PHPUnit\Framework\MockObject\MockObject|\phpbb\language\language */ + protected $language; + + /** @var \PHPUnit\Framework\MockObject\MockObject|\phpbb\notification\manager */ + protected $manager; + + protected function setUp(): void + { + parent::setUp(); + + global $phpbb_dispatcher, $phpbb_root_path, $phpEx; + + $phpbb_dispatcher = new \phpbb_mock_event_dispatcher(); + + $db = $this->createMock(\phpbb\db\driver\driver_interface::class); + $this->language = $this->createMock(\phpbb\language\language::class); + $user = $this->createMock(\phpbb\user::class); + $auth = $this->createMock(\phpbb\auth\auth::class); + $this->manager = $this->createMock(\phpbb\notification\manager::class); + + $this->notification = new \phpbb\autogroups\notification\type\group_added( + $db, + $this->language, + $user, + $auth, + $phpbb_root_path, + $phpEx, + 'phpbb_user_notifications' + ); + + $property = new \ReflectionProperty(\phpbb\notification\type\base::class, 'notification_manager'); + $property->setAccessible(true); + $property->setValue($this->notification, $this->manager); + } + + public function test_metadata_and_delivery_contract() + { + self::assertSame('phpbb.autogroups.notification.type.group_added', $this->notification->get_type()); + self::assertFalse($this->notification->is_available()); + self::assertSame(42, $this->notification::get_item_id(array('group_id' => 42))); + self::assertSame(0, $this->notification::get_item_parent_id(array('group_id' => 42))); + self::assertSame(array(), $this->notification->users_to_query()); + self::assertFalse($this->notification->get_email_template()); + self::assertSame(array(), $this->notification->get_email_template_variables()); + } + + public function find_users_data() + { + return array( + 'single user' => array(2, array(2 => array('notification.method.board'))), + 'multiple users' => array(array(2, 7), array( + 2 => array('notification.method.board'), + 7 => array('notification.method.board'), + )), + 'no users' => array(array(), array()), + ); + } + + /** + * @dataProvider find_users_data + */ + public function test_find_users_for_notification($user_ids, $expected) + { + $this->manager->expects(self::exactly(count((array) $user_ids))) + ->method('get_default_methods') + ->willReturn(array('notification.method.board')); + + self::assertSame($expected, $this->notification->find_users_for_notification(array('user_ids' => $user_ids))); + } + + public function test_title_url_and_insert_data() + { + global $phpbb_root_path; + + $this->language->expects(self::once()) + ->method('lang') + ->with('AUTOGROUPS_NOTIFICATION_GROUP_ADDED', 'Administrators') + ->willReturn('Added to Administrators'); + + $this->notification->create_insert_array(array( + 'group_id' => 42, + 'group_name' => 'Administrators', + )); + + self::assertSame('Added to Administrators', $this->notification->get_title()); + self::assertSame($phpbb_root_path . 'memberlist.php?mode=group&g=42', $this->notification->get_url()); + + $insert = $this->notification->get_insert_array(); + self::assertSame(42, $insert['item_id']); + self::assertSame(array('group_name' => 'Administrators'), unserialize($insert['notification_data'])); + } + + public function test_removed_notification_overrides_type_title_and_url() + { + global $phpbb_root_path, $phpEx; + + $notification = new \phpbb\autogroups\notification\type\group_removed( + $this->createMock(\phpbb\db\driver\driver_interface::class), + $this->language, + $this->createMock(\phpbb\user::class), + $this->createMock(\phpbb\auth\auth::class), + $phpbb_root_path, + $phpEx, + 'phpbb_user_notifications' + ); + $notification->create_insert_array(array('group_id' => 42, 'group_name' => 'Administrators')); + + $this->language->expects(self::once()) + ->method('lang') + ->with('AUTOGROUPS_NOTIFICATION_GROUP_REMOVED', 'Administrators') + ->willReturn('Removed from Administrators'); + + self::assertSame('phpbb.autogroups.notification.type.group_removed', $notification->get_type()); + self::assertSame('Removed from Administrators', $notification->get_title()); + self::assertSame('', $notification->get_url()); + } +}