From f294ab26d699654718d1a28f1e433af2bd108e94 Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Mon, 18 Sep 2017 14:16:24 +1200 Subject: [PATCH] =?UTF-8?q?Update=20tests=20and=20lang=E2=80=99s=20for=204?= =?UTF-8?q?.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lang/de.yml | 90 ++++++------ lang/en.yml | 90 ++++++------ lang/eo.yml | 72 +++++----- lang/es.yml | 50 +++---- lang/fa_IR.yml | 82 +++++------ lang/fi.yml | 56 ++++---- lang/fr.yml | 51 +++---- lang/hu.yml | 88 ++++++------ lang/id.yml | 46 +++---- lang/lt.yml | 82 +++++------ lang/nb.yml | 40 +++--- lang/nl.yml | 48 +++---- lang/pl_PL.yml | 82 +++++------ lang/ro.yml | 86 ++++++------ lang/ru.yml | 46 +++---- lang/sk_SK.yml | 50 +++---- lang/sr@latin.yml | 48 +++---- lang/sv.yml | 46 +++---- src/Admin/CommentAdmin.php | 27 ++-- src/Admin/CommentsGridField.php | 3 +- src/Admin/CommentsGridFieldAction.php | 8 +- src/Admin/CommentsGridFieldConfig.php | 4 +- src/Controllers/CommentingController.php | 24 +++- src/Extensions/CommentsExtension.php | 89 +++++++----- src/Forms/CommentForm.php | 21 +-- src/Model/Comment.php | 27 ++-- tests/CommentAdminTest.php | 41 +----- tests/CommentingControllerTest.php | 75 +++++----- tests/CommentsExtensionTest.php | 131 +++++++----------- tests/CommentsTest.php | 166 +++++++++++------------ tests/Stubs/CommentableItem.php | 4 - 31 files changed, 875 insertions(+), 898 deletions(-) diff --git a/lang/de.yml b/lang/de.yml index a4218ed..a805f95 100644 --- a/lang/de.yml +++ b/lang/de.yml @@ -1,5 +1,49 @@ de: - Comment: + CommentInterface: + COMMENT_MESSAGE_REQUIRED: 'Bitte geben Sie Ihren Kommentar ein' + COMMENT_MESSAGE_URL: 'Bitte geben Sie eine gültige URL ein' + EMAILADDRESS_MESSAGE_EMAIL: 'Bitte geben Sie eine gültige E-Mail-Adresse ein' + EMAILADDRESS_MESSAGE_REQUIRED: 'Bitte geben Sie Ihre E-Mail-Adresse ein' + POST: Absenden + PREVIEW: Vorschau + PREVIEWLABEL: Vorschau + YOURNAME: Name + YOURNAME_MESSAGE_REQUIRED: 'Bitte geben Sie Ihren Namen ein' + CommentsAdmin: + NeedsModeration: 'Benötigt Moderation' + CommentsInterface_pendingcomment_ss: + AWAITINGMODERATION: 'Ihr Kommentar wurde gespeichert und wird durch einen Moderator freigeschaltet.' + CommentsInterface_singlecomment_ss: + PBY: 'Geschrieben von' + CommentsInterface_ss: + AWAITINGMODERATION: 'Ihr Kommentar wurde gespeichert und wird durch einen Moderator freigeschaltet.' + COMMENTLOGINERROR: 'Sie können diese Seite nur kommentieren, wenn Sie eingeloggt sind' + COMMENTPERMISSIONERROR: 'und die nötige Berechtigung besitzen' + COMMENTPOSTLOGIN: Login + COMMENTS: Kommentare + COMMENTSDISABLED: 'Kommentare sind deaktiviert' + DELETEALLCOMMENTS: 'Alle Kommentare auf dieser Seite löschen' + LOGINTOPOSTCOMMENT: 'Login um zu kommentieren' + NEXT: weiter + NOCOMMENTSYET: 'Noch keine Kommentare auf dieser Seite.' + POSTCOM: Kommentieren + PREV: zurück + RSSFEEDALLCOMMENTS: 'RSS Feed für alle Kommentare' + RSSFEEDCOMMENTS: 'RSS Feed für Kommentare auf dieser Seite' + PageCommentInterface: + DELETEALLCOMMENTS: 'Alle Kommentare auf dieser Seite entfernen' + SilverStripe\Comments\Admin\CommentAdmin: + ADMIN_PERMISSION: 'Zugang zum Bereich ''Kommentare''' + MENUTITLE: Kommentare + Moderated: Moderiert + NeedsModeration: 'Benötigt Moderation' + SilverStripe\Comments\Controllers\CommentingController: + COMMENTS: Kommentare + EMAILADDRESS: 'E-Mail Adresse (wird nicht angezeigt)' + PERMISSIONFAILURE: 'Sie sind nicht berechtigt diese Seite zu kommentieren. Bitte stellen Sie sicher das Sie eingeloggt sind und die nötige Berechtigung besitzen.' + RSSTITLE: 'Kommentare RSS Feed' + WEBSITEURL: 'Website URL' + SilverStripe\Comments\Model\Comment: ALLOWCOMMENTS: 'Kommentare Erlauben' COMMENT: Kommentar COMMENTBY: 'Kommentar von ''%s''' @@ -12,47 +56,3 @@ de: PLURALNAME: Kommentare SINGULARNAME: Kommentar URL: URL - CommentAdmin: - ADMIN_PERMISSION: 'Zugang zum Bereich ''Kommentare''' - MENUTITLE: Kommentare - Moderated: Moderiert - NeedsModeration: 'Benötigt Moderation' - CommentInterface: - COMMENT_MESSAGE_REQUIRED: 'Bitte geben Sie Ihren Kommentar ein' - COMMENT_MESSAGE_URL: 'Bitte geben Sie eine gültige URL ein' - EMAILADDRESS_MESSAGE_EMAIL: 'Bitte geben Sie eine gültige E-Mail-Adresse ein' - EMAILADDRESS_MESSAGE_REQUIRED: 'Bitte geben Sie Ihre E-Mail-Adresse ein' - POST: Absenden - PREVIEW: Vorschau - PREVIEWLABEL: Vorschau - YOURNAME: 'Name' - YOURNAME_MESSAGE_REQUIRED: 'Bitte geben Sie Ihren Namen ein' - CommentingController: - COMMENTS: Kommentare - EMAILADDRESS: 'E-Mail Adresse (wird nicht angezeigt)' - PERMISSIONFAILURE: 'Sie sind nicht berechtigt diese Seite zu kommentieren. Bitte stellen Sie sicher das Sie eingeloggt sind und die nötige Berechtigung besitzen.' - RSSTITLE: 'Kommentare RSS Feed' - WEBSITEURL: 'Website URL' - CommentsAdmin: - NeedsModeration: 'Benötigt Moderation' - CommentsInterface_pendingcomment_ss: - AWAITINGMODERATION: 'Ihr Kommentar wurde gespeichert und wird durch einen Moderator freigeschaltet.' - CommentsInterface_singlecomment_ss: - PBY: 'Geschrieben von' - CommentsInterface_ss: - AWAITINGMODERATION: 'Ihr Kommentar wurde gespeichert und wird durch einen Moderator freigeschaltet.' - COMMENTLOGINERROR: 'Sie können diese Seite nur kommentieren, wenn Sie eingeloggt sind' - COMMENTPERMISSIONERROR: 'und die nötige Berechtigung besitzen' - COMMENTPOSTLOGIN: 'Login' - COMMENTS: Kommentare - COMMENTSDISABLED: 'Kommentare sind deaktiviert' - DELETEALLCOMMENTS: 'Alle Kommentare auf dieser Seite löschen' - LOGINTOPOSTCOMMENT: 'Login um zu kommentieren' - NEXT: weiter - NOCOMMENTSYET: 'Noch keine Kommentare auf dieser Seite.' - POSTCOM: 'Kommentieren' - PREV: zurück - RSSFEEDALLCOMMENTS: 'RSS Feed für alle Kommentare' - RSSFEEDCOMMENTS: 'RSS Feed für Kommentare auf dieser Seite' - PageCommentInterface: - DELETEALLCOMMENTS: 'Alle Kommentare auf dieser Seite entfernen' diff --git a/lang/en.yml b/lang/en.yml index 24b4a78..6bcefcb 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -1,30 +1,4 @@ en: - Comment: - ALLOWCOMMENTS: 'Allow Comments' - COMMENT: Comment - COMMENTBY: 'Comment by %s' - CREATED: 'Date posted' - EMAIL: Email - ISSPAM: 'Spam?' - MODERATED: 'Moderated?' - NAME: 'Author Name' - 'ON': 'on' - OPTIONS: Options - OPTION_DESCRIPTION: 'Unmoderated and spam comments will not be displayed until approved' - PARENTTITLE: Parent - PLURALNAME: Comments - ParentComment_Title: 'This comment is a reply to the below' - SINGULARNAME: Comment - URL: URL - CommentAdmin: - ADMIN_PERMISSION: 'Access to ''Comments'' section' - ApprovedComments: Approved - Comments: Approved - MENUTITLE: Comments - Moderated: Moderated - NeedsModeration: 'Needs Moderation' - NewComments: New - SpamComments: Spam CommentInterface: COMMENT_MESSAGE_REQUIRED: 'Please enter your comment' COMMENT_MESSAGE_URL: 'Please enter a valid URL' @@ -35,12 +9,6 @@ en: PREVIEWLABEL: Preview YOURNAME: 'Your name' YOURNAME_MESSAGE_REQUIRED: 'Please enter your name' - CommentingController: - COMMENTS: Comments - EMAILADDRESS: 'Your email address (will not be published)' - PERMISSIONFAILURE: 'You''re not able to post comments to this page. Please ensure you are logged in and have an appropriate permission level.' - RSSTITLE: 'Comments RSS Feed' - WEBSITEURL: 'Your website URL' Comments: COMMENTSREQUIRELOGIN: 'Require login to comment' CommentsAdmin: @@ -49,19 +17,6 @@ en: NeedsModeration: 'Needs Moderation' NewComments: New SpamComments: Spam - CommentsExtension: - COMMENTOPTIONS: Comments - MODERATIONREQUIRED_NONE: 'No moderation required' - MODERATIONREQUIRED_NONMEMBERSONLY: 'Only moderate non-members' - MODERATIONREQUIRED_REQUIRED: 'Moderate all comments' - CommentsGridFieldAction: - APPROVE: Approve - COMMENTAPPROVED: 'Comment approved.' - COMMENTMARKEDSPAM: 'Comment marked as spam.' - SPAM: Spam - CommentsGridFieldConfig: - APPROVE: Approve - SPAM: Spam CommentsInterface_pendingcomment_ss: AWAITINGMODERATION: 'Your comment has been submitted and is now awaiting moderation.' CommentsInterface_singlecomment_ss: @@ -87,3 +42,48 @@ en: RSSFEEDCOMMENTS: 'RSS feed for comments on this page' PageCommentInterface: DELETEALLCOMMENTS: 'Delete all comments on this page' + SilverStripe\Comments\Admin\CommentAdmin: + ADMIN_PERMISSION: 'Access to ''Comments'' section' + ApprovedComments: Approved + Comments: Approved + MENUTITLE: Comments + Moderated: Moderated + NeedsModeration: 'Needs Moderation' + NewComments: New + SpamComments: Spam + SilverStripe\Comments\Admin\CommentsGridFieldAction: + APPROVE: Approve + COMMENTAPPROVED: 'Comment approved.' + COMMENTMARKEDSPAM: 'Comment marked as spam.' + SPAM: Spam + SilverStripe\Comments\Admin\CommentsGridFieldConfig: + APPROVE: Approve + SPAM: Spam + SilverStripe\Comments\Controllers\CommentingController: + COMMENTS: Comments + EMAILADDRESS: 'Your email address (will not be published)' + PERMISSIONFAILURE: 'You''re not able to post comments to this page. Please ensure you are logged in and have an appropriate permission level.' + RSSTITLE: 'Comments RSS Feed' + WEBSITEURL: 'Your website URL' + SilverStripe\Comments\Extensions\CommentsExtension: + COMMENTOPTIONS: Comments + MODERATIONREQUIRED_NONE: 'No moderation required' + MODERATIONREQUIRED_NONMEMBERSONLY: 'Only moderate non-members' + MODERATIONREQUIRED_REQUIRED: 'Moderate all comments' + SilverStripe\Comments\Model\Comment: + ALLOWCOMMENTS: 'Allow Comments' + COMMENT: Comment + COMMENTBY: 'Comment by %s' + CREATED: 'Date posted' + EMAIL: Email + ISSPAM: 'Spam?' + MODERATED: 'Moderated?' + NAME: 'Author Name' + 'ON': 'on' + OPTIONS: Options + OPTION_DESCRIPTION: 'Unmoderated and spam comments will not be displayed until approved' + PARENTTITLE: Parent + PLURALNAME: Comments + ParentComment_Title: 'This comment is a reply to the below' + SINGULARNAME: Comment + URL: URL diff --git a/lang/eo.yml b/lang/eo.yml index 9ca6903..d9114de 100644 --- a/lang/eo.yml +++ b/lang/eo.yml @@ -1,29 +1,4 @@ eo: - Comment: - ALLOWCOMMENTS: 'Ebligi komentojn' - COMMENT: Komento - COMMENTBY: 'Komento de %s' - CREATED: 'Dato de afiŝo' - EMAIL: Retpoŝto - ISSPAM: 'Ĉu spamo?' - MODERATED: 'Ĉu kontrolata?' - NAME: 'Nomo de aŭtoro' - 'ON': 'en' - OPTION_DESCRIPTION: 'Ne vidigos nekontrolitajn aŭ spamajn komentojn antaŭ aprobo' - PARENTTITLE: Patra - PLURALNAME: Komentoj - ParentComment_Title: 'Tiu komento estas respondo al la suba' - SINGULARNAME: Komento - URL: URL - CommentAdmin: - ADMIN_PERMISSION: 'Aliro al sekcio ''Komentoj''' - ApprovedComments: Aprobita - Comments: Aprobita - MENUTITLE: Komentoj - Moderated: Kontrolata - NeedsModeration: 'Bezonas kontrolon' - NewComments: Nova - SpamComments: Spamo CommentInterface: COMMENT_MESSAGE_REQUIRED: 'Bonvole enigu vian komenton' COMMENT_MESSAGE_URL: 'Bonvole enigu validan URL-on' @@ -34,12 +9,6 @@ eo: PREVIEWLABEL: Antaŭvido YOURNAME: 'Via nomo' YOURNAME_MESSAGE_REQUIRED: 'Bonvole enigu vian nomon' - CommentingController: - COMMENTS: Komentoj - EMAILADDRESS: 'Via retadreso (ne publikiĝos)' - PERMISSIONFAILURE: 'Vi ne povas afiŝi komentojn al ĉi tiu paĝo. Bonvole certigu ke vi jam ensalutis kaj havas taŭgan permeson.' - RSSTITLE: 'RSS-fluo de komentoj' - WEBSITEURL: 'Via reteja URL' Comments: COMMENTSREQUIRELOGIN: 'Necesas ensaluti por komenti' CommentsAdmin: @@ -48,11 +17,6 @@ eo: NeedsModeration: 'Bezonas kontrolon' NewComments: Nova SpamComments: Spamo - CommentsExtension: - COMMENTOPTIONS: Komentoj - MODERATIONREQUIRED_NONE: 'Kontrolado ne bezonatas' - MODERATIONREQUIRED_NONMEMBERSONLY: 'Kontroli nur nemembrojn' - MODERATIONREQUIRED_REQUIRED: 'Kontroli ĉiujn komentojn' CommentsInterface_pendingcomment_ss: AWAITINGMODERATION: 'Via komento afiŝiĝis kaj nun atendas kontrolon.' CommentsInterface_singlecomment_ss: @@ -78,3 +42,39 @@ eo: RSSFEEDCOMMENTS: 'RSS-fluo por komentoj pri ĉi tiu paĝo' PageCommentInterface: DELETEALLCOMMENTS: 'Forigi ĉiujn komentojn pri ĉi tiu paĝo' + SilverStripe\Comments\Admin\CommentAdmin: + ADMIN_PERMISSION: 'Aliro al sekcio ''Komentoj''' + ApprovedComments: Aprobita + Comments: Aprobita + MENUTITLE: Komentoj + Moderated: Kontrolata + NeedsModeration: 'Bezonas kontrolon' + NewComments: Nova + SpamComments: Spamo + SilverStripe\Comments\Controllers\CommentingController: + COMMENTS: Komentoj + EMAILADDRESS: 'Via retadreso (ne publikiĝos)' + PERMISSIONFAILURE: 'Vi ne povas afiŝi komentojn al ĉi tiu paĝo. Bonvole certigu ke vi jam ensalutis kaj havas taŭgan permeson.' + RSSTITLE: 'RSS-fluo de komentoj' + WEBSITEURL: 'Via reteja URL' + SilverStripe\Comments\Extensions\CommentsExtension: + COMMENTOPTIONS: Komentoj + MODERATIONREQUIRED_NONE: 'Kontrolado ne bezonatas' + MODERATIONREQUIRED_NONMEMBERSONLY: 'Kontroli nur nemembrojn' + MODERATIONREQUIRED_REQUIRED: 'Kontroli ĉiujn komentojn' + SilverStripe\Comments\Model\Comment: + ALLOWCOMMENTS: 'Ebligi komentojn' + COMMENT: Komento + COMMENTBY: 'Komento de %s' + CREATED: 'Dato de afiŝo' + EMAIL: Retpoŝto + ISSPAM: 'Ĉu spamo?' + MODERATED: 'Ĉu kontrolata?' + NAME: 'Nomo de aŭtoro' + 'ON': en + OPTION_DESCRIPTION: 'Ne vidigos nekontrolitajn aŭ spamajn komentojn antaŭ aprobo' + PARENTTITLE: Patra + PLURALNAME: Komentoj + ParentComment_Title: 'Tiu komento estas respondo al la suba' + SINGULARNAME: Komento + URL: URL diff --git a/lang/es.yml b/lang/es.yml index 539932a..5aff86d 100644 --- a/lang/es.yml +++ b/lang/es.yml @@ -1,37 +1,14 @@ es: - Comment: - ALLOWCOMMENTS: 'Permitir comentarios' - COMMENT: Comentario - COMMENTBY: 'Comentario por %s' - CREATED: 'Fecha de publicación' - EMAIL: Email - ISSPAM: '¿Spam?' - MODERATED: '¿Moderado?' - NAME: 'Nombre del autor' - PARENTTITLE: Padre - PLURALNAME: Comentarios - SINGULARNAME: Comentario - URL: URL - CommentAdmin: - ADMIN_PERMISSION: 'Acceder a la sección ''Comentarios''' - MENUTITLE: Comentarios - Moderated: Moderado - NeedsModeration: 'Necesita moderación' CommentInterface: COMMENT_MESSAGE_REQUIRED: 'Por favor, ingres su comentario' COMMENT_MESSAGE_URL: 'Por favor, ingrese una URL válida' EMAILADDRESS_MESSAGE_EMAIL: 'Por favor, ingrse una dirección de correo válida' EMAILADDRESS_MESSAGE_REQUIRED: 'Por favor, ingrese su dirección de correo' POST: Publicar - PREVIEW: Vista previa - PREVIEWLABEL: Vista previa + PREVIEW: 'Vista previa' + PREVIEWLABEL: 'Vista previa' YOURNAME: 'Su nombre' YOURNAME_MESSAGE_REQUIRED: 'Por favor, ingrese su nombre' - CommentingController: - COMMENTS: Comentarios - EMAILADDRESS: 'Su dirección de correo (no se publicará)' - PERMISSIONFAILURE: 'Ud no puede publicar comentarios en esta página. Por favor asegúrese que haya iniciado sesión y que tenga el adecuado nivel de permisos.' - WEBSITEURL: 'URL de su sitio Web' CommentsAdmin: NeedsModeration: 'Necesita moderación' CommentsInterface_pendingcomment_ss: @@ -53,3 +30,26 @@ es: PREV: anterior PageCommentInterface: DELETEALLCOMMENTS: 'Eliminar todos los comentarios de esta página' + SilverStripe\Comments\Admin\CommentAdmin: + ADMIN_PERMISSION: 'Acceder a la sección ''Comentarios''' + MENUTITLE: Comentarios + Moderated: Moderado + NeedsModeration: 'Necesita moderación' + SilverStripe\Comments\Controllers\CommentingController: + COMMENTS: Comentarios + EMAILADDRESS: 'Su dirección de correo (no se publicará)' + PERMISSIONFAILURE: 'Ud no puede publicar comentarios en esta página. Por favor asegúrese que haya iniciado sesión y que tenga el adecuado nivel de permisos.' + WEBSITEURL: 'URL de su sitio Web' + SilverStripe\Comments\Model\Comment: + ALLOWCOMMENTS: 'Permitir comentarios' + COMMENT: Comentario + COMMENTBY: 'Comentario por %s' + CREATED: 'Fecha de publicación' + EMAIL: Email + ISSPAM: '¿Spam?' + MODERATED: '¿Moderado?' + NAME: 'Nombre del autor' + PARENTTITLE: Padre + PLURALNAME: Comentarios + SINGULARNAME: Comentario + URL: URL diff --git a/lang/fa_IR.yml b/lang/fa_IR.yml index 6ed66fc..7bc7742 100644 --- a/lang/fa_IR.yml +++ b/lang/fa_IR.yml @@ -1,64 +1,28 @@ fa_IR: - Comment: - ALLOWCOMMENTS: 'اجازه نشر دیدگاه' - COMMENT: دیدگاه - COMMENTBY: 'دیدگاه توسط %s' - CREATED: 'تاریخ ارسال' - EMAIL: ایمیل - ISSPAM: 'هرزنوشت؟' - MODERATED: 'مدیریت شده؟' - NAME: 'نام نگارنده' - 'ON': 'در' - OPTION_DESCRIPTION: 'دیدگاه‌های مدیریت نشده و هرزنوشت‌ها تا زمان تایید به نمایش در نخواهند آمد' - PARENTTITLE: والد - PLURALNAME: دیدگاه‌ها - ParentComment_Title: 'این دیدگاه پاسخی است به زیر' - SINGULARNAME: دیدگاه - URL: نشانی اینترنتی - CommentAdmin: - ADMIN_PERMISSION: 'دسترسی به بخش ''دیدگاه‌ها''' - ApprovedComments: تایید شده - Comments: تایید شده - MENUTITLE: دیدگاه‌ها - Moderated: مدیریت شده - NeedsModeration: 'نیازمند مدیریت' - NewComments: تازه - SpamComments: هرزنوشت CommentInterface: COMMENT_MESSAGE_REQUIRED: 'لطفاً دیدگاه خود را وارد نمایید' COMMENT_MESSAGE_URL: 'لطفاً نشانی اینترنتی معتبر وارد نمایید' EMAILADDRESS_MESSAGE_EMAIL: 'لطفاً نشانی ایمیل معتبر وارد نمایید' EMAILADDRESS_MESSAGE_REQUIRED: 'لطفاً نشانی ایمیل خود را وارد نمایید' POST: ارسال - PREVIEW: پیش‌نمایش - PREVIEWLABEL: پیش‌نمایش + PREVIEW: 'پیش‌نمایش' + PREVIEWLABEL: 'پیش‌نمایش' YOURNAME: 'نام شما' YOURNAME_MESSAGE_REQUIRED: 'لطفاً نام خود را وارد نمایید' - CommentingController: - COMMENTS: دیدگاه‌ها - EMAILADDRESS: 'ایمیل شما (منتشر نخواهد شد)' - PERMISSIONFAILURE: 'شما نمی‌توانید در این صفحه دیدگاهی درج نمایید. لطفاً اطمینان حاصل نمایید که وارد سایت شده‌اید و از سطح دسترسی دسترسی مناسب برخوردار هستید.' - RSSTITLE: 'خوراک آراس‌اس دیدگاه‌ها' - WEBSITEURL: 'نشانی وب‌سایت شما' Comments: COMMENTSREQUIRELOGIN: 'درج دیدگاه نیازمند ورود شما به سایت است' CommentsAdmin: - ApprovedComments: تایید شده - Comments: تایید شده + ApprovedComments: 'تایید شده' + Comments: 'تایید شده' NeedsModeration: 'نیازمند مدیریت' NewComments: تازه SpamComments: هرزنوشت - CommentsExtension: - COMMENTOPTIONS: دیدگاه‌ها - MODERATIONREQUIRED_NONE: 'نیاز به مدیریت ندارد' - MODERATIONREQUIRED_NONMEMBERSONLY: 'تنها مدیریت کاربران غیر عضو' - MODERATIONREQUIRED_REQUIRED: 'مدیریت تمامی دیدگاه‌ها' CommentsInterface_pendingcomment_ss: AWAITINGMODERATION: 'دیدگاه شما ارسال شده و هم‌اکنون در انتظار بررسی است.' CommentsInterface_singlecomment_ss: APPROVE: 'تایید کن' ISNTSPAM: 'هرزنوشت نیست' - ISSPAM: 'هرزنوشته' + ISSPAM: هرزنوشته PBY: 'ارسال شده توسط' REMCOM: 'رد کردن' CommentsInterface_ss: @@ -78,3 +42,39 @@ fa_IR: RSSFEEDCOMMENTS: 'خوراک آر‌اس‌اس دیدگاه‌های این صفحه' PageCommentInterface: DELETEALLCOMMENTS: 'حذف تمامی دیدگاه‌ها در این صفحه' + SilverStripe\Comments\Admin\CommentAdmin: + ADMIN_PERMISSION: 'دسترسی به بخش ''دیدگاه‌ها''' + ApprovedComments: 'تایید شده' + Comments: 'تایید شده' + MENUTITLE: دیدگاه‌ها + Moderated: 'مدیریت شده' + NeedsModeration: 'نیازمند مدیریت' + NewComments: تازه + SpamComments: هرزنوشت + SilverStripe\Comments\Controllers\CommentingController: + COMMENTS: دیدگاه‌ها + EMAILADDRESS: 'ایمیل شما (منتشر نخواهد شد)' + PERMISSIONFAILURE: 'شما نمی‌توانید در این صفحه دیدگاهی درج نمایید. لطفاً اطمینان حاصل نمایید که وارد سایت شده‌اید و از سطح دسترسی دسترسی مناسب برخوردار هستید.' + RSSTITLE: 'خوراک آراس‌اس دیدگاه‌ها' + WEBSITEURL: 'نشانی وب‌سایت شما' + SilverStripe\Comments\Extensions\CommentsExtension: + COMMENTOPTIONS: دیدگاه‌ها + MODERATIONREQUIRED_NONE: 'نیاز به مدیریت ندارد' + MODERATIONREQUIRED_NONMEMBERSONLY: 'تنها مدیریت کاربران غیر عضو' + MODERATIONREQUIRED_REQUIRED: 'مدیریت تمامی دیدگاه‌ها' + SilverStripe\Comments\Model\Comment: + ALLOWCOMMENTS: 'اجازه نشر دیدگاه' + COMMENT: دیدگاه + COMMENTBY: 'دیدگاه توسط %s' + CREATED: 'تاریخ ارسال' + EMAIL: 'ایمیل' + ISSPAM: هرزنوشت؟ + MODERATED: 'مدیریت شده؟' + NAME: 'نام نگارنده' + 'ON': در + OPTION_DESCRIPTION: 'دیدگاه‌های مدیریت نشده و هرزنوشت‌ها تا زمان تایید به نمایش در نخواهند آمد' + PARENTTITLE: والد + PLURALNAME: دیدگاه‌ها + ParentComment_Title: 'این دیدگاه پاسخی است به زیر' + SINGULARNAME: دیدگاه + URL: 'نشانی اینترنتی' diff --git a/lang/fi.yml b/lang/fi.yml index 21d6ede..9b7af2b 100644 --- a/lang/fi.yml +++ b/lang/fi.yml @@ -1,44 +1,20 @@ fi: - Comment: - ALLOWCOMMENTS: 'Salli kommentointi' - COMMENT: Komentti - COMMENTBY: 'Kommentoija: %s' - CREATED: 'Kirjoitettu' - EMAIL: Sähköposti - ISSPAM: 'Spämmiä?' - MODERATED: 'Moderoitu?' - NAME: 'Kirjoittajan nimi' - 'ON': 'pvm' - PARENTTITLE: Isäntä - PLURALNAME: Kommentit - SINGULARNAME: Komentti - URL: URL-osoite - CommentAdmin: - MENUTITLE: Kommentit - Moderated: Moderoitu - NeedsModeration: 'Tarvitsee moderointia' CommentInterface: COMMENT_MESSAGE_REQUIRED: 'Ole hyvä ja kommentoi' COMMENT_MESSAGE_URL: 'URL-osoitteen on oltava kelvollinen' EMAILADDRESS_MESSAGE_EMAIL: 'Sähköpostiosoitteen on oltava kelvollinen' - EMAILADDRESS_MESSAGE_REQUIRED: 'Sähköpostiosoitteesi' + EMAILADDRESS_MESSAGE_REQUIRED: Sähköpostiosoitteesi POST: Lähetä PREVIEW: Esikatselu PREVIEWLABEL: Esikatselu - YOURNAME: 'Nimesi' - YOURNAME_MESSAGE_REQUIRED: 'Nimesi' - CommentingController: - COMMENTS: Kommentit - EMAILADDRESS: 'Sähköpostiosoitteesi (ei julkaista)' - PERMISSIONFAILURE: 'Et voi kommentoida tätä sivua. Varmista, että olet kirjatuneena ja että käyttöoikeutesi ovat riittävät.' - RSSTITLE: 'Kommenttien RSS-syöte' - WEBSITEURL: 'WWW-sivustosi osoite' + YOURNAME: Nimesi + YOURNAME_MESSAGE_REQUIRED: Nimesi CommentsAdmin: NeedsModeration: 'Tarvitsee moderointia' CommentsInterface_pendingcomment_ss: AWAITINGMODERATION: 'Kommenttisi on lähetetty ja on moderoitavana.' CommentsInterface_singlecomment_ss: - PBY: 'Lähettänyt' + PBY: Lähettänyt CommentsInterface_ss: AWAITINGMODERATION: 'Kommenttisi on lähetetty ja on moderoitavana.' COMMENTLOGINERROR: 'Et voi kommentoida ennen kuin olet kirjautunut sisään' @@ -55,3 +31,27 @@ fi: RSSFEEDCOMMENTS: 'RSS-syöte tämän sivun kommenteista' PageCommentInterface: DELETEALLCOMMENTS: 'Poista kaikki tämän sivun kommentit' + SilverStripe\Comments\Admin\CommentAdmin: + MENUTITLE: Kommentit + Moderated: Moderoitu + NeedsModeration: 'Tarvitsee moderointia' + SilverStripe\Comments\Controllers\CommentingController: + COMMENTS: Kommentit + EMAILADDRESS: 'Sähköpostiosoitteesi (ei julkaista)' + PERMISSIONFAILURE: 'Et voi kommentoida tätä sivua. Varmista, että olet kirjatuneena ja että käyttöoikeutesi ovat riittävät.' + RSSTITLE: 'Kommenttien RSS-syöte' + WEBSITEURL: 'WWW-sivustosi osoite' + SilverStripe\Comments\Model\Comment: + ALLOWCOMMENTS: 'Salli kommentointi' + COMMENT: Komentti + COMMENTBY: 'Kommentoija: %s' + CREATED: Kirjoitettu + EMAIL: Sähköposti + ISSPAM: 'Spämmiä?' + MODERATED: 'Moderoitu?' + NAME: 'Kirjoittajan nimi' + 'ON': pvm + PARENTTITLE: Isäntä + PLURALNAME: Kommentit + SINGULARNAME: Komentti + URL: URL-osoite diff --git a/lang/fr.yml b/lang/fr.yml index b892dba..f984f59 100644 --- a/lang/fr.yml +++ b/lang/fr.yml @@ -1,21 +1,4 @@ fr: - Comment: - ALLOWCOMMENTS: 'Autoriser Commentaires' - COMMENT: Commentaire - COMMENTBY: 'Commentaire par %s' - CREATED: 'Date de publication' - EMAIL: Email - ISSPAM: 'Spam?' - MODERATED: 'Modéré?' - NAME: 'Nom de l''Auteur' - PARENTTITLE: Parent - PLURALNAME: Commentaires - SINGULARNAME: Commentaire - URL: URL - CommentAdmin: - MENUTITLE: Commentaires - Moderated: Modéré - NeedsModeration: 'Besoin de modération' CommentInterface: COMMENT_MESSAGE_REQUIRED: 'Saisissez votre commentaire' COMMENT_MESSAGE_URL: 'Saisissez une URl valide' @@ -26,16 +9,8 @@ fr: PREVIEWLABEL: Aperçu YOURNAME: 'Votre Nom' YOURNAME_MESSAGE_REQUIRED: 'Saisissez votre nom' - CommentingController: - COMMENTS: Commentaires - EMAILADDRESS: 'Votre adresse e-mail (ne sera pas publiée)' - PERMISSIONFAILURE: 'Vous n''avez pas l''autorisation de commenter cette page. Assurez vous d''être connecté et d''avoir le bon niveau de d''autorisation.' - RSSTITLE: 'Flux RSS de Commentaires' - WEBSITEURL: 'URl de votre site web' CommentsAdmin: NeedsModeration: 'Besoin de Modération' - CommentsExtension: - COMMENTOPTIONS: Commentaires CommentsInterface_pendingcomment_ss: AWAITINGMODERATION: 'Votre commentaire a été soumis à modération.' CommentsInterface_singlecomment_ss: @@ -57,3 +32,29 @@ fr: RSSFEEDCOMMENTS: 'Flux RSS de commentaires de cette page' PageCommentInterface: DELETEALLCOMMENTS: 'Supprimer tout les commentaires de cette page' + SilverStripe\Comments\Admin\CommentAdmin: + ADMIN_PERMISSION: 'Accès à la section Commentaires' + MENUTITLE: Commentaires + Moderated: Modéré + NeedsModeration: 'Besoin de modération' + SilverStripe\Comments\Controllers\CommentingController: + COMMENTS: Commentaires + EMAILADDRESS: 'Votre adresse e-mail (ne sera pas publiée)' + PERMISSIONFAILURE: 'Vous n''avez pas l''autorisation de commenter cette page. Assurez vous d''être connecté et d''avoir le bon niveau de d''autorisation.' + RSSTITLE: 'Flux RSS de Commentaires' + WEBSITEURL: 'URl de votre site web' + SilverStripe\Comments\Extensions\CommentsExtension: + COMMENTOPTIONS: Commentaires + SilverStripe\Comments\Model\Comment: + ALLOWCOMMENTS: 'Autoriser Commentaires' + COMMENT: Commentaire + COMMENTBY: 'Commentaire par %s' + CREATED: 'Date de publication' + EMAIL: Email + ISSPAM: 'Spam?' + MODERATED: 'Modéré?' + NAME: 'Nom de l''Auteur' + PARENTTITLE: Parent + PLURALNAME: Commentaires + SINGULARNAME: Commentaire + URL: URL diff --git a/lang/hu.yml b/lang/hu.yml index 8368052..42c25b1 100644 --- a/lang/hu.yml +++ b/lang/hu.yml @@ -1,5 +1,48 @@ hu: - Comment: + CommentInterface: + COMMENT_MESSAGE_REQUIRED: 'Szöveg megadása' + COMMENT_MESSAGE_URL: 'Kérjük adjon meg egy működő linket' + EMAILADDRESS_MESSAGE_EMAIL: 'Kérjük adjon meg egy e-mail címet' + EMAILADDRESS_MESSAGE_REQUIRED: 'Kérjük adja meg az e-mail címét' + POST: Elküld + PREVIEW: Előnézet + PREVIEWLABEL: Előnézet + YOURNAME: 'Az Ön neve' + YOURNAME_MESSAGE_REQUIRED: 'Kérjük adja meg nevét' + CommentsAdmin: + NeedsModeration: 'Moderálás szükséges' + CommentsInterface_pendingcomment_ss: + AWAITINGMODERATION: 'Hozzászólását moderálásra továbbítottuk' + CommentsInterface_singlecomment_ss: + PBY: Feladó + CommentsInterface_ss: + AWAITINGMODERATION: 'Hozzászólását moderálásra továbbítottuk' + COMMENTLOGINERROR: 'A hozzászóláshoz be kell jelentkeznie' + COMMENTPERMISSIONERROR: 'és rendelkeznie kell a megfelelő jogosultsággal' + COMMENTPOSTLOGIN: Bejelentkezés + COMMENTS: Hozzászólások + COMMENTSDISABLED: 'A hozzászólások le vannak tiltva ' + LOGINTOPOSTCOMMENT: 'A hozzászóláshoz jelentkezzen be ' + NEXT: következő + NOCOMMENTSYET: 'Nem érkeztek hozzászólások' + POSTCOM: 'Küldjön egy hozzászólást' + PREV: előző + RSSFEEDALLCOMMENTS: 'Összes hozzászólás RSS-ben' + RSSFEEDCOMMENTS: 'Oldal hozzászólásai RSS-ben' + PageCommentInterface: + DELETEALLCOMMENTS: 'Oldal összes hozzászólásának törlése' + SilverStripe\Comments\Admin\CommentAdmin: + ADMIN_PERMISSION: '''Hozzászólások'' mező elérése' + MENUTITLE: Hozzászólások + Moderated: Moderált + NeedsModeration: 'Moderálás szükséges' + SilverStripe\Comments\Controllers\CommentingController: + COMMENTS: 'A hosszászólás szövege' + EMAILADDRESS: 'Az Ön e-mail címe (nem látható)' + PERMISSIONFAILURE: 'Ön csak a bejelentkezést követően, és a megfelelő jogosultság birtokában hozhat létre hozzászólást.' + RSSTITLE: 'Hozzászólások RSS-ben' + WEBSITEURL: 'Az Ön webcíme' + SilverStripe\Comments\Model\Comment: ALLOWCOMMENTS: 'Hozzászólások engedélyezve' COMMENT: Hozzászólás COMMENTBY: 'Létrehozta %s' @@ -12,46 +55,3 @@ hu: PLURALNAME: Hozzászólások SINGULARNAME: Hozzászólás URL: Link - CommentAdmin: - ADMIN_PERMISSION: '''Hozzászólások'' mező elérése' - MENUTITLE: Hozzászólások - Moderated: Moderált - NeedsModeration: 'Moderálás szükséges' - CommentInterface: - COMMENT_MESSAGE_REQUIRED: 'Szöveg megadása' - COMMENT_MESSAGE_URL: 'Kérjük adjon meg egy működő linket' - EMAILADDRESS_MESSAGE_EMAIL: 'Kérjük adjon meg egy e-mail címet' - EMAILADDRESS_MESSAGE_REQUIRED: 'Kérjük adja meg az e-mail címét' - POST: Elküld - PREVIEW: Előnézet - PREVIEWLABEL: Előnézet - YOURNAME: 'Az Ön neve' - YOURNAME_MESSAGE_REQUIRED: 'Kérjük adja meg nevét' - CommentingController: - COMMENTS: A hosszászólás szövege - EMAILADDRESS: 'Az Ön e-mail címe (nem látható)' - PERMISSIONFAILURE: 'Ön csak a bejelentkezést követően, és a megfelelő jogosultság birtokában hozhat létre hozzászólást.' - RSSTITLE: 'Hozzászólások RSS-ben' - WEBSITEURL: 'Az Ön webcíme' - CommentsAdmin: - NeedsModeration: 'Moderálás szükséges' - CommentsInterface_pendingcomment_ss: - AWAITINGMODERATION: 'Hozzászólását moderálásra továbbítottuk' - CommentsInterface_singlecomment_ss: - PBY: 'Feladó' - CommentsInterface_ss: - AWAITINGMODERATION: 'Hozzászólását moderálásra továbbítottuk' - COMMENTLOGINERROR: 'A hozzászóláshoz be kell jelentkeznie' - COMMENTPERMISSIONERROR: 'és rendelkeznie kell a megfelelő jogosultsággal' - COMMENTPOSTLOGIN: 'Bejelentkezés' - COMMENTS: Hozzászólások - COMMENTSDISABLED: 'A hozzászólások le vannak tiltva ' - LOGINTOPOSTCOMMENT: 'A hozzászóláshoz jelentkezzen be ' - NEXT: következő - NOCOMMENTSYET: 'Nem érkeztek hozzászólások' - POSTCOM: 'Küldjön egy hozzászólást' - PREV: előző - RSSFEEDALLCOMMENTS: 'Összes hozzászólás RSS-ben' - RSSFEEDCOMMENTS: 'Oldal hozzászólásai RSS-ben' - PageCommentInterface: - DELETEALLCOMMENTS: 'Oldal összes hozzászólásának törlése' diff --git a/lang/id.yml b/lang/id.yml index 3ff1fe7..70d9308 100644 --- a/lang/id.yml +++ b/lang/id.yml @@ -1,21 +1,4 @@ id: - Comment: - ALLOWCOMMENTS: 'Bolehkan Komentar' - COMMENT: Komentar - COMMENTBY: 'Komentar oleh %s' - CREATED: 'Tanggal kirim' - EMAIL: Email - ISSPAM: 'Spam?' - MODERATED: 'Moderasi?' - NAME: 'Nama Penulis' - PARENTTITLE: Induk - PLURALNAME: Komentar - SINGULARNAME: Komentar - URL: URL - CommentAdmin: - MENUTITLE: Komentar - Moderated: Dimoderasi - NeedsModeration: 'Perlu Moderasi' CommentInterface: COMMENT_MESSAGE_REQUIRED: 'Ketikkan komentar Anda' COMMENT_MESSAGE_URL: 'Isikan URL yang valid' @@ -26,12 +9,6 @@ id: PREVIEWLABEL: Pratinjau YOURNAME: 'Nama Anda' YOURNAME_MESSAGE_REQUIRED: 'Isikan nama Anda' - CommentingController: - COMMENTS: Komentar - EMAILADDRESS: 'Alamat email Anda (tidak akan diterbitkan)' - PERMISSIONFAILURE: 'Anda tidak dapat mengomentari laman ini. Mohon pastikan Anda sudah login dan mendapatkan hak akses yang sesuai.' - RSSTITLE: 'Sindikasi RSS Komentar' - WEBSITEURL: 'URL situs Anda' CommentsAdmin: NeedsModeration: 'Perlu Moderasi' CommentsInterface_pendingcomment_ss: @@ -54,3 +31,26 @@ id: RSSFEEDCOMMENTS: 'Sindikasi RSS untuk komentar di laman ini' PageCommentInterface: DELETEALLCOMMENTS: 'Hapus semua komentar di laman ini' + SilverStripe\Comments\Admin\CommentAdmin: + MENUTITLE: Komentar + Moderated: Dimoderasi + NeedsModeration: 'Perlu Moderasi' + SilverStripe\Comments\Controllers\CommentingController: + COMMENTS: Komentar + EMAILADDRESS: 'Alamat email Anda (tidak akan diterbitkan)' + PERMISSIONFAILURE: 'Anda tidak dapat mengomentari laman ini. Mohon pastikan Anda sudah login dan mendapatkan hak akses yang sesuai.' + RSSTITLE: 'Sindikasi RSS Komentar' + WEBSITEURL: 'URL situs Anda' + SilverStripe\Comments\Model\Comment: + ALLOWCOMMENTS: 'Bolehkan Komentar' + COMMENT: Komentar + COMMENTBY: 'Komentar oleh %s' + CREATED: 'Tanggal kirim' + EMAIL: Email + ISSPAM: 'Spam?' + MODERATED: 'Moderasi?' + NAME: 'Nama Penulis' + PARENTTITLE: Induk + PLURALNAME: Komentar + SINGULARNAME: Komentar + URL: URL diff --git a/lang/lt.yml b/lang/lt.yml index 8363c36..954cede 100644 --- a/lang/lt.yml +++ b/lang/lt.yml @@ -1,29 +1,4 @@ lt: - Comment: - ALLOWCOMMENTS: 'Leisti komentarus' - COMMENT: Komentaras - COMMENTBY: 'Komentarą parašė ''%s''' - CREATED: 'Paskelbimo data' - EMAIL: E. paštas - ISSPAM: 'Šlamštas?' - MODERATED: 'Patvirtintas?' - NAME: 'Autoriaus Vardas' - 'ON': 'į' - OPTION_DESCRIPTION: 'Nepatvirtinti komentarai nebus rodomi, kol jie atskirai nebus patvirtinti' - PARENTTITLE: Priklauso - PLURALNAME: Komentarai - ParentComment_Title: 'Šis komentaras yra atsakymas į žemiau esantį' - SINGULARNAME: Komentaras - URL: URL adresas - CommentAdmin: - ADMIN_PERMISSION: 'Patekti į ''Komentarų'' dalį' - ApprovedComments: Patvirtinti - Comments: Patvirtinti - MENUTITLE: Komentarai - Moderated: Patvirtinti - NeedsModeration: 'Laukia patvirtinimo' - NewComments: Nauji - SpamComments: Šlamštas CommentInterface: COMMENT_MESSAGE_REQUIRED: 'Prašome parašyti savo komentarą' COMMENT_MESSAGE_URL: 'Prašome įvesti teisingą URL adresą' @@ -34,12 +9,6 @@ lt: PREVIEWLABEL: Peržiūra YOURNAME: 'Jūsų vardas' YOURNAME_MESSAGE_REQUIRED: 'Prašome įvesti savo vardą' - CommentingController: - COMMENTS: Komentarai - EMAILADDRESS: 'Jūsų el.pašto adresas (nebus skelbiamas)' - PERMISSIONFAILURE: 'Jūs negalite skelbti komentarų šiame puslapyje. Įsitikinkite, kad esate prisijungęs ir turite atitinkamą teisių lygį.' - RSSTITLE: 'Komentarų RSS srautas' - WEBSITEURL: 'Jūsų svetainės nuoroda' Comments: COMMENTSREQUIRELOGIN: 'Būtina prisijungti komentavimui' CommentsAdmin: @@ -47,20 +16,15 @@ lt: Comments: Patvirtinti NeedsModeration: 'Laukia patvirtinimo' NewComments: Nauji - SpamComments: Šlamštas - CommentsExtension: - COMMENTOPTIONS: Komentarai - MODERATIONREQUIRED_NONE: 'Nereikalauja patvirtinimo' - MODERATIONREQUIRED_NONMEMBERSONLY: 'Tvirtinti tik neregistruotų vartotojų' - MODERATIONREQUIRED_REQUIRED: 'Tvirtinti visus komentarus' + SpamComments: 'Šlamštas' CommentsInterface_pendingcomment_ss: AWAITINGMODERATION: 'Jūsų komentaras išsiųstas ir laukia patvirtinimo.' CommentsInterface_singlecomment_ss: - APPROVE: 'patvirtinti' + APPROVE: patvirtinti ISNTSPAM: 'ne šlamštas' - ISSPAM: 'šlamštas' - PBY: 'Paskelbė' - REMCOM: 'ištrinti' + ISSPAM: šlamštas + PBY: Paskelbė + REMCOM: ištrinti CommentsInterface_ss: AWAITINGMODERATION: 'Jūsų komentaras išsiųstas ir laukia patvirtinimo.' COMMENTLOGINERROR: 'Negalite rašyti komentarų, jeigu nesate prisijungę' @@ -78,3 +42,39 @@ lt: RSSFEEDCOMMENTS: 'Šio puslapio komentarų RSS' PageCommentInterface: DELETEALLCOMMENTS: 'Ištrinti visus komentarus šiame puslapyje' + SilverStripe\Comments\Admin\CommentAdmin: + ADMIN_PERMISSION: 'Patekti į ''Komentarų'' dalį' + ApprovedComments: Patvirtinti + Comments: Patvirtinti + MENUTITLE: Komentarai + Moderated: Patvirtinti + NeedsModeration: 'Laukia patvirtinimo' + NewComments: Nauji + SpamComments: 'Šlamštas' + SilverStripe\Comments\Controllers\CommentingController: + COMMENTS: Komentarai + EMAILADDRESS: 'Jūsų el.pašto adresas (nebus skelbiamas)' + PERMISSIONFAILURE: 'Jūs negalite skelbti komentarų šiame puslapyje. Įsitikinkite, kad esate prisijungęs ir turite atitinkamą teisių lygį.' + RSSTITLE: 'Komentarų RSS srautas' + WEBSITEURL: 'Jūsų svetainės nuoroda' + SilverStripe\Comments\Extensions\CommentsExtension: + COMMENTOPTIONS: Komentarai + MODERATIONREQUIRED_NONE: 'Nereikalauja patvirtinimo' + MODERATIONREQUIRED_NONMEMBERSONLY: 'Tvirtinti tik neregistruotų vartotojų' + MODERATIONREQUIRED_REQUIRED: 'Tvirtinti visus komentarus' + SilverStripe\Comments\Model\Comment: + ALLOWCOMMENTS: 'Leisti komentarus' + COMMENT: Komentaras + COMMENTBY: 'Komentarą parašė ''%s''' + CREATED: 'Paskelbimo data' + EMAIL: 'E. paštas' + ISSPAM: 'Šlamštas?' + MODERATED: 'Patvirtintas?' + NAME: 'Autoriaus Vardas' + 'ON': į + OPTION_DESCRIPTION: 'Nepatvirtinti komentarai nebus rodomi, kol jie atskirai nebus patvirtinti' + PARENTTITLE: Priklauso + PLURALNAME: Komentarai + ParentComment_Title: 'Šis komentaras yra atsakymas į žemiau esantį' + SINGULARNAME: Komentaras + URL: 'URL adresas' diff --git a/lang/nb.yml b/lang/nb.yml index 87becfb..98d9258 100644 --- a/lang/nb.yml +++ b/lang/nb.yml @@ -1,25 +1,7 @@ nb: - Comment: - ALLOWCOMMENTS: 'Tillat kommentarer' - COMMENT: Kommentar - ISSPAM: 'Spam?' - MODERATED: 'Moderert?' - NAME: 'Navn' - PLURALNAME: Kommentarer - SINGULARNAME: Kommentar - CommentAdmin: - MENUTITLE: Kommentarer - Moderated: Moderert - NeedsModeration: 'Trenger moderering' CommentInterface: - POST: Legg ut - YOURNAME: 'Navn' - CommentingController: - COMMENTS: Kommentar - EMAILADDRESS: 'Epostadresse (blir ikke publisert)' - PERMISSIONFAILURE: 'Du kan ikke kommentere på denne siden. Vennligst sjekk at du er innlogget og har et passende tilgangsnivå.' - RSSTITLE: 'RSS-feed for kommentarer' - WEBSITEURL: 'Hjemmeside' + POST: 'Legg ut' + YOURNAME: Navn CommentsAdmin: NeedsModeration: 'Trenger moderering' CommentsInterface_pendingcomment_ss: @@ -41,3 +23,21 @@ nb: RSSFEEDCOMMENTS: 'RSS-feed for kommentarer på denne siden' PageCommentInterface: DELETEALLCOMMENTS: 'Fjern alle kommentarer på denne siden' + SilverStripe\Comments\Admin\CommentAdmin: + MENUTITLE: Kommentarer + Moderated: Moderert + NeedsModeration: 'Trenger moderering' + SilverStripe\Comments\Controllers\CommentingController: + COMMENTS: Kommentar + EMAILADDRESS: 'Epostadresse (blir ikke publisert)' + PERMISSIONFAILURE: 'Du kan ikke kommentere på denne siden. Vennligst sjekk at du er innlogget og har et passende tilgangsnivå.' + RSSTITLE: 'RSS-feed for kommentarer' + WEBSITEURL: Hjemmeside + SilverStripe\Comments\Model\Comment: + ALLOWCOMMENTS: 'Tillat kommentarer' + COMMENT: Kommentar + ISSPAM: 'Spam?' + MODERATED: 'Moderert?' + NAME: Navn + PLURALNAME: Kommentarer + SINGULARNAME: Kommentar diff --git a/lang/nl.yml b/lang/nl.yml index 1daa8f3..168499a 100644 --- a/lang/nl.yml +++ b/lang/nl.yml @@ -1,30 +1,9 @@ nl: - Comment: - ALLOWCOMMENTS: 'Reacties toestaan' - COMMENT: Reactie - ISSPAM: 'Spam?' - MODERATED: 'Gemodereerd?' - NAME: 'Auteur' - 'ON': 'op' - PLURALNAME: Reacties - SINGULARNAME: Reactie - CommentAdmin: - MENUTITLE: Reacties - Moderated: Gemodereerd - NeedsModeration: 'Wacht op moderatie' CommentInterface: - POST: Plaats reactie - YOURNAME: 'Naam' - CommentingController: - COMMENTS: Reacties - EMAILADDRESS: 'E-mail adres (wordt niet gepubliceerd)' - PERMISSIONFAILURE: 'Je mag geen reacties plaatsen op deze pagina. Log a.u.b. eerst in en controleer je gebruikersrechten.' - RSSTITLE: 'Reacties RSS feed' - WEBSITEURL: 'Website URL' + POST: 'Plaats reactie' + YOURNAME: Naam CommentsAdmin: NeedsModeration: 'Wacht op moderatie' - CommentsExtension: - COMMENTOPTIONS: Reacties CommentsInterface_pendingcomment_ss: AWAITINGMODERATION: 'Je reactie is verstuurd en is in afwachting van moderatie.' CommentsInterface_singlecomment_ss: @@ -32,7 +11,7 @@ nl: CommentsInterface_ss: COMMENTLOGINERROR: 'Je moet ingelogd zijn om reacties te kunnen plaatsen' COMMENTPERMISSIONERROR: 'en controleer je gebruikersrechten' - COMMENTPOSTLOGIN: 'Inloggen' + COMMENTPOSTLOGIN: Inloggen COMMENTS: Reacties COMMENTSDISABLED: 'Reacties plaatsen is uitgeschakeld' LOGINTOPOSTCOMMENT: 'Log in om een reactie te plaatsen' @@ -44,3 +23,24 @@ nl: RSSFEEDCOMMENTS: 'RSS feed voor reacties op deze pagina' PageCommentInterface: DELETEALLCOMMENTS: 'Verwijder alle reacties op deze pagina' + SilverStripe\Comments\Admin\CommentAdmin: + MENUTITLE: Reacties + Moderated: Gemodereerd + NeedsModeration: 'Wacht op moderatie' + SilverStripe\Comments\Controllers\CommentingController: + COMMENTS: Reacties + EMAILADDRESS: 'E-mail adres (wordt niet gepubliceerd)' + PERMISSIONFAILURE: 'Je mag geen reacties plaatsen op deze pagina. Log a.u.b. eerst in en controleer je gebruikersrechten.' + RSSTITLE: 'Reacties RSS feed' + WEBSITEURL: 'Website URL' + SilverStripe\Comments\Extensions\CommentsExtension: + COMMENTOPTIONS: Reacties + SilverStripe\Comments\Model\Comment: + ALLOWCOMMENTS: 'Reacties toestaan' + COMMENT: Reactie + ISSPAM: 'Spam?' + MODERATED: 'Gemodereerd?' + NAME: Auteur + 'ON': op + PLURALNAME: Reacties + SINGULARNAME: Reactie diff --git a/lang/pl_PL.yml b/lang/pl_PL.yml index e125eaf..b48c7dd 100644 --- a/lang/pl_PL.yml +++ b/lang/pl_PL.yml @@ -1,45 +1,14 @@ pl_PL: - Comment: - ALLOWCOMMENTS: 'Zezwól na komentarze' - COMMENT: Komentarz - COMMENTBY: 'Komentarz %s' - CREATED: 'Data opublikowania' - EMAIL: Email - ISSPAM: 'Spam?' - MODERATED: 'Moderowane?' - NAME: 'Autor' - 'ON': 'na' - OPTION_DESCRIPTION: 'Niemoderowane i oznaczone jako spam komentarze nie będą wyświetlane do momentu zatwierdzenia' - PARENTTITLE: Rodzic - PLURALNAME: Komentarze - ParentComment_Title: 'Ten komentarz jest odpowiedzią na komentarz poniżej' - SINGULARNAME: Komentarz - URL: URL - CommentAdmin: - ADMIN_PERMISSION: 'Dostęp do sekcji "Komentarze"' - ApprovedComments: Zatwierdzone - Comments: Zatwierdzone - MENUTITLE: Komentarze - Moderated: Moderowane - NeedsModeration: 'Wymaga moderacji' - NewComments: Nowy - SpamComments: Spam CommentInterface: COMMENT_MESSAGE_REQUIRED: 'Wprowadź swój komentarz' COMMENT_MESSAGE_URL: 'Wprowadź poprawny adres URL' EMAILADDRESS_MESSAGE_EMAIL: 'Wprowadź poprawny adres email' EMAILADDRESS_MESSAGE_REQUIRED: 'Wprowadź swój adres email' POST: Wyślij - PREVIEW: Podgląd - PREVIEWLABEL: Podgląd + PREVIEW: 'Podgląd' + PREVIEWLABEL: 'Podgląd' YOURNAME: 'Twoja nazwa' YOURNAME_MESSAGE_REQUIRED: 'Wprowadź swoje imie' - CommentingController: - COMMENTS: Komentarze - EMAILADDRESS: 'Twój adres email (nie będzie widoczny)' - PERMISSIONFAILURE: 'Nie można dodać komentarza na tej stronie. Upewnij się, że jesteś zalogowany i masz odpowednie uprawnienia.' - RSSTITLE: 'Komentarze z RSS' - WEBSITEURL: 'Adres Twojej strony' Comments: COMMENTSREQUIRELOGIN: 'Zaloguj się aby dodać komentarz' CommentsAdmin: @@ -48,24 +17,19 @@ pl_PL: NeedsModeration: 'Wymagają moderacji' NewComments: Nowe SpamComments: Spam - CommentsExtension: - COMMENTOPTIONS: Komentarze - MODERATIONREQUIRED_NONE: 'Komentarze nie wymagają moderacji' - MODERATIONREQUIRED_NONMEMBERSONLY: 'Moderuj tylko niezarejestrowanych użytkowników' - MODERATIONREQUIRED_REQUIRED: 'Moderuj wszystkie komentarze' CommentsInterface_pendingcomment_ss: AWAITINGMODERATION: 'Twój komentarz został wysłany i czeka na akceptację przez moderatora.' CommentsInterface_singlecomment_ss: - APPROVE: 'zatwierdź' + APPROVE: zatwierdź ISNTSPAM: 'nie spam' ISSPAM: 'oznacz spam' PBY: 'Dodany przez' - REMCOM: 'odrzuć' + REMCOM: odrzuć CommentsInterface_ss: AWAITINGMODERATION: 'Twój komentarz został wysłany i czeka na akceptację przez moderatora.' COMMENTLOGINERROR: 'Nie można dodać komentarza dopóki nie będziesz zalogowany' COMMENTPERMISSIONERROR: 'i że masz odpowiednie uprawnienia' - COMMENTPOSTLOGIN: 'Zaloguj' + COMMENTPOSTLOGIN: Zaloguj COMMENTS: Komentarze COMMENTSDISABLED: 'Dodawanie komentarzy zostało wyłączone' DELETEALLCOMMENTS: 'Usuń wszystkie komentarze na tej stronie' @@ -78,3 +42,39 @@ pl_PL: RSSFEEDCOMMENTS: 'Kanał RSS dla komentarzy na tej stronie' PageCommentInterface: DELETEALLCOMMENTS: 'Usuń wszystkie komentarze na tej stronie' + SilverStripe\Comments\Admin\CommentAdmin: + ADMIN_PERMISSION: 'Dostęp do sekcji "Komentarze"' + ApprovedComments: Zatwierdzone + Comments: Zatwierdzone + MENUTITLE: Komentarze + Moderated: Moderowane + NeedsModeration: 'Wymaga moderacji' + NewComments: Nowy + SpamComments: Spam + SilverStripe\Comments\Controllers\CommentingController: + COMMENTS: Komentarze + EMAILADDRESS: 'Twój adres email (nie będzie widoczny)' + PERMISSIONFAILURE: 'Nie można dodać komentarza na tej stronie. Upewnij się, że jesteś zalogowany i masz odpowednie uprawnienia.' + RSSTITLE: 'Komentarze z RSS' + WEBSITEURL: 'Adres Twojej strony' + SilverStripe\Comments\Extensions\CommentsExtension: + COMMENTOPTIONS: Komentarze + MODERATIONREQUIRED_NONE: 'Komentarze nie wymagają moderacji' + MODERATIONREQUIRED_NONMEMBERSONLY: 'Moderuj tylko niezarejestrowanych użytkowników' + MODERATIONREQUIRED_REQUIRED: 'Moderuj wszystkie komentarze' + SilverStripe\Comments\Model\Comment: + ALLOWCOMMENTS: 'Zezwól na komentarze' + COMMENT: Komentarz + COMMENTBY: 'Komentarz %s' + CREATED: 'Data opublikowania' + EMAIL: Email + ISSPAM: 'Spam?' + MODERATED: 'Moderowane?' + NAME: Autor + 'ON': na + OPTION_DESCRIPTION: 'Niemoderowane i oznaczone jako spam komentarze nie będą wyświetlane do momentu zatwierdzenia' + PARENTTITLE: Rodzic + PLURALNAME: Komentarze + ParentComment_Title: 'Ten komentarz jest odpowiedzią na komentarz poniżej' + SINGULARNAME: Komentarz + URL: URL diff --git a/lang/ro.yml b/lang/ro.yml index 48c97d1..7042920 100644 --- a/lang/ro.yml +++ b/lang/ro.yml @@ -1,5 +1,47 @@ ro: - Comment: + CommentInterface: + COMMENT_MESSAGE_REQUIRED: 'Vă rugăm să introduceți un comentariu' + COMMENT_MESSAGE_URL: 'Vă rugăm să introduceți un URL valid' + EMAILADDRESS_MESSAGE_EMAIL: 'Vă rugăm să introduceți uo adresă de e-mail validă' + EMAILADDRESS_MESSAGE_REQUIRED: 'Vă rugăm să vă introduceți adresa de e-mail' + POST: Publică + PREVIEW: 'Vizualizare înaintea publicării' + PREVIEWLABEL: 'Vizualizare înaintea publicării' + YOURNAME: 'Numele dvs.' + YOURNAME_MESSAGE_REQUIRED: 'Vă rugăm să vă introduceți numele' + CommentsAdmin: + NeedsModeration: 'Necesită moderare' + CommentsInterface_pendingcomment_ss: + AWAITINGMODERATION: 'Comentariul dvs. a fost trimis și așteaptă să fie moderat.' + CommentsInterface_singlecomment_ss: + PBY: 'Publicat de' + CommentsInterface_ss: + AWAITINGMODERATION: 'Comentariul dvs. a fost trimis și așteaptă să fie moderat.' + COMMENTLOGINERROR: 'Publicarea de comentarii necesită autentificare pe site' + COMMENTPERMISSIONERROR: 'și că aveți nivelul de permisiune corespunzător' + COMMENTPOSTLOGIN: Autentificare + COMMENTS: Comentarii + COMMENTSDISABLED: 'Postarea de comentarii a fost dezactivată' + LOGINTOPOSTCOMMENT: 'Autentificaţi-vă pentru a publica un comentariu' + NEXT: următorul + NOCOMMENTSYET: 'Nimeni nu a comentat încă pe aceasta pagină.' + POSTCOM: 'Publicaţi-vă comentariul' + PREV: anteriorul + RSSFEEDALLCOMMENTS: 'RSS pentru toate comentariile' + RSSFEEDCOMMENTS: 'RSS pentru comentariile de pe această pagină' + PageCommentInterface: + DELETEALLCOMMENTS: 'Ştergeţi toate comentariile de pe această pagină' + SilverStripe\Comments\Admin\CommentAdmin: + MENUTITLE: Commentarii + Moderated: Moderat + NeedsModeration: 'Necesită moderare' + SilverStripe\Comments\Controllers\CommentingController: + COMMENTS: Commentarii + EMAILADDRESS: 'Adresa dvs. de e-mail (nu va fi publicată)' + PERMISSIONFAILURE: 'Nu puteţi publica comentarii pe această pagină. Vă rugăm să vă asiguaţi că sunteți autentificat și că aveşi nivelul de permisiune corespunzător.' + RSSTITLE: 'RSS feed pentru comentarii' + WEBSITEURL: 'URL Site web' + SilverStripe\Comments\Model\Comment: ALLOWCOMMENTS: 'Acceptare comentarii' COMMENT: Comentariu COMMENTBY: 'Comentat de %s' @@ -12,45 +54,3 @@ ro: PLURALNAME: Comentarii SINGULARNAME: Comentariu URL: URL - CommentAdmin: - MENUTITLE: Commentarii - Moderated: Moderat - NeedsModeration: 'Necesită moderare' - CommentInterface: - COMMENT_MESSAGE_REQUIRED: 'Vă rugăm să introduceți un comentariu' - COMMENT_MESSAGE_URL: 'Vă rugăm să introduceți un URL valid' - EMAILADDRESS_MESSAGE_EMAIL: 'Vă rugăm să introduceți uo adresă de e-mail validă' - EMAILADDRESS_MESSAGE_REQUIRED: 'Vă rugăm să vă introduceți adresa de e-mail' - POST: Publică - PREVIEW: Vizualizare înaintea publicării - PREVIEWLABEL: Vizualizare înaintea publicării - YOURNAME: 'Numele dvs.' - YOURNAME_MESSAGE_REQUIRED: 'Vă rugăm să vă introduceți numele' - CommentingController: - COMMENTS: Commentarii - EMAILADDRESS: 'Adresa dvs. de e-mail (nu va fi publicată)' - PERMISSIONFAILURE: 'Nu puteţi publica comentarii pe această pagină. Vă rugăm să vă asiguaţi că sunteți autentificat și că aveşi nivelul de permisiune corespunzător.' - RSSTITLE: 'RSS feed pentru comentarii' - WEBSITEURL: 'URL Site web' - CommentsAdmin: - NeedsModeration: 'Necesită moderare' - CommentsInterface_pendingcomment_ss: - AWAITINGMODERATION: 'Comentariul dvs. a fost trimis și așteaptă să fie moderat.' - CommentsInterface_singlecomment_ss: - PBY: 'Publicat de' - CommentsInterface_ss: - AWAITINGMODERATION: 'Comentariul dvs. a fost trimis și așteaptă să fie moderat.' - COMMENTLOGINERROR: 'Publicarea de comentarii necesită autentificare pe site' - COMMENTPERMISSIONERROR: 'și că aveți nivelul de permisiune corespunzător' - COMMENTPOSTLOGIN: 'Autentificare' - COMMENTS: Comentarii - COMMENTSDISABLED: 'Postarea de comentarii a fost dezactivată' - LOGINTOPOSTCOMMENT: 'Autentificaţi-vă pentru a publica un comentariu' - NEXT: următorul - NOCOMMENTSYET: 'Nimeni nu a comentat încă pe aceasta pagină.' - POSTCOM: 'Publicaţi-vă comentariul' - PREV: anteriorul - RSSFEEDALLCOMMENTS: 'RSS pentru toate comentariile' - RSSFEEDCOMMENTS: 'RSS pentru comentariile de pe această pagină' - PageCommentInterface: - DELETEALLCOMMENTS: 'Ştergeţi toate comentariile de pe această pagină' diff --git a/lang/ru.yml b/lang/ru.yml index 560afad..242a419 100644 --- a/lang/ru.yml +++ b/lang/ru.yml @@ -1,21 +1,4 @@ ru: - Comment: - ALLOWCOMMENTS: 'Разрешить комментарии' - COMMENT: Комментарий - COMMENTBY: 'Комментарий автора %s' - CREATED: 'Дата добавления' - EMAIL: Email - ISSPAM: 'Спам?' - MODERATED: 'Проверено?' - NAME: 'Автор' - PARENTTITLE: Родительская - PLURALNAME: Комментарии - SINGULARNAME: Комментарий - URL: URL - CommentAdmin: - MENUTITLE: Комментарии - NewComments: Новый - SpamComments: Спам CommentInterface: COMMENT_MESSAGE_URL: 'Пожалуйста, задайте действительный URL-адрес' EMAILADDRESS_MESSAGE_EMAIL: 'Пожалуйста, укажите действительный электронный адрес' @@ -23,13 +6,8 @@ ru: POST: Отправить PREVIEW: Просмотр PREVIEWLABEL: Просмотр - YOURNAME: 'Имя' + YOURNAME: Имя YOURNAME_MESSAGE_REQUIRED: 'Пожалуйста, укажите своё имя' - CommentingController: - COMMENTS: Комментарии - EMAILADDRESS: 'Ваш электронный адрес (не будет опубликован)' - RSSTITLE: 'RSS-лента комментариев' - WEBSITEURL: 'Адрес вашего сайта' CommentsInterface_pendingcomment_ss: AWAITINGMODERATION: 'Ваш комментарий отправлен и ожидает проверки.' CommentsInterface_singlecomment_ss: @@ -44,3 +22,25 @@ ru: NOCOMMENTSYET: 'Комментариев на этой странице пока нет.' PageCommentInterface: DELETEALLCOMMENTS: 'Удалить все комментарии на этой странице' + SilverStripe\Comments\Admin\CommentAdmin: + MENUTITLE: Комментарии + NewComments: Новый + SpamComments: Спам + SilverStripe\Comments\Controllers\CommentingController: + COMMENTS: Комментарии + EMAILADDRESS: 'Ваш электронный адрес (не будет опубликован)' + RSSTITLE: 'RSS-лента комментариев' + WEBSITEURL: 'Адрес вашего сайта' + SilverStripe\Comments\Model\Comment: + ALLOWCOMMENTS: 'Разрешить комментарии' + COMMENT: Комментарий + COMMENTBY: 'Комментарий автора %s' + CREATED: 'Дата добавления' + EMAIL: Email + ISSPAM: 'Спам?' + MODERATED: 'Проверено?' + NAME: Автор + PARENTTITLE: 'Родительская' + PLURALNAME: Комментарии + SINGULARNAME: Комментарий + URL: URL diff --git a/lang/sk_SK.yml b/lang/sk_SK.yml index e57fac3..84ffe3b 100644 --- a/lang/sk_SK.yml +++ b/lang/sk_SK.yml @@ -1,5 +1,28 @@ sk_SK: - Comment: + CommentInterface: + COMMENT_MESSAGE_REQUIRED: 'Pridaj scoj komentár' + COMMENT_MESSAGE_URL: 'Vlož platbú adresu URL' + POST: Odoslať + PREVIEW: Náhľad + PREVIEWLABEL: Náhľad + YOURNAME: 'Vaše meno' + YOURNAME_MESSAGE_REQUIRED: 'Vlož svoje meno' + CommentsAdmin: + NeedsModeration: 'Vyžaduje schválenie' + CommentsInterface_ss: + COMMENTLOGINERROR: 'Komentáre môže pridávať len prihlásený užívateľ' + COMMENTS: Komentáre + COMMENTSDISABLED: 'Už nie je možné pridávať nové komentáre' + SilverStripe\Comments\Admin\CommentAdmin: + MENUTITLE: Komentáre + Moderated: Odsúhlasený + NeedsModeration: 'Vyžaduje odsúhlasenie' + SilverStripe\Comments\Controllers\CommentingController: + COMMENTS: Komentáre + EMAILADDRESS: 'Váš e-mail (nebude zverejnený)' + RSSTITLE: 'RSS feed komentárov' + WEBSITEURL: 'Vaša web stránka' + SilverStripe\Comments\Model\Comment: ALLOWCOMMENTS: 'Povoliť komentáre' COMMENT: Komentár COMMENTBY: 'Komentáre od %s' @@ -11,27 +34,4 @@ sk_SK: PARENTTITLE: Rodič PLURALNAME: Komentáre SINGULARNAME: Komentár - URL: Web adresa - CommentAdmin: - MENUTITLE: Komentáre - Moderated: Odsúhlasený - NeedsModeration: 'Vyžaduje odsúhlasenie' - CommentInterface: - COMMENT_MESSAGE_REQUIRED: 'Pridaj scoj komentár' - COMMENT_MESSAGE_URL: 'Vlož platbú adresu URL' - POST: Odoslať - PREVIEW: Náhľad - PREVIEWLABEL: Náhľad - YOURNAME: 'Vaše meno' - YOURNAME_MESSAGE_REQUIRED: 'Vlož svoje meno' - CommentingController: - COMMENTS: Komentáre - EMAILADDRESS: 'Váš e-mail (nebude zverejnený)' - RSSTITLE: 'RSS feed komentárov' - WEBSITEURL: 'Vaša web stránka' - CommentsAdmin: - NeedsModeration: 'Vyžaduje schválenie' - CommentsInterface_ss: - COMMENTLOGINERROR: 'Komentáre môže pridávať len prihlásený užívateľ' - COMMENTS: Komentáre - COMMENTSDISABLED: 'Už nie je možné pridávať nové komentáre' + URL: 'Web adresa' diff --git a/lang/sr@latin.yml b/lang/sr@latin.yml index 3a353c9..b47374f 100644 --- a/lang/sr@latin.yml +++ b/lang/sr@latin.yml @@ -1,21 +1,4 @@ sr@latin: - Comment: - ALLOWCOMMENTS: 'Dozvoli komentare' - COMMENT: Komentar - COMMENTBY: 'Autor komentara %s' - CREATED: 'Datum objavljivanja' - EMAIL: Elektronska pošta - ISSPAM: 'Zlonameran?' - MODERATED: 'Uređen?' - NAME: 'Ime autora' - PARENTTITLE: Roditelj - PLURALNAME: Komentari - SINGULARNAME: Komentar - URL: URL - CommentAdmin: - MENUTITLE: Komentari - Moderated: Uređen - NeedsModeration: 'Potrebno uređivanje' CommentInterface: COMMENT_MESSAGE_REQUIRED: 'Molimo unesite komentar' COMMENT_MESSAGE_URL: 'Molimo Vas da unesete ispravan URL' @@ -26,18 +9,12 @@ sr@latin: PREVIEWLABEL: Prikaz YOURNAME: 'Vaše ime' YOURNAME_MESSAGE_REQUIRED: 'Molimo Vas da unesete Vaše ime' - CommentingController: - COMMENTS: Komentari - EMAILADDRESS: 'Vaša adresa elektronske pošte (neće biti objavljeno)' - PERMISSIONFAILURE: 'Niste u mogućnosti da objavljujete komentare na ovoj strani. Molimo Vas da proverite da li ste prijavljeni i da li imate odgovarajući nivo ovlašćenja.' - RSSTITLE: 'RSS Feed komentara' - WEBSITEURL: 'URL Vašeg sajta' CommentsAdmin: NeedsModeration: 'Potrebno uređivanje' CommentsInterface_pendingcomment_ss: AWAITINGMODERATION: 'Vaš komentar je prosleđen i sada čeka uređivanje.' CommentsInterface_singlecomment_ss: - PBY: 'Objavio' + PBY: Objavio CommentsInterface_ss: AWAITINGMODERATION: 'Vaš komentar je prosleđen i sada čeka uređivanje.' COMMENTLOGINERROR: 'Ne možete objavljivati komentare dok se ne prijavite' @@ -54,3 +31,26 @@ sr@latin: RSSFEEDCOMMENTS: 'RSS feed za komentare na ovoj strani' PageCommentInterface: DELETEALLCOMMENTS: 'Obriši sve komentare na ovoj strani' + SilverStripe\Comments\Admin\CommentAdmin: + MENUTITLE: Komentari + Moderated: Uređen + NeedsModeration: 'Potrebno uređivanje' + SilverStripe\Comments\Controllers\CommentingController: + COMMENTS: Komentari + EMAILADDRESS: 'Vaša adresa elektronske pošte (neće biti objavljeno)' + PERMISSIONFAILURE: 'Niste u mogućnosti da objavljujete komentare na ovoj strani. Molimo Vas da proverite da li ste prijavljeni i da li imate odgovarajući nivo ovlašćenja.' + RSSTITLE: 'RSS Feed komentara' + WEBSITEURL: 'URL Vašeg sajta' + SilverStripe\Comments\Model\Comment: + ALLOWCOMMENTS: 'Dozvoli komentare' + COMMENT: Komentar + COMMENTBY: 'Autor komentara %s' + CREATED: 'Datum objavljivanja' + EMAIL: 'Elektronska pošta' + ISSPAM: 'Zlonameran?' + MODERATED: 'Uređen?' + NAME: 'Ime autora' + PARENTTITLE: Roditelj + PLURALNAME: Komentari + SINGULARNAME: Komentar + URL: URL diff --git a/lang/sv.yml b/lang/sv.yml index 2dcd615..e3969a6 100644 --- a/lang/sv.yml +++ b/lang/sv.yml @@ -1,21 +1,4 @@ sv: - Comment: - ALLOWCOMMENTS: 'Tillåt kommentarer' - COMMENT: Kommentarer - COMMENTBY: 'Kommentar av %s' - CREATED: 'Datum' - EMAIL: E-post - ISSPAM: 'Spam?' - MODERATED: 'Modererad?' - NAME: 'Författare' - PARENTTITLE: Överordnad sida - PLURALNAME: Kommentarer - SINGULARNAME: Kommentar - URL: URL - CommentAdmin: - MENUTITLE: Kommentarer - Moderated: Modererad - NeedsModeration: 'Kräver moderering' CommentInterface: COMMENT_MESSAGE_REQUIRED: 'Var vänlig och skriv in din kommentar' COMMENT_MESSAGE_URL: 'Var vänlig och ange en korrekt URL' @@ -26,12 +9,6 @@ sv: PREVIEWLABEL: Förhandsgranska YOURNAME: 'Ditt namn' YOURNAME_MESSAGE_REQUIRED: 'Var vänlig och skriv in ditt namn' - CommentingController: - COMMENTS: Kommentarer - EMAILADDRESS: 'Din e-postadress (kommer inte att publiceras)' - PERMISSIONFAILURE: 'Du kan inte skriva kommentarer på denna sida. Vänligen kontrollera att du är inloggad och har de användarrättigheter som krävs.' - RSSTITLE: 'RSS-flöde med kommentarer' - WEBSITEURL: 'Din hemsidas URL' CommentsAdmin: NeedsModeration: 'Kräver moderering' CommentsInterface_pendingcomment_ss: @@ -54,3 +31,26 @@ sv: RSSFEEDCOMMENTS: 'RSS-flöde för kommentarer på denna sida' PageCommentInterface: DELETEALLCOMMENTS: 'Radera alla kommenterar på den här sidan' + SilverStripe\Comments\Admin\CommentAdmin: + MENUTITLE: Kommentarer + Moderated: Modererad + NeedsModeration: 'Kräver moderering' + SilverStripe\Comments\Controllers\CommentingController: + COMMENTS: Kommentarer + EMAILADDRESS: 'Din e-postadress (kommer inte att publiceras)' + PERMISSIONFAILURE: 'Du kan inte skriva kommentarer på denna sida. Vänligen kontrollera att du är inloggad och har de användarrättigheter som krävs.' + RSSTITLE: 'RSS-flöde med kommentarer' + WEBSITEURL: 'Din hemsidas URL' + SilverStripe\Comments\Model\Comment: + ALLOWCOMMENTS: 'Tillåt kommentarer' + COMMENT: Kommentarer + COMMENTBY: 'Kommentar av %s' + CREATED: Datum + EMAIL: E-post + ISSPAM: 'Spam?' + MODERATED: 'Modererad?' + NAME: Författare + PARENTTITLE: 'Överordnad sida' + PLURALNAME: Kommentarer + SINGULARNAME: Kommentar + URL: URL diff --git a/src/Admin/CommentAdmin.php b/src/Admin/CommentAdmin.php index ddccd55..acc7729 100644 --- a/src/Admin/CommentAdmin.php +++ b/src/Admin/CommentAdmin.php @@ -11,6 +11,7 @@ use SilverStripe\Forms\FieldList; use SilverStripe\Forms\Form; use SilverStripe\Security\PermissionProvider; use SilverStripe\Security\Security; +use SilverStripe\View\SSViewer; /** * Comment administration system within the CMS @@ -25,6 +26,8 @@ class CommentAdmin extends LeftAndMain implements PermissionProvider private static $menu_title = 'Comments'; + private static $menu_icon_class = 'font-icon-comment'; + private static $allowed_actions = array( 'approvedmarked', 'deleteall', @@ -36,12 +39,14 @@ class CommentAdmin extends LeftAndMain implements PermissionProvider 'unmoderated' ); + private static $required_permission_codes = 'CMS_ACCESS_CommentAdmin'; + public function providePermissions() { return array( "CMS_ACCESS_CommentAdmin" => array( - 'name' => _t('CommentAdmin.ADMIN_PERMISSION', "Access to 'Comments' section"), - 'category' => _t('Permission.CMS_ACCESS_CATEGORY', 'CMS Access') + 'name' => _t('SilverStripe\\Comments\\Admin\\CommentAdmin.ADMIN_PERMISSION', "Access to 'Comments' section"), + 'category' => _t('SilverStripe\\Security\\Permission.CMS_ACCESS_CATEGORY', 'CMS Access') ) ); } @@ -66,7 +71,7 @@ class CommentAdmin extends LeftAndMain implements PermissionProvider $newGrid = new CommentsGridField( 'NewComments', - _t('CommentsAdmin.NewComments', 'New'), + '', $newComments, CommentsGridFieldConfig::create() ); @@ -75,7 +80,7 @@ class CommentAdmin extends LeftAndMain implements PermissionProvider $approvedGrid = new CommentsGridField( 'ApprovedComments', - _t('CommentsAdmin.ApprovedComments', 'Approved'), + '', $approvedComments, CommentsGridFieldConfig::create() ); @@ -84,7 +89,7 @@ class CommentAdmin extends LeftAndMain implements PermissionProvider $spamGrid = new CommentsGridField( 'SpamComments', - _t('CommentsAdmin.SpamComments', 'Spam'), + '', $spamComments, CommentsGridFieldConfig::create() ); @@ -95,27 +100,25 @@ class CommentAdmin extends LeftAndMain implements PermissionProvider $fields = new FieldList( $root = new TabSet( - 'Root', + 'Comments', new Tab( 'NewComments', - _t('CommentAdmin.NewComments', 'New') . ' ' . $newCount, + _t(__CLASS__.'.NewComments', 'New') . ' ' . $newCount, $newGrid ), new Tab( 'ApprovedComments', - _t('CommentAdmin.ApprovedComments', 'Approved') . ' ' . $approvedCount, + _t(__CLASS__.'.ApprovedComments', 'Approved') . ' ' . $approvedCount, $approvedGrid ), new Tab( 'SpamComments', - _t('CommentAdmin.SpamComments', 'Spam') . ' ' . $spamCount, + _t(__CLASS__.'.SpamComments', 'Spam') . ' ' . $spamCount, $spamGrid ) ) ); - $root->setTemplate('CMSTabSet'); - $actions = new FieldList(); $form = new Form( @@ -129,7 +132,7 @@ class CommentAdmin extends LeftAndMain implements PermissionProvider $form->setTemplate($this->getTemplatesWithSuffix('_EditForm')); if ($form->Fields()->hasTabset()) { - $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet'); + // $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet'); $form->addExtraClass('center ss-tabset cms-tabset ' . $this->BaseCSSClasses()); } diff --git a/src/Admin/CommentsGridField.php b/src/Admin/CommentsGridField.php index 86b3480..732c036 100644 --- a/src/Admin/CommentsGridField.php +++ b/src/Admin/CommentsGridField.php @@ -4,6 +4,7 @@ namespace SilverStripe\Comments\Admin; use SilverStripe\Forms\FormField; use SilverStripe\Forms\GridField\GridField; +use SilverStripe\View\HTML; class CommentsGridField extends GridField { @@ -20,7 +21,7 @@ class CommentsGridField extends GridField $attributes['class'] .= ' spam'; } - return FormField::create_tag( + return HTML::createTag( 'tr', $attributes, $content diff --git a/src/Admin/CommentsGridFieldAction.php b/src/Admin/CommentsGridFieldAction.php index 37762ff..2f1d59d 100644 --- a/src/Admin/CommentsGridFieldAction.php +++ b/src/Admin/CommentsGridFieldAction.php @@ -62,7 +62,7 @@ class CommentsGridFieldAction implements GridField_ColumnProvider, GridField_Act $field .= GridField_FormAction::create( $gridField, 'CustomAction' . $record->ID . 'Spam', - _t('CommentsGridFieldAction.SPAM', 'Spam'), + _t('SilverStripe\\Comments\\Admin\\CommentsGridFieldAction.SPAM', 'Spam'), 'spam', array('RecordID' => $record->ID) )->Field(); @@ -72,7 +72,7 @@ class CommentsGridFieldAction implements GridField_ColumnProvider, GridField_Act $field .= GridField_FormAction::create( $gridField, 'CustomAction' . $record->ID . 'Approve', - _t('CommentsGridFieldAction.APPROVE', 'Approve'), + _t('SilverStripe\\Comments\\Admin\\CommentsGridFieldAction.APPROVE', 'Approve'), 'approve', array('RecordID' => $record->ID) )->Field(); @@ -101,7 +101,7 @@ class CommentsGridFieldAction implements GridField_ColumnProvider, GridField_Act // output a success message to the user Controller::curr()->getResponse()->setStatusCode( 200, - _t('CommentsGridFieldAction.COMMENTMARKEDSPAM', 'Comment marked as spam.') + _t('SilverStripe\\Comments\\Admin\\CommentsGridFieldAction.COMMENTMARKEDSPAM', 'Comment marked as spam.') ); } @@ -112,7 +112,7 @@ class CommentsGridFieldAction implements GridField_ColumnProvider, GridField_Act // output a success message to the user Controller::curr()->getResponse()->setStatusCode( 200, - _t('CommentsGridFieldAction.COMMENTAPPROVED', 'Comment approved.') + _t('SilverStripe\\Comments\\Admin\\CommentsGridFieldAction.COMMENTAPPROVED', 'Comment approved.') ); } } diff --git a/src/Admin/CommentsGridFieldConfig.php b/src/Admin/CommentsGridFieldConfig.php index 1661468..9b583ce 100644 --- a/src/Admin/CommentsGridFieldConfig.php +++ b/src/Admin/CommentsGridFieldConfig.php @@ -35,7 +35,7 @@ class CommentsGridFieldConfig extends GridFieldConfig_RecordEditor $manager->addBulkAction( 'spam', - _t('CommentsGridFieldConfig.SPAM', 'Spam'), + _t('SilverStripe\\Comments\\Admin\\CommentsGridFieldConfig.SPAM', 'Spam'), Handler::class, array( 'isAjax' => true, @@ -46,7 +46,7 @@ class CommentsGridFieldConfig extends GridFieldConfig_RecordEditor $manager->addBulkAction( 'approve', - _t('CommentsGridFieldConfig.APPROVE', 'Approve'), + _t('SilverStripe\\Comments\\Admin\\CommentsGridFieldConfig.APPROVE', 'Approve'), Handler::class, array( 'isAjax' => true, diff --git a/src/Controllers/CommentingController.php b/src/Controllers/CommentingController.php index 8d69ca8..da705da 100644 --- a/src/Controllers/CommentingController.php +++ b/src/Controllers/CommentingController.php @@ -190,6 +190,26 @@ class CommentingController extends Controller return singleton(CommentsExtension::class)->getCommentsOption($key); } + /** + * Returns all the commenting options for the current instance. + * + * @return array + */ + public function getOptions() + { + if ($record = $this->getOwnerRecord()) { + return $record->getCommentsOptions(); + } + + // Otherwise a singleton of that record + if ($class = $this->getParentClass()) { + return singleton($class)->getCommentsOptions(); + } + + // Otherwise just use the default options + return singleton(CommentsExtension::class)->getCommentsOptions(); + } + /** * Workaround for generating the link to this controller * @@ -254,7 +274,7 @@ class CommentingController extends Controller } } - $title = _t('CommentingController.RSSTITLE', "Comments RSS Feed"); + $title = _t('SilverStripe\\Comments\\Controllers\\CommentingController.RSSTITLE', "Comments RSS Feed"); $comments = new PaginatedList($comments, $request); $comments->setPageLength($this->getOption('comments_per_page')); @@ -455,7 +475,7 @@ class CommentingController extends Controller */ public function CommentsForm() { - return Injector::inst()->create(CommentForm::class, __FUNCTION__, $this->owner); + return Injector::inst()->create(CommentForm::class, __FUNCTION__, $this); } diff --git a/src/Extensions/CommentsExtension.php b/src/Extensions/CommentsExtension.php index be3fc07..e608ee7 100644 --- a/src/Extensions/CommentsExtension.php +++ b/src/Extensions/CommentsExtension.php @@ -61,43 +61,43 @@ class CommentsExtension extends DataExtension * * @config */ - private static $comments = array( + private static $comments = [ 'enabled' => true, - 'enabled_cms' => false, - 'require_login' => false, - 'require_login_cms' => false, - 'required_permission' => false, + // 'enabled_cms' => false, + // 'require_login' => false, + // 'require_login_cms' => false, + // 'required_permission' => false, 'include_js' => true, - 'use_gravatar' => false, + // 'use_gravatar' => false, 'gravatar_size' => 80, 'gravatar_default' => 'identicon', 'gravatar_rating' => 'g', - 'show_comments_when_disabled' => false, + // 'show_comments_when_disabled' => false, 'order_comments_by' => '"Created" DESC', - 'order_replies_by' => false, + // 'order_replies_by' => false, 'comments_per_page' => 10, 'comments_holder_id' => 'comments-holder', 'comment_permalink_prefix' => 'comment-', - 'require_moderation' => false, - 'require_moderation_nonmembers' => false, - 'require_moderation_cms' => false, - 'frontend_moderation' => false, - 'frontend_spam' => false, - 'html_allowed' => false, - 'html_allowed_elements' => array('a', 'img', 'i', 'b'), - 'use_preview' => false, - 'nested_comments' => false, + // 'require_moderation' => false, + // 'require_moderation_nonmembers' => false, + // 'require_moderation_cms' => false, + // 'frontend_moderation' => false, + // 'frontend_spam' => false, + // 'html_allowed' => false, + 'html_allowed_elements' => ['a', 'img', 'i', 'b'], + // 'use_preview' => false, + // 'nested_comments' => false, 'nested_depth' => 2, - ); + ]; /** * @var array */ - private static $db = array( + private static $db = [ 'ProvideComments' => 'Boolean', 'ModerationRequired' => 'Enum(\'None,Required,NonMembersOnly\',\'None\')', 'CommentsRequireLogin' => 'Boolean', - ); + ]; /** * {@inheritDoc} @@ -152,11 +152,11 @@ class CommentsExtension extends DataExtension */ public function updateSettingsFields(FieldList $fields) { - $options = FieldGroup::create()->setTitle(_t('CommentsExtension.COMMENTOPTIONS', 'Comments')); + $options = FieldGroup::create()->setTitle(_t('SilverStripe\\Comments\\Extensions\\CommentsExtension.COMMENTOPTIONS', 'Comments')); // Check if enabled setting should be cms configurable if ($this->owner->getCommentsOption('enabled_cms')) { - $options->push(new CheckboxField('ProvideComments', _t('Comment.ALLOWCOMMENTS', 'Allow Comments'))); + $options->push(new CheckboxField('ProvideComments', _t('SilverStripe\\Comments\\Model\\Comment.ALLOWCOMMENTS', 'Allow Comments'))); } // Check if we should require users to login to comment @@ -179,11 +179,11 @@ class CommentsExtension extends DataExtension // Check if moderation should be enabled via cms configurable if ($this->owner->getCommentsOption('require_moderation_cms')) { - $moderationField = new DropdownField('ModerationRequired', _t('CommentsExtension.COMMENTMODERATION', 'Comment Moderation'), array( - 'None' => _t('CommentsExtension.MODERATIONREQUIRED_NONE', 'No moderation required'), - 'Required' => _t('CommentsExtension.MODERATIONREQUIRED_REQUIRED', 'Moderate all comments'), + $moderationField = new DropdownField('ModerationRequired', _t('SilverStripe\\Comments\\Extensions\\CommentsExtension.COMMENTMODERATION', 'Comment Moderation'), array( + 'None' => _t('SilverStripe\\Comments\\Extensions\\CommentsExtension.MODERATIONREQUIRED_NONE', 'No moderation required'), + 'Required' => _t('SilverStripe\\Comments\\Extensions\\CommentsExtension.MODERATIONREQUIRED_REQUIRED', 'Moderate all comments'), 'NonMembersOnly' => _t( - 'CommentsExtension.MODERATIONREQUIRED_NONMEMBERSONLY', + 'SilverStripe\\Comments\\Extensions\\CommentsExtension.MODERATIONREQUIRED_NONMEMBERSONLY', 'Only moderate non-members' ), )); @@ -493,9 +493,10 @@ class CommentsExtension extends DataExtension } /** - * Get the commenting option for this object + * Get the commenting option for this object. * - * This can be overridden in any instance or extension to customise the option available + * This can be overridden in any instance or extension to customise the + * option available. * * @param string $key * @@ -503,10 +504,9 @@ class CommentsExtension extends DataExtension */ public function getCommentsOption($key) { - $settings = $this->owner // In case singleton is called on the extension directly - ? $this->owner->config()->comments - : Config::inst()->get(__CLASS__, 'comments'); + $settings = $this->getCommentsOptions(); $value = null; + if (isset($settings[$key])) { $value = $settings[$key]; } @@ -515,9 +515,24 @@ class CommentsExtension extends DataExtension if ($this->owner) { $this->owner->extend('updateCommentsOption', $key, $value); } + return $value; } + /** + * @return array + */ + public function getCommentsOptions() + { + if ($this->owner) { + $settings = $this->owner->config()->comments; + } else { + $settings = Config::inst()->get(__CLASS__, 'comments'); + } + + return $settings; + } + /** * Add moderation functions to the current fieldlist * @@ -561,13 +576,19 @@ class CommentsExtension extends DataExtension if ($fields->hasTabSet()) { $tabs = new TabSet( 'Comments', - new Tab('CommentsNewCommentsTab', _t('CommentAdmin.NewComments', 'New') . ' ' . $newCount, + new Tab( + 'CommentsNewCommentsTab', + _t('SilverStripe\\Comments\\Admin\\CommentAdmin.NewComments', 'New') . ' ' . $newCount, $newGrid ), - new Tab('CommentsCommentsTab', _t('CommentAdmin.Comments', 'Approved') . ' ' . $approvedCount, + new Tab( + 'CommentsCommentsTab', + _t('SilverStripe\\Comments\\Admin\\CommentAdmin.Comments', 'Approved') . ' ' . $approvedCount, $approvedGrid ), - new Tab('CommentsSpamCommentsTab', _t('CommentAdmin.SpamComments', 'Spam') . ' ' . $spamCount, + new Tab( + 'CommentsSpamCommentsTab', + _t('SilverStripe\\Comments\\Admin\\CommentAdmin.SpamComments', 'Spam') . ' ' . $spamCount, $spamGrid ) ); diff --git a/src/Forms/CommentForm.php b/src/Forms/CommentForm.php index 9011c4b..882c831 100644 --- a/src/Forms/CommentForm.php +++ b/src/Forms/CommentForm.php @@ -18,13 +18,18 @@ use SilverStripe\Core\Convert; use SilverStripe\Security\Security; use SilverStripe\Comments\Model\Comment; use SilverStripe\Control\Controller; +use SilverStripe\Comments\Controllers\CommentingController; +use SilverStripe\Core\Config\Config; class CommentForm extends Form { - public function __construct($name, $controller) + /** + * @param string $name + * @param CommentingController $controller + */ + public function __construct($name, CommentingController $controller) { $usePreview = $controller->getOption('use_preview'); - $nameRequired = _t('CommentInterface.YOURNAME_MESSAGE_REQUIRED', 'Please enter your name'); $emailRequired = _t('CommentInterface.EMAILADDRESS_MESSAGE_REQUIRED', 'Please enter your email address'); $emailInvalid = _t('CommentInterface.EMAILADDRESS_MESSAGE_EMAIL', 'Please enter a valid email address'); @@ -40,18 +45,18 @@ class CommentForm extends Form // Email EmailField::create( 'Email', - _t('CommentingController.EMAILADDRESS', 'Your email address (will not be published)') + _t('SilverStripe\\Comments\\Controllers\\CommentingController.EMAILADDRESS', 'Your email address (will not be published)') ) ->setCustomValidationMessage($emailRequired) ->setAttribute('data-msg-required', $emailRequired) ->setAttribute('data-msg-email', $emailInvalid) ->setAttribute('data-rule-email', true), // Url - TextField::create('URL', _t('CommentingController.WEBSITEURL', 'Your website URL')) + TextField::create('URL', _t('SilverStripe\\Comments\\Controllers\\CommentingController.WEBSITEURL', 'Your website URL')) ->setAttribute('data-msg-url', $urlInvalid) ->setAttribute('data-rule-url', true), // Comment - TextareaField::create('Comment', _t('CommentingController.COMMENTS', 'Comments')) + TextareaField::create('Comment', _t('SilverStripe\\Comments\\Controllers\\CommentingController.COMMENTS', 'Comments')) ->setCustomValidationMessage($commentRequired) ->setAttribute('data-msg-required', $commentRequired) ), @@ -139,13 +144,14 @@ class CommentForm extends Form 'URL' => isset($data['URL']) ? $data['URL'] : '', 'Email' => isset($data['Email']) ? $data['Email'] : '' )); + // allow previous value to fill if comment not stored in cookie (i.e. validation error) $prevComment = Cookie::get('CommentsForm_Comment'); + if ($prevComment && $prevComment != '') { $this->loadDataFrom(array('Comment' => $prevComment)); } } - } /** @@ -192,7 +198,7 @@ class CommentForm extends Form return Security::permissionFailure( $this, _t( - 'CommentingController.PERMISSIONFAILURE', + 'SilverStripe\\Comments\\Controllers\\CommentingController.PERMISSIONFAILURE', "You're not able to post comments to this page. Please ensure you are logged in and have an " . 'appropriate permission level.' ) @@ -269,5 +275,4 @@ class CommentForm extends Form return $this->controller->redirect(Controller::join_links($url, "#{$hash}")); } - } diff --git a/src/Model/Comment.php b/src/Model/Comment.php index 79ca1d2..c517f18 100755 --- a/src/Model/Comment.php +++ b/src/Model/Comment.php @@ -248,14 +248,14 @@ class Comment extends DataObject { $labels = parent::fieldLabels($includerelations); - $labels['Name'] = _t('Comment.NAME', 'Author Name'); - $labels['Comment'] = _t('Comment.COMMENT', 'Comment'); - $labels['Email'] = _t('Comment.EMAIL', 'Email'); - $labels['URL'] = _t('Comment.URL', 'URL'); - $labels['IsSpam'] = _t('Comment.ISSPAM', 'Spam?'); - $labels['Moderated'] = _t('Comment.MODERATED', 'Moderated?'); - $labels['ParentTitle'] = _t('Comment.PARENTTITLE', 'Parent'); - $labels['Created'] = _t('Comment.CREATED', 'Date posted'); + $labels['Name'] = _t('SilverStripe\\Comments\\Model\\Comment.NAME', 'Author Name'); + $labels['Comment'] = _t('SilverStripe\\Comments\\Model\\Comment.COMMENT', 'Comment'); + $labels['Email'] = _t('SilverStripe\\Comments\\Model\\Comment.EMAIL', 'Email'); + $labels['URL'] = _t('SilverStripe\\Comments\\Model\\Comment.URL', 'URL'); + $labels['IsSpam'] = _t('SilverStripe\\Comments\\Model\\Comment.ISSPAM', 'Spam?'); + $labels['Moderated'] = _t('SilverStripe\\Comments\\Model\\Comment.MODERATED', 'Moderated?'); + $labels['ParentTitle'] = _t('SilverStripe\\Comments\\Model\\Comment.PARENTTITLE', 'Parent'); + $labels['Created'] = _t('SilverStripe\\Comments\\Model\\Comment.CREATED', 'Date posted'); return $labels; } @@ -623,11 +623,11 @@ class Comment extends DataObject */ public function getTitle() { - $title = sprintf(_t('Comment.COMMENTBY', 'Comment by %s', 'Name'), $this->getAuthorName()); + $title = sprintf(_t('SilverStripe\\Comments\\Model\\Comment.COMMENTBY', 'Comment by %s', 'Name'), $this->getAuthorName()); if ($parent = $this->Parent()) { if ($parent->Title) { - $title .= sprintf(' %s %s', _t('Comment.ON', 'on'), $parent->Title); + $title .= sprintf(' %s %s', _t('SilverStripe\\Comments\\Model\\Comment.ON', 'on'), $parent->Title); } } @@ -653,9 +653,9 @@ class Comment extends DataObject CheckboxField::create('Moderated', $this->fieldLabel('Moderated')), CheckboxField::create('IsSpam', $this->fieldLabel('IsSpam')), )) - ->setTitle(_t('Comment.OPTIONS', 'Options')) + ->setTitle(_t('SilverStripe\\Comments\\Model\\Comment.OPTIONS', 'Options')) ->setDescription(_t( - 'Comment.OPTION_DESCRIPTION', + 'SilverStripe\\Comments\\Model\\Comment.OPTION_DESCRIPTION', 'Unmoderated and spam comments will not be displayed until approved' )) ); @@ -673,7 +673,7 @@ class Comment extends DataObject if (($parent = $this->ParentComment()) && $parent->exists()) { $fields->push(new HeaderField( 'ParentComment_Title', - _t('Comment.ParentComment_Title', 'This comment is a reply to the below') + _t('SilverStripe\\Comments\\Model\\Comment.ParentComment_Title', 'This comment is a reply to the below') )); // Created date // FIXME - the method setName in DatetimeField is not chainable, hence @@ -760,6 +760,7 @@ class Comment extends DataObject { $gravatar = ''; $use_gravatar = $this->getOption('use_gravatar'); + if ($use_gravatar) { $gravatar = 'http://www.gravatar.com/avatar/' . md5(strtolower(trim($this->Email))); $gravatarsize = $this->getOption('gravatar_size'); diff --git a/tests/CommentAdminTest.php b/tests/CommentAdminTest.php index 0b8b68d..63d1d8d 100644 --- a/tests/CommentAdminTest.php +++ b/tests/CommentAdminTest.php @@ -5,7 +5,7 @@ namespace SilverStripe\Comments\Tests; use SilverStripe\Comments\Admin\CommentAdmin; use SilverStripe\Dev\SapphireTest; use SilverStripe\i18n\i18n; -use SilverStripe\Security\Member; +use SilverStripe\Security\Security; class CommentAdminTest extends SapphireTest { @@ -22,53 +22,20 @@ class CommentAdminTest extends SapphireTest i18n::set_locale('fr'); $expected = array( 'CMS_ACCESS_CommentAdmin' => array( - # FIXME - this is a bug, missing from lang.yml files - 'name' => 'Access to \'Comments\' section', - 'category' => 'Accès au CMS' + 'name' => 'Accès à la section Commentaires', + 'category' => 'CMS Access' // missing in core ) ); + $this->assertEquals($expected, $commentAdmin->providePermissions()); i18n::set_locale($locale); $expected = array( 'CMS_ACCESS_CommentAdmin' => array( - # FIXME - this is a bug, missing from lang.yml files 'name' => 'Access to \'Comments\' section', 'category' => 'CMS Access' ) ); $this->assertEquals($expected, $commentAdmin->providePermissions()); } - - public function testGetEditForm() - { - $commentAdmin = new CommentAdmin(); - $this->logInWithPermission('CMS_ACCESS_CommentAdmin'); - $form = $commentAdmin->getEditForm(); - $names = $this->getFormFieldNames($form); - $expected = array( - 'NewComments', - 'ApprovedComments', - 'SpamComments' - ); - $this->assertEquals($expected, $names); - - if ($member = Member::currentUser()) { - $member->logOut(); - } - - $form = $commentAdmin->getEditForm(); - } - - private function getFormFieldNames($form) - { - $result = array(); - $fields = $form->Fields(); - $tab = $fields->findOrMakeTab('Root'); - $fields = $tab->FieldList(); - foreach ($fields as $field) { - array_push($result, $field->getName()); - } - return $result; - } } diff --git a/tests/CommentingControllerTest.php b/tests/CommentingControllerTest.php index 24cf3b7..efa7041 100644 --- a/tests/CommentingControllerTest.php +++ b/tests/CommentingControllerTest.php @@ -15,10 +15,6 @@ use SilverStripe\ORM\DataObject; use SilverStripe\Security\Member; use SilverStripe\Security\SecurityToken; -/** - * @package comments - * @subpackage tests - */ class CommentingControllerTest extends FunctionalTest { /** @@ -43,10 +39,14 @@ class CommentingControllerTest extends FunctionalTest SecurityToken::inst()->disable(); } parent::tearDown(); + + Config::unnest(); } public function setUp() { + Config::nest(); // additional nesting here necessary + parent::setUp(); $this->securityEnabled = SecurityToken::inst()->is_enabled(); @@ -54,6 +54,39 @@ class CommentingControllerTest extends FunctionalTest $this->autoFollowRedirection = false; } + public function testCommentsFormUsePreview() + { + $parent = $this->objFromFixture(CommentableItem::class, 'first'); + $commController = new CommentingController(); + $commController->setOwnerRecord($parent); + $form = $commController->CommentsForm(); + + $commentsFields = $form->Fields()->first()->FieldList(); + $expected = array('Name', 'Email', 'URL', 'Comment'); + CommentTestHelper::assertFieldNames($this, $expected, $commentsFields); + + // test with preview on + Config::modify()->merge(CommentableItem::class, 'comments', array( + 'use_preview' => true + )); + + $parent = $this->objFromFixture(CommentableItem::class, 'first'); + $commController = new CommentingController(); + $commController->setOwnerRecord($parent); + + $this->objFromFixture(Comment::class, 'firstComAChild1')->delete(); + $this->objFromFixture(Comment::class, 'firstComAChild2')->delete(); + $this->objFromFixture(Comment::class, 'firstComAChild3')->delete(); + + SecurityToken::inst()->disable(); + $this->autoFollowRedirection = false; + + $form = $commController->CommentsForm(); + $commentsFields = $form->Fields()->first()->FieldList(); + $expected = array('Name', 'Email', 'URL', 'Comment', 'PreviewComment'); + CommentTestHelper::assertFieldNames($this, $expected, $commentsFields); + } + public function testApproveUnmoderatedComment() { SecurityToken::inst()->disable(); @@ -185,7 +218,7 @@ class CommentingControllerTest extends FunctionalTest */ /* public function testCommentsFormLoadMemberData() { - Config::inst()->update('CommentableItem', 'comments', array( + Config::modify()->set('CommentableItem', 'comments', array( 'use_preview' => false )); $this->logInAs('visitor'); @@ -204,38 +237,6 @@ class CommentingControllerTest extends FunctionalTest } */ - public function testCommentsFormUsePreview() - { - // test with preview on - Config::inst()->update(CommentableItem::class, 'comments', array( - 'use_preview' => true - )); - - $this->objFromFixture(Comment::class, 'firstComAChild1')->delete(); - $this->objFromFixture(Comment::class, 'firstComAChild2')->delete(); - $this->objFromFixture(Comment::class, 'firstComAChild3')->delete(); - - SecurityToken::inst()->disable(); - $this->autoFollowRedirection = false; - $parent = $this->objFromFixture(CommentableItem::class, 'first'); - $commController = new CommentingController(); - $commController->setOwnerRecord($parent); - - $form = $commController->CommentsForm(); - $commentsFields = $form->Fields()->first()->FieldList(); - $expected = array('Name', 'Email', 'URL', 'Comment', 'PreviewComment'); - CommentTestHelper::assertFieldNames($this, $expected, $commentsFields); - - // Turn off preview. Assert lack of preview field - Config::inst()->update(CommentableItem::class, 'comments', array( - 'use_preview' => false - )); - $form = $commController->CommentsForm(); - $commentsFields = $form->Fields()->first()->FieldList(); - $expected = array('Name', 'Email', 'URL', 'Comment'); - CommentTestHelper::assertFieldNames($this, $expected, $commentsFields); - } - public function testCommentsForm() { $this->autoFollowRedirection = true; diff --git a/tests/CommentsExtensionTest.php b/tests/CommentsExtensionTest.php index 843b2e2..d914e37 100644 --- a/tests/CommentsExtensionTest.php +++ b/tests/CommentsExtensionTest.php @@ -18,7 +18,7 @@ class CommentsExtensionTest extends SapphireTest /** * {@inheritDoc} */ - protected static $fixture_file = 'comments/tests/CommentsTest.yml'; + protected static $fixture_file = 'CommentsTest.yml'; /** * {@inheritDoc} @@ -35,7 +35,7 @@ class CommentsExtensionTest extends SapphireTest Config::nest(); // Set good default values - Config::inst()->update(CommentsExtension::class, 'comments', array( + Config::modify()->set(CommentsExtension::class, 'comments', array( 'enabled' => true, 'enabled_cms' => false, 'require_login' => false, @@ -53,7 +53,7 @@ class CommentsExtensionTest extends SapphireTest ); // Configure this dataobject - Config::inst()->update(CommentableItem::class, 'comments', array( + Config::modify()->set(CommentableItem::class, 'comments', array( 'enabled_cms' => true )); } @@ -64,9 +64,20 @@ class CommentsExtensionTest extends SapphireTest parent::tearDown(); } + + public function testGetCommentsOption() + { + Config::modify()->set(CommentableItem::class, 'comments', [ + 'comments_holder_id' => 'some-option' + ]); + + $item = $this->objFromFixture(CommentableItem::class, 'first'); + $this->assertEquals('some-option', $item->getCommentsOption('comments_holder_id')); + } + public function testPopulateDefaults() { - Config::inst()->update(CommentableItem::class, 'comments', array( + Config::modify()->set(CommentableItem::class, 'comments', array( 'require_moderation_cms' => true, 'require_moderation' => true, 'require_moderation_nonmembers' => true @@ -77,7 +88,7 @@ class CommentsExtensionTest extends SapphireTest $this->assertTrue($item->CommentsRequireLogin); - Config::inst()->update(CommentableItem::class, 'comments', array( + Config::modify()->set(CommentableItem::class, 'comments', array( 'require_moderation_cms' => true, 'require_moderation' => true, 'require_moderation_nonmembers' => true @@ -87,7 +98,6 @@ class CommentsExtensionTest extends SapphireTest $item->populateDefaults(); $this->assertFalse($item->CommentsRequireLogin); - } public function testUpdateSettingsFields() @@ -99,7 +109,7 @@ class CommentsExtensionTest extends SapphireTest { // the 3 options take precedence in this order, executed if true - Config::inst()->update(CommentableItem::class, 'comments', array( + Config::modify()->set(CommentableItem::class, 'comments', array( 'require_moderation_cms' => true, 'require_moderation' => true, 'require_moderation_nonmembers' => true @@ -122,21 +132,21 @@ class CommentsExtensionTest extends SapphireTest $this->assertEquals('NonMembersOnly', $item->getModerationRequired()); - Config::inst()->update(CommentableItem::class, 'comments', array( + Config::modify()->set(CommentableItem::class, 'comments', array( 'require_moderation_cms' => false, 'require_moderation' => true, 'require_moderation_nonmembers' => true )); $this->assertEquals('Required', $item->getModerationRequired()); - Config::inst()->update(CommentableItem::class, 'comments', array( + Config::modify()->set(CommentableItem::class, 'comments', array( 'require_moderation_cms' => false, 'require_moderation' => false, 'require_moderation_nonmembers' => true )); $this->assertEquals('NonMembersOnly', $item->getModerationRequired()); - Config::inst()->update(CommentableItem::class, 'comments', array( + Config::modify()->set(CommentableItem::class, 'comments', array( 'require_moderation_cms' => false, 'require_moderation' => false, 'require_moderation_nonmembers' => false @@ -146,7 +156,7 @@ class CommentsExtensionTest extends SapphireTest public function testGetCommentsRequireLogin() { - Config::inst()->update(CommentableItem::class, 'comments', array( + Config::modify()->set(CommentableItem::class, 'comments', array( 'require_login_cms' => true )); @@ -158,12 +168,12 @@ class CommentsExtensionTest extends SapphireTest $item->CommentsRequireLogin = false; $this->assertFalse($item->getCommentsRequireLogin()); - Config::inst()->update(CommentableItem::class, 'comments', array( + Config::modify()->set(CommentableItem::class, 'comments', array( 'require_login_cms' => false, 'require_login' => false )); $this->assertFalse($item->getCommentsRequireLogin()); - Config::inst()->update(CommentableItem::class, 'comments', array( + Config::modify()->set(CommentableItem::class, 'comments', array( 'require_login_cms' => false, 'require_login' => true )); @@ -173,7 +183,7 @@ class CommentsExtensionTest extends SapphireTest public function testAllComments() { $item = $this->objFromFixture(CommentableItem::class, 'first'); - $this->assertEquals(4, $items->AllComments()->count()); + $this->assertEquals(4, $item->AllComments()->count()); } public function testAllVisibleComments() @@ -183,28 +193,28 @@ class CommentsExtensionTest extends SapphireTest } $item = $this->objFromFixture(CommentableItem::class, 'second'); - $this->assertEquals(4, $items->AllVisibleComments()->count()); + $this->assertEquals(4, $item->AllVisibleComments()->count()); } public function testComments() { - Config::inst()->update(CommentableItem::class, 'comments', array( + Config::modify()->set(CommentableItem::class, 'comments', array( 'nested_comments' => false )); $item = $this->objFromFixture(CommentableItem::class, 'first'); - $this->assertEquals(4, $items->Comments()->count()); + $this->assertEquals(4, $item->Comments()->count()); - Config::inst()->update(CommentableItem::class, 'comments', array( + Config::modify()->set(CommentableItem::class, 'comments', array( 'nested_comments' => true )); - $this->assertEquals(1, $items->Comments()->count()); + $this->assertEquals(1, $item->Comments()->count()); } public function testGetCommentsEnabled() { - Config::inst()->update(CommentableItem::class, 'comments', array( + Config::modify()->set(CommentableItem::class, 'comments', array( 'enabled_cms' => true )); @@ -218,12 +228,12 @@ class CommentsExtensionTest extends SapphireTest public function testGetCommentHolderID() { $item = $this->objFromFixture(CommentableItem::class, 'first'); - Config::inst()->update(CommentableItem::class, 'comments', array( - 'comments_holder_id' => 'comments-holder', + Config::modify()->set(CommentableItem::class, 'comments', array( + 'comments_holder_id' => 'commentid_test1', )); $this->assertEquals('commentid_test1', $item->getCommentHolderID()); - Config::inst()->update(CommentableItem::class, 'comments', array( + Config::modify()->set(CommentableItem::class, 'comments', array( 'comments_holder_id' => 'commtentid_test_another', )); $this->assertEquals('commtentid_test_another', $item->getCommentHolderID()); @@ -251,7 +261,7 @@ class CommentsExtensionTest extends SapphireTest public function testGetCommentRSSLink() { - Config::inst()->update('SilverStripe\\Control\\Director', 'alternate_base_url', 'http://unittesting.local'); + Config::modify()->set('SilverStripe\\Control\\Director', 'alternate_base_url', 'http://unittesting.local'); $item = $this->objFromFixture(CommentableItem::class, 'first'); $link = $item->getCommentRSSLink(); @@ -260,7 +270,7 @@ class CommentsExtensionTest extends SapphireTest public function testGetCommentRSSLinkPage() { - Config::inst()->update('SilverStripe\\Control\\Director', 'alternate_base_url', 'http://unittesting.local'); + Config::modify()->set('SilverStripe\\Control\\Director', 'alternate_base_url', 'http://unittesting.local'); $item = $this->objFromFixture(CommentableItem::class, 'first'); $page = $item->getCommentRSSLinkPage(); @@ -272,7 +282,7 @@ class CommentsExtensionTest extends SapphireTest public function testCommentsForm() { - Config::inst()->update(CommentableItem::class, 'comments', array( + Config::modify()->set(CommentableItem::class, 'comments', array( 'include_js' => false, 'comments_holder_id' => 'comments-holder', )); @@ -287,21 +297,20 @@ class CommentsExtensionTest extends SapphireTest $this->assertContains($expected, $cf); $this->assertContains('

Post your comment

', $cf); - // check the comments form exists - $expected = 'assertContains($expected, $cf); - $expected = 'assertContains($expected, $cf); - $expected = 'assertContains($expected, $cf); - $expected = ''; + $expected = 'assertContains($expected, $cf); - $expected = '