diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..aff08c6 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,20 @@ +{ + "root": true, + "extends": "wikimedia", + "env": { + "browser": true, + "jquery": true + }, + "globals": { + "mediaWiki": false + }, + "rules": { + "quote-props": [ + "error", + "as-needed", + { + "keywords": false + } + ] + } +} diff --git a/.gitignore b/.gitignore index 1689d7a..8ea3b90 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ *.kate-swp .*.swp node_modules/** +vendor/** +composer.lock diff --git a/.jshintignore b/.jshintignore deleted file mode 100644 index 3c3629e..0000000 --- a/.jshintignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index 04c3a97..0000000 --- a/.jshintrc +++ /dev/null @@ -1,23 +0,0 @@ -{ - // Enforcing - "bitwise": true, - "eqeqeq": true, - "freeze": true, - "latedef": "nofunc", - "noarg": true, - "nonew": true, - "undef": true, - "unused": true, - "strict": false, - - // Relaxing - "es5": false, - - // Environment - "browser": true, - "jquery": true, - - "globals": { - "mediaWiki": false - } -} diff --git a/.phpcs.xml b/.phpcs.xml new file mode 100644 index 0000000..0015da3 --- /dev/null +++ b/.phpcs.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + . + + + diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index d8e5d08..498acf7 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1 +1 @@ -The development of this software is covered by a [Code of Conduct](https://www.mediawiki.org/wiki/Code_of_Conduct). +The development of this software is covered by a [Code of Conduct](https://www.mediawiki.org/wiki/Special:MyLanguage/Code_of_Conduct). diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/Comments.i18n.alias.php b/Comments.i18n.alias.php new file mode 100644 index 0000000..05e082d --- /dev/null +++ b/Comments.i18n.alias.php @@ -0,0 +1,14 @@ + [ 'CommentIgnoreList' ], +]; diff --git a/Comments.i18n.magic.php b/Comments.i18n.magic.php new file mode 100644 index 0000000..12fffef --- /dev/null +++ b/Comments.i18n.magic.php @@ -0,0 +1,12 @@ + [ 0, 'NUMBEROFCOMMENTS' ], + 'NUMBEROFCOMMENTSPAGE' => [ 0, 'NUMBEROFCOMMENTSPAGE' ], +]; diff --git a/Gruntfile.js b/Gruntfile.js index 36b6671..016f4d1 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,17 +1,15 @@ -/*jshint node:true */ +/* eslint-env node */ module.exports = function ( grunt ) { - grunt.loadNpmTasks( 'grunt-contrib-jshint' ); + grunt.loadNpmTasks( 'grunt-eslint' ); grunt.loadNpmTasks( 'grunt-jsonlint' ); grunt.loadNpmTasks( 'grunt-banana-checker' ); grunt.initConfig( { - jshint: { - options: { - jshintrc: true - }, + eslint: { all: [ '**/*.js', - '!node_modules/**' + '!node_modules/**', + '!vendor/**' ] }, banana: { @@ -20,11 +18,12 @@ module.exports = function ( grunt ) { jsonlint: { all: [ '**/*.json', - '!node_modules/**' + '!node_modules/**', + '!vendor/**' ] } } ); - grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] ); + grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'banana' ] ); grunt.registerTask( 'default', 'test' ); }; diff --git a/README.md b/README.md deleted file mode 100644 index f0e0f9b..0000000 --- a/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Mediawiki Extension "Comments" - -Original: https://www.mediawiki.org/wiki/Extension:Comments - -Das hier ist eine an https://znil.net angepasste Version: -* Email Benachrichtigung bei neuen Kommentaren -* Rudimentärer Spamfilter -* Namen + Email über Kommentarfeld eingeben -* Eigenes Bild bei Benutzer BLinz - diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..f510b13 --- /dev/null +++ b/composer.json @@ -0,0 +1,19 @@ +{ + "require-dev": { + "jakub-onderka/php-parallel-lint": "1.0.0", + "jakub-onderka/php-console-highlighter": "0.3.2", + "mediawiki/minus-x": "0.3.1", + "mediawiki/mediawiki-codesniffer": "24.0.0" + }, + "scripts": { + "test": [ + "parallel-lint . --exclude vendor --exclude node_modules", + "minus-x check .", + "phpcs -sp" + ], + "fix": [ + "minus-x fix .", + "phpcbf" + ] + } +} diff --git a/extension.json b/extension.json index e2f67b2..a8a7acd 100644 --- a/extension.json +++ b/extension.json @@ -1,17 +1,21 @@ { - "name": "Comments", - "version": "4.3.0 znilwiki", + "name": "Comments (znilwiki)", + "version": "4.5.1 (znilwiki)", "author": [ "David Pean", "Misza", "Jack Phoenix", "Adam Carter/UltrasonicNXT", - "Bernhard Linz" + "Samantha Nguyen", + "Bernhard Linz (znilwiki-Anteil)" ], - "license-name": "GPL-2.0+", + "license-name": "GPL-2.0-or-later", "url": "https://www.mediawiki.org/wiki/Extension:Comments", "descriptionmsg": "comments-desc", "type": "parserhook", + "requires": { + "MediaWiki": ">= 1.31.0" + }, "GroupPermissions": { "*": { "comment": true @@ -26,7 +30,8 @@ "AvailableRights": [ "comment", "commentadmin", - "commentlinks" + "commentlinks", + "comment-delete-own" ], "SpecialPages": { "CommentIgnoreList": "CommentIgnoreList" @@ -55,30 +60,33 @@ ] }, "ExtensionMessagesFiles": { - "CommentsAliases": "includes/Comments.alias.php", - "CommentsMagic": "includes/Comments.i18n.magic.php", - "NumberOfCommentsMagic": "includes/Comments.i18n.magic.php" + "CommentsAliases": "Comments.i18n.alias.php", + "CommentsMagic": "Comments.i18n.magic.php", + "NumberOfCommentsMagic": "Comments.i18n.magic.php" }, "AutoloadClasses": { - "Comment": "includes/Comment.class.php", - "CommentsPage": "includes/CommentsPage.class.php", - "CommentsOfTheDay": "includes/CommentsOfTheDay.class.php", - "CommentFunctions": "/includes/CommentFunctions.class.php", - "CommentIgnoreList": "includes/specials/SpecialCommentIgnoreList.php", - "CommentsLogFormatter": "includes/CommentsLogFormatter.class.php", - "CommentsHooks": "includes/Comments.hooks.php", - "NumberOfComments": "includes/NumberOfComments.class.php", - "CommentBlockAPI": "includes/api/CommentBlock.api.php", - "CommentDeleteAPI": "includes/api/CommentDelete.api.php", - "CommentLatestIdAPI": "includes/api/CommentLatestID.api.php", - "CommentListAPI": "includes/api/CommentList.api.php", - "CommentSubmitAPI": "includes/api/CommentSubmit.api.php", - "CommentVoteAPI": "includes/api/CommentVote.api.php" + "Comment": "includes/Comment.php", + "CommentsPage": "includes/CommentsPage.php", + "NumberOfComments": "includes/parser/NumberOfComments.php", + "DisplayComments": "includes/parser/DisplayComments.php", + "CommentFunctions": "includes/CommentFunctions.php", + "CommentIgnoreList": "includes/specials/CommentIgnoreList.php", + "CommentsLogFormatter": "includes/CommentsLogFormatter.php", + "CommentsHooks": "includes/CommentsHooks.php", + "CommentBlockAPI": "includes/api/CommentBlockAPI.php", + "CommentDeleteAPI": "includes/api/CommentDeleteAPI.php", + "CommentLatestIdAPI": "includes/api/CommentLatestIdAPI.php", + "CommentListAPI": "includes/api/CommentListAPI.php", + "CommentSubmitAPI": "includes/api/CommentSubmitAPI.php", + "CommentVoteAPI": "includes/api/CommentVoteAPI.php" }, "ResourceModules": { "ext.comments.css": { "styles": "resources/css/Comments.css", - "position": "top" + "targets": [ + "desktop", + "mobile" + ] }, "ext.comments.js": { "scripts": "resources/js/Comment.js", @@ -93,6 +101,10 @@ "comments-block-warning-anon", "comments-block-warning-user", "comments-delete-warning" + ], + "targets": [ + "desktop", + "mobile" ] } }, @@ -101,26 +113,14 @@ "remoteExtPath": "Comments" }, "Hooks": { - "ParserFirstCallInit": [ - "CommentsHooks::onParserFirstCallInit", - "NumberOfComments::setupNumberOfCommentsPageParser", - "CommentsOfTheDay::registerTag" - ], - "LoadExtensionSchemaUpdates": [ - "CommentsHooks::onLoadExtensionSchemaUpdates" - ], - "RenameUserSQL": [ - "CommentsHooks::onRenameUserSQL" - ], - "MagicWordwgVariableIDs": [ - "NumberOfComments::registerNumberOfCommentsMagicWord" - ], - "ParserGetVariableValueSwitch": [ - "NumberOfComments::getNumberOfCommentsMagic" - ] + "ParserFirstCallInit": "CommentsHooks::onParserFirstCallInit", + "LoadExtensionSchemaUpdates": "CommentsHooks::onLoadExtensionSchemaUpdates", + "RenameUserSQL": "CommentsHooks::onRenameUserSQL", + "MagicWordwgVariableIDs": "NumberOfComments::onMagicWordwgVariableIDs", + "ParserGetVariableValueSwitch": "NumberOfComments::onParserGetVariableValueSwitch" }, "config": { - "CommentsDefaultAvatar": "resources/images/default_ml.gif", + "CommentsDefaultAvatar": "http://www.shoutwiki.com/w/extensions/SocialProfile/avatars/default_ml.gif", "CommentsSortDescending": false, "CommentsInRecentChanges": false }, diff --git a/gitinfo.json b/gitinfo.json deleted file mode 100644 index 7e543e6..0000000 --- a/gitinfo.json +++ /dev/null @@ -1 +0,0 @@ -{"headSHA1": "608f7af40f3af53b83966063496e34d32655e49b\n", "head": "608f7af40f3af53b83966063496e34d32655e49b\n", "remoteURL": "https://gerrit.wikimedia.org/r/mediawiki/extensions/Comments", "branch": "608f7af40f3af53b83966063496e34d32655e49b\n", "headCommitDate": "1501709440"} \ No newline at end of file diff --git a/i18n/ais.json b/i18n/ais.json new file mode 100644 index 0000000..048dd2a --- /dev/null +++ b/i18n/ais.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Benel" + ] + }, + "comments-loading": "miasip henay ayza..." +} diff --git a/i18n/ar.json b/i18n/ar.json new file mode 100644 index 0000000..6701913 --- /dev/null +++ b/i18n/ar.json @@ -0,0 +1,92 @@ +{ + "@metadata": { + "authors": [ + "ديفيد", + "Meno25" + ] + }, + "apihelp-commentblock-description": "تسمح API Commentblock بمنع مستخدم من التعليق الذي تم إنشاؤه من بعد ملء الوسائط التالية: CommentID.", + "apihelp-commentblock-summary": "تسمح API Commentblock بمنع مستخدم من التعليق الذي تم إنشاؤه من بعد ملء الوسائط التالية: CommentID.", + "apihelp-commentdelete-description": "تسمح API commentdelete حذف تعليق بعد ملء الوسائط التالية: CommentID.", + "apihelp-commentdelete-summary": "تسمح API commentdelete حذف تعليق بعد ملء الوسائط التالية: CommentID.", + "apihelp-commentlatestid-description": "تسمح API commentlatestID باسترداد معرف أحدث تعليق بعد ملء الوسائط التالية: pageID", + "apihelp-commentlatestid-summary": "تسمح API commentlatestID باسترداد معرف أحدث تعليق بعد ملء الوسائط التالية: pageID", + "apihelp-commentlist-description": "تسترد API Commentlist عدة تعليقات وتخرجها كقائمة بعد ملء الوسائط التالية: pageID وorder وpagerPage وshowForm.", + "apihelp-commentlist-summary": "تسترد API Commentlist عدة تعليقات وتخرجها كقائمة بعد ملء الوسائط التالية: pageID وorder وpagerPage وshowForm.", + "apihelp-commentsubmit-description": "تسمح API commentubmit بتقديم/نشر تعليق بعد ملء الوسائط التالية: pageIDو parentID وcommentText.", + "apihelp-commentsubmit-summary": "تسمح API commentubmit بتقديم/نشر تعليق بعد ملء الوسائط التالية: pageID وparentID وcommentText.", + "apihelp-commentvote-description": "تسمح API commentubmit بالتصويت على تعليق بعد ملء الوسائط التالية: commentID وvoteValue.", + "apihelp-commentvote-summary": "تسمح API commentubmit بالتصويت على تعليق بعد ملء الوسائط التالية: commentID وvoteValue.", + "apihelp-commentblock-param-commentID": "معرف التعليق للتعليق من قبل المستخدم والذي سيتم منعه", + "apihelp-commentdelete-param-commentID": "معرف التعليق للتعليق المراد حذفه", + "apihelp-commentlatestid-param-pageID": "معرف الصفحة للصفحة التي يوجد بها أحدث تعليق", + "apihelp-commentlist-param-pageID": "معرف الصفحة للصفحة حيث يتم استرداد قائمة التعليقات", + "apihelp-commentlist-param-order": "حدد ما إذا كانت قائمة التعليقات بترتيب تصاعدي أم تنازلي", + "apihelp-commentlist-param-pagerPage": "رقم صفحة التعليقات", + "apihelp-commentlist-param-showForm": "عرض نموذج التعليقات", + "apihelp-commentsubmit-param-pageID": "معرف الصفحة للصفحة التي سيتم إرسال التعليق عليها", + "apihelp-commentsubmit-param-parentID": "معرف التعليق للتعليق الأصلي", + "apihelp-commentsubmit-param-commentText": "نص التعليق", + "apihelp-commentvote-param-commentID": "معرف التعليق للتعليق الذي تم التصويت له", + "apihelp-commentvote-param-voteValue": "قيمة التصويت للتعليق", + "comments-comment": "تعليق", + "comments-desc": "يضيف خطاف المحلل <comments> الذي يسمح بالتعليق على الصفحات", + "comments-db-locked": "

إضافة التعليقات

قاعدة البيانات مقفلة حاليا لصيانة قاعدة البيانات الروتينية، وبعد ذلك ستعود إلى وضعها الطبيعي; يُرجَى التحقق مرة أخرى في وقت لاحق!", + "comments-voted-label": "تم التصويت", + "comments-loading": "جارٍ التحميل...", + "comments-auto-refresher-enable": "تمكين المحدث التلقائي للتعليق", + "comments-auto-refresher-pause": "إيقاف مؤقت للمحدث التلقائي للتعليق", + "comments-reply-to": "رد على {{GENDER:$2|$1}}", + "comments-cancel-reply": "إلغاء", + "comments-block-warning-anon": "هل أنت متأكد من أنك تريد تجاهل جميع التعليقات من هذا المستخدم المجهول بشكل دائم (عبر عنوان الآيبي الخاص به)؟", + "comments-block-warning-user": "هل أنت متأكد من أنك تريد تجاهل جميع التعليقات من المستخدم $1 نهائيًا؟", + "comments-delete-warning": "هل أنت متأكد من أنك تريد حذف التعليق؟", + "comments-sort-by-date": "رتب حسب التاريخ", + "comments-sort-by-score": "الترتيب حسب النتيجة", + "comments-show-comment-link": "إظهار التعليق", + "comments-manage-blocklist-link": "إدارة قائمة التجاهل", + "comments-ignore-message": "أنت تتجاهل مؤلف هذا التعليق", + "comments-you": "أنت", + "comments-reply": "رد", + "comments-login-required": "يجب عليك تسجيل الدخول لإضافة تعليق", + "comments-not-allowed": "ليس مسموح لك بأن تنشر تعليقا.", + "comments-post": "إضافة تعليق", + "comments-submit": "إضافة تعليق", + "comments-score-text": "النتيجة", + "comments-permalink": "وصلة دائمة", + "comments-delete-link": "حذف التعليق", + "comments-anon-name": "مستخدم مجهول", + "comments-anon-message": "يرحب {{SITENAME}} بجميع التعليقات، إذا كنت لا تريد أن تكون مجهولا، قم بالتسجيل أو سجل الدخول، إنه مجاني.", + "comments-links-are-forbidden": "الروابط الخارجية في التعليقات ممنوعة!", + "comments-is-spam": "تم تفسير نص التعليقات المقدم على أنه رسالة غير مرغوب فيها.", + "comments-ignore-item": "$2 on $3 (إلغاء المنع)", + "comments-ignore-no-users": "لا يوجد مستخدم حاليا ممنوع.", + "comments-ignore-remove-message": "هل تريد بالتأكيد إلغاء حظر تعليقات المستخدم $1؟", + "comments-ignore-unblock": "رفع المنع", + "comments-ignore-cancel": "إلغاء", + "comments-ignore-title": "قائمة تجاهل التعليقات", + "commentignorelist": "قائمة تجاهل التعليقات", + "log-name-comments": "سجل التعليقات", + "log-description-comments": "هذا هو سجل التعليقات.", + "logentry-comments-add": "$1 نشر 1 تعليقا جديدا على $3", + "logentry-comments-delete": "$1 حذف التعليق #$4 على $3", + "comments-time-ago": "منذ $1", + "comments-time-months": "{{PLURAL:$1||شهر واحد|$1 شهور}}", + "comments-time-days": "{{PLURAL:$1||يوم واحد|$1 أيام}}", + "comments-time-hours": "{{PLURAL:$1|ساعة واحدة|$1 ساعات}}", + "comments-time-minutes": "{{PLURAL:$1|دقيقة واحدة|$1 دقائق}}", + "comments-time-seconds": "{{PLURAL:$1||ثانية واحدة|$1 ثوانٍ}}", + "log-show-hide-comments": "$1 سجل التعليق", + "logeventslist-comments-log": "سجل التعليقات", + "group-commentadmin": "إداريو التعليقات", + "group-commentadmin-member": "{{GENDER:$1|إداري تعليقات|إدارية تعليقات}}", + "grouppage-commentadmin": "{{ns:project}}:إداريو التعليقات", + "action-comment": "تقديم التعليقات", + "right-comment": "تقديم التعليقات", + "action-commentadmin": "إدارة التعليقات التي أرسلها المستخدم", + "right-commentadmin": "إدارة التعليقات التي أرسلها المستخدم", + "action-commentlinks": "استخدام الروابط الخارجية في التعليقات", + "right-commentlinks": "استخدام الروابط الخارجية في التعليقات", + "action-comment-delete-own": "حذف التعليقات الخاصة", + "right-comment-delete-own": "حذف التعليقات الخاصة" +} diff --git a/i18n/ast.json b/i18n/ast.json index 3e835b3..665c9c4 100644 --- a/i18n/ast.json +++ b/i18n/ast.json @@ -4,6 +4,15 @@ "Xuacu" ] }, + "apihelp-commentblock-description": "L'API de commentblock permite bloquiar a un usuariu dende'l comentariu del que s'orixinó después de rellenar los parámetros siguientes: CommentID.", + "apihelp-commentblock-summary": "L'API de commentblock permite bloquiar a un usuariu dende'l comentariu del que s'orixinó después de rellenar los parámetros siguientes: CommentID.", + "apihelp-commentdelete-description": "L'API de commentdelete permite desaniciar un comentariu después de rellenar los parámetros siguientes: CommentID.", + "apihelp-commentdelete-summary": "L'API de commentdelete permite desaniciar un comentariu después de rellenar los parámetros siguientes: CommentID.", + "apihelp-commentlatestid-description": "L'API de commentlatestID permite llograr l'ID del últimu comentariu después de rellenar los parámetros siguientes: pageID.", + "apihelp-commentlatestid-summary": "L'API de commentlatestID permite llograr l'ID del últimu comentariu después de rellenar los parámetros siguientes: pageID.", + "apihelp-commentlist-description": "La API commentlist recupera múltiples comentarios y preséntalos en forma de llista después de rellenar los siguientes parámetros: pageID, order, pagerPage, y showForm.", + "apihelp-commentlist-summary": "La API commentlist recupera múltiples comentarios y preséntalos en forma de llista después de rellenar los siguientes parámetros: pageID, order, pagerPage, y showForm.", + "apihelp-commentsubmit-description": "La API commentsubmit permite unviar/espublizar un comentariu después de rellenar los parametros siguientes: pageID, parentID, commentText.", "comments-comment": "Comentariu", "comments-desc": "Añade l'enganche del analizador <comments> que permite comentar nes páxines", "comments-db-locked": "

Amestar comentarios

Nesti momentu la base de datos ta bloquiada por xeres rutinaries de caltenimientu, depués de les que volverá a la normalidá. Torna más sero.", @@ -22,5 +31,36 @@ "comments-manage-blocklist-link": "Alministrar llista de comentarios inoraos", "comments-ignore-message": "Tas inorando al autor d'esti comentariu", "comments-you": "Tu", - "comments-reply": "Responder" + "comments-reply": "Responder", + "comments-score-text": "Puntuación", + "comments-permalink": "Enllaz permanente", + "comments-delete-link": "Desaniciar comentariu", + "comments-anon-name": "Usuariu anónimu", + "comments-anon-message": "{{SITENAME}} valora tolos comentarios. Si nun quies ser anónimu, rexístrate o anicia sesión. Ye gratis.", + "comments-links-are-forbidden": "Nun se permite poner enllaces esternos nos comentarios", + "comments-is-spam": "El testu del comentariu unviáu interpretóse como spam.", + "comments-ignore-item": "$2 el $3 (desbloquiar)", + "comments-ignore-no-users": "Nun hai nengún usuariu bloquiáu.", + "comments-ignore-remove-message": "¿Tas seguru de que desees desbloquiar los comentarios de $1?", + "comments-ignore-unblock": "Desbloquiar", + "comments-ignore-cancel": "Encaboxar", + "comments-ignore-title": "Llista de comentarios inoraos", + "commentignorelist": "Llista de comentarios inoraos", + "log-name-comments": "Rexistru de comentarios", + "log-description-comments": "Este ye'l rexistru de comentarios.", + "logentry-comments-add": "$1 publicó un comentariu nuevu en $3", + "logentry-comments-delete": "$1 desanició'l comentariu nu $4 en $3", + "comments-time-ago": "hai $1", + "comments-time-months": "{{PLURAL:$1|un mes|$1 meses}}", + "comments-time-days": "{{PLURAL:$1|un día|$1 díes}}", + "comments-time-hours": "{{PLURAL:$1|una hora|$1 hores}}", + "comments-time-minutes": "{{PLURAL:$1|un minutu|$1 minutos}}", + "comments-time-seconds": "{{PLURAL:$1|un segundu|$1 segundos}}", + "log-show-hide-comments": "$1 el rexistru de comentarios", + "group-commentadmin": "Alministradores de comentarios", + "group-commentadmin-member": "{{GENDER:$1|alministrador|alministradora}} de comentarios", + "grouppage-commentadmin": "{{ns:project}}:Alministradores de comentarios", + "right-comment": "Unviar comentarios", + "right-commentadmin": "Alministrar los comentarios unviaos polos usuarios", + "right-commentlinks": "Usar enllaces esternos en comentarios" } diff --git a/i18n/bcl.json b/i18n/bcl.json index 4b7c977..00f7593 100644 --- a/i18n/bcl.json +++ b/i18n/bcl.json @@ -39,7 +39,6 @@ "comments-ignore-cancel": "Kanselaron", "comments-ignore-title": "Listahan kan pinabayaang komento", "commentignorelist": "Listahan kan pinabayaang komento", - "comments-no-comments-of-day": "Mayo nin mga komento kan aldaw.", "log-name-comments": "Talaan nin mga komento", "log-description-comments": "Ini sarong talaan nin mga komento.", "logentry-comments-add": "$1 nagpaskil nin sarong baguhong komento kan $3", diff --git a/i18n/be-tarask.json b/i18n/be-tarask.json index 2620df0..c117d68 100644 --- a/i18n/be-tarask.json +++ b/i18n/be-tarask.json @@ -41,7 +41,6 @@ "comments-ignore-cancel": "Скасаваць", "comments-ignore-title": "Сьпіс ігнараваных камэнтатараў", "commentignorelist": "Сьпіс ігнараваных камэнтатараў", - "comments-no-comments-of-day": "Сёньня лепшых камэнтараў дня няма.", "log-name-comments": "Журнал камэнтараў", "log-description-comments": "Гэта журнал камэнтараў.", "comments-time-ago": "$1 таму", diff --git a/i18n/bg.json b/i18n/bg.json index 93799a5..2fcf477 100644 --- a/i18n/bg.json +++ b/i18n/bg.json @@ -2,14 +2,34 @@ "@metadata": { "authors": [ "පසිඳු කාවින්ද", - "DCLXVI" + "DCLXVI", + "StanProg", + "Vlad5250" ] }, + "apihelp-commentblock-description": "Приложението за блокиране коментари позволява блокиране на потребител от коментиране след като попълните следните параметри: CommentID.", + "apihelp-commentblock-summary": "Приложението за блокиране коментари позволява блокиране на потребител от коментиране след като попълните следните параметри: CommentID.", + "apihelp-commentdelete-description": "Приложението за изтриване коментари позволява изтриване на коментар след като попълните следните параметри: CommentID.", + "apihelp-commentdelete-summary": "Приложението за изтриване коментари позволява изтриване на коментар след като попълните следните параметри: CommentID.", + "apihelp-commentlatestid-description": "Приложението за идентификатори на най-нови коментари позволява получаване на идентификатори на най-новите коментари след като попълните следните параметри: pageID.", + "apihelp-commentlatestid-summary": "Приложението за идентификатори на най-нови коментари позволява получаване на идентификатори на най-новите коментари след като попълните следните параметри: pageID.", + "apihelp-commentlist-description": "Приложението за списък на коментари за получаване на повече коментари; дава ги в извод в облик на списък, след като попълните следните параметри: pageID, order, pagerPage и showForm.", + "apihelp-commentlist-summary": "Приложението за списък на коментари за получаване на повече коментари; дава ги в извод в облик на списък, след като попълните следните параметри: pageID, order, pagerPage и showForm.", + "apihelp-commentsubmit-description": "Приложението за изпращане коментари позволява изпращане/публикуване на коментар след като попълните следните параметри: pageID, parentID, commentText.", + "apihelp-commentsubmit-summary": "Приложението за изпращане коментари позволява изпращане/публикуване на коментар след като попълните следните параметри: pageID, parentID, commentText.", + "apihelp-commentvote-description": "Приложението за гласуване на коментари позволява гласуване за коментар след като попълните следните параметри: commentID, voteValue.", + "apihelp-commentvote-summary": "Приложението за гласуване на коментари позволява гласуване за коментар след като попълните следните параметри: commentID, voteValue.", "comments-comment": "Коментар", "comments-loading": "Зареждане...", - "comments-cancel-reply": "Отказване", + "comments-cancel-reply": "Отказ", + "comments-sort-by-date": "Сортиране по дата", "comments-you": "Вие", "comments-reply": "Отговор", "comments-score-text": "Точки", - "comments-ignore-cancel": "Отказване" + "comments-ignore-unblock": "Отблокиране", + "comments-ignore-cancel": "Отказ", + "right-comment": "Изпращане на коментари", + "right-commentadmin": "Управление на потребителски коментари", + "right-commentlinks": "Използване на външни препратки в коментарите", + "right-comment-delete-own": "Изтриване на собствени коментари" } diff --git a/i18n/bn.json b/i18n/bn.json index 8b32e02..1ae7d77 100644 --- a/i18n/bn.json +++ b/i18n/bn.json @@ -3,7 +3,8 @@ "authors": [ "Bellayet", "Aftab1995", - "Aftabuzzaman" + "Aftabuzzaman", + "আফতাবুজ্জামান" ] }, "comments-comment": "মন্তব্য", @@ -15,5 +16,6 @@ "comments-reply": "উত্তর", "comments-score-text": "স্কোর", "comments-ignore-cancel": "বাতিল", - "comments-time-ago": "$1 আগে" + "comments-time-ago": "$1 আগে", + "logeventslist-comments-log": "মন্তব্যের লগ" } diff --git a/i18n/ca.json b/i18n/ca.json index 2bd36f6..c48a024 100644 --- a/i18n/ca.json +++ b/i18n/ca.json @@ -7,11 +7,14 @@ "Ssola" ] }, + "apihelp-commentlist-param-showForm": "Mostra el formulari de comentaris", + "apihelp-commentsubmit-param-commentText": "Text del comentari", "comments-comment": "Comentari", "comments-voted-label": "Votat", - "comments-loading": "Carregant...", - "comments-reply-to": "Respon a", + "comments-loading": "S’està carregant…", + "comments-reply-to": "Respon a {{GENDER:$2|$1}}", "comments-cancel-reply": "Cancel·la", + "comments-block-warning-user": "Segur que voleu ignorar permanentment tots els comentaris de {{GENDER:$1|l’usuari|la usuària}} $1?", "comments-delete-warning": "Segur que voleu suprimir aquest comentari?", "comments-sort-by-date": "Ordena per data", "comments-sort-by-score": "Ordena per puntuació", @@ -33,15 +36,17 @@ "comments-ignore-cancel": "Cancel·la", "comments-ignore-title": "Llista d'ignorats dels comentaris", "commentignorelist": "Llista d'ignorats dels comentaris", - "comments-no-comments-of-day": "No hi ha cap comentari del dia.", "log-name-comments": "Registre de comentaris", "log-description-comments": "Això és un registre de comentaris.", "comments-time-ago": "fa $1", + "comments-time-months": "{{PLURAL:$1|1 mes|$1 mesos}}", "comments-time-days": "{{PLURAL:$1|un dia|$1 dies}}", "comments-time-hours": "{{PLURAL:$1|una hora|$1 hores}}", "comments-time-minutes": "{{PLURAL:$1|un minut|$1 minuts}}", "comments-time-seconds": "{{PLURAL:$1|un segon|$1 segons}}", "log-show-hide-comments": "Registre de comentaris de $1", + "logeventslist-comments-log": "Registre de comentaris", "group-commentadmin": "Administradors de comentaris", - "group-commentadmin-member": "{{GENDER:$1|adminsitrador|administradora}} de comentaris" + "group-commentadmin-member": "{{GENDER:$1|adminsitrador|administradora}} de comentaris", + "grouppage-commentadmin": "{{ns:project}}:Administradors de comentaris" } diff --git a/i18n/ce.json b/i18n/ce.json index 5a4b7ff..bd66e31 100644 --- a/i18n/ce.json +++ b/i18n/ce.json @@ -4,7 +4,7 @@ "Умар" ] }, - "comments-comment": "Къамел", + "comments-comment": "Коммент", "comments-voted-label": "Кхаж тесна", "comments-loading": "Чуйолуш…", "comments-auto-refresher-enable": "Латаде комментареш автоматически карладахар", @@ -14,9 +14,10 @@ "comments-sort-by-date": "Терхаца нисъе", "comments-you": "Хьо", "comments-reply": "Жоп далар", - "comments-post": "Дита къамел", - "comments-submit": "ТӀетоха хьай къамел", + "comments-post": "Йита коммент", + "comments-submit": "ТӀетоха хьай коммент", "comments-score-text": "Мах хадор", + "comments-permalink": "Цахийцалун хьажорг", "comments-ignore-cancel": "Цаоьшу", "comments-time-ago": "$1 юха", "comments-time-months": "{{PLURAL:$1|цхьа бутт|$1 беттанаш}}", diff --git a/i18n/cy.json b/i18n/cy.json index ae80378..198065d 100644 --- a/i18n/cy.json +++ b/i18n/cy.json @@ -12,5 +12,6 @@ "comments-cancel-reply": "Diddymu", "comments-delete-warning": "Ydych chi'n siwr eich bod am ddileu'r sylw hwn?", "comments-sort-by-date": "Trefnu yn ôl dyddiad", - "comments-reply": "Ateb" + "comments-reply": "Ateb", + "comments-score-text": "Sgor" } diff --git a/i18n/da.json b/i18n/da.json index 61c1556..36f55fb 100644 --- a/i18n/da.json +++ b/i18n/da.json @@ -2,7 +2,8 @@ "@metadata": { "authors": [ "Tjernobyl", - "Sarrus" + "Sarrus", + "Saederup92" ] }, "comments-comment": "Kommentar", @@ -17,5 +18,10 @@ "comments-permalink": "Permanent henvisning", "comments-delete-link": "Slet kommentar", "comments-anon-name": "Anonym bruger", - "comments-ignore-cancel": "Annuller" + "comments-ignore-cancel": "Annuller", + "comments-time-days": "{{PLURAL:$1|en dag|$1 dage}}", + "comments-time-hours": "{{PLURAL:$1|en time|$1 timer}}", + "comments-time-minutes": "{{PLURAL:$1|et minut|$1 minutter}}", + "comments-time-seconds": "{{PLURAL:$1|et sekund|$1 sekunder}}", + "action-comment": "Indsend kommentarer" } diff --git a/i18n/de.json b/i18n/de.json index 6d247b0..6e1f777 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -7,10 +7,26 @@ "Geitost" ] }, + "apihelp-commentblock-description": "Die commentblock-API erlaubt das Sperren eines Benutzers, von dem der Kommentar stammt, nach dem Ausfüllen der folgenden Parameter: CommentID.", + "apihelp-commentblock-summary": "Die commentblock-API erlaubt das Sperren eines Benutzers, von dem der Kommentar stammt, nach dem Ausfüllen der folgenden Parameter: CommentID.", + "apihelp-commentdelete-description": "Die commentdelete-API erlaubt das Löschen eines Kommentars nach dem Ausfüllen der folgenden Parameter: CommentID.", + "apihelp-commentdelete-summary": "Die commentdelete-API erlaubt das Löschen eines Kommentars nach dem Ausfüllen der folgenden Parameter: CommentID.", + "apihelp-commentlatestid-description": "Die commentlatestID-API erlaubt das Abrufen der aktuellen Kommentarkennung nach dem Ausfüllen der folgenden Parameter: pageID", + "apihelp-commentlatestid-summary": "Die commentlatestID-API erlaubt das Abrufen der aktuellen Kommentarkennung nach dem Ausfüllen der folgenden Parameter: pageID", + "apihelp-commentlist-description": "Die commentlist-API ruft mehrere Kommentare ab und gibt sie als Liste aus nach dem Ausfüllen der folgenden Parameter: pageID, order, pagerPage und showForm.", + "apihelp-commentlist-summary": "Die commentlist-API ruft mehrere Kommentare ab und gibt sie als Liste aus nach dem Ausfüllen der folgenden Parameter: pageID, order, pagerPage und showForm.", + "apihelp-commentblock-param-commentID": "Kennung des Kommentars des Benutzers, der gesperrt werden soll.", + "apihelp-commentdelete-param-commentID": "Kennung des Kommentars, der gelöscht werden soll.", + "apihelp-commentlatestid-param-pageID": "Kennung der Seite, auf der sich der letzte Kommentar befindet.", + "apihelp-commentlist-param-pageID": "Kennung der Seite, von der die Kommentarliste abgerufen wird.", + "apihelp-commentlist-param-order": "Definiert, ob die Kommentarliste in auf- oder absteigender Reihenfolge ist.", "apihelp-commentlist-param-pagerPage": "Kommentarseitenzahl", "apihelp-commentlist-param-showForm": "Zeigt das Kommentarformular", + "apihelp-commentsubmit-param-pageID": "Kennung der Seite, für die der Kommentar eingereicht werden soll.", "apihelp-commentsubmit-param-parentID": "Kommentarkennung des übergeordneten Kommentars", "apihelp-commentsubmit-param-commentText": "Kommentartext", + "apihelp-commentvote-param-commentID": "Kennung des Kommentars, für den abgestimmt wurde.", + "apihelp-commentvote-param-voteValue": "Abstimmungswert für den Kommentar", "comments-comment": "Kommentar", "comments-desc": "Ergänzt die Parsererweiterung <comments> zum Kommentieren von Seiten", "comments-db-locked": "

Hinzufügen von Kommentaren

Die Datenbank ist momentan aufgrund routinemäßiger Wartungsarbeiten für den Schreibzugriff gesperrt. Bitte probiere es später noch einmal.", @@ -38,7 +54,7 @@ "comments-permalink": "Permanentlink", "comments-delete-link": "Kommentar löschen", "comments-anon-name": "Anonymer Benutzer", - "comments-anon-message": "{{SITENAME}} freut sich über alle Kommentare. Sofern du nicht anonym bleiben möchtest, trage deinen Namen oder deine Email-Adresse ein oder melde dich an. Du kannst das Feld auch einfach leer lassen.", + "comments-anon-message": "{{SITENAME}} freut sich über alle Kommentare. Sofern du nicht anonym bleiben möchtest, registriere dich bitte oder melde dich an.", "comments-links-are-forbidden": "Weblinks sind in Kommentaren verboten!", "comments-is-spam": "Der eingegebene Kommentartext wurde als Spam interpretiert.", "comments-ignore-item": "$2 am $3 (freigeben)", @@ -48,7 +64,6 @@ "comments-ignore-cancel": "Abbrechen", "comments-ignore-title": "Ignorierliste zu Kommentaren", "commentignorelist": "Ignorierliste zu Kommentaren", - "comments-no-comments-of-day": "Es gibt keinen Kommentar des Tages.", "log-name-comments": "Kommentar-Logbuch", "log-description-comments": "Dies ist ein Logbuch von Kommentaren.", "logentry-comments-add": "$1 hinterließ einen neuen Kommentar auf $3", @@ -60,10 +75,16 @@ "comments-time-minutes": "{{PLURAL:$1|einer Minute|$1 Minuten}}", "comments-time-seconds": "{{PLURAL:$1|einer Sekunde|$1 Sekunden}}", "log-show-hide-comments": "Kommentar-Logbuch $1", + "logeventslist-comments-log": "Kommentar-Logbuch", "group-commentadmin": "Kommentaradministratoren", "group-commentadmin-member": "{{GENDER:$1|Kommentaradministrator|Kommentaradministratorin}}", "grouppage-commentadmin": "{{ns:project}}:Kommentaradministratoren", + "action-comment": "Kommentare abzugeben", "right-comment": "Kommentar abgeben", + "action-commentadmin": "Benutzerkommentare zu verwalten", "right-commentadmin": "Benutzerkommentare verwalten", - "right-commentlinks": "Weblinks in Kommentaren verwenden" + "action-commentlinks": "Weblinks in Kommentaren zu verwenden", + "right-commentlinks": "Weblinks in Kommentaren verwenden", + "action-comment-delete-own": "eigene Kommentare zu löschen", + "right-comment-delete-own": "Eigene Kommentare löschen" } diff --git a/i18n/diq.json b/i18n/diq.json index 7a241b7..f3d8a40 100644 --- a/i18n/diq.json +++ b/i18n/diq.json @@ -20,11 +20,13 @@ "comments-post": "Mışewre bırışe", "comments-submit": "Vatışa xo dekere de", "comments-score-text": "Skor", - "comments-permalink": "Greyo Daimi", + "comments-permalink": "Gıreyo daimi", "comments-delete-link": "Vatışi bestere", "comments-anon-name": "Karbero bêname", - "comments-ignore-unblock": "bloqi hewad", + "comments-ignore-unblock": "Ake", "comments-ignore-cancel": "Bıtexelne", "log-name-comments": "Qeyda vatışan", - "comments-time-ago": "Verdê $1" + "comments-time-ago": "Verdê $1", + "comments-time-days": "{{PLURAL:$1|yew roce|$1 roci}}", + "comments-time-hours": "{{PLURAL:$1|yew saete|$1 saeti}}" } diff --git a/i18n/dsb.json b/i18n/dsb.json index 2a57da8..39d1f60 100644 --- a/i18n/dsb.json +++ b/i18n/dsb.json @@ -41,7 +41,6 @@ "comments-ignore-cancel": "Pśetergnuś", "comments-ignore-title": "Ignorěrowańska lisćina komentarow", "commentignorelist": "Ignorěrowańska lisćina komentarow", - "comments-no-comments-of-day": "Njedaju komentary dnja.", "log-name-comments": "Komentarowy protokol", "log-description-comments": "To jo komentarowy protokol.", "logentry-comments-add": "$1 jo nowy komentar na $3 zawóstajił", diff --git a/i18n/el.json b/i18n/el.json index fe5772c..ffdbd1e 100644 --- a/i18n/el.json +++ b/i18n/el.json @@ -3,7 +3,8 @@ "authors": [ "Glavkos", "ZaDiak", - "Protnet" + "Protnet", + "Nikosgranturismogt" ] }, "comments-comment": "Σχόλιο", @@ -36,6 +37,7 @@ "comments-time-minutes": "{{PLURAL:$1|ένα λεπτό|$1 λεπτά}}", "comments-time-seconds": "{{PLURAL:$1|ένα δευτερόλεπτο|$1 δευτερόλεπτα}}", "log-show-hide-comments": "$1 αρχείο καταγραφής σχολίων", + "logeventslist-comments-log": "Αρχείο καταγραφής σχολίων", "group-commentadmin": "Διαχειριστές σχολίων", "group-commentadmin-member": "{{GENDER:$1|διαχειριστής σχολίων|διαχειρίστρια σχολίων}}", "grouppage-commentadmin": "{{ns:project}}:Διαχειριστές σχολίων", diff --git a/i18n/en.json b/i18n/en.json index 78e4940..54e52f0 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -66,7 +66,6 @@ "comments-ignore-cancel": "Cancel", "comments-ignore-title": "Comment ignore list", "commentignorelist": "Comment ignore list", - "comments-no-comments-of-day": "There are no comments of the day.", "log-name-comments": "Comments log", "log-description-comments": "This is a log of comments.", "logentry-comments-add": "$1 posted a new comment on $3", @@ -78,10 +77,16 @@ "comments-time-minutes": "{{PLURAL:$1|one minute|$1 minutes}}", "comments-time-seconds": "{{PLURAL:$1|one second|$1 seconds}}", "log-show-hide-comments": "$1 comment log", + "logeventslist-comments-log": "Comment log", "group-commentadmin": "Comment administrators", "group-commentadmin-member": "{{GENDER:$1|comment administrator}}", "grouppage-commentadmin": "{{ns:project}}:Comment administrators", + "action-comment": "submit comments", "right-comment": "Submit comments", + "action-commentadmin": "administrate user-submitted comments", "right-commentadmin": "Administrate user-submitted comments", - "right-commentlinks": "Use external links in comments" + "action-commentlinks": "use external links in comments", + "right-commentlinks": "Use external links in comments", + "action-comment-delete-own": "delete own comments", + "right-comment-delete-own": "Delete own comments" } diff --git a/i18n/eo.json b/i18n/eo.json index 70e229e..944671f 100644 --- a/i18n/eo.json +++ b/i18n/eo.json @@ -30,7 +30,6 @@ "comments-ignore-cancel": "Nuligi", "comments-ignore-title": "Ignor-listo de komentoj", "commentignorelist": "Ignor-listo de komentoj", - "comments-no-comments-of-day": "Estas neniuj komentoj de la tago.", "log-name-comments": "Protokolo pri komentoj", "log-description-comments": "Jen protokolo de komentoj.", "comments-time-ago": "antaŭ $1", diff --git a/i18n/es.json b/i18n/es.json index 8675d84..ea105f6 100644 --- a/i18n/es.json +++ b/i18n/es.json @@ -16,8 +16,13 @@ }, "apihelp-commentvote-description": "La API commentvote permite votar un comentario tras proporcionar los parámetros siguientes: commentID, voteValue.", "apihelp-commentblock-param-commentID": "Identificador del comentario del usuario que se bloqueará", + "apihelp-commentdelete-param-commentID": "Identificador del comentario que se eliminará", + "apihelp-commentlatestid-param-pageID": "Identificador de la página donde está el comentario más reciente", + "apihelp-commentlist-param-pageID": "Identificador de la página desde la cual se recupera la lista de comentarios", "apihelp-commentlist-param-pagerPage": "Número de la página de comentarios", "apihelp-commentlist-param-showForm": "Mostrar el formulario de comentarios", + "apihelp-commentsubmit-param-parentID": "Identificador del comentario padre", + "apihelp-commentsubmit-param-commentText": "Texto del comentario", "comments-comment": "Comentario", "comments-desc": "Añade el asociador analítico <comments> que permite hacer comentarios en las páginas", "comments-db-locked": "

Agregar comentarios

En este momento la base de datos está bloqueada por tareas rutinarias de mantenimiento, luego de los cuales volverá a la normalidad. Regresa más tarde.", @@ -28,8 +33,8 @@ "comments-reply-to": "Responder a {{GENDER:$2|$1}}", "comments-cancel-reply": "Cancelar", "comments-block-warning-anon": "¿Estás seguro que deseas ignorar permanentemente todos los comentarios de este usuario anónimo (a través de su dirección IP)?", - "comments-block-warning-user": "¿Estás seguro de que deseas ignorar permanentemente todos los comentarios {{GENDER:$1|del usuario|de la usuaria}} $1?", - "comments-delete-warning": "¿Estás seguro de que quieres eliminar este comentario?", + "comments-block-warning-user": "¿Confirmas que quieres ignorar permanentemente todos los comentarios {{GENDER:$1|del usuario|de la usuaria}} $1?", + "comments-delete-warning": "¿Confirmas que quieres borrar este comentario?", "comments-sort-by-date": "Ordenar por fecha", "comments-sort-by-score": "Ordenar por valoración", "comments-show-comment-link": "Mostrar comentario", @@ -50,12 +55,11 @@ "comments-is-spam": "El texto enviado en el comentario ha sido interpretado como spam.", "comments-ignore-item": "$2 el $3 (desbloquear)", "comments-ignore-no-users": "No hay ningún usuario bloqueado.", - "comments-ignore-remove-message": "¿Estás seguro de que deseas desbloquear los comentarios de $1?", + "comments-ignore-remove-message": "¿Confirmas que quieres desbloquear los comentarios de $1?", "comments-ignore-unblock": "Desbloquear", "comments-ignore-cancel": "Cancelar", "comments-ignore-title": "Lista de comentarios ignorados", "commentignorelist": "Lista de comentarios ignorados", - "comments-no-comments-of-day": "No hay ningún comentario del día.", "log-name-comments": "Registro de comentarios", "log-description-comments": "Este es un registro de los comentarios.", "logentry-comments-add": "$1 publicó un comentario nuevo en $3", @@ -67,6 +71,7 @@ "comments-time-minutes": "{{PLURAL:$1|un minuto|$1 minutos}}", "comments-time-seconds": "{{PLURAL:$1|un segundo|$1 segundos}}", "log-show-hide-comments": "$1 registro de comentarios", + "logeventslist-comments-log": "Registro de comentarios", "group-commentadmin": "Administradores de comentarios", "group-commentadmin-member": "{{GENDER:$1|administrador de comentarios|administradora de comentarios|administrador de comentarios}}", "grouppage-commentadmin": "{{ns:project}}:Administradores de comentarios", diff --git a/i18n/et.json b/i18n/et.json index eddcae6..4419dc2 100644 --- a/i18n/et.json +++ b/i18n/et.json @@ -31,7 +31,6 @@ "comments-ignore-cancel": "Loobu", "comments-ignore-title": "Kommentaaride eiramisloend", "commentignorelist": "Kommentaaride eiramisloend", - "comments-no-comments-of-day": "Päevakommentaarid puuduvad.", "log-name-comments": "Kommentaarilogi", "log-description-comments": "See on kommentaaride logi.", "comments-time-ago": "$1 tagasi", diff --git a/i18n/fa.json b/i18n/fa.json index cc355c3..af973ed 100644 --- a/i18n/fa.json +++ b/i18n/fa.json @@ -50,7 +50,6 @@ "comments-ignore-cancel": "لغو", "comments-ignore-title": "فهرست نظرات نادیده گرفته شده", "commentignorelist": "فهرست نظرات نادیده گرفته شده", - "comments-no-comments-of-day": "هیچ نظری از روز وجود ندارد.", "log-name-comments": "سیاههٔ نظرات", "log-description-comments": "این یک سیاههٔ نظرات است.", "logentry-comments-add": "$1 نظری تازه در صفحهٔ $3 ارسال کرد", diff --git a/i18n/fi.json b/i18n/fi.json index 34b8778..38670cb 100644 --- a/i18n/fi.json +++ b/i18n/fi.json @@ -2,7 +2,7 @@ "@metadata": { "authors": [ "Crt", - "Jack Phoenix ", + "Jack Phoenix", "Nedergard", "Nike", "Pxos" @@ -42,7 +42,6 @@ "comments-ignore-cancel": "Peruuta", "comments-ignore-title": "Kommenttien huomioimattomuuslista", "commentignorelist": "Kommenttien huomioimattomuuslista", - "comments-no-comments-of-day": "Ei päivän kommentteja.", "log-name-comments": "Kommenttiloki", "log-description-comments": "Tämä on loki kommenteista.", "comments-time-ago": "$1 sitten", diff --git a/i18n/fr.json b/i18n/fr.json index f7ba27b..5dcc69f 100644 --- a/i18n/fr.json +++ b/i18n/fr.json @@ -8,7 +8,8 @@ "Tuxxic", "Mattho69", "Wladek92", - "Urhixidur" + "Urhixidur", + "Fitoschido" ] }, "apihelp-commentblock-description": "L'API commentblock permet de bloquer un utilisateur à partir du commentaire dont elle est issue en fournissant les paramètres suivants: CommentID.", @@ -19,7 +20,7 @@ "apihelp-commentlatestid-summary": "L’API commentlatestID permet de récupérer le dernier ID de commentaire après avoir saisi les paramètres suivants : pageID", "apihelp-commentlist-description": "L'API commentlist recherche les commentaires multiples et les affiche sous forme de liste après avoir fourni les paramètres suivants: pageID, order, pagerPage, and showForm.", "apihelp-commentlist-summary": "L’API commentlist récupère de multiples commentaires et les ressort sous forme d’une liste, après avoir saisi les paramètres suivants : pageID, order, pagerPage, et showForm.", - "apihelp-commentsubmit-description": "L'API commentsubmit permet de soumettre/poster un commentaire après avoir fourni les paramètres suivants: pageID, parentID, commentText.", + "apihelp-commentsubmit-description": "L’API commentsubmit permet de soumettre/publier un commentaire après avoir fourni les paramètres suivants : pageID, parentID, commentText.", "apihelp-commentsubmit-summary": "L’API commentsubmit permet de soumettre/publier un commentaire après avoir saisi les paramètres suivants : pageID, parentID, commentText.", "apihelp-commentvote-description": "L'API commentvote permet de voter pour un commentaire après avoir fourni les paramètres suivants: commentID, voteValue.", "apihelp-commentvote-summary": "L’API commentvote permet de voter sur un commentaire après avoir saisi les paramètres suivants : commentID, voteValue.", @@ -45,7 +46,7 @@ "comments-reply-to": "Répondre à {{GENDER:$2|$1}}", "comments-cancel-reply": "Annuler", "comments-block-warning-anon": "Êtes-vous sûr de vouloir ignorer de façon permanente tous les commentaires de cet utilisateur anonyme (via son adresse IP)?", - "comments-block-warning-user": "Êtes-vous sûr de vouloir ignorer de façon permanente tous les commentaires de l’utilisateur $1?", + "comments-block-warning-user": "Êtes-vous sûr de vouloir ignorer de façon permanente tous les commentaires de l’{{GENDER:$1|utilisateur|utilisatrice}} $1?", "comments-delete-warning": "Êtes-vous sûr de vouloir supprimer ce commentaire?", "comments-sort-by-date": "Trier par date", "comments-sort-by-score": "Trier par pointage", @@ -72,7 +73,6 @@ "comments-ignore-cancel": "Annuler", "comments-ignore-title": "Liste des utilisateurs ignorés", "commentignorelist": "Liste des utilisateurs dont les commentaires sont ignorés", - "comments-no-comments-of-day": "Il n’y a pas de commentaire du jour.", "log-name-comments": "Historique des commentaires", "log-description-comments": "Ceci est un journal de commentaires.", "logentry-comments-add": "$1 a publié un nouveau commentaire sur $3", @@ -84,10 +84,16 @@ "comments-time-minutes": "{{PLURAL:$1|une minute|$1 minutes}}", "comments-time-seconds": "{{PLURAL:$1|une seconde|$1 seconds}}", "log-show-hide-comments": "$1 le journal des commentaires", + "logeventslist-comments-log": "Journal des commentaires", "group-commentadmin": "Administrateurs de commentaires", "group-commentadmin-member": "{{GENDER:$1|administrateur de commentaires|administratrice de commentaires}}", "grouppage-commentadmin": "{{ns:project}}:Administrateurs de commentaires", + "action-comment": "soumettre les commentaires", "right-comment": "Publier les commentaires", + "action-commentadmin": "administrer les commentaires soumis par l’utilisateur", "right-commentadmin": "Administrer les commentaires soumis par les utilisateurs", - "right-commentlinks": "Utiliser les liens externes dans les commentaires" + "action-commentlinks": "utiliser des liens externes dans les commentaires", + "right-commentlinks": "Utiliser les liens externes dans les commentaires", + "action-comment-delete-own": "supprimer vos propres commentaires", + "right-comment-delete-own": "Supprimer vos propres commentaires" } diff --git a/i18n/frp.json b/i18n/frp.json index 67fe389..daafe07 100644 --- a/i18n/frp.json +++ b/i18n/frp.json @@ -25,7 +25,6 @@ "comments-ignore-remove-message": "Voléd-vos franc dèblocar los comentèros de l’utilisator $1 ?", "comments-ignore-unblock": "Dèblocar", "comments-ignore-cancel": "Anular", - "comments-no-comments-of-day": "Y at gins de comentèro du jorn.", "log-name-comments": "Jornal des comentèros", "log-description-comments": "O est un jornal de comentèros.", "comments-time-ago": "cen fât $1", diff --git a/i18n/fy.json b/i18n/fy.json index a0aa934..9da6ebe 100644 --- a/i18n/fy.json +++ b/i18n/fy.json @@ -2,7 +2,8 @@ "@metadata": { "authors": [ "Kening Aldgilles", - "Robin0van0der0vliet" + "Robin0van0der0vliet", + "Robin van der Vliet" ] }, "comments-cancel-reply": "Annulearje", diff --git a/i18n/gl.json b/i18n/gl.json index dcaaf80..ff97859 100644 --- a/i18n/gl.json +++ b/i18n/gl.json @@ -9,7 +9,7 @@ "apihelp-commentblock-param-commentID": "Identificador do comentario do usuario que vai ser bloqueado", "apihelp-commentdelete-param-commentID": "Identificador (ID) do comentario a borrar", "apihelp-commentlist-param-pagerPage": "Número da páxina de comentarios", - "apihelp-commentlist-param-showForm": "Mostrar o formulario de comentarios", + "apihelp-commentlist-param-showForm": "Amosar o formulario de comentarios", "apihelp-commentsubmit-param-pageID": "Identificador (ID) da páxina na que se fai o comentario", "apihelp-commentsubmit-param-parentID": "Identificador (ID) do comentario pai", "apihelp-commentsubmit-param-commentText": "Texto do comentario", @@ -28,7 +28,7 @@ "comments-delete-warning": "Estás seguro de querer borrar este comentario?", "comments-sort-by-date": "Ordenar por data", "comments-sort-by-score": "Ordenar por puntuación", - "comments-show-comment-link": "Mostrar o comentario", + "comments-show-comment-link": "Amosar comentario", "comments-manage-blocklist-link": "Administrar a lista de ignorados", "comments-ignore-message": "Está ignorando o autor deste comentario", "comments-you": " Vostede", @@ -51,7 +51,6 @@ "comments-ignore-cancel": "Cancelar", "comments-ignore-title": "Lista de comentarios ignorados", "commentignorelist": "Lista de comentarios ignorados", - "comments-no-comments-of-day": "Non hai ningún comentario do día.", "log-name-comments": "Rexistro de comentarios", "log-description-comments": "Este é un rexistro de comentarios.", "logentry-comments-add": "$1 deixou un novo comentario en \"$3\"", diff --git a/i18n/he.json b/i18n/he.json index 936550f..c30e767 100644 --- a/i18n/he.json +++ b/i18n/he.json @@ -8,31 +8,56 @@ "Guycn2" ] }, + "apihelp-commentblock-description": "באמצעות ה־API‏ \"commentblock\" ניתן לחסום משתמש מתגובה. יש למלא את הפרמטר CommentID.", + "apihelp-commentblock-summary": "באמצעות ה־API‏ \"commentblock\" ניתן לחסום משתמש מתגובה. יש למלא את הפרמטר CommentID.", + "apihelp-commentdelete-description": "באמצעות ה־API‏ \"commentdelete\" ניתן למחוק תגובה. יש למלא את הפרמטר CommentID.", + "apihelp-commentdelete-summary": "באמצעות ה־API‏ \"commentdelete\" ניתן למחוק תגובה. יש למלא את הפרמטר CommentID.", + "apihelp-commentlatestid-description": "באמצעות ה־API‏ \"commentlatestID\" ניתן לשלוף את המזהה של התגובה האחרונה. יש למלא את הפרמטר pageID.", + "apihelp-commentlatestid-summary": "באמצעות ה־API‏ \"commentlatestID\" ניתן לשלוף את המזהה של התגובה האחרונה. יש למלא את הפרמטר pageID.", + "apihelp-commentlist-description": "באמצעות ה־API‏ \"commentlist\" ניתן לשלוף תגובות מרובות ולהציג אותן כרשימה. יש למלא את הפרמטרים הבאים: pageID‏, order‏, pagerPage‏, showForm.", + "apihelp-commentlist-summary": "באמצעות ה־API‏ \"commentlist\" ניתן לשלוף תגובות מרובות ולהציג אותן כרשימה. יש למלא את הפרמטרים הבאים: pageID‏, order‏, pagerPage‏, showForm.", + "apihelp-commentsubmit-description": "באמצעות ה־API‏ \"commentsubmit\" ניתן לשלוח או לפרסם תגובה. יש למלא את הפרמטרים הבאים: pageID‏, parentID‏, commentText.", + "apihelp-commentsubmit-summary": "באמצעות ה־API‏ \"commentsubmit\" ניתן לשלוח או לפרסם תגובה. יש למלא את הפרמטרים הבאים: pageID‏, parentID‏, commentText.", + "apihelp-commentvote-description": "באמצעות ה־API‏ \"commentvote\" ניתן להצביע על תגובה. יש למלא את הפרמטרים הבאים: commentID‏, voteValue.", + "apihelp-commentvote-summary": "באמצעות ה־API‏ \"commentvote\" ניתן להצביע על תגובה. יש למלא את הפרמטרים הבאים: commentID‏, voteValue.", + "apihelp-commentblock-param-commentID": "מזהה התגובה שנכתבה על־ידי המשתמש שייחסם", + "apihelp-commentdelete-param-commentID": "מזהה התגובה שתימחק", + "apihelp-commentlatestid-param-pageID": "מזהה הדף שבו נמצאת התגובה האחרונה", + "apihelp-commentlist-param-pageID": "מזהה הדף שממנו תישלף רשימת התגובות", + "apihelp-commentlist-param-order": "קביעה האם רשימת התגובות מוצגת בסדר עולה או יורד", + "apihelp-commentlist-param-pagerPage": "מספר דף התגובות", + "apihelp-commentlist-param-showForm": "הצגת תגובות מאת", + "apihelp-commentsubmit-param-pageID": "מזהה הדף שאליו תישלח התגובה", + "apihelp-commentsubmit-param-parentID": "מזהה התגובה ההורה", + "apihelp-commentsubmit-param-commentText": "טקסט התגובה", + "apihelp-commentvote-param-commentID": "מזהה התגובה שעליה תבוצע ההצבעה", + "apihelp-commentvote-param-voteValue": "ערך ההצבעה עבור התגובה", "comments-comment": "תגובה", - "comments-db-locked": "

הוספת הערות

מסד הנתונים נעול כעת עקב תחזוקה שגרתית במסד הנתונים, לאחר מכן האתר ישוב לקדמותו. אנא בדוק שנית במועד מאוחר יותר!", - "comments-voted-label": "הצבעה", - "comments-loading": "טוען...", - "comments-auto-refresher-enable": "אפשר רענון אוטומטי של תגובה", - "comments-auto-refresher-pause": "מנע רענון אוטומטי של תגובה", - "comments-reply-to": "להשיב ל{{GENDER:$2|$1}}", + "comments-desc": "הוספת התג <comments> המאפשר להגיב על דפים", + "comments-db-locked": "

הוספת תגובות

בסיס הנתונים נעול כעת עקב תחזוקה שגרתית, שאחריה האתר ישוב לקדמותו. נא לבדוק שוב מאוחר יותר!", + "comments-voted-label": "הצבעת", + "comments-loading": "בטעינה...", + "comments-auto-refresher-enable": "הפעלת רענון אוטומטי של התגובות", + "comments-auto-refresher-pause": "הפסקת הרענון האוטומטי של התגובות", + "comments-reply-to": "תשובה אל {{GENDER:$2|$1}}", "comments-cancel-reply": "ביטול", - "comments-block-warning-anon": "האם ברצונך באמת להתעלם לצמיתות מכל התגובות שנכתבות מכתובת ה־IP הזאת?", + "comments-block-warning-anon": "האם ברצונך להתעלם לצמיתות מכל התגובות שנכתבות על־ידי המשתמש האנונימי הזה (כלומר, מכתובת ה־IP הזאת)?", "comments-block-warning-user": "האם ברצונך באמת להתעלם לצמיתות מכל התגובות של ה{{GENDER:$1|משתמש|משתמשת}} $1?", "comments-delete-warning": "האם ברצונך באמת למחוק את התגובה הזאת?", - "comments-sort-by-date": "מיין לפי שם", - "comments-sort-by-score": "מיין לפי ציון", - "comments-show-comment-link": "הצג הערה", - "comments-manage-blocklist-link": "ניהול רשימת התעלמות", + "comments-sort-by-date": "מיון לפי תאריך", + "comments-sort-by-score": "מיון לפי ציון", + "comments-show-comment-link": "הצגת התגובה", + "comments-manage-blocklist-link": "ניהול רשימת ההתעלמות", "comments-ignore-message": "בחרת להתעלם מהמפרסם של התגובה הזאת", - "comments-you": "אתה", - "comments-reply": "השב", + "comments-you": "{{GENDER:|אתה|את}}", + "comments-reply": "תשובה", "comments-login-required": "יש להיכנס לחשבון כדי להוסיף תגובות", - "comments-not-allowed": "אינך מורשה לפרסם תגובות.", - "comments-post": "פרסם תגובה", - "comments-submit": "הוסף את ההערה שלך", - "comments-score-text": "תוצאה", + "comments-not-allowed": "אין באפשרותך לפרסם תגובות.", + "comments-post": "פרסום התגובה", + "comments-submit": "הוספת התגובה שלך", + "comments-score-text": "ציון", "comments-permalink": "קישור קבוע", - "comments-delete-link": "מחק תגובה", + "comments-delete-link": "מחיקת התגובה", "comments-anon-name": "משתמש אנונימי", "comments-anon-message": "אתר {{SITENAME}} מקבל בברכה את כל התגובות. אם אתם לא רוצים להיות אלמוניים, הירשמו או היכנסו לחשבון. זה בחינם.", "comments-links-are-forbidden": "אין להוסיף קישורים חיצוניים בתגובות!", @@ -44,17 +69,18 @@ "comments-ignore-cancel": "ביטול", "comments-ignore-title": "רשימת התעלמות בתגובות", "commentignorelist": "רשימת התעלמות בתגובות", - "log-name-comments": "יומן ההערות", + "log-name-comments": "יומן תגובות", "log-description-comments": "זהו יומן של התגובות.", - "logentry-comments-add": "$1 {{GENDER:$2|פרסם|פרסמה}} תגובה חדשה בדף $3", - "logentry-comments-delete": "$1 {{GENDER:$2|מחק|מחקה}} את התגובה #$4 בדף $3", + "logentry-comments-add": "$1 פרסם תגובה חדשה בדף $3", + "logentry-comments-delete": "$1 מחק את התגובה #$4 בדף $3", "comments-time-ago": "לפני $1", "comments-time-months": "{{PLURAL:$1|חודש|חודשיים|$1 חודשים}}", - "comments-time-days": "{{PLURAL:$1|יום אחד|יומיים|$1 ימים}}", - "comments-time-hours": "{{PLURAL:$1|שעה אחת|שעתיים|$1 שעות}}", - "comments-time-minutes": "{{PLURAL:$1|דקה אחת|$1 דקות}}", - "comments-time-seconds": "{{PLURAL:$1|שנייה אחת|$1 שניות}}", - "log-show-hide-comments": "$1 יומן ההערות", + "comments-time-days": "{{PLURAL:$1|יום|יומיים|$1 ימים}}", + "comments-time-hours": "{{PLURAL:$1|שעה|שעתיים|$1 שעות}}", + "comments-time-minutes": "{{PLURAL:$1|דקה|$1 דקות}}", + "comments-time-seconds": "{{PLURAL:$1|שנייה|$1 שניות}}", + "log-show-hide-comments": "$1 יומן תגובות", + "logeventslist-comments-log": "יומן תגובות", "group-commentadmin": "מנהלי תגובות", "group-commentadmin-member": "{{GENDER:$1|מנהל|מנהלת}} תגובות", "grouppage-commentadmin": "{{ns:project}}:מנהל תגובות", diff --git a/i18n/hsb.json b/i18n/hsb.json index 215553f..8558155 100644 --- a/i18n/hsb.json +++ b/i18n/hsb.json @@ -41,7 +41,6 @@ "comments-ignore-cancel": "Přetorhnyć", "comments-ignore-title": "Ignorowanska lisćina komentarow", "commentignorelist": "Ignorowanska lisćiny komentarow", - "comments-no-comments-of-day": "Komentary dnja njejsu.", "log-name-comments": "Komentarowy protokol", "log-description-comments": "To je komentarowy protokol.", "logentry-comments-add": "$1 je nowy komentar na $3 zawostajił", diff --git a/i18n/hu.json b/i18n/hu.json index 3c66afe..6455ed1 100644 --- a/i18n/hu.json +++ b/i18n/hu.json @@ -2,7 +2,8 @@ "@metadata": { "authors": [ "Dj", - "Wolf Rex" + "Wolf Rex", + "R-Joe" ] }, "comments-comment": "Megjegyzés", @@ -12,7 +13,7 @@ "comments-loading": "Betöltés…", "comments-auto-refresher-enable": "Automatikus megjegyzés frissítő engedélyezése", "comments-auto-refresher-pause": "Automatikus megjegyzés frissítő felfüggesztése", - "comments-reply-to": "Válasz", + "comments-reply-to": "Válasz {{GENDER:$2|$1}} felé", "comments-cancel-reply": "Mégse", "comments-block-warning-anon": "Biztos, hogy véglegesen figyelmen kívül hagyod ezen névtelen szerkesztő valamennyi megjegyzéseit (az IP-címe alapján)?", "comments-block-warning-user": "Biztos, hogy véglegesen figyelmen kívül hagyod $1 valamennyi megjegyzését?", @@ -40,7 +41,6 @@ "comments-ignore-cancel": "Mégse", "comments-ignore-title": "Figyelmen kívül hagyandó megjegyzések listája", "commentignorelist": "Figyelmen kívül hagyandó megjegyzések listája", - "comments-no-comments-of-day": "Nincs napi hozzászólás.", "log-name-comments": "Megjegyzés napló", "log-description-comments": "Ez a megjegyzések naplója", "comments-time-ago": "$1 ezelőtt", diff --git a/i18n/hyw.json b/i18n/hyw.json new file mode 100644 index 0000000..580656e --- /dev/null +++ b/i18n/hyw.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Kareyac" + ] + }, + "comments-cancel-reply": "Չեղարկել", + "comments-ignore-cancel": "Չեղարկել" +} diff --git a/i18n/ia.json b/i18n/ia.json index c5d2b55..38b414a 100644 --- a/i18n/ia.json +++ b/i18n/ia.json @@ -53,7 +53,6 @@ "comments-ignore-cancel": "Cancellar", "comments-ignore-title": "Lista de commentos ignorate", "commentignorelist": "Lista de commentos ignorate", - "comments-no-comments-of-day": "Il non ha commentos del die.", "log-name-comments": "Registro de commentos", "log-description-comments": "Isto es un registro de commentos.", "logentry-comments-add": "$1 lassava un nove commento sur $3", @@ -70,5 +69,6 @@ "grouppage-commentadmin": "{{ns:project}}:Administratores de commentos", "right-comment": "Submitter commentos", "right-commentadmin": "Administrar commentos submittite per usatores", - "right-commentlinks": "Usar ligamines externe in commentos" + "right-commentlinks": "Usar ligamines externe in commentos", + "right-comment-delete-own": "Deler le proprie commentos" } diff --git a/i18n/id.json b/i18n/id.json index ff4f8aa..d706ae4 100644 --- a/i18n/id.json +++ b/i18n/id.json @@ -44,7 +44,6 @@ "comments-ignore-cancel": "Batalkan", "comments-ignore-title": "Daftar abai komentar", "commentignorelist": "Daftar abai komentar", - "comments-no-comments-of-day": "Tidak ada komentar untuk hari ini.", "log-name-comments": "Log komentar", "log-description-comments": "Ini adalah log komentar.", "logentry-comments-add": "$1 mengirimkan komentar baru pada $3", diff --git a/i18n/ig.json b/i18n/ig.json new file mode 100644 index 0000000..4df307c --- /dev/null +++ b/i18n/ig.json @@ -0,0 +1,13 @@ +{ + "@metadata": { + "authors": [ + "Ukabia", + "Oby Ezeilo" + ] + }, + "comments-cancel-reply": "Hapụ̀", + "comments-ignore-cancel": "Hapụ̀", + "action-comment": "tinye ihe ị chere", + "action-commentadmin": "onye nlekọta ebe a etinyela ihe ndi o kwuru", + "action-comment-delete-own": "hichapu ihe ị kwuru/dere" +} diff --git a/i18n/inh.json b/i18n/inh.json new file mode 100644 index 0000000..5a961d9 --- /dev/null +++ b/i18n/inh.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Adam-Yourist" + ] + }, + "comments-time-days": "{{PLURAL:$1|ди}}" +} diff --git a/i18n/io.json b/i18n/io.json new file mode 100644 index 0000000..dd30cc1 --- /dev/null +++ b/i18n/io.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Joao Xavier" + ] + }, + "comments-time-days": "{{PLURAL:$1|un dio|$1 dii}}", + "comments-time-hours": "{{PLURAL:$1|1 horo|$1 hori}}" +} diff --git a/i18n/it.json b/i18n/it.json index 71c2698..157bd5c 100644 --- a/i18n/it.json +++ b/i18n/it.json @@ -2,7 +2,8 @@ "@metadata": { "authors": [ "Beta16", - "Darth Kule" + "Darth Kule", + "Senpremì" ] }, "comments-comment": "Commento", @@ -42,7 +43,6 @@ "comments-ignore-cancel": "Annulla", "comments-ignore-title": "Lista ignorati dei commenti", "commentignorelist": "Lista ignorati dei commenti", - "comments-no-comments-of-day": "Non sono presenti commenti del giorno.", "log-name-comments": "Commenti", "log-description-comments": "Di seguito sono elencati i commenti.", "logentry-comments-add": "$1 ha pubblicato un nuovo commento su $3", @@ -54,10 +54,16 @@ "comments-time-minutes": "{{PLURAL:$1|un minuto|$1 minuti}}", "comments-time-seconds": "{{PLURAL:$1|un secondo|$1 secondi}}", "log-show-hide-comments": "$1 registro commenti", + "logeventslist-comments-log": "Commenti", "group-commentadmin": "Amministratori dei commenti", "group-commentadmin-member": "{{GENDER:$1|amministratore|amministratrice|amministratore/trice}} di commenti", "grouppage-commentadmin": "{{ns:project}}:Amministratori di commenti", + "action-comment": "inviare commenti", "right-comment": "Invia commenti", + "action-commentadmin": "amministrare i commenti inseriti dagli utenti", "right-commentadmin": "Gestisce i commenti inviati dagli utenti", - "right-commentlinks": "Usa collegamenti esterni nei commenti" + "action-commentlinks": "usare collegamenti esterni nei commenti", + "right-commentlinks": "Usa collegamenti esterni nei commenti", + "action-comment-delete-own": "cancellare i tuoi commenti", + "right-comment-delete-own": "Cancella i propri commenti" } diff --git a/i18n/ja.json b/i18n/ja.json index d76d9eb..7ff91c9 100644 --- a/i18n/ja.json +++ b/i18n/ja.json @@ -44,7 +44,6 @@ "comments-ignore-cancel": "キャンセル", "comments-ignore-title": "コメント無視リスト", "commentignorelist": "コメント無視リスト", - "comments-no-comments-of-day": "今日のコメントはありません。", "log-name-comments": "コメント記録", "log-description-comments": "これはコメントの記録です。", "logentry-comments-add": "$1 が $3 に新しいコメントを投稿しました", @@ -61,5 +60,6 @@ "grouppage-commentadmin": "{{ns:project}}:コメント管理者", "right-comment": "コメントを投稿", "right-commentadmin": "利用者が投稿したコメントを管理", - "right-commentlinks": "コメント内で外部リンクを使用" + "right-commentlinks": "コメント内で外部リンクを使用", + "right-comment-delete-own": "自身のコメントを削除" } diff --git a/i18n/kab.json b/i18n/kab.json new file mode 100644 index 0000000..0487b90 --- /dev/null +++ b/i18n/kab.json @@ -0,0 +1,19 @@ +{ + "@metadata": { + "authors": [ + "Belkacem77" + ] + }, + "apihelp-commentblock-description": "API commentblock ad isireg asewḥel n useqdac seg uwennit ansa i d-yekka s umuddu i ɣewwaṛen-agi: CommentID.", + "apihelp-commentblock-summary": "API commentblock ad isireg asewḥel n useqdac seg uwennit aida yella d ameskar s umuddu n iɣewwaṛen-agi: CommentID.", + "apihelp-commentdelete-description": "API commentdelete ad isireg tukksa deffir umuddu n iɣewwaṛen-agi: CommentID.", + "apihelp-commentdelete-summary": "API commentdelete ad isireg tukksa ticki tmuddeḍ iɣewwaṛen-agi: CommentID.", + "comments-you": "Kečč", + "comments-reply": "Err", + "comments-post": "Azen awennit", + "comments-submit": "Rnu awennit-ik", + "comments-score-text": "Agmuḍ", + "comments-permalink": "Aseɣwen yezgan", + "comments-delete-link": "Kkes awennit", + "comments-anon-name": "Aseqdac udrig" +} diff --git a/i18n/kiu.json b/i18n/kiu.json new file mode 100644 index 0000000..3dcce50 --- /dev/null +++ b/i18n/kiu.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Mirzali" + ] + }, + "comments-cancel-reply": "Bıtexelne", + "comments-ignore-cancel": "Bıtexelne" +} diff --git a/i18n/ko.json b/i18n/ko.json index 00d77e4..6000d70 100644 --- a/i18n/ko.json +++ b/i18n/ko.json @@ -37,7 +37,7 @@ "comments-delete-link": "댓글 삭제", "comments-anon-name": "익명 사용자", "comments-anon-message": "{{SITENAME}}은(는) 모든 댓글을 환영합니다. 익명을 원하지 않으면 등록하거나 로그인하세요. 무료입니다.", - "comments-links-are-forbidden": "댓글 안의 바깥 링크는 접근 거부입니다!", + "comments-links-are-forbidden": "댓글 안의 외부 링크는 금지됩니다!", "comments-is-spam": "제출된 글이 스팸으로 판단됩니다.", "comments-ignore-item": "$3에 $2 (차단 해제)", "comments-ignore-no-users": "현재 차단된 사용자가 없습니다.", @@ -46,7 +46,6 @@ "comments-ignore-cancel": "취소", "comments-ignore-title": "댓글 무시 목록", "commentignorelist": "댓글 무시 목록", - "comments-no-comments-of-day": "오늘의 댓글이 없습니다.", "log-name-comments": "댓글 기록", "log-description-comments": "댓글의 기록입니다.", "logentry-comments-add": "$1님이 $3에 새 댓글을 남겼습니다", @@ -58,10 +57,12 @@ "comments-time-minutes": "{{PLURAL:$1|1분|$1분}}", "comments-time-seconds": "{{PLURAL:$1|1초|$1초}}", "log-show-hide-comments": "$1 댓글 기록", + "logeventslist-comments-log": "댓글 기록", "group-commentadmin": "댓글 관리자", "group-commentadmin-member": "{{GENDER:$1|댓글 관리자}}", "grouppage-commentadmin": "{{ns:project}}:댓글 관리자", "right-comment": "댓글 제출", "right-commentadmin": "사용자가 제출한 댓글 관리", - "right-commentlinks": "바깥 링크를 사용해 댓글 남기기" + "right-commentlinks": "댓글에 외부 링크 사용하기", + "right-comment-delete-own": "자신의 댓글 삭제" } diff --git a/i18n/ksh.json b/i18n/ksh.json index 5b8e6ec..03fbf80 100644 --- a/i18n/ksh.json +++ b/i18n/ksh.json @@ -26,7 +26,6 @@ "comments-ignore-no-users": "Em Momang sen hein Metmaacher jeschpärrt.", "comments-ignore-unblock": "Sperr ophävve", "comments-ignore-cancel": "Ophüre", - "comments-no-comments-of-day": "Mer hann_er kein Aanmärkonge aan däm Daach.", "log-name-comments": "Logbooch met Aanmärkonge", "log-description-comments": "Heh is est Logbooch met Aanmärkonge", "comments-time-ago": "vör $1", diff --git a/i18n/lag.json b/i18n/lag.json new file mode 100644 index 0000000..6343baf --- /dev/null +++ b/i18n/lag.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Baba Tabita" + ] + }, + "comments-time-months": "{{PLURAL:$1|mweeri ʉmudu|myeeri $1}}" +} diff --git a/i18n/lb.json b/i18n/lb.json index 88d0b6b..10097e7 100644 --- a/i18n/lb.json +++ b/i18n/lb.json @@ -2,18 +2,19 @@ "@metadata": { "authors": [ "Robby", - "Soued031" + "Soued031", + "Les Meloures" ] }, "apihelp-commentlist-param-pagerPage": "Nummer vun der Säit vun de Bemierkungen", "apihelp-commentlist-param-showForm": "De Formulaire fir d'Bemierkunge weisen", "apihelp-commentsubmit-param-commentText": "Text vun der Bemierkung", "comments-comment": "Bemierkung", - "comments-desc": "Setzt d'Parsererweiderung <comments> derbäi déi et erlaabt fir Säiten ze kommentéieren", - "comments-db-locked": "

Bemierkungen derbäisetzen

D'Datebank ass elo wéinst Maintenance-Aarbechte gespaart. Probéiert w.e.g. méi spéit nach eng Kéier.", + "comments-desc": "Setzt d'Parsererweiderung <comments> dobäi déi et erlaabt fir Säiten ze kommentéieren", + "comments-db-locked": "

Bemierkungen derbäisetzen

D'Datebank ass elo wéinst Maintenanceaarbechte gespaart. Probéiert w. e. g. méi spéit nach eng Kéier.", "comments-voted-label": "Ofgestëmmt", "comments-loading": "Lueden...", - "comments-auto-refresher-enable": "Automatesch Aktualisatioun vun de Bemierkungen aschalten", + "comments-auto-refresher-enable": "Automatesch Aktualiséierung vun de Bemierkungen aschalten", "comments-auto-refresher-pause": "Automatesch Aktualisatioun vun de Bemierkungen ausschalten", "comments-reply-to": "Äntwert fir {{GENDER:$2|$1}}", "comments-cancel-reply": "Ofbriechen", @@ -27,8 +28,8 @@ "comments-ignore-message": "Dir ignoréiert den Auteur vun dëser Bemierkung", "comments-you": "Dir", "comments-reply": "Äntwerten", - "comments-login-required": "Dir musst ageloggt si fir Bemierkungen derbäizesetzen", - "comments-not-allowed": "Dir däerft keng Bemierkungen derbäisetzen.", + "comments-login-required": "Dir musst ageloggt si fir Bemierkungen dobäizesetzen", + "comments-not-allowed": "Dir däerft keng Bemierkungen dobäisetzen.", "comments-post": "Bemierkung derbäisetzen", "comments-submit": "Setzt Är Bemierkung derbäi", "comments-score-text": "Score", @@ -45,7 +46,6 @@ "comments-ignore-cancel": "Ofbriechen", "comments-ignore-title": "Lëscht vun den ignoréierte Bemierkungen", "commentignorelist": "Lëscht vun den ignoréierte Bemierkungen", - "comments-no-comments-of-day": "Et gëtt keng Bemierkunge vum Dag.", "log-name-comments": "Logbuch vun de Bemierkungen", "log-description-comments": "Dëst ass eng Lëscht vun all Bemierkungen.", "logentry-comments-add": "$1 huet eng nei Bemierkung op $3 gemaach", @@ -62,5 +62,6 @@ "grouppage-commentadmin": "{{ns:project}}:Bemierkungs-Administrateuren", "right-comment": "Bemierkunge späicheren", "right-commentadmin": "Bemierkunge vu Benotzer verwalten", - "right-commentlinks": "Extern Linken a Bemierkunge benotzen" + "right-commentlinks": "Extern Linken a Bemierkunge benotzen", + "action-comment-delete-own": "eege Bemierkunge läschen" } diff --git a/i18n/lt.json b/i18n/lt.json index 5bc849b..e28d171 100644 --- a/i18n/lt.json +++ b/i18n/lt.json @@ -2,13 +2,14 @@ "@metadata": { "authors": [ "Eitvys200", - "Hugo.arg" + "Hugo.arg", + "Manvydasz" ] }, "comments-comment": "Paaiškinimas", "comments-voted-label": "Balsavo", "comments-loading": "Įkeliama…", - "comments-reply-to": "Atsakyti į", + "comments-reply-to": "Atsakyti į {{GENDER:$2|$1}}", "comments-cancel-reply": "Atšaukti", "comments-delete-warning": "Ar tikrai norite ištrinti šį komentarą?", "comments-sort-by-date": "Rūšiuoti pagal datą", diff --git a/i18n/mk.json b/i18n/mk.json index 7f12919..40aeb37 100644 --- a/i18n/mk.json +++ b/i18n/mk.json @@ -1,15 +1,16 @@ { "@metadata": { "authors": [ - "Bjankuloski06" + "Bjankuloski06", + "Vlad5250" ] }, "apihelp-commentblock-description": "Прилогот за блокриање коментари овозможува блокирање на корисник од коментирање откако ќе ги пополните следниве параметри: CommentID.", "apihelp-commentblock-summary": "Прилогот за блокриање коментари овозможува блокирање на корисник од коментирање откако ќе ги пополните следниве параметри: CommentID.", - "apihelp-commentdelete-description": "Прилогот за бришење коментари овозможува бришење на корисник од кого дошол коментар откако ќе ги пополните следниве параметри: CommentID.", - "apihelp-commentdelete-summary": "Прилогот за бришење коментари овозможува бришење на корисник од кого дошол коментар откако ќе ги пополните следниве параметри: CommentID.", - "apihelp-commentlatestid-description": "Прилогот за назнакаи на најнови коментари овозможува добивање на назнаки на најновите коментариќе ги пополните следниве параметри: pageID.", - "apihelp-commentlatestid-summary": "Прилогот за назнакаи на најнови коментари овозможува добивање на назнаки на најновите коментариќе ги пополните следниве параметри: pageID.", + "apihelp-commentdelete-description": "Прилогот за бришење коментари овозможува бришење на коментар откако ќе ги пополните следниве параметри: CommentID.", + "apihelp-commentdelete-summary": "Прилогот за бришење коментари овозможува бришење на коментар откако ќе ги пополните следниве параметри: CommentID.", + "apihelp-commentlatestid-description": "Прилогот за назнаки на најнови коментари овозможува добивање на назнаки на најновите коментари откако ќе ги пополните следниве параметри: pageID.", + "apihelp-commentlatestid-summary": "Прилогот за назнаки на најнови коментари овозможува добивање на назнаки на најновите коментари откако ќе ги пополните следниве параметри: pageID.", "apihelp-commentlist-description": "Прилогот за список на коментари за добивање на повеќе коментари; ги дава во извод во облик на список, откако ќе се пополнат следниве параметри: pageID, order, pagerPage и showForm.", "apihelp-commentlist-summary": "Прилогот за список на коментари за добивање на повеќе коментари; ги дава во извод во облик на список, откако ќе се пополнат следниве параметри: pageID, order, pagerPage и showForm.", "apihelp-commentsubmit-description": "Прилогот за поднесување коментари овозможува однесување/објавување на коментар откако ќе се пополнат следниве параметри: pageID, parentID, commentText.", @@ -65,7 +66,6 @@ "comments-ignore-cancel": "Откажи", "comments-ignore-title": "Список на занемарени коментари", "commentignorelist": "Список на занемарени коментари", - "comments-no-comments-of-day": "Нема коментари на денот.", "log-name-comments": "Дневник на коментари", "log-description-comments": "Ова е дневник на коментар.", "logentry-comments-add": "$1 објави нов коментар на $3", @@ -77,10 +77,16 @@ "comments-time-minutes": "{{PLURAL:$1|една минута|$1 минути}}", "comments-time-seconds": "{{PLURAL:$1|една секунда|$1 секунди}}", "log-show-hide-comments": "$1 дневник на коментари", + "logeventslist-comments-log": "Дневник на коментари", "group-commentadmin": "Администратори на коментари", "group-commentadmin-member": "{{GENDER:$1|администратор на коментари}}", "grouppage-commentadmin": "{{ns:project}}:Администратори на коментари", + "action-comment": "поднесување на коментари", "right-comment": "Поднесување на коментари", + "action-commentadmin": "раководење со кориснички коментари", "right-commentadmin": "Раководење со кориснички коментари", - "right-commentlinks": "Употреба на надворешни врски во коментарите" + "action-commentlinks": "употреба на надворешни врски во коментарите", + "right-commentlinks": "Употреба на надворешни врски во коментарите", + "action-comment-delete-own": "бришење на сопствени коментари", + "right-comment-delete-own": "Бришење на сопствени коментари" } diff --git a/i18n/ml.json b/i18n/ml.json new file mode 100644 index 0000000..28b97b1 --- /dev/null +++ b/i18n/ml.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Jinoytommanjaly" + ] + }, + "logeventslist-comments-log": "അഭിപ്രായ ലോഗ്" +} diff --git a/i18n/ms.json b/i18n/ms.json index 562799f..bf98db2 100644 --- a/i18n/ms.json +++ b/i18n/ms.json @@ -41,7 +41,6 @@ "comments-ignore-cancel": "Batalkan", "comments-ignore-title": "Senarai abai komen", "commentignorelist": "Senarai abai komen", - "comments-no-comments-of-day": "Tiada komen pada hari ini.", "log-name-comments": "Log komen", "log-description-comments": "Ini ialah log komen.", "comments-time-ago": "$1 yang lalu", diff --git a/i18n/mt.json b/i18n/mt.json index e01407b..e4c1ecc 100644 --- a/i18n/mt.json +++ b/i18n/mt.json @@ -34,7 +34,6 @@ "comments-ignore-no-users": "M'hemm l-ebda utent li huwa attwalment imblukkat.", "comments-ignore-remove-message": "Inti ċert li tixtieq tiżblokka l-kummenti tal-utent $1?", "comments-ignore-unblock": "Żblokka", - "comments-no-comments-of-day": "M'hemm l-ebda kummenti tal-ġurnata.", "log-name-comments": "Reġistru tal-kummenti", "log-description-comments": "Dan huwa reġistru tal-kummenti." } diff --git a/i18n/mwl.json b/i18n/mwl.json new file mode 100644 index 0000000..5c4a3a8 --- /dev/null +++ b/i18n/mwl.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "MokaAkashiyaPT", + "Athena in Wonderland" + ] + }, + "comments-cancel-reply": "Çfazer" +} diff --git a/i18n/my.json b/i18n/my.json new file mode 100644 index 0000000..413e4d3 --- /dev/null +++ b/i18n/my.json @@ -0,0 +1,26 @@ +{ + "@metadata": { + "authors": [ + "Dr Lotus Black" + ] + }, + "apihelp-commentsubmit-param-commentText": "မှတ်ချက်စာသား", + "comments-comment": "မှတ်ချက်", + "comments-cancel-reply": "မလုပ်တော့ပါ", + "comments-delete-warning": "ဤမှတ်ချက်အား ဖျက်ရန် သေချာပါသလား", + "comments-sort-by-date": "နေ့စွဲအလိုက် စီရန်", + "comments-sort-by-score": "ရမှတ်အလိုက် စီရန်", + "comments-show-comment-link": "မှတ်ချက်ပြရန်", + "comments-reply": "အကြောင်းပြန်ရန်", + "comments-permalink": "ပုံသေလိပ်စာ", + "comments-ignore-cancel": "မလုပ်တော့ပါ", + "comments-time-ago": "$1 အကြာက", + "comments-time-months": "{{PLURAL:$1|တစ်လ|$1 လများ}}", + "comments-time-days": "{{PLURAL:$1|တစ်ရက်|$1 ရက်များ}}", + "comments-time-hours": "{{PLURAL:$1|တစ်နာရီ|$1 နာရီများ}}", + "comments-time-minutes": "{{PLURAL:$1|တစ်မိနစ်|$1 မိနစ်များ}}", + "comments-time-seconds": "{{PLURAL:$1|တစ်စက္ကန့်|$1 စက္ကန့်များ}}", + "group-commentadmin": "မှတ်ချက် အက်ဒမင်", + "group-commentadmin-member": "{{GENDER:$1|မှတ်ချက် အက်ဒမင်}}", + "grouppage-commentadmin": "{{ns:project}}:မှတ်ချက် အက်ဒမင်များ" +} diff --git a/i18n/nah.json b/i18n/nah.json new file mode 100644 index 0000000..fa8eb06 --- /dev/null +++ b/i18n/nah.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Akapochtli" + ] + }, + "comments-cancel-reply": "Moxitiniz", + "comments-ignore-cancel": "Moxitiniz" +} diff --git a/i18n/nds-nl.json b/i18n/nds-nl.json index 2972943..36fa8f7 100644 --- a/i18n/nds-nl.json +++ b/i18n/nds-nl.json @@ -4,6 +4,12 @@ "Servien" ] }, + "comments-auto-refresher-enable": "Automaties biewarken van reaksies inschakelen", + "comments-auto-refresher-pause": "Automatisch biewarken van reaksies pauzeren", + "comments-reply-to": "Reageren op {{GENDER:$2|$1}}", + "comments-cancel-reply": "Aofbreken", + "comments-you": "Jie", + "comments-reply": "Antwoorden", "comments-time-ago": "$1 elejen", "comments-time-months": "{{PLURAL:$1|een maond|$1 maonden}}" } diff --git a/i18n/ne.json b/i18n/ne.json new file mode 100644 index 0000000..d0864fa --- /dev/null +++ b/i18n/ne.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Nirajan pant" + ] + }, + "logeventslist-comments-log": "टिप्पणी गतिविधि" +} diff --git a/i18n/nl.json b/i18n/nl.json index 6e85e09..64ae3fa 100644 --- a/i18n/nl.json +++ b/i18n/nl.json @@ -48,7 +48,6 @@ "comments-ignore-cancel": "Annuleren", "comments-ignore-title": "Negeerlijst voor reacties", "commentignorelist": "Lijst voor te negeren reacties", - "comments-no-comments-of-day": "Er zijn geen reacties van de dag.", "log-name-comments": "Berichtenlogboek", "log-description-comments": "Dit is een logboek over reacties.", "logentry-comments-add": "$1 stuurde een nieuwe opmerking over $3 in.", diff --git a/i18n/oc.json b/i18n/oc.json index 191ff06..d363dfa 100644 --- a/i18n/oc.json +++ b/i18n/oc.json @@ -27,7 +27,6 @@ "comments-ignore-cancel": "Anullar", "comments-ignore-title": "Lista dels comentaris ignorats", "commentignorelist": "Lista dels comentaris ignorats", - "comments-no-comments-of-day": "I a pas de comentari del jorn.", "log-name-comments": "Istoric dels comentaris", "comments-time-ago": "I a $1", "comments-time-months": "{{PLURAL:$1|un mes|$1 meses}}", diff --git a/i18n/or.json b/i18n/or.json index c5d7ef2..82aa5b1 100644 --- a/i18n/or.json +++ b/i18n/or.json @@ -28,7 +28,6 @@ "comments-ignore-cancel": "ବାତିଲ", "comments-ignore-title": "ମତ ଅଣଦେଖା ତାଲିକା", "commentignorelist": "ମତ ଅଣଦେଖା ତାଲିକା", - "comments-no-comments-of-day": "ଆଜି ପାଇଁ କୌଣସି ମତ ନାହିଁ ।", "log-name-comments": "ମନ୍ତବ୍ୟ ତାଲିକା", "log-description-comments": "ଏହା ମନ୍ତବ୍ୟଗୁଡିକର ଏକ ତାଲିକା ।", "comments-time-ago": "$1 ପୂର୍ବରୁ", diff --git a/i18n/pl.json b/i18n/pl.json index 612e5ae..63aefec 100644 --- a/i18n/pl.json +++ b/i18n/pl.json @@ -4,16 +4,18 @@ "Jacenty359", "Odie2", "Chrumps", - "Woytecr" + "Woytecr", + "Railfail536", + "Kpalion" ] }, "comments-comment": "Komentarz", - "comments-desc": "Dodaje parser <comments> (komentarzy), który umożliwia komentowanie na stronach", + "comments-desc": "Dodaje tag <comments> (komentarzy), który umożliwia komentowanie na stronach", "comments-db-locked": "

Dodawanie komentarzy

Baza danych jest zablokowana z powodu rutynowej konserwacji. Prosimy spróbować ponownie później!", "comments-voted-label": "Zagłosowało", - "comments-loading": "Ładowanie...", - "comments-auto-refresher-enable": "Włącz automatyczne korygowanie komentarzy", - "comments-auto-refresher-pause": "Wstrzymaj automatyczne korygowanie komentarzy", + "comments-loading": "Ładowanie…", + "comments-auto-refresher-enable": "Włącz automatyczne odświeżanie komentarzy", + "comments-auto-refresher-pause": "Wstrzymaj automatyczne odświeżanie komentarzy", "comments-reply-to": "Odpowiedz {{GENDER:$2|$1}}", "comments-cancel-reply": "Anuluj", "comments-block-warning-anon": "Naprawdę chcesz ciągle ignorować komentarze od tego anonimowego użytkownika (adres IP)?", @@ -44,22 +46,27 @@ "comments-ignore-cancel": "Anuluj", "comments-ignore-title": "Lista ignorowanych komentarzy", "commentignorelist": "Lista ignorowanych komentarzy", - "comments-no-comments-of-day": "Dziś brak komentarzy.", - "log-name-comments": "Dziennik komentarzy", - "log-description-comments": "Jest to dziennik komentarzy.", - "logentry-comments-add": "$1 {{GENDER:$2|napisał|napisała}} nowy komentarz na stronie $3", - "logentry-comments-delete": "$1 {{GENDER:$2|usunął|usunęła}} komentarz #$4 na stronie $3", + "log-name-comments": "Rejestr komentarzy", + "log-description-comments": "To jest rejestr komentarzy.", + "logentry-comments-add": "$1 {{GENDER:$2|opublikował|opublikowała}} nowy komentarz na stronie „$3”", + "logentry-comments-delete": "$1 {{GENDER:$2|usunął|usunęła}} komentarz #$4 na stronie „$3”", "comments-time-ago": "$1 temu", "comments-time-months": "{{PLURAL:$1|jeden miesiąc|$1 miesiące}}", "comments-time-days": "{{PLURAL:$1|dzień|$1 dni}}", "comments-time-hours": "{{PLURAL:$1|godzina|$1 godzin}}", "comments-time-minutes": "{{PLURAL:$1|minuta|$1 minut}}", "comments-time-seconds": "{{PLURAL:$1|sekunda|$1 sekund}}", - "log-show-hide-comments": "$1 dziennik komentarzu", + "log-show-hide-comments": "$1 rejestr komentarzy", + "logeventslist-comments-log": "Rejestr komentarzy", "group-commentadmin": "Komentarz administratorów", "group-commentadmin-member": "{{GENDER:$1|komentarz administratora}}", "grouppage-commentadmin": "{{ns:project}}:Komentarz administratorów", - "right-comment": "Zgłoś komentarze", - "right-commentadmin": "Administrowanie wysłanych komentarzy użytkownika", - "right-commentlinks": "Używanie linków zewnętrznych w komentarzach" + "action-comment": "publikowania komentarzy", + "right-comment": "Publikowanie komentarzy", + "action-commentadmin": "administrowania komentarzy opublikowanych przez użytkownika", + "right-commentadmin": "Administrowanie komentarzy opublikowanych przez użytkownika", + "action-commentlinks": "używania linków zewnętrznych w komentarzach", + "right-commentlinks": "Używanie linków zewnętrznych w komentarzach", + "action-comment-delete-own": "usuwania własnych komentarzy", + "right-comment-delete-own": "Usuwanie własnych komentarzy" } diff --git a/i18n/pms.json b/i18n/pms.json index f5202d9..be0efb3 100644 --- a/i18n/pms.json +++ b/i18n/pms.json @@ -40,7 +40,6 @@ "comments-ignore-cancel": "Scancela", "comments-ignore-title": "Lista dij coment ignorà", "commentignorelist": "Lista dij coment ignorà", - "comments-no-comments-of-day": "A-i é pa gnun coment ëd la giornà.", "log-name-comments": "Registr dij coment", "log-description-comments": "Cost-sì a l'é un registr dij coment.", "comments-time-ago": "$1 fa", diff --git a/i18n/ps.json b/i18n/ps.json index 9f910bc..6cb4cd7 100644 --- a/i18n/ps.json +++ b/i18n/ps.json @@ -1,7 +1,9 @@ { "@metadata": { "authors": [ - "Ahmed-Najib-Biabani-Ibrahimkhel" + "Ahmed-Najib-Biabani-Ibrahimkhel", + "Baloch Khan", + "Amjad Khan" ] }, "comments-comment": "تبصره", @@ -19,6 +21,7 @@ "comments-ignore-cancel": "ناگارل", "log-name-comments": "د تبصرو يادښت", "comments-time-ago": "$1 دمخه", + "comments-time-months": "{{PLURAL:$1|۱ مياشت|$1 مياشت}}", "comments-time-days": "{{PLURAL:$1|يو ورځ|$1 ورځې}}", "comments-time-hours": "{{PLURAL:$1|يو ساعت|$1 ساعتونه}}", "comments-time-minutes": "{{PLURAL:$1|يو دقيقه|$1 دقيقې}}", diff --git a/i18n/pt-br.json b/i18n/pt-br.json index bf5f9c2..3a627f0 100644 --- a/i18n/pt-br.json +++ b/i18n/pt-br.json @@ -3,16 +3,51 @@ "authors": [ "Cainamarques", "Luckas", - "Nemo bis" + "Nemo bis", + "Eduardo Addad de Oliveira" ] }, + "apihelp-commentblock-description": "A API commentblock permite bloquear um utilizador a partir de um comentário feito por ele, após preencher os seguintes parâmetros: CommentID.", + "apihelp-commentblock-summary": "A API commentblock permite bloquear um utilizador a partir de um comentário feito por ele, após preencher os seguintes parâmetros: CommentID.", + "apihelp-commentdelete-description": "A API commentdelete permite eliminar um comentário após preencher os seguintes parâmetros: CommentID.", + "apihelp-commentdelete-summary": "A API commentdelete permite eliminar um comentário após preencher os seguintes parâmetros: CommentID.", + "apihelp-commentlatestid-description": "A API commentlatestID permite obter o identificador do comentário mais recente após preencher os seguintes parâmetros: pageID", + "apihelp-commentlatestid-summary": "A API commentlatestID permite obter o identificador do comentário mais recente após preencher os seguintes parâmetros: pageID", + "apihelp-commentlist-description": "A API commentlist obtém vários comentários e fornece-os na forma de lista após preencher os seguintes parâmetros: pageID, order, pagerPage e showForm.", + "apihelp-commentlist-summary": "A API commentlist obtém vários comentários e fornece-os na forma de lista após preencher os seguintes parâmetros: pageID, order, pagerPage e showForm.", + "apihelp-commentsubmit-description": "A API commentsubmit permite enviar/publicar um comentário após preencher os seguintes parâmetros: pageID, parentID, commentText.", + "apihelp-commentsubmit-summary": "A API commentsubmit permite enviar/publicar um comentário após preencher os seguintes parâmetros: pageID, parentID, commentText.", + "apihelp-commentvote-description": "A API commentvote permite votar num comentário após preencher os seguintes parâmetros: commentID, voteValue.", + "apihelp-commentvote-summary": "A API commentvote permite votar num comentário após preencher os seguintes parâmetros: commentID, voteValue.", + "apihelp-commentblock-param-commentID": "Identificador do comentário do utilizador que vai ser bloqueado", + "apihelp-commentdelete-param-commentID": "Identificador do comentário a ser eliminado", + "apihelp-commentlatestid-param-pageID": "Identificador da página em que está o comentário mais recente", + "apihelp-commentlist-param-pageID": "Identificador da página de onde é obtida a lista de comentários", + "apihelp-commentlist-param-order": "Define se a lista de comentários tem ordem crescente ou decrescente", + "apihelp-commentlist-param-pagerPage": "Número da página de comentários", + "apihelp-commentlist-param-showForm": "Mostrar o formulário de comentários", + "apihelp-commentsubmit-param-pageID": "Identificador da página onde será feito o comentário", + "apihelp-commentsubmit-param-parentID": "Identificador do comentário mãe", + "apihelp-commentsubmit-param-commentText": "Texto do comentário", + "apihelp-commentvote-param-commentID": "Identificador do comentário que foi votado", + "apihelp-commentvote-param-voteValue": "Valor do voto para o comentário", + "comments-comment": "Comentário", + "comments-desc": "Adiciona ao analisador sintático o ''hook'' <comments> que permite comentar em páginas", + "comments-db-locked": "

A adicionar comentários

A base de dados está bloqueada para manutenção de rotina, após a qual voltará ao normal. Volte mais tarde, por favor!", + "comments-voted-label": "Votado", "comments-loading": "Carregando...", - "comments-reply-to": "Responder a", + "comments-auto-refresher-enable": "Ativar a atualização automática de comentários", + "comments-auto-refresher-pause": "Parar a atualização automática de comentários", + "comments-reply-to": "Responder a {{GENDER:$2|$1}}", "comments-cancel-reply": "Cancelar", + "comments-block-warning-anon": "Tem a certeza de que pretende ignorar permanentemente todos os comentários deste utilizador anónimo (através do seu endereço IP)?", + "comments-block-warning-user": "Tem a certeza de que pretende ignorar permanentemente todos os comentários do utilizador $1?", "comments-delete-warning": "Você tem certeza que deseja excluir este comentário?", "comments-sort-by-date": "Ordenar por data", "comments-sort-by-score": "Ordenar por pontuação", "comments-show-comment-link": "Mostrar comentário", + "comments-manage-blocklist-link": "Gerenciar lista de ignorados", + "comments-ignore-message": "Está a ignorar o autor deste comentário", "comments-you": "Você", "comments-reply": "Responder", "comments-login-required": "Você precisa estar autenticado para adicionar comentários", @@ -23,6 +58,10 @@ "comments-permalink": "Link permanente", "comments-delete-link": "Apagar comentário", "comments-anon-name": "Usuário anônimo", + "comments-anon-message": "A wiki {{SITENAME}} agradece todos os comentários. Se não quer ser anónimo, registe-se ou inicie a sua sessão. É gratuito.", + "comments-links-are-forbidden": "Não são permitidas hiperligações externas nos comentários!", + "comments-is-spam": "O texto do comentário enviado foi interpretado como spam.", + "comments-ignore-item": "$2 a $3 (desbloquear)", "comments-ignore-no-users": "Não há usuários atualmente bloqueados.", "comments-ignore-remove-message": "Você tem certeza que deseja desbloquear os comentários do usuário $1?", "comments-ignore-unblock": "Desbloquear", @@ -31,9 +70,25 @@ "commentignorelist": "Lista de comentários ignorados", "log-name-comments": "Registro de comentários", "log-description-comments": "Este é um registro de comentários.", + "logentry-comments-add": "$1 publicou um novo comentário em $3", + "logentry-comments-delete": "$1 eliminou o comentário #$4 em $3", + "comments-time-ago": "$1 atrás", + "comments-time-months": "{{PLURAL:$1|um mês|$1 meses}}", "comments-time-days": "{{PLURAL:$1|um dia|$1 dias}}", "comments-time-hours": "{{PLURAL:$1|uma hora|$1 horas}}", "comments-time-minutes": "{{PLURAL:$1|um minuto|$1 minutos}}", "comments-time-seconds": "{{PLURAL:$1|um segundo|$1 segundos}}", - "right-comment": "Enviar comentários" + "log-show-hide-comments": "$1 registo de comentários", + "logeventslist-comments-log": "Registo de comentários", + "group-commentadmin": "Administradores de comentários", + "group-commentadmin-member": "{{GENDER:$1|administrador|administradora}} de comentários", + "grouppage-commentadmin": "{{ns:project}}:Administradores de comentários", + "action-comment": "enviar comentários", + "right-comment": "Enviar comentários", + "action-commentadmin": "administrar comentários enviados por usuários", + "right-commentadmin": "Administrar comentários enviados por utilizadores", + "action-commentlinks": "usar links externos em comentários", + "right-commentlinks": "Usar hiperligações externas em comentários", + "action-comment-delete-own": "eliminar comentários do próprio", + "right-comment-delete-own": "Excluir seus próprios comentários" } diff --git a/i18n/pt.json b/i18n/pt.json index 4e0ee40..2813059 100644 --- a/i18n/pt.json +++ b/i18n/pt.json @@ -8,18 +8,18 @@ "Hamilton Abreu" ] }, - "apihelp-commentblock-description": "A API commentblock permite bloquear um utilizador a partir de um comentário feito por ele, após preencher os seguintes parâmetros: CommentID.", - "apihelp-commentblock-summary": "A API commentblock permite bloquear um utilizador a partir de um comentário feito por ele, após preencher os seguintes parâmetros: CommentID.", - "apihelp-commentdelete-description": "A API commentdelete permite eliminar um comentário após preencher os seguintes parâmetros: CommentID.", - "apihelp-commentdelete-summary": "A API commentdelete permite eliminar um comentário após preencher os seguintes parâmetros: CommentID.", - "apihelp-commentlatestid-description": "A API commentlatestID permite obter o identificador do comentário mais recente após preencher os seguintes parâmetros: pageID", - "apihelp-commentlatestid-summary": "A API commentlatestID permite obter o identificador do comentário mais recente após preencher os seguintes parâmetros: pageID", - "apihelp-commentlist-description": "A API commentlist obtém vários comentários e fornece-os na forma de lista após preencher os seguintes parâmetros: pageID, order, pagerPage e showForm.", - "apihelp-commentlist-summary": "A API commentlist obtém vários comentários e fornece-os na forma de lista após preencher os seguintes parâmetros: pageID, order, pagerPage e showForm.", - "apihelp-commentsubmit-description": "A API commentsubmit permite enviar/publicar um comentário após preencher os seguintes parâmetros: pageID, parentID, commentText.", + "apihelp-commentblock-description": "A API commentblock permite bloquear um utilizador a partir de um comentário feito por ele, depois de preencher os seguintes parâmetros: CommentID.", + "apihelp-commentblock-summary": "A API commentblock permite bloquear um utilizador a partir de um comentário feito por ele, depois de preencher os seguintes parâmetros: CommentID.", + "apihelp-commentdelete-description": "A API commentdelete permite eliminar um comentário depois de preencher os seguintes parâmetros: CommentID.", + "apihelp-commentdelete-summary": "A API commentdelete permite eliminar um comentário depois de preencher os seguintes parâmetros: CommentID.", + "apihelp-commentlatestid-description": "A API commentlatestID permite obter o identificador do comentário mais recente depois de preencher os seguintes parâmetros: pageID", + "apihelp-commentlatestid-summary": "A API commentlatestID permite obter o identificador do comentário mais recente depois de preencher os seguintes parâmetros: pageID", + "apihelp-commentlist-description": "A API commentlist obtém vários comentários e fornece-os na forma de lista depois de preencher os seguintes parâmetros: pageID, order, pagerPage e showForm.", + "apihelp-commentlist-summary": "A API commentlist obtém vários comentários e fornece-os na forma de lista depois de preencher os seguintes parâmetros: pageID, order, pagerPage e showForm.", + "apihelp-commentsubmit-description": "A API commentsubmit permite enviar/publicar um comentário depois de preencher os seguintes parâmetros: pageID, parentID, commentText.", "apihelp-commentsubmit-summary": "A API commentsubmit permite enviar/publicar um comentário após preencher os seguintes parâmetros: pageID, parentID, commentText.", "apihelp-commentvote-description": "A API commentvote permite votar num comentário após preencher os seguintes parâmetros: commentID, voteValue.", - "apihelp-commentvote-summary": "A API commentvote permite votar num comentário após preencher os seguintes parâmetros: commentID, voteValue.", + "apihelp-commentvote-summary": "A API commentvote permite votar num comentário depois de preencher os seguintes parâmetros: commentID, voteValue.", "apihelp-commentblock-param-commentID": "Identificador do comentário do utilizador que vai ser bloqueado", "apihelp-commentdelete-param-commentID": "Identificador do comentário a ser eliminado", "apihelp-commentlatestid-param-pageID": "Identificador da página em que está o comentário mais recente", @@ -56,11 +56,11 @@ "comments-post": "Publicar comentário", "comments-submit": "Adicionar o seu comentário", "comments-score-text": "Pontuação", - "comments-permalink": "Ligação permanente", + "comments-permalink": "Hiperligação permanente", "comments-delete-link": "Eliminar comentário", "comments-anon-name": "Utilizador anónimo", "comments-anon-message": "A wiki {{SITENAME}} agradece todos os comentários. Se não quer ser anónimo, registe-se ou inicie a sua sessão. É gratuito.", - "comments-links-are-forbidden": "Ligações externas nos comentários são proibidas!", + "comments-links-are-forbidden": "Não são permitidas hiperligações externas nos comentários!", "comments-is-spam": "O texto do comentário enviado foi interpretado como spam.", "comments-ignore-item": "$2 a $3 (desbloquear)", "comments-ignore-no-users": "Não existem utilizadores bloqueados.", @@ -69,7 +69,6 @@ "comments-ignore-cancel": "Cancelar", "comments-ignore-title": "Lista de comentários ignorados", "commentignorelist": "Lista de comentários ignorados", - "comments-no-comments-of-day": "Não existem comentários do dia.", "log-name-comments": "Registo de comentários", "log-description-comments": "Este é um registo de comentários.", "logentry-comments-add": "$1 publicou um novo comentário em $3", @@ -81,10 +80,16 @@ "comments-time-minutes": "{{PLURAL:$1|um minuto|$1 minutos}}", "comments-time-seconds": "{{PLURAL:$1|um segundo|$1 segundos}}", "log-show-hide-comments": "$1 registo de comentários", + "logeventslist-comments-log": "Registo de comentários", "group-commentadmin": "Administradores de comentários", "group-commentadmin-member": "{{GENDER:$1|administrador|administradora}} de comentários", "grouppage-commentadmin": "{{ns:project}}:Administradores de comentários", + "action-comment": "enviar comentários", "right-comment": "Enviar comentários", + "action-commentadmin": "administrar comentários enviados por utilizadores", "right-commentadmin": "Administrar comentários enviados por utilizadores", - "right-commentlinks": "Usar ligações externas em comentários" + "action-commentlinks": "usar hiperligações externas em comentários", + "right-commentlinks": "Usar hiperligações externas em comentários", + "action-comment-delete-own": "eliminar comentários do próprio", + "right-comment-delete-own": "Eliminar comentários do próprio" } diff --git a/i18n/qqq.json b/i18n/qqq.json index c6e6340..71779ae 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -74,7 +74,6 @@ "comments-ignore-cancel": "Used as Cancel button text.\n{{Identical|Cancel}}", "comments-ignore-title": "Title of Special:CommentIgnoreList, as shown on the said page.", "commentignorelist": "{{doc-special|CommentIgnoreList}}\nThe comment ignore list contains a list of users whose comments you are ignoring; an ignored comment won't show up by default and you have to click on a special link to view it", - "comments-no-comments-of-day": "Shown as the output of the parser hook if there are no comments of the day.", "log-name-comments": "Shown on the dropdown on [[Special:Log]].", "log-description-comments": "Explanation of the comments log, shown on [[Special:Log/comments]].", "logentry-comments-add": "Parameters:\n* $1 - contains the user name + talk/block/contribs links, as is the standard with log entries nowadays\n* $2 - (Optional) username, for {{GENDER}} support\n* $3 - a wikilink to the page where the comment was posted; it contains a fragment that directly points to the new comment in question, i.e. [[Talk:Main Page#comment-10]] (the number is the internal comment identifier)", @@ -86,10 +85,16 @@ "comments-time-minutes": "Used as the duration in {{msg-mw|Comments-time-ago}}.\n\nParameters:\n* $1 - number of minutes\n{{Related|Comments-time}}\n{{Identical|Minute}}", "comments-time-seconds": "Used as the duration in {{msg-mw|Comments-time-ago}}.\n\nParameters:\n* $1 - number of seconds\n{{Related|Comments-time}}\n{{Identical|Second}}", "log-show-hide-comments": "For [[Special:Log]]. Parameters:\n* $1 - one of {{msg-mw|Show}} or {{msg-mw|Hide}}\n{{Related|Log-show-hide}}", + "logeventslist-comments-log": "Comment log option label on [[Special:Log]]", "group-commentadmin": "Shown on [[Special:ListUsers]]. Members of this group can delete other users' comments.\n{{doc-group|commentadmin}}", "group-commentadmin-member": "Member of the Comment Administrators (commentadmin) group, shown on [[Special:ListUsers]].\n{{doc-group|commentadmin|member}}", "grouppage-commentadmin": "{{doc-group|commentadmin|page}}", + "action-comment": "{{doc-action|comment}}", "right-comment": "{{doc-right|comment}}", + "action-commentadmin": "{{doc-action|commentadmin}}", "right-commentadmin": "{{doc-right|commentadmin}}", - "right-commentlinks": "{{doc-right|commentlinks}}" + "action-commentlinks": "{{doc-action|commentlinks}}", + "right-commentlinks": "{{doc-right|commentlinks}}", + "action-comment-delete-own": "{{doc-action|comment-delete-own}}", + "right-comment-delete-own": "{{doc-right|comment-delete-own}}" } diff --git a/i18n/qu.json b/i18n/qu.json index b0753df..5cebc23 100644 --- a/i18n/qu.json +++ b/i18n/qu.json @@ -5,5 +5,6 @@ ] }, "comments-post": "Willapasqata uyaychay", - "comments-time-ago": "$1 ñaqha" + "comments-time-ago": "$1 ñaqha", + "comments-time-days": "{{PLURAL:$1|huk p'unchaw|$1 p'unchawkuna}}" } diff --git a/i18n/ro.json b/i18n/ro.json index ef07827..3fcfdd2 100644 --- a/i18n/ro.json +++ b/i18n/ro.json @@ -30,7 +30,6 @@ "comments-ignore-no-users": "Nu există utilizatori blocați.", "comments-ignore-unblock": "Deblocare", "comments-ignore-cancel": "Renunță", - "comments-no-comments-of-day": "Nu există niciun comentariu al zilei.", "log-name-comments": "Jurnal comentarii", "log-description-comments": "Acesta este un jurnal de comentarii.", "comments-time-ago": "în urmă cu $1", diff --git a/i18n/roa-tara.json b/i18n/roa-tara.json index 004dc09..fbebfd0 100644 --- a/i18n/roa-tara.json +++ b/i18n/roa-tara.json @@ -4,8 +4,10 @@ "Joetaras" ] }, + "apihelp-commentlist-param-pagerPage": "Numere de pàgene de le commende", "apihelp-commentlist-param-showForm": "Fà 'ndrucà 'u module de le commende", "apihelp-commentsubmit-param-commentText": "Teste d'u commende", + "apihelp-commentvote-param-voteValue": "Vote 'u valore pu commende", "comments-comment": "Commende", "comments-desc": "Aggiunge <comments> cumme gance analizzatrice ca permette de commendà sus a le pàggene", "comments-db-locked": "

Aggiunde de commende

'U database jè bloccate pe mò pe manutenzione, apprisse ca spicce torne normale. Pe piacere pruève cchiù tarde!", @@ -43,7 +45,6 @@ "comments-ignore-cancel": "Annulle", "comments-ignore-title": "Commende l'elenghe de scarte", "commentignorelist": "Commende l'elenghe de scarte", - "comments-no-comments-of-day": "Non ge stonne commende d'a sciurnate.", "log-name-comments": "Archivije de le commende", "log-description-comments": "Quiste jè 'n'archivije de commende.", "logentry-comments-add": "$1 ave mannate 'nu commende nuève sus a $3", @@ -55,10 +56,12 @@ "comments-time-minutes": "{{PLURAL:$1|'nu minute|$1 minute}}", "comments-time-seconds": "{{PLURAL:$1|'nu seconde|$1 seconde}}", "log-show-hide-comments": "$1 archivije de commende", + "logeventslist-comments-log": "Archivije de le commende", "group-commentadmin": "Amministrature de le Commende", "group-commentadmin-member": "{{GENDER:$1|amministratore d'u commende}}", "grouppage-commentadmin": "{{ns:project}}:Amministrature d'u commende", "right-comment": "Conferme le commende", "right-commentadmin": "Gestisce le commende de le utinde confermate", - "right-commentlinks": "Ause le collegaminde de fore jndr'à le commende" + "right-commentlinks": "Ause le collegaminde de fore jndr'à le commende", + "right-comment-delete-own": "Scangìlle le commende tune" } diff --git a/i18n/ru.json b/i18n/ru.json index 2ee1864..f92c809 100644 --- a/i18n/ru.json +++ b/i18n/ru.json @@ -5,9 +5,15 @@ "Lockal", "Okras", "Ole Yves", - "SimonLitt" + "SimonLitt", + "Stjn", + "Vlad5250" ] }, + "apihelp-commentblock-description": "Приложение для блокировки комментариев позволяет заблокировать участника от комментирования, который возник после заполнения следующих параметров: CommentID.", + "apihelp-commentblock-summary": "Приложение для блокировки комментариев позволяет заблокировать участника от комментирования, который возник после заполнения следующих параметров: CommentID.", + "apihelp-commentdelete-description": "Приложение для удаления комментариев позволяет удалить комментарий, который возник после заполнения следующих параметров: CommentID.", + "apihelp-commentdelete-summary": "Приложение для удаления комментариев позволяет удалить комментарий, который возник после заполнения следующих параметров: CommentID.", "apihelp-commentsubmit-param-commentText": "Текст комментария", "comments-comment": "Комментарий", "comments-desc": "Добавляет перехватчик синтаксического анализатора <comments>, который позволяет комментировать страницы", @@ -46,7 +52,6 @@ "comments-ignore-cancel": "Отменить", "comments-ignore-title": "Список тех, чьи комментарии игнорируются", "commentignorelist": "Список игнорируемых комментаторов", - "comments-no-comments-of-day": "Нет комментариев дня.", "log-name-comments": "Журнал комментариев", "log-description-comments": "Это журнал комментариев.", "logentry-comments-add": "$1 опубликовал новый комментарий на $3", @@ -58,10 +63,12 @@ "comments-time-minutes": "{{PLURAL:$1|$1 минуту|$1 минуты|$1 минут}}", "comments-time-seconds": "{{PLURAL:$1|$1 секунду|$1 секунды|$1 секунд}}", "log-show-hide-comments": "$1 комментарий из журнала", + "logeventslist-comments-log": "Журнал комментариев", "group-commentadmin": "Модераторы комментариев", "group-commentadmin-member": "{{GENDER:$1|модератор комментариев}}", "grouppage-commentadmin": "{{ns:project}}:Модераторы комментариев", "right-comment": "Отправить комментарии", "right-commentadmin": "Администрировать комментарии, опубликованные участником", - "right-commentlinks": "Использовать внешние ссылки в комментариях" + "right-commentlinks": "Использовать внешние ссылки в комментариях", + "right-comment-delete-own": "удаление собственных комментариев" } diff --git a/i18n/sco.json b/i18n/sco.json index 11a6648..5cbc8fb 100644 --- a/i18n/sco.json +++ b/i18n/sco.json @@ -41,7 +41,6 @@ "comments-ignore-cancel": "Cancel", "comments-ignore-title": "Comment ignore leet", "commentignorelist": "Comment ignore leet", - "comments-no-comments-of-day": "Thaur ar naw comments o the day.", "log-name-comments": "Comments log", "log-description-comments": "This is ae log o comments.", "logentry-comments-add": "$1 posted ae new comment oan $3", diff --git a/i18n/si.json b/i18n/si.json index 3118dc7..f7cb349 100644 --- a/i18n/si.json +++ b/i18n/si.json @@ -35,7 +35,6 @@ "comments-ignore-cancel": "අත් හරින්න", "comments-ignore-title": "පරිකථන නොසලකා හැරීම් ලැයිස්තුව", "commentignorelist": "පරිකථන නොසලකා හැරීම් ලැයිස්තුව", - "comments-no-comments-of-day": "දවසේ පරිකථන කිසිවක් එහි නොමැත.", "log-name-comments": "පරිකථන ලඝු සටහන", "log-description-comments": "මෙය පරිකථනවල ලඝු සටහනකි.", "comments-time-ago": "$1 පෙර", diff --git a/i18n/sr-ec.json b/i18n/sr-ec.json index 9d8a90e..8b5ac19 100644 --- a/i18n/sr-ec.json +++ b/i18n/sr-ec.json @@ -4,7 +4,8 @@ "Rancher", "Milicevic01", "Сербијана", - "Obsuser" + "Obsuser", + "BadDog" ] }, "comments-comment": "Коментар", @@ -25,7 +26,6 @@ "comments-ignore-cancel": "Откажи", "comments-ignore-title": "Списак занемарених коментара", "commentignorelist": "Списак занемарених коментара", - "comments-no-comments-of-day": "Нема коментара дана.", "log-name-comments": "Дневник коментара", "log-description-comments": "Ово је дневник коментара.", "comments-time-ago": "пре $1", @@ -38,5 +38,6 @@ "group-commentadmin-member": "{{GENDER:$1|администратор|администраторка}} коментара", "grouppage-commentadmin": "{{ns:project}}:Администратори коментара", "right-comment": "слање коментара", - "right-commentadmin": "управљање корисничким коментарима" + "right-commentadmin": "управљање корисничким коментарима", + "right-comment-delete-own": "брисање сопственох коментара" } diff --git a/i18n/sr-el.json b/i18n/sr-el.json index 872bf50..f7b4483 100644 --- a/i18n/sr-el.json +++ b/i18n/sr-el.json @@ -25,7 +25,6 @@ "comments-ignore-cancel": "Otkaži", "comments-ignore-title": "Spisak zanemarenih komentara", "commentignorelist": "Spisak zanemarenih komentara", - "comments-no-comments-of-day": "Nema komentara dana.", "log-name-comments": "Dnevnik komentara", "log-description-comments": "Ovo je dnevnik komentara.", "comments-time-ago": "pre $1", diff --git a/i18n/sv.json b/i18n/sv.json index 66f5e98..d816c3f 100644 --- a/i18n/sv.json +++ b/i18n/sv.json @@ -68,7 +68,6 @@ "comments-ignore-cancel": "Avbryt", "comments-ignore-title": "Ignoreringslista för kommentarer", "commentignorelist": "Ignoreringslista för kommentarer", - "comments-no-comments-of-day": "Det finns inga kommentarer idag.", "log-name-comments": "Kommentarlogg", "log-description-comments": "Detta är en logg för kommentarer.", "logentry-comments-add": "$1 har postat en ny kommentar på $3", @@ -80,10 +79,14 @@ "comments-time-minutes": "{{PLURAL:$1|en minut|$1 minuter}}", "comments-time-seconds": "{{PLURAL:$1|en sekund|$1 sekunder}}", "log-show-hide-comments": "$1 kommentarlogg", + "logeventslist-comments-log": "Kommentarslogg", "group-commentadmin": "Kommentaradministratörer", "group-commentadmin-member": "{{GENDER:$1|kommentaradministratör}}", "grouppage-commentadmin": "{{ns:project}}:Kommentaradministratörer", "right-comment": "Skicka kommentarer", "right-commentadmin": "Administrera kommentarer som användare har skickat", - "right-commentlinks": "Använd externa länkar i kommentarer" + "action-commentlinks": "använda externa länkar i kommentarer", + "right-commentlinks": "Använd externa länkar i kommentarer", + "action-comment-delete-own": "radera egna kommentarer", + "right-comment-delete-own": "Radera egna kommentarer" } diff --git a/i18n/sw.json b/i18n/sw.json index 186a4c2..307f288 100644 --- a/i18n/sw.json +++ b/i18n/sw.json @@ -1,7 +1,8 @@ { "@metadata": { "authors": [ - "Stephenwanjau" + "Stephenwanjau", + "Rance" ] }, "comments-loading": "Inapakiwa...", @@ -11,5 +12,6 @@ "comments-submit": "Ongeza maoni yako", "comments-delete-link": "Futa maoni", "comments-ignore-cancel": "Ghairi", - "log-name-comments": "Kumbukumbu ya maoni" + "log-name-comments": "Kumbukumbu ya maoni", + "logeventslist-comments-log": "taarifa ya maoni" } diff --git a/i18n/tay.json b/i18n/tay.json new file mode 100644 index 0000000..4d02792 --- /dev/null +++ b/i18n/tay.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Akamycoco" + ] + }, + "comments-anon-name": "Inqing lalu’ nqu squliq cyux mbing" +} diff --git a/i18n/te.json b/i18n/te.json index f82c696..d91a3f0 100644 --- a/i18n/te.json +++ b/i18n/te.json @@ -30,7 +30,7 @@ "comments-ignore-unblock": "నిరోధాన్ని ఎత్తివేయి", "comments-ignore-cancel": "రద్దుచేయి", "log-name-comments": "వ్యాఖ్యల చిట్టా", - "log-description-comments": "ఇది వ్యాఖ్యల యొక్క చిట్టా.", + "log-description-comments": "ఇది వ్యాఖ్యల చిట్టా.", "comments-time-ago": "$1 క్రితం", "comments-time-months": "{{PLURAL:$1|ఒక నెల|$1 నెలల}}", "comments-time-days": "{{PLURAL:$1|ఒక రోజు|$1 రోజుల}}", diff --git a/i18n/th.json b/i18n/th.json index 2241250..0298ee9 100644 --- a/i18n/th.json +++ b/i18n/th.json @@ -1,62 +1,62 @@ { "@metadata": { "authors": [ - "XthemeCore" + "XthemeCore", + "Octahedron80" ] }, - "comments-comment": "ความคิดเห็น", - "comments-desc": "เพิ่ม <comments> parser hook ซึ่งทำให้สามารถในการแสดงความคิดเห็นได้", - "comments-db-locked": "

เพิ่มความเห็นเห็น

ขออภัย ขณะนี้้ฐานข้อมูลถูกปิดการใช้งานเพื่อทำการบำรุงรักษา กรุณาลองใหม่ในภายหลัง", - "comments-voted-label": "โหวต", + "comments-comment": "ความเห็น", + "comments-desc": "เพิ่มฮุกตัวแจงส่วน <comments> ซึ่งทำให้สามารถแสดงความเห็นบนหน้าต่าง ๆ ได้", + "comments-db-locked": "

เพิ่มความเห็น

ขณะนี้ฐานข้อมูลถูกล็อกเพื่อบำรุงรักษา หลังจากนี้จะกลับเป็นปกติ กรุณาลองใหม่ในภายหลัง", + "comments-voted-label": "โหวตแล้ว", "comments-loading": "กำลังโหลด...", - "comments-auto-refresher-enable": "เปิดการ รีเฟรส ความคิดเห็นอัตโนมัติ", - "comments-auto-refresher-pause": "หยุดการ รีเฟรส ความคิดเห็นอัตโนมัติ", - "comments-reply-to": "ตอบกลับ {{GENDER:$2|$1}}", + "comments-auto-refresher-enable": "เปิดตัวรีเฟรชความเห็นอัตโนมัติ", + "comments-auto-refresher-pause": "หยุดตัวรีเฟรชความเห็นอัตโนมัติ", + "comments-reply-to": "ตอบกลับถึง {{GENDER:$2|$1}}", "comments-cancel-reply": "ยกเลิก", - "comments-block-warning-anon": "คุณต้องการเพิกเฉยความคิดเห็นทั้งหมดของผู้ใช้ไม่ระบุตัวตนอย่างถาวร (ผ่าน หมายเลขที่อยู่ไอพี ของพวกเขา)หรือไม่", - "comments-block-warning-user": "คุณต้องการเพิกเฉยความคิดเห็นทั้งหมดของ $1 อย่างถาวรหรือไม่", - "comments-delete-warning": "คุณต้องการลบความคิดเห็นนี้หรือไม่", + "comments-block-warning-anon": "คุณต้องการเพิกเฉยความเห็นทั้งหมดของผู้ใช้นิรนาม (ผ่านหมายเลขที่อยู่ไอพีของพวกเขา) อย่างถาวรหรือไม่", + "comments-block-warning-user": "คุณต้องการเพิกเฉยความเห็นทั้งหมดของผู้ใช้ $1 อย่างถาวรหรือไม่", + "comments-delete-warning": "คุณต้องการลบความเห็นนี้หรือไม่", "comments-sort-by-date": "เรียงตามวันที่", "comments-sort-by-score": "เรียงตามคะแนน", - "comments-show-comment-link": "ดูความคิดเห็น", - "comments-manage-blocklist-link": "จัดการรายการที่ถูกละเว้น", - "comments-ignore-message": "คุณกำลังเพิกเฉยผู้แสดงความคิดเห็นนี้", + "comments-show-comment-link": "แสดงความเห็น", + "comments-manage-blocklist-link": "จัดการรายการที่เพิกเฉย", + "comments-ignore-message": "คุณกำลังเพิกเฉยต่อผู้ฝากความเห็นนี้", "comments-you": "คุณ", "comments-reply": "ตอบกลับ", - "comments-login-required": "คุณต้องเข้าสู่ระบบเพื่อแสดงความคิดเห็น", - "comments-not-allowed": "คุณไม่ได้รับอนุญาตให้แสดงความคิดเห็น", - "comments-post": "แสดงความคิดเห็น", - "comments-submit": "เพิ่มความคิดเห็นของคุณ", - "comments-score-text": "คะแนนโหวต", + "comments-login-required": "คุณต้องล็อกอินเพื่อฝากความเห็น", + "comments-not-allowed": "คุณไม่ได้รับอนุญาตให้ฝากความเห็น", + "comments-post": "ฝากความเห็น", + "comments-submit": "เพิ่มความเห็นของคุณ", + "comments-score-text": "คะแนน", "comments-permalink": "ลิงก์ถาวร", - "comments-delete-link": "ลบความคิดเห็น", - "comments-anon-name": "ผู้ใช้ไม่ระบุตัวตน", - "comments-anon-message": "{{SITENAME}} ขอน้อมรับ ทุกความคิดเห็น คุณกำลังใช้งานในฐานะผู้ใช้ไม่ระบุตัวตน ลงทะเบียน | เข้าสู่ระบบ", - "comments-links-are-forbidden": "ไม่อนุญาตให้แสดงความคิดเห็นที่มีการแนบลิงก์จากภายนอก", - "comments-is-spam": "ความคิดเห็นมีลักษณะเป็นสแปม", - "comments-ignore-item": "$2 เมื่อ $3 (ปลดล็อค)", - "comments-ignore-no-users": "ขณะนี้ไม่มีผู้ใช้ใดถูกล็อค", - "comments-ignore-remove-message": "คุณต้องการปลดล็อค ความคิดเห็นของผู้ใช้ $1 หรือไม่", - "comments-ignore-unblock": "ปลดล็อค", + "comments-delete-link": "ลบความเห็น", + "comments-anon-name": "ผู้ใช้นิรนาม", + "comments-anon-message": "{{SITENAME}} ต้อนรับทุกความเห็น ถ้าคุณไม่ต้องการแสดงเป็นนิรนาม กรุณาลงทะเบียนหรือล็อกอิน ไม่มีค่าใช้จ่าย", + "comments-links-are-forbidden": "ห้ามใส่ลิงก์ภายนอกในความเห็น", + "comments-is-spam": "ข้อความในความเห็นที่ส่งมามีลักษณะเป็นสแปม", + "comments-ignore-item": "$2 เมื่อ $3 (ปลดบล็อก)", + "comments-ignore-no-users": "ไม่มีผู้ใช้ถูกบล็อกในขณะนี้", + "comments-ignore-remove-message": "คุณต้องการปลดบล็อกความเห็นของผู้ใช้ $1 หรือไม่", + "comments-ignore-unblock": "ปลดบล็อก", "comments-ignore-cancel": "ยกเลิก", - "comments-ignore-title": "รายการความคิดเห็นที่ถูกเพิกเฉย", - "commentignorelist": "รายการความคิดเห็นที่ถูกเพิกเฉย", - "comments-no-comments-of-day": "ไม่มีความคิดเห็นประจำวันนี้", - "log-name-comments": "บันทึกรายการความคิดเห็น", - "log-description-comments": "นี่คือบันทึกรายการความคิดเห็น", - "logentry-comments-add": "$1 แสดงความคิดเห็นใน $3", - "logentry-comments-delete": "$1 ลบความคิดเห็นหมายเลข #$4 ใน $3", - "comments-time-ago": "เมื่อ $1", - "comments-time-months": "{{PLURAL:$1|เดือนเดียว|$1 เดือน}}", - "comments-time-days": "{{PLURAL:$1|วันเดียว|$1 วัน}}", - "comments-time-hours": "{{PLURAL:$1|ชั่วโมงเดียว|$1 ชั่วโมง}}", - "comments-time-minutes": "{{PLURAL:$1|นาทีเดียว|$1 นาที}}", - "comments-time-seconds": "{{PLURAL:$1|วินาทีเดียว|$1 วินาที}}", - "log-show-hide-comments": "$1 บันทึกรายการความคิดเห็น", - "group-commentadmin": "ผู้ดูแลระบบ", - "group-commentadmin-member": "{{GENDER:$1|ผู้ดูแลระบบ}}", - "grouppage-commentadmin": "{{ns:project}}:ผู้ดูแลระบบ", - "right-comment": "แสดงความคิดเห็น", - "right-commentadmin": "จัดการความคิดเห็น", - "right-commentlinks": "สามารถใช้ลิงก์จากภายนอกในความคิดเห็น" + "comments-ignore-title": "รายการความเห็นที่เพิกเฉย", + "commentignorelist": "รายการความเห็นที่เพิกเฉย", + "log-name-comments": "ปูมความเห็น", + "log-description-comments": "นี่คือปูมบันทึกความเห็น", + "logentry-comments-add": "$1 ฝากความเห็นใหม่ใน $3", + "logentry-comments-delete": "$1 ลบความเห็น #$4 ใน $3", + "comments-time-ago": "$1ที่แล้ว", + "comments-time-months": "{{PLURAL:$1|1 เดือน|$1 เดือน}}", + "comments-time-days": "{{PLURAL:$1|1 วัน|$1 วัน}}", + "comments-time-hours": "{{PLURAL:$1|1 ชั่วโมง|$1 ชั่วโมง}}", + "comments-time-minutes": "{{PLURAL:$1|1 นาที|$1 นาที}}", + "comments-time-seconds": "{{PLURAL:$1|1 วินาที|$1 วินาที}}", + "log-show-hide-comments": "$1 ปูมความเห็น", + "group-commentadmin": "ผู้ดูแลความเห็น", + "group-commentadmin-member": "{{GENDER:$1|ผู้ดูแลความเห็น}}", + "grouppage-commentadmin": "{{ns:project}}:ผู้ดูแลความเห็น", + "right-comment": "ส่งความเห็น", + "right-commentadmin": "จัดการความเห็นของผู้ใช้ที่ส่งมา", + "right-commentlinks": "ใช้ลิงก์ภายนอกในความเห็น" } diff --git a/i18n/tt-cyrl.json b/i18n/tt-cyrl.json index 6e074c1..9288834 100644 --- a/i18n/tt-cyrl.json +++ b/i18n/tt-cyrl.json @@ -4,5 +4,19 @@ "Ильнар" ] }, - "comments-time-ago": "$1 элек" + "comments-voted-label": "Тавыш бирде", + "comments-loading": "Йөкләү...", + "comments-cancel-reply": "Баш тарту", + "comments-you": "Сез", + "comments-reply": "Җавап бирергә", + "comments-score-text": "Билге", + "comments-permalink": "Даими сылтама", + "comments-ignore-unblock": "Блоктан алу", + "comments-ignore-cancel": "Баш тарту", + "comments-time-ago": "$1 элек", + "comments-time-months": "{{PLURAL:$1|бер ай|$1 ай}}", + "comments-time-days": "{{PLURAL:$1|бер көн|$1 көн}}", + "comments-time-hours": "{{PLURAL:$1|бер сәгать|$1 сәгать}}", + "comments-time-minutes": "{{PLURAL:$1|бер минут|$1 минут}}", + "comments-time-seconds": "{{PLURAL:$1|бер секунд|$1 секунд}}" } diff --git a/i18n/uk.json b/i18n/uk.json index 89ca18b..dbf898e 100644 --- a/i18n/uk.json +++ b/i18n/uk.json @@ -6,7 +6,8 @@ "Base", "RLuts", "Ата", - "Piramidion" + "Piramidion", + "Vlad5250" ] }, "apihelp-commentblock-description": "Commentblock API дозволяє заблокувати користувача за коментарем, за яким його можна відстежити, заповнивши такий параметр: CommentID.", @@ -70,7 +71,6 @@ "comments-ignore-cancel": "Скасувати", "comments-ignore-title": "Список коментарів, що ігноруються", "commentignorelist": "Список коментарів, що ігноруються", - "comments-no-comments-of-day": "Сьогодні коментарів немає.", "log-name-comments": "Журнал коментарів", "log-description-comments": "Це журнал коментарів.", "logentry-comments-add": "$1 {{GENDER:$1|додав|додала}} новий коментар на сторінку $3", @@ -82,10 +82,16 @@ "comments-time-minutes": "$1 {{PLURAL:$1|хвилину|хвилини|хвилин}}", "comments-time-seconds": "$1 {{PLURAL:$1|секунду|секунди|секунд}}", "log-show-hide-comments": "$1 журнал коментарів", + "logeventslist-comments-log": "Журнал коментарів", "group-commentadmin": "Адміністратор коментарів", "group-commentadmin-member": "{{GENDER:$1|адміністратор коментарів|адміністраторка коментрарів}}", "grouppage-commentadmin": "{{ns:project}}:Адміністратори коментарів", + "action-comment": "відправлення коментарів", "right-comment": "робити коментарі", + "action-commentadmin": "адміністрування доданих користувачами коментарів", "right-commentadmin": "Адмініструвати надіслані користувачами коментарі", - "right-commentlinks": "Вживати зовнішні посилання у коментарях" + "action-commentlinks": "використовування зовнішніх посилань у коментарях", + "right-commentlinks": "Вживати зовнішні посилання у коментарях", + "action-comment-delete-own": "видалення власних коментарів", + "right-comment-delete-own": "вилучення власних коментарів" } diff --git a/i18n/zgh.json b/i18n/zgh.json new file mode 100644 index 0000000..acef1e0 --- /dev/null +++ b/i18n/zgh.json @@ -0,0 +1,14 @@ +{ + "@metadata": { + "authors": [ + "ⵕⴰⵊⵉ", + "Mdb897" + ] + }, + "comments-comment": "ⴰⵅⴼⴰⵡⴰⵍ", + "comments-cancel-reply": "ⵙⵔ", + "comments-reply": "ⵔⴰⵔ", + "comments-ignore-cancel": "ⵙⵔ", + "logentry-comments-delete": "$1 ⵉⴽⴽⵙ ⴰⵅⴼⴰⵡⴰⵍ #$4 ⴷⵉ $3", + "logeventslist-comments-log": "ⵜⴰⵎⵙⵙⴽⵜⵉⵜ ⵏ ⵉⵅⴼⴰⵡⴰⵍⵏ" +} diff --git a/i18n/zh-hans.json b/i18n/zh-hans.json index 8cf8c30..de3796e 100644 --- a/i18n/zh-hans.json +++ b/i18n/zh-hans.json @@ -8,7 +8,9 @@ "Yfdyh000", "Liuxinyu970226", "Mywood", - "Impersonator 1" + "Impersonator 1", + "A Chinese Wikipedian", + "佛壁灯" ] }, "apihelp-commentblock-description": "评论封禁API允许封禁用户的评论权,它在填写以下参数后出现:评论ID。", @@ -72,7 +74,6 @@ "comments-ignore-cancel": "取消", "comments-ignore-title": "评论忽略名单", "commentignorelist": "评论忽略名单", - "comments-no-comments-of-day": "今天没有新的评论。", "log-name-comments": "评论日志", "log-description-comments": "这是评论的日志。", "logentry-comments-add": "$1在$3上添加了一则新评论", @@ -84,10 +85,16 @@ "comments-time-minutes": "{{PLURAL:$1|$1分钟}}", "comments-time-seconds": "{{PLURAL:$1|$1秒}}", "log-show-hide-comments": "$1评论日志", + "logeventslist-comments-log": "注释日志", "group-commentadmin": "评论管理员", "group-commentadmin-member": "{{GENDER:$1|评论管理员}}", "grouppage-commentadmin": "{{ns:project}}:评论管理员", + "action-comment": "提交评论", "right-comment": "提交评论", + "action-commentadmin": "管理员提交的评论", "right-commentadmin": "管理用户提交的评论", - "right-commentlinks": "评论中使用外部链接" + "action-commentlinks": "评论中使用外部链接", + "right-commentlinks": "评论中使用外部链接", + "action-comment-delete-own": "删除自己的评论", + "right-comment-delete-own": "删除自己的评论" } diff --git a/i18n/zh-hant.json b/i18n/zh-hant.json index 33f4f5d..49ffd7b 100644 --- a/i18n/zh-hant.json +++ b/i18n/zh-hant.json @@ -8,9 +8,36 @@ "Cwlin0416", "Impersonator 1", "Liuxinyu970226", - "LNDDYL" + "LNDDYL", + "Sanmosa", + "Kly", + "A2093064" ] }, + "apihelp-commentblock-description": "評論封鎖 API 允許在填完以下參數後來封鎖建立該評論的使用者:評論 ID", + "apihelp-commentblock-summary": "評論封鎖 API 允許在填完以下參數後來封鎖建立該評論的使用者:評論 ID", + "apihelp-commentdelete-description": "評論刪除 API 允許在填完以下參數後來刪除評論:評論 ID", + "apihelp-commentdelete-summary": "評論刪除 API 允許在填完以下參數後來刪除評論:評論 ID", + "apihelp-commentlatestid-description": "最新評論 ID API 允許在填完以下參數後來取得最新的評論 ID:頁面 ID", + "apihelp-commentlatestid-summary": "最新評論 ID API 允許在填完以下參數後來取得最新的評論 ID:頁面 ID", + "apihelp-commentlist-description": "評論清單 API 允許在填完以下參數後來取得多個評論並輸出成清單:頁面 ID、排序、排序頁面、與顯示表單。", + "apihelp-commentlist-summary": "評論清單 API 允許在填完以下參數後來取得多個評論並輸出成清單:頁面 ID、排序、排序頁面、與顯示表單。", + "apihelp-commentsubmit-description": "評論提交 API 允許在填完以下參數後來提交/發佈評論:頁面 ID、父 ID、評論文字。", + "apihelp-commentsubmit-summary": "評論提交 API 允許在填完以下參數後來提交/發佈評論:頁面 ID、父 ID、評論文字。", + "apihelp-commentvote-description": "評論投票 API 允許在填完以下參數後來對評論投票:評論 ID、投票評比。", + "apihelp-commentvote-summary": "評論投票 API 允許在填完以下參數後來對評論投票:評論 ID、投票評比。", + "apihelp-commentblock-param-commentID": "由被封鎖使用者所做出評論的評論 ID", + "apihelp-commentdelete-param-commentID": "要被刪除的評論之評論 ID", + "apihelp-commentlatestid-param-pageID": "在最新評論頁面的頁面 ID", + "apihelp-commentlist-param-pageID": "評論清單所取得頁面的頁面 ID", + "apihelp-commentlist-param-order": "定義評論清單為升序或降序排序", + "apihelp-commentlist-param-pagerPage": "評論頁面號碼", + "apihelp-commentlist-param-showForm": "顯示評論來自於", + "apihelp-commentsubmit-param-pageID": "所提交評論的該頁面之頁面 ID", + "apihelp-commentsubmit-param-parentID": "父評論的評論 ID", + "apihelp-commentsubmit-param-commentText": "評論文字", + "apihelp-commentvote-param-commentID": "所要投票用的評論之評論 ID", + "apihelp-commentvote-param-voteValue": "對於評論的投票評比", "comments-comment": "評論", "comments-desc": "增加 <comments> 語法分析器連結,允許在頁面上發表評論", "comments-db-locked": "

增加評論

資料庫因例行性維護目前已鎖定,待維護作業完成後會恢復正常。請稍後再檢查一次。", @@ -48,7 +75,6 @@ "comments-ignore-cancel": "取消", "comments-ignore-title": "評論忽略清單", "commentignorelist": "評論忽略清單", - "comments-no-comments-of-day": "當天沒有任何評論。", "log-name-comments": "評論日誌", "log-description-comments": "此為評論的日誌。", "logentry-comments-add": "$1 已發表新的評論於 $3", @@ -60,10 +86,16 @@ "comments-time-minutes": "$1 分鍾", "comments-time-seconds": "$1 秒", "log-show-hide-comments": "$1評論日誌", + "logeventslist-comments-log": "評論日誌", "group-commentadmin": "評論管理員", "group-commentadmin-member": "{{GENDER:$1|評論管理員}}", "grouppage-commentadmin": "{{ns:project}}:Comment administrators", + "action-comment": "送出評論", "right-comment": "送出評論", + "action-commentadmin": "管理使用者送出的評論", "right-commentadmin": "管理使用者送出的評論", - "right-commentlinks": "在評論中使用外部連結" + "action-commentlinks": "在評論中使用外部連結", + "right-commentlinks": "在評論中使用外部連結", + "action-comment-delete-own": "刪除擁有的評論", + "right-comment-delete-own": "刪除自有的評論" } diff --git a/i18n/zh-hk.json b/i18n/zh-hk.json new file mode 100644 index 0000000..d5bec42 --- /dev/null +++ b/i18n/zh-hk.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Liuxinyu970226" + ] + }, + "comments-anon-name": "匿名用戶" +} diff --git a/includes/.htaccess b/includes/.htaccess deleted file mode 100755 index 6326ab3..0000000 --- a/includes/.htaccess +++ /dev/null @@ -1,5 +0,0 @@ -## Default .htaccess file -# Displaying PHP errors -php_flag display_errors on -php_value error_reporting 6143 - diff --git a/includes/Comment.class.php b/includes/Comment.php similarity index 67% rename from includes/Comment.class.php rename to includes/Comment.php index af0de6a..2eed4f8 100644 --- a/includes/Comment.class.php +++ b/includes/Comment.php @@ -1,4 +1,7 @@ page = $page; @@ -125,24 +124,24 @@ class Comment extends ContextSource { $this->ip = $data['Comment_IP']; $this->text = $data['Comment_Text']; $this->date = $data['Comment_Date']; - $this->userID = $data['Comment_user_id']; + $this->userID = (int)$data['Comment_user_id']; $this->userPoints = $data['Comment_user_points']; - $this->id = $data['CommentID']; - $this->parentID = $data['Comment_Parent_ID']; + $this->id = (int)$data['CommentID']; + $this->parentID = (int)$data['Comment_Parent_ID']; $this->thread = $data['thread']; $this->timestamp = $data['timestamp']; if ( isset( $data['current_vote'] ) ) { $vote = $data['current_vote']; } else { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $row = $dbr->selectRow( 'Comments_Vote', - array( 'Comment_Vote_Score' ), - array( + [ 'Comment_Vote_Score' ], + [ 'Comment_Vote_ID' => $this->id, 'Comment_Vote_Username' => $this->getUser()->getName() - ), + ], __METHOD__ ); if ( $row !== false ) { @@ -160,24 +159,24 @@ class Comment extends ContextSource { public static function newFromID( $id ) { $context = RequestContext::getMain(); - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); if ( !is_numeric( $id ) || $id == 0 ) { return null; } - $tables = array(); - $params = array(); - $joinConds = array(); + $tables = []; + $params = []; + $joinConds = []; // Defaults (for non-social wikis) $tables[] = 'Comments'; - $fields = array( + $fields = [ 'Comment_Username', 'Comment_IP', 'Comment_Text', 'Comment_Date', 'Comment_Date AS timestamp', 'Comment_user_id', 'CommentID', 'Comment_Parent_ID', 'CommentID', 'Comment_Page_ID' - ); + ]; // If SocialProfile is installed, query the user_stats table too. if ( @@ -186,18 +185,18 @@ class Comment extends ContextSource { ) { $tables[] = 'user_stats'; $fields[] = 'stats_total_points'; - $joinConds = array( - 'Comments' => array( + $joinConds = [ + 'Comments' => [ 'LEFT JOIN', 'Comment_user_id = stats_user_id' - ) - ); + ] + ]; } // Perform the query $res = $dbr->select( $tables, $fields, - array( 'CommentID' => $id ), + [ 'CommentID' => $id ], __METHOD__, $params, $joinConds @@ -210,7 +209,7 @@ class Comment extends ContextSource { } else { $thread = $row->Comment_Parent_ID; } - $data = array( + $data = [ 'Comment_Username' => $row->Comment_Username, 'Comment_IP' => $row->Comment_IP, 'Comment_Text' => $row->Comment_Text, @@ -221,13 +220,23 @@ class Comment extends ContextSource { 'Comment_Parent_ID' => $row->Comment_Parent_ID, 'thread' => $thread, 'timestamp' => wfTimestamp( TS_UNIX, $row->timestamp ) - ); + ]; $page = new CommentsPage( $row->Comment_Page_ID, $context ); return new Comment( $page, $context, $data ); } + /** + * Is the given User the owner (author) of this comment? + * + * @param User $user + * @return bool + */ + public function isOwner( User $user ) { + return ( $this->username === $user->getName() && $this->userID === $user->getId() ); + } + /** * Parse and return the text for this comment * @@ -235,7 +244,7 @@ class Comment extends ContextSource { * @throws MWException */ function getText() { - global $wgParser; + $parser = MediaWikiServices::getInstance()->getParser(); $commentText = trim( str_replace( '"', "'", $this->text ) ); $comment_text_parts = explode( "\n", $commentText ); @@ -245,25 +254,25 @@ class Comment extends ContextSource { } if ( $this->getTitle()->getArticleID() > 0 ) { - $commentText = $wgParser->recursiveTagParse( $comment_text_fix ); + $commentText = $parser->recursiveTagParse( $comment_text_fix ); } else { $commentText = $this->getOutput()->parse( $comment_text_fix ); } // really bad hack because we want to parse=firstline, but don't want wrapping

tags - if ( substr( $commentText, 0 , 3 ) == '

' ) { + if ( substr( $commentText, 0, 3 ) == '

' ) { $commentText = substr( $commentText, 3 ); } - if ( substr( $commentText, strlen( $commentText ) -4 , 4 ) == '

' ) { - $commentText = substr( $commentText, 0, strlen( $commentText ) -4 ); + if ( substr( $commentText, strlen( $commentText ) - 4, 4 ) == '

' ) { + $commentText = substr( $commentText, 0, strlen( $commentText ) - 4 ); } // make sure link text is not too long (will overflow) // this function changes too long links to http://www.abc....xyz.html $commentText = preg_replace_callback( "/(]*>)(.*?)(<\/a>)/i", - array( 'CommentFunctions', 'cutCommentLinkText' ), + [ 'CommentFunctions', 'cutCommentLinkText' ], $commentText ); @@ -274,62 +283,48 @@ class Comment extends ContextSource { * Adds the comment and all necessary info into the Comments table in the * database. * - * @param string $text: text of the comment - * @param CommentsPage $page: container page - * @param User $user: user commenting - * @param int $parentID: ID of parent comment, if this is a reply + * @param string $text text of the comment + * @param CommentsPage $page container page + * @param User $user user commenting + * @param int $parentID ID of parent comment, if this is a reply * - * @return Comment: the added comment + * @return Comment the added comment */ static function add( $text, CommentsPage $page, User $user, $parentID ) { - global $wgCommentsInRecentChanges; $dbw = wfGetDB( DB_MASTER ); $context = RequestContext::getMain(); - wfSuppressWarnings(); + Wikimedia\suppressWarnings(); $commentDate = date( 'Y-m-d H:i:s' ); - wfRestoreWarnings(); - // ##START## 2017-09-27 von Bernhard Linz -// if ( $this->getUser()->isLoggedIn() ) { -// $kok_username = $user->getName(); -// $kok_username = $this->UsernameKOK; -// } else { - $kok_username = preg_match('/(?<=#START#).*?(?=#ENDE#)/s', $text, $result); - $kok_username = $result[0]; - $text = str_replace('#START#' . $result[0] . '#ENDE#', '', $text); -// $kok_username = str_replace('#START#', '', $kok_username); -// $kok_username = str_replace('#ENDE#', '', $kok_username); - if ( $kok_username == "" ) { - $kok_username = $user->getName(); - } - if ( $kok_username == "none" ) { - $kok_username = $user->getName(); - } -// $kok_username = preg_replace('/<.*>/i', '', $kok_username); -// $kok_username = preg_replace('/[^A-Za-z0-9. \-\@]/i', '', $kok_username); -// $kok_username = str_replace("1'1", '', $kok_username); -// $kok_username = str_replace('USER_NAME', '', $kok_username); -// $kok_username = str_replace('DESC', '', $kok_username); -// $kok_username = str_replace('(*)', '', $kok_username); -// $kok_username = str_replace('EXEC', '', $kok_username); */ - // } - // ##ENDE## 2017-09-27 von Bernhard Linz + Wikimedia\restoreWarnings(); +// ## START ## 25.05.2019 von Bernhard Linz ################################################################################################### + $kok_username = preg_match('/(?<=#START#).*?(?=#ENDE#)/s', $text, $result); + $kok_username = $result[0]; + $text = str_replace('#START#' . $result[0] . '#ENDE#', '', $text); + if ( $kok_username == "" ) { + $kok_username = $user->getName(); + } + if ( $kok_username == "none" ) { + $kok_username = $user->getName(); + } +// ## ENDE ## 25.05.2019 von Bernhard Linz ################################################################################################### $dbw->insert( 'Comments', - array( + [ 'Comment_Page_ID' => $page->id, +// ## START ## 25.05.2019 von Bernhard Linz ################################################################################################### //'Comment_Username' => $user->getName(), 'Comment_Username' => $kok_username, +// ## ENDE ## 25.05.2019 von Bernhard Linz ################################################################################################### 'Comment_user_id' => $user->getId(), 'Comment_Text' => $text, 'Comment_Date' => $commentDate, 'Comment_Parent_ID' => $parentID, 'Comment_IP' => $_SERVER['REMOTE_ADDR'] - ), + ], __METHOD__ ); $commentId = $dbw->insertId(); - $dbw->commit( __METHOD__ ); // misza: added this $id = $commentId; $page->clearCommentListCache(); @@ -337,7 +332,7 @@ class Comment extends ContextSource { // Add a log entry. self::log( 'add', $user, $page->id, $commentId, $text ); - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); if ( class_exists( 'UserProfile' ) && $dbr->tableExists( 'user_stats' ) @@ -345,7 +340,7 @@ class Comment extends ContextSource { $res = $dbr->select( // need this data for seeding a Comment object 'user_stats', 'stats_total_points', - array( 'stats_user_id' => $user->getId() ), + [ 'stats_user_id' => $user->getId() ], __METHOD__ ); @@ -360,38 +355,38 @@ class Comment extends ContextSource { } else { $thread = $parentID; } - $data = array( + $data = [ 'Comment_Username' => $user->getName(), 'Comment_IP' => $context->getRequest()->getIP(), 'Comment_Text' => $text, 'Comment_Date' => $commentDate, - 'Comment_user_id' => $user->getID(), + 'Comment_user_id' => $user->getId(), 'Comment_user_points' => $userPoints, 'CommentID' => $id, 'Comment_Parent_ID' => $parentID, 'thread' => $thread, 'timestamp' => strtotime( $commentDate ) - ); + ]; $page = new CommentsPage( $page->id, $context ); $comment = new Comment( $page, $context, $data ); - Hooks::run( 'Comment::add', array( $comment, $commentId, $comment->page->id ) ); - /* ## START Kommentar auch per Email versenden ## 11/2014 Bernhard Linz */ - //$title = Title::makeTitle( NS_USER, $this->username ); - $znilpageTitle = Title::newFromID( $comment->page->id ); - $comment_mailto = "root@linz.email"; - $comment_mailsubject = "Neuer Kommentar von: " . $kok_username . " - IP: " . $_SERVER['REMOTE_ADDR'] . " - DNS: " . gethostbyaddr($_SERVER['REMOTE_ADDR']) ; - $comment_mailfrom = "MIME-Version: 1.0\r\n"; - $comment_mailfrom .= "Content-type: text/html; charset=utf-8\r\n"; - $comment_mailfrom .= "From: znil.net Kommentare \r\n"; -// $comment_url = $znilpageTitle; - $comment_url = "https://znil.net/index.php?title={$znilpageTitle}#comment-{$commentId}"; -// $comment_url = "getFullURL() . "\">" . $title->getFullURL() . ""; - $comment_mailtext = $commentDate . "

" . $comment_url . "


" . "IP: " . $_SERVER['REMOTE_ADDR'] . "
" . "DNS: " . gethostbyaddr($_SERVER['REMOTE_ADDR']) ."

" . $kok_username . "

" . $text; - $comment_mailtext = nl2br($comment_mailtext); - mail($comment_mailto, $comment_mailsubject, $comment_mailtext, $comment_mailfrom); - /* ## ENDE Bernhard Linz */ + Hooks::run( 'Comment::add', [ $comment, $commentId, $comment->page->id ] ); +// ## START ## 25.05.2019 von Bernhard Linz ################################################################################################### +// Kommentar auch noch einmal per Email versenden (zur Kontrolle) + $znilpageTitle = Title::newFromID( $comment->page->id ); + $comment_mailto = "root@linz.email"; + $comment_mailsubject = "Neuer Kommentar von: " . $kok_username . " - IP: " . $_SERVER['REMOTE_ADDR'] . " - DNS: " . gethostbyaddr($_SERVER['REMOTE_ADDR']) ; + $comment_mailfrom = "MIME-Version: 1.0\r\n"; + $comment_mailfrom .= "Content-type: text/html; charset=utf-8\r\n"; + $comment_mailfrom .= "From: znil.net Kommentare \r\n"; +// $comment_url = $znilpageTitle; + $comment_url = "https://znil.net/index.php?title={$znilpageTitle}#comment-{$commentId}"; +// $comment_url = "getFullURL() . "\">" . $title->getFullURL() . ""; + $comment_mailtext = $commentDate . "

" . $comment_url . "


" . "IP: " . $_SERVER['REMOTE_ADDR'] . "
" . "DNS: " . gethostbyaddr($_SERVER['REMOTE_ADDR']) ."

" . $kok_username . "

" . $text; + $comment_mailtext = nl2br($comment_mailtext); + mail($comment_mailto, $comment_mailsubject, $comment_mailtext, $comment_mailfrom); +// ## ENDE ## 25.05.2019 von Bernhard Linz ################################################################################################### return $comment; } @@ -401,11 +396,11 @@ class Comment extends ContextSource { * @return string */ function getScore() { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $row = $dbr->selectRow( 'Comments_Vote', - array( 'SUM(Comment_Vote_Score) AS CommentScore' ), - array( 'Comment_Vote_ID' => $this->id ), + [ 'SUM(Comment_Vote_Score) AS CommentScore' ], + [ 'Comment_Vote_ID' => $this->id ], __METHOD__ ); $score = '0'; @@ -415,21 +410,12 @@ class Comment extends ContextSource { return $score; } - /* START Anpassungen znilwiki */ - /* ## START ## 25.10.2013 Hinzugefügt von Kai-Ole */ - function setCommentUsernameKOK( $UsernameKOK ) { - $this->CommentUsernameKOK = $UsernameKOK; - } - /* ## ENDE ## 25.10.2013 Kai-Ole */ - /* ENDE Anpassungen znilwiki */ - /** * Adds a vote for a comment if the user hasn't voted for said comment yet. * - * @param $value int: upvote or downvote (1 or -1) + * @param int $value Upvote or downvote (1 or -1) */ function vote( $value ) { - global $wgMemc; $dbw = wfGetDB( DB_MASTER ); if ( $value < -1 ) { // limit to range -1 -> 0 -> 1 @@ -442,53 +428,39 @@ class Comment extends ContextSource { $value = 0; } - wfSuppressWarnings(); + Wikimedia\suppressWarnings(); $commentDate = date( 'Y-m-d H:i:s' ); - wfRestoreWarnings(); + Wikimedia\restoreWarnings(); if ( $this->currentVote === false ) { // no vote, insert $dbw->insert( 'Comments_Vote', - array( + [ 'Comment_Vote_id' => $this->id, 'Comment_Vote_Username' => $this->getUser()->getName(), 'Comment_Vote_user_id' => $this->getUser()->getId(), 'Comment_Vote_Score' => $value, 'Comment_Vote_Date' => $commentDate, 'Comment_Vote_IP' => $_SERVER['REMOTE_ADDR'] - ), + ], __METHOD__ ); } else { // already a vote, update $dbw->update( 'Comments_Vote', - array( + [ 'Comment_Vote_Score' => $value, 'Comment_Vote_Date' => $commentDate, 'Comment_Vote_IP' => $_SERVER['REMOTE_ADDR'] - ), - array( + ], + [ 'Comment_Vote_id' => $this->id, 'Comment_Vote_Username' => $this->getUser()->getName(), 'Comment_Vote_user_id' => $this->getUser()->getId(), - ), + ], __METHOD__ ); } - $dbw->commit( __METHOD__ ); - - // update cache for comment list - // should perform better than deleting cache completely since Votes happen more frequently - $key = wfMemcKey( 'comment', 'pagethreadlist', $this->page->id ); - $comments = $wgMemc->get( $key ); - if ( $comments ) { - foreach ( $comments as &$comment ) { - if ( $comment->id == $this->id ) { - $comment->currentScore = $this->currentScore; - } - } - $wgMemc->set( $key, $comments ); - } $score = $this->getScore(); @@ -501,17 +473,18 @@ class Comment extends ContextSource { */ function delete() { $dbw = wfGetDB( DB_MASTER ); + $dbw->startAtomic( __METHOD__ ); $dbw->delete( 'Comments', - array( 'CommentID' => $this->id ), + [ 'CommentID' => $this->id ], __METHOD__ ); $dbw->delete( 'Comments_Vote', - array( 'Comment_Vote_ID' => $this->id ), + [ 'Comment_Vote_ID' => $this->id ], __METHOD__ ); - $dbw->commit( __METHOD__ ); + $dbw->endAtomic( __METHOD__ ); // Log the deletion to Special:Log/comments. self::log( 'delete', $this->getUser(), $this->page->id, $this->id ); @@ -520,7 +493,7 @@ class Comment extends ContextSource { $this->page->clearCommentListCache(); // Ping other extensions that may have hooked into this point (i.e. LinkFilter) - Hooks::run( 'Comment::delete', array( $this, $this->id, $this->page->id ) ); + Hooks::run( 'Comment::delete', [ $this, $this->id, $this->page->id ] ); } /** @@ -530,7 +503,7 @@ class Comment extends ContextSource { * @param User $user User who performed the action * @param int $pageId Page ID of the page that contains the comment thread * @param int $commentId Comment ID of the affected comment - * @param string $commentText Supplementary log comment, if any + * @param string|null $commentText Supplementary log comment, if any */ static function log( $action, $user, $pageId, $commentId, $commentText = null ) { global $wgCommentsInRecentChanges; @@ -540,9 +513,9 @@ class Comment extends ContextSource { if ( $commentText !== null ) { $logEntry->setComment( $commentText ); } - $logEntry->setParameters( array( + $logEntry->setParameters( [ '4::commentid' => $commentId - ) ); + ] ); $logId = $logEntry->insert(); $logEntry->publish( $logId, ( $wgCommentsInRecentChanges ? 'rcandudp' : 'udp' ) ); } @@ -571,11 +544,16 @@ class Comment extends ContextSource { '" data-voting="' . $this->page->voting . '" href="javascript:void(0);">'; } else { $login = SpecialPage::getTitleFor( 'Userlogin' ); // Anonymous users need to log in before they can vote - $returnTo = $this->page->title->getPrefixedDBkey(); // Determine a sane returnto URL parameter + $urlParams = []; + // @todo FIXME: *when* and *why* is this null? + if ( $this->page->title instanceof Title ) { + $returnTo = $this->page->title->getPrefixedDBkey(); // Determine a sane returnto URL parameter + $urlParams = [ 'returnto' => $returnTo ]; + } $voteLink .= "getLocalURL( array( 'returnto' => $returnTo ) ) ) . + htmlspecialchars( $login->getLocalURL( $urlParams ) ) . "\" rel=\"nofollow\">"; } @@ -600,9 +578,9 @@ class Comment extends ContextSource { /** * Show the HTML for this comment and ignore section * - * @param array $blockList list of users the current user has blocked - * @param array $anonList map of ip addresses to names like anon#1, anon#2 - * @return string html + * @param array $blockList List of users the current user has blocked + * @param array $anonList Map of IP addresses to names like anon#1, anon#2 + * @return string HTML */ function display( $blockList, $anonList ) { if ( $this->parentID == 0 ) { @@ -624,62 +602,6 @@ class Comment extends ContextSource { return $output; } - function displayForCommentOfTheDay() { - $output = ''; - - $title2 = $this->page->getTitle(); - - if ( $this->userID != 0 ) { - $title = Title::makeTitle( NS_USER, $this->username ); - $commentPoster_Display = $this->username; - $commentPoster = '' . $this->username . ''; - if ( class_exists( 'wAvatar' ) ) { - $avatar = new wAvatar( $this->userID, 's' ); - $commentIcon = $avatar->getAvatarImage(); - } else { - $commentIcon = ''; - } - } else { - // ##START## 27.09.2017 von Bernhard Linz - $commentPoster_Display = $this->username; - $commentPoster = $this->username; -// $commentPoster_Display = wfMessage( 'comments-anon-name' )->plain(); -// $commentPoster = wfMessage( 'comments-anon-name' )->plain(); - $commentIcon = 'default_s.gif'; - // ##ENDE## - } - - $avatarHTML = ''; - if ( class_exists( 'wAvatar' ) ) { - global $wgUploadPath; - $avatarHTML = ''; - } - - $comment_text = substr( $this->text, 0, 50 - strlen( $commentPoster_Display ) ); - if ( $comment_text != $this->text ) { - $comment_text .= wfMessage( 'ellipsis' )->plain(); - } - - $output .= '
'; - $sign = ''; - if ( $this->currentScore > 0 ) { - $sign = '+'; - } elseif ( $this->currentScore < 0 ) { - $sign = '-'; // this *really* shouldn't be happening... - } - $output .= '' . $sign . $this->currentScore . - ' ' . $avatarHTML . - '' . $commentPoster . ''; - $output .= '' . $comment_text . - ''; - $output .= '
'; - - return $output; - } - /** * Show the box for if this comment has been ignored * @@ -711,10 +633,10 @@ class Comment extends ContextSource { /** * Show the comment * - * @param bool $hide: if true, comment is returned but hidden (display:none) - * @param $containerClass - * @param $blockList - * @param $anonList + * @param bool $hide If true, comment is returned but hidden (display:none) + * @param string $containerClass + * @param array $blockList + * @param array $anonList * @return string */ function showComment( $hide = false, $containerClass, $blockList, $anonList ) { @@ -743,24 +665,33 @@ class Comment extends ContextSource { $user = User::newFromId( $this->userID ); $CommentReplyToGender = $user->getOption( 'gender', 'unknown' ); } else { - // ##START## 27.09.2017 von Bernhard Linz $anonMsg = $this->msg( 'comments-anon-name' )->inContentLanguage()->plain(); +// ## START ## 25.05.2019 von Bernhard Linz ################################################################################################### + //Bei Anonymen Benutzern den Namen trotzdem aus der Datenbank benutzen //$commentPoster = $anonMsg . ' #' . $anonList[$this->username]; $commentPoster = $this->username; if ( filter_var($commentPoster, FILTER_VALIDATE_IP) !== false ){ // Wert ist eine IP-Adresse $commentPoster = $anonMsg . ' #' . $anonList[$this->username]; } + // Name Fett drucken + $commentPoster = '' . $commentPoster . ''; +// ## ENDE ## 25.05.2019 von Bernhard Linz ################################################################################################### $CommentReplyTo = $anonMsg; $CommentReplyToGender = 'unknown'; // Undisclosed gender as anon user - $commentPoster = '' . $commentPoster . ''; - // ##ENDE## } // Comment delete button for privileged users + $userObj = $this->getUser(); $dlt = ''; - if ( $this->getUser()->isAllowed( 'commentadmin' ) ) { + if ( + $userObj->isAllowed( 'commentadmin' ) || + // Allow users to delete their own comments if that feature is enabled in + // site configuration + // @see https://phabricator.wikimedia.org/T147796 + $userObj->isAllowed( 'comment-delete-own' ) && $this->isOwner( $userObj ) + ) { $dlt = ' | ' . '' . @@ -769,7 +700,7 @@ class Comment extends ContextSource { // Reply Link (does not appear on child comments) $replyRow = ''; - if ( $this->getUser()->isAllowed( 'comment' ) ) { + if ( $userObj->isAllowed( 'comment' ) ) { if ( $this->parentID == 0 ) { if ( $replyRow ) { $replyRow .= wfMessage( 'pipe-separator' )->plain(); @@ -792,7 +723,7 @@ class Comment extends ContextSource { $blockLink = ''; if ( - $this->getUser()->getID() != 0 && $this->getUser()->getID() != $this->userID && + $userObj->getId() != 0 && $userObj->getId() != $this->userID && !( in_array( $this->userID, $blockList ) ) ) { $blockLink = ''; } else { - $avatarImg = ''; + $avatarImg = ''; } -// $avatarImg = ''; +// ## ENDE ## 25.05.2019 von Bernhard Linz ################################################################################################### // If SocialProfile *is* enabled, then use its wAvatar class to get the avatars for each commenter if ( class_exists( 'wAvatar' ) ) { $avatar = new wAvatar( $this->userID, 'ml' ); @@ -824,13 +756,13 @@ class Comment extends ContextSource { $output .= "{$commentPoster}"; $output .= "{$commentPosterLevel} {$blockLink}" . "\n"; - wfSuppressWarnings(); // E_STRICT bitches about strtotime() + Wikimedia\suppressWarnings(); // E_STRICT bitches about strtotime() $output .= '
' . wfMessage( 'comments-time-ago', CommentFunctions::getTimeAgo( strtotime( $this->date ) ) )->parse() . '
' . "\n"; - wfRestoreWarnings(); + Wikimedia\restoreWarnings(); $output .= '
' . "\n"; $output .= $this->getScoreHTML(); diff --git a/includes/CommentFunctions.class.php b/includes/CommentFunctions.php similarity index 86% rename from includes/CommentFunctions.class.php rename to includes/CommentFunctions.php index afaccd0..db4afe4 100644 --- a/includes/CommentFunctions.class.php +++ b/includes/CommentFunctions.php @@ -21,12 +21,12 @@ class CommentFunctions { static function getTimeOffset( $time, $timeabrv, $timename ) { $timeStr = ''; // misza: initialize variables, DUMB FUCKS! - if( $time[$timeabrv] > 0 ) { + if ( $time[$timeabrv] > 0 ) { // Give grep a chance to find the usages: // comments-time-days, comments-time-hours, comments-time-minutes, comments-time-seconds, comments-time-months $timeStr = wfMessage( "comments-time-{$timename}", $time[$timeabrv] )->parse(); } - if( $timeStr ) { + if ( $timeStr ) { $timeStr .= ' '; } return $timeStr; @@ -45,15 +45,15 @@ class CommentFunctions { $timeStr = $timeStrMo; } else { $timeStr = $timeStrD; - if( $timeStr < 2 ) { + if ( $timeStr < 2 ) { $timeStr .= $timeStrH; $timeStr .= $timeStrM; - if( !$timeStr ) { + if ( !$timeStr ) { $timeStr .= $timeStrS; } } } - if( !$timeStr ) { + if ( !$timeStr ) { $timeStr = wfMessage( 'comments-time-seconds', 1 )->parse(); } return $timeStr; @@ -64,7 +64,7 @@ class CommentFunctions { * http://www.abc....xyz.html * * @param $matches Array - * @return String: shortened URL + * @return String shortened URL */ public static function cutCommentLinkText( $matches ) { $tagOpen = $matches[1]; @@ -74,7 +74,7 @@ class CommentFunctions { $image = preg_match( "/ 30 ) { + if ( $isURL && !$image && strlen( $linkText ) > 30 ) { $start = substr( $linkText, 0, ( 30 / 2 ) - 3 ); $end = substr( $linkText, strlen( $linkText ) - ( 30 / 2 ) + 3, ( 30 / 2 ) - 3 ); $linkText = trim( $start ) . wfMessage( 'ellipsis' )->escaped() . trim( $end ); @@ -87,7 +87,7 @@ class CommentFunctions { * built-in regex-based spam filters * * @param $text String: text to check for spam patterns - * @return Boolean: true if it contains spam, otherwise false + * @return Boolean true if it contains spam, otherwise false */ public static function isSpam( $text ) { global $wgSpamRegex, $wgSummarySpamRegex; @@ -96,7 +96,7 @@ class CommentFunctions { // Allow to hook other anti-spam extensions so that sites that use, // for example, AbuseFilter, Phalanx or SpamBlacklist can add additional // checks - Hooks::run( 'Comments::isSpam', array( &$text, &$retVal ) ); + Hooks::run( 'Comments::isSpam', [ &$text, &$retVal ] ); if ( $retVal ) { // Should only be true here... return $retVal; @@ -122,13 +122,13 @@ class CommentFunctions { * Checks the supplied text for links * * @param $text String: text to check - * @return Boolean: true if it contains links, otherwise false + * @return Boolean true if it contains links, otherwise false */ public static function haveLinks( $text ) { - $linkPatterns = array( + $linkPatterns = [ '/(https?)|(ftp):\/\//', '/=\\s*[\'"]?\\s*mailto:/', - ); + ]; foreach ( $linkPatterns as $linkPattern ) { if ( preg_match( $linkPattern, $text ) ) { return true; @@ -148,21 +148,20 @@ class CommentFunctions { public static function blockUser( $blocker, $userId, $userName ) { $dbw = wfGetDB( DB_MASTER ); - wfSuppressWarnings(); // E_STRICT bitching + Wikimedia\suppressWarnings(); // E_STRICT bitching $date = date( 'Y-m-d H:i:s' ); - wfRestoreWarnings(); + Wikimedia\restoreWarnings(); $dbw->insert( 'Comments_block', - array( + [ 'cb_user_id' => $blocker->getId(), 'cb_user_name' => $blocker->getName(), 'cb_user_id_blocked' => $userId, 'cb_user_name_blocked' => $userName, 'cb_date' => $date - ), + ], __METHOD__ ); - $dbw->commit( __METHOD__ ); } /** @@ -172,12 +171,12 @@ class CommentFunctions { * @return array List of comment-blocked users */ static function getBlockList( $userId ) { - $blockList = array(); - $dbr = wfGetDB( DB_SLAVE ); + $blockList = []; + $dbr = wfGetDB( DB_REPLICA ); $res = $dbr->select( 'Comments_block', 'cb_user_name_blocked', - array( 'cb_user_id' => $userId ), + [ 'cb_user_id' => $userId ], __METHOD__ ); foreach ( $res as $row ) { @@ -187,14 +186,14 @@ class CommentFunctions { } static function isUserCommentBlocked( $userId, $userIdBlocked ) { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $s = $dbr->selectRow( 'Comments_block', - array( 'cb_id' ), - array( + [ 'cb_id' ], + [ 'cb_user_id' => $userId, 'cb_user_id_blocked' => $userIdBlocked - ), + ], __METHOD__ ); if ( $s !== false ) { @@ -214,13 +213,12 @@ class CommentFunctions { $dbw = wfGetDB( DB_MASTER ); $dbw->delete( 'Comments_block', - array( + [ 'cb_user_id' => $userId, 'cb_user_id_blocked' => $userIdBlocked - ), + ], __METHOD__ ); - $dbw->commit( __METHOD__ ); } /** @@ -279,24 +277,6 @@ class CommentFunctions { } } - /** - * Sort COMMENTS (not threads) by score - * - * @param $x - * @param $y - */ - public static function sortCommentScore( $x, $y ) { - // return -1 - x goes above y - // return 1 - x goes below y - // return 0 - order irrelevant (only when x == y) - - if ( $x->currentScore > $y->currentScore ) { - return -1; - } else { - return 1; - } - } - /** * Sort the comments purely by the time, from earliest to latest * diff --git a/includes/Comments.alias.php b/includes/Comments.alias.php deleted file mode 100644 index 01a989e..0000000 --- a/includes/Comments.alias.php +++ /dev/null @@ -1,15 +0,0 @@ - array( 'CommentIgnoreList' ), -); diff --git a/includes/Comments.hooks.php b/includes/Comments.hooks.php deleted file mode 100644 index 3b81f1a..0000000 --- a/includes/Comments.hooks.php +++ /dev/null @@ -1,173 +0,0 @@ - - * @author Alexia E. Smith - * @copyright (c) 2013 Curse Inc. - * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later - * @link https://www.mediawiki.org/wiki/Extension:Comments Documentation - */ - -class CommentsHooks { - /** - * Registers the tag with the Parser. - * - * @param Parser $parser - * @return bool - */ - public static function onParserFirstCallInit( Parser &$parser ) { - $parser->setHook( 'comments', array( 'CommentsHooks', 'displayComments' ) ); - return true; - } - - /** - * Callback function for onParserFirstCallInit(). - * - * @param $input - * @param array $args - * @param Parser $parser - * @return string HTML - */ - public static function displayComments( $input, $args, $parser ) { - global $wgOut, $wgCommentsSortDescending; - - $parser->disableCache(); - // If an unclosed tag is added to a page, the extension will - // go to an infinite loop...this protects against that condition. - $parser->setHook( 'comments', array( 'CommentsHooks', 'nonDisplayComments' ) ); - - $title = $parser->getTitle(); - if ( $title->getArticleID() == 0 && $title->getDBkey() == 'CommentListGet' ) { - return self::nonDisplayComments( $input, $args, $parser ); - } - - // Add required CSS & JS via ResourceLoader - $wgOut->addModuleStyles( 'ext.comments.css' ); - $wgOut->addModules( 'ext.comments.js' ); - $wgOut->addJsConfigVars( array( 'wgCommentsSortDescending' => $wgCommentsSortDescending ) ); - - // Parse arguments - // The preg_match() lines here are to support the old-style way of - // adding arguments: - // - // Allow=Foo,Bar - // Voting=Plus - // - // whereas the normal, standard MediaWiki style, which this extension - // also supports is: - $allow = ''; - if ( preg_match( '/^\s*Allow\s*=\s*(.*)/mi', $input, $matches ) ) { - $allow = htmlspecialchars( $matches[1] ); - } elseif ( !empty( $args['allow'] ) ) { - $allow = $args['allow']; - } - - $voting = ''; - if ( preg_match( '/^\s*Voting\s*=\s*(.*)/mi', $input, $matches ) ) { - $voting = htmlspecialchars( $matches[1] ); - } elseif ( - !empty( $args['voting'] ) && - in_array( strtoupper( $args['voting'] ), array( 'OFF', 'PLUS', 'MINUS' ) ) - ) { - $voting = $args['voting']; - } - - $commentsPage = new CommentsPage( $title->getArticleID(), $wgOut->getContext() ); - $commentsPage->allow = $allow; - $commentsPage->setVoting( $voting ); - - $output = '
'; - - if ( $wgCommentsSortDescending ) { // form before comments - $output .= ''; - if ( !wfReadOnly() ) { - $output .= $commentsPage->displayForm(); - } else { - $output .= wfMessage( 'comments-db-locked' )->parse(); - } - } - - $output .= $commentsPage->displayOrderForm(); - - $output .= '
' . $commentsPage->display() . '
'; - - // If the database is in read-only mode, display a message informing the - // user about that, otherwise allow them to comment - if ( !$wgCommentsSortDescending ) { // form after comments - if ( !wfReadOnly() ) { - $output .= $commentsPage->displayForm(); - } else { - $output .= wfMessage( 'comments-db-locked' )->parse(); - } - $output .= ''; - } - - $output .= '
'; // div.comments-body - - return $output; - } - - public static function nonDisplayComments( $input, $args, $parser ) { - $attr = array(); - - foreach ( $args as $name => $value ) { - $attr[] = htmlspecialchars( $name ) . '="' . htmlspecialchars( $value ) . '"'; - } - - $output = '<comments'; - if ( count( $attr ) > 0 ) { - $output .= ' ' . implode( ' ', $attr ); - } - - if ( !is_null( $input ) ) { - $output .= '>' . htmlspecialchars( $input ) . '</comments>'; - } else { - $output .= ' />'; - } - - return $output; - } - - /** - * Adds the three new required database tables into the database when the - * user runs /maintenance/update.php (the core database updater script). - * - * @param DatabaseUpdater $updater - * @return bool - */ - public static function onLoadExtensionSchemaUpdates( $updater ) { - $dir = __DIR__ . '/../sql'; - - $dbType = $updater->getDB()->getType(); - // For non-MySQL/MariaDB/SQLite DBMSes, use the appropriately named file - if ( !in_array( $dbType, array( 'mysql', 'sqlite' ) ) ) { - $filename = "comments.{$dbType}.sql"; - } else { - $filename = 'comments.sql'; - } - - $updater->addExtensionUpdate( array( 'addTable', 'Comments', "{$dir}/{$filename}", true ) ); - $updater->addExtensionUpdate( array( 'addTable', 'Comments_Vote', "{$dir}/{$filename}", true ) ); - $updater->addExtensionUpdate( array( 'addTable', 'Comments_block', "{$dir}/{$filename}", true ) ); - - return true; - } - - /** - * For integration with the Renameuser extension. - * - * @param RenameuserSQL $renameUserSQL - * @return bool - */ - public static function onRenameUserSQL( $renameUserSQL ) { - $renameUserSQL->tables['Comments'] = array( 'Comment_Username', 'Comment_user_id' ); - $renameUserSQL->tables['Comments_Vote'] = array( 'Comment_Vote_Username', 'Comment_Vote_user_id' ); - $renameUserSQL->tables['Comments_block'] = array( 'cb_user_name', 'cb_user_id' ); - $renameUserSQL->tables['Comments_block'] = array( 'cb_user_name_blocked', 'cb_user_id_blocked' ); - return true; - } -} diff --git a/includes/Comments.i18n.magic.php b/includes/Comments.i18n.magic.php deleted file mode 100644 index b91b254..0000000 --- a/includes/Comments.i18n.magic.php +++ /dev/null @@ -1,12 +0,0 @@ - array( 0, 'NUMBEROFCOMMENTS' ), - 'NUMBEROFCOMMENTSPAGE' => array( 0, 'NUMBEROFCOMMENTSPAGE' ), -); diff --git a/includes/CommentsHooks.php b/includes/CommentsHooks.php new file mode 100644 index 0000000..834a897 --- /dev/null +++ b/includes/CommentsHooks.php @@ -0,0 +1,65 @@ + + * - NUMBEROFCOMMENTSPAGE + * + * @param Parser $parser + */ + public static function onParserFirstCallInit( Parser &$parser ) { + $parser->setHook( 'comments', [ 'DisplayComments', 'getParserHandler' ] ); + $parser->setFunctionHook( 'NUMBEROFCOMMENTSPAGE', 'NumberOfComments::getParserHandler', Parser::SFH_NO_HASH ); + } + + /** + * Adds the three new required database tables into the database when the + * user runs /maintenance/update.php (the core database updater script). + * + * @param DatabaseUpdater $updater + */ + public static function onLoadExtensionSchemaUpdates( $updater ) { + $dir = __DIR__ . '/../sql'; + + $dbType = $updater->getDB()->getType(); + // For non-MySQL/MariaDB/SQLite DBMSes, use the appropriately named file + if ( !in_array( $dbType, [ 'mysql', 'sqlite' ] ) ) { + $comments = "comments.{$dbType}.sql"; + $comments_vote = "comments_vote.{$dbType}.sql"; + $comments_block = "comments_block.{$dbType}.sql"; + } else { + $comments = 'comments.sql'; + $comments_vote = 'comments_vote.sql'; + $comments_block = 'comments_block.sql'; + } + + $updater->addExtensionTable( 'Comments', "{$dir}/{$comments}" ); + $updater->addExtensionTable( 'Comments_Vote', "{$dir}/{$comments_vote}" ); + $updater->addExtensionTable( 'Comments_block', "{$dir}/{$comments_block}" ); + } + + /** + * For integration with the Renameuser extension. + * + * @param RenameuserSQL $renameUserSQL + */ + public static function onRenameUserSQL( $renameUserSQL ) { + $renameUserSQL->tables['Comments'] = [ 'Comment_Username', 'Comment_user_id' ]; + $renameUserSQL->tables['Comments_Vote'] = [ 'Comment_Vote_Username', 'Comment_Vote_user_id' ]; + $renameUserSQL->tables['Comments_block'] = [ 'cb_user_name', 'cb_user_id' ]; + $renameUserSQL->tables['Comments_block'] = [ 'cb_user_name_blocked', 'cb_user_id_blocked' ]; + } +} diff --git a/includes/CommentsLogFormatter.class.php b/includes/CommentsLogFormatter.php similarity index 58% rename from includes/CommentsLogFormatter.class.php rename to includes/CommentsLogFormatter.php index dbc2b54..86a83eb 100644 --- a/includes/CommentsLogFormatter.class.php +++ b/includes/CommentsLogFormatter.php @@ -5,32 +5,7 @@ * @file * @date 28 July 2013 */ -class CommentsLogFormatter extends LogFormatter { - /** - * Gets the log action, including username. - * - * This is a copy of LogFormatter::getActionText() with one "escaped" - * swapped to parse; no other changes here! - * - * @return string HTML - */ - public function getActionText() { - if ( $this->canView( LogPage::DELETED_ACTION ) ) { - $element = $this->getActionMessage(); - if ( $element instanceof Message ) { - $element = $this->plaintext ? $element->text() : $element->parse(); // <-- here's the change! - } - if ( $this->entry->isDeleted( LogPage::DELETED_ACTION ) ) { - $element = $this->styleRestricedElement( $element ); - } - } else { - $performer = $this->getPerformerElement() . $this->msg( 'word-separator' )->text(); - $element = $performer . $this->getRestrictedElement( 'rev-deleted-event' ); - } - - return $element; - } - +class CommentsLogFormatter extends WikitextLogFormatter { /** * Formats parameters intented for action message from * array of all parameters. There are three hardcoded diff --git a/includes/CommentsOfTheDay.class.php b/includes/CommentsOfTheDay.class.php deleted file mode 100644 index 4f89d34..0000000 --- a/includes/CommentsOfTheDay.class.php +++ /dev/null @@ -1,120 +0,0 @@ - parser hook with the Parser. - * - * @param Parser $parser Instance of Parser - * @return bool - */ - public static function registerTag( &$parser ) { - $parser->setHook( 'commentsoftheday', array( __CLASS__, 'getHTML' ) ); - return true; - } - - /** - * Get comments of the day -- five newest comments within the last 24 hours - * - * @return string HTML - */ - public static function getHTML( $input, $args, $parser ) { - $comments = self::get( (bool)$args['nocache'] ); - $commentOutput = ''; - - foreach ( $comments as $comment ) { - $commentOutput .= $comment->displayForCommentOfTheDay(); - } - - $output = ''; - if ( !empty( $commentOutput ) ) { - $output .= $commentOutput; - } else { - $output .= wfMessage( 'comments-no-comments-of-day' )->plain(); - } - - return $output; - } - - /** - * Get comments of the day, either from cache or the DB. - * - * @param bool $skipCache Skip using memcached and fetch data directly from the DB? - * @param int $cacheTime How long to cache the results in memcached? Default is one day (60 * 60 * 24). - * @param array $whereConds WHERE conditions for the SQL clause (if not using the defaults) - * @return array - */ - public static function get( $skipCache = false, $cacheTime = 86400, $whereConds = array() ) { - global $wgMemc; - - // Try memcached first - $key = wfMemcKey( 'comments-of-the-day', 'standalone-hook-new' ); - $data = $wgMemc->get( $key ); - - if ( $data ) { // success, got it from memcached! - $comments = $data; - } elseif ( !$data || $skipCache ) { // just query the DB - $dbr = wfGetDB( DB_SLAVE ); - - if ( empty( $whereConds ) ) { - $whereConds = array( - 'Comment_Page_ID = page_id', - 'UNIX_TIMESTAMP(Comment_Date) > ' . ( time() - ( $cacheTime ) ) - ); - } - - $res = $dbr->select( - array( 'Comments', 'page' ), - array( - 'Comment_Username', 'Comment_IP', 'Comment_Text', - 'Comment_Date', 'Comment_User_Id', 'CommentID', - 'Comment_Parent_ID', 'Comment_Page_ID' - ), - $whereConds, - __METHOD__ - ); - - $comments = array(); - - foreach ( $res as $row ) { - if ( $row->Comment_Parent_ID == 0 ) { - $thread = $row->CommentID; - } else { - $thread = $row->Comment_Parent_ID; - } - $data = array( - 'Comment_Username' => $row->Comment_Username, - 'Comment_IP' => $row->Comment_IP, - 'Comment_Text' => $row->Comment_Text, - 'Comment_Date' => $row->Comment_Date, - 'Comment_user_id' => $row->Comment_User_Id, - // @todo FIXME: absolutely disgusting -- should use Language's formatNum() for better i18n - 'Comment_user_points' => ( isset( $row->stats_total_points ) ? number_format( $row->stats_total_points ) : 0 ), - 'CommentID' => $row->CommentID, - 'Comment_Parent_ID' => $row->Comment_Parent_ID, - 'thread' => $thread, - 'timestamp' => wfTimestamp( TS_UNIX, $row->Comment_Date ) - ); - - $page = new CommentsPage( $row->Comment_Page_ID, new RequestContext() ); - $comments[] = new Comment( $page, new RequestContext(), $data ); - } - - usort( $comments, array( 'CommentFunctions', 'sortCommentScore' ) ); - $comments = array_slice( $comments, 0, 5 ); - - $wgMemc->set( $key, $comments, $cacheTime ); - } - - return $comments; - } - -} diff --git a/includes/CommentsPage.class.php b/includes/CommentsPage.php similarity index 83% rename from includes/CommentsPage.class.php rename to includes/CommentsPage.php index 2aaf6dc..65b30cd 100644 --- a/includes/CommentsPage.class.php +++ b/includes/CommentsPage.php @@ -79,14 +79,14 @@ class CommentsPage extends ContextSource { * * @var array */ - public $comments = array(); + public $comments = []; /** * Constructor * * @param $pageID: current page ID */ - function __construct ( $pageID, $context ) { + function __construct( $pageID, $context ) { $this->id = $pageID; $this->setContext( $context ); $this->title = Title::newFromID( $pageID ); @@ -98,12 +98,12 @@ class CommentsPage extends ContextSource { * @return int */ function countTotal() { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $count = 0; $s = $dbr->selectRow( 'Comments', - array( 'COUNT(*) AS CommentCount' ), - array( 'Comment_Page_ID' => $this->id ), + [ 'COUNT(*) AS CommentCount' ], + [ 'Comment_Page_ID' => $this->id ], __METHOD__ ); if ( $s !== false ) { @@ -119,13 +119,13 @@ class CommentsPage extends ContextSource { */ function getLatestCommentID() { $latestCommentID = 0; - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $s = $dbr->selectRow( 'Comments', - array( 'CommentID' ), - array( 'Comment_Page_ID' => $this->id ), + [ 'CommentID' ], + [ 'Comment_Page_ID' => $this->id ], __METHOD__, - array( 'ORDER BY' => 'Comment_Date DESC', 'LIMIT' => 1 ) + [ 'ORDER BY' => 'Comment_Date DESC', 'LIMIT' => 1 ] ); if ( $s !== false ) { $latestCommentID = $s->CommentID; @@ -159,37 +159,37 @@ class CommentsPage extends ContextSource { * Fetches all comments, called by display(). * * @return array Array containing every possible bit of information about - * a comment, including score, timestamp and more + * a comment, including score, timestamp and more */ public function getComments() { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); // Defaults (for non-social wikis) - $tables = array( + $tables = [ 'Comments', 'vote1' => 'Comments_Vote', 'vote2' => 'Comments_Vote', - ); - $fields = array( + ]; + $fields = [ 'Comment_Username', 'Comment_IP', 'Comment_Text', 'Comment_Date', 'Comment_Date AS timestamp', 'Comment_user_id', 'CommentID', 'Comment_Parent_ID', 'vote1.Comment_Vote_Score AS current_vote', 'SUM(vote2.Comment_Vote_Score) AS comment_score' - ); - $joinConds = array( + ]; + $joinConds = [ // For current user's vote - 'vote1' => array( + 'vote1' => [ 'LEFT JOIN', - array( + [ 'vote1.Comment_Vote_ID = CommentID', 'vote1.Comment_Vote_Username' => $this->getUser()->getName() - ) - ), + ] + ], // For total vote count - 'vote2' => array( 'LEFT JOIN', 'vote2.Comment_Vote_ID = CommentID' ) - ); - $params = array( 'GROUP BY' => 'CommentID' ); + 'vote2' => [ 'LEFT JOIN', 'vote2.Comment_Vote_ID = CommentID' ] + ]; + $params = [ 'GROUP BY' => 'CommentID' ]; // If SocialProfile is installed, query the user_stats table too. if ( @@ -198,22 +198,22 @@ class CommentsPage extends ContextSource { ) { $tables[] = 'user_stats'; $fields[] = 'stats_total_points'; - $joinConds['Comments'] = array( + $joinConds['Comments'] = [ 'LEFT JOIN', 'Comment_user_id = stats_user_id' - ); + ]; } // Perform the query $res = $dbr->select( $tables, $fields, - array( 'Comment_Page_ID' => $this->id ), + [ 'Comment_Page_ID' => $this->id ], __METHOD__, $params, $joinConds ); - $comments = array(); + $comments = []; foreach ( $res as $row ) { if ( $row->Comment_Parent_ID == 0 ) { @@ -221,7 +221,7 @@ class CommentsPage extends ContextSource { } else { $thread = $row->Comment_Parent_ID; } - $data = array( + $data = [ 'Comment_Username' => $row->Comment_Username, 'Comment_IP' => $row->Comment_IP, 'Comment_Text' => $row->Comment_Text, @@ -234,16 +234,16 @@ class CommentsPage extends ContextSource { 'timestamp' => wfTimestamp( TS_UNIX, $row->timestamp ), 'current_vote' => ( isset( $row->current_vote ) ? $row->current_vote : false ), 'total_vote' => ( isset( $row->comment_score ) ? $row->comment_score : 0 ), - ); + ]; $comments[] = new Comment( $this, $this->getContext(), $data ); } - $commentThreads = array(); + $commentThreads = []; foreach ( $comments as $comment ) { if ( $comment->parentID == 0 ) { - $commentThreads[$comment->id] = array( $comment ); + $commentThreads[$comment->id] = [ $comment ]; } else { $commentThreads[$comment->parentID][] = $comment; } @@ -274,7 +274,7 @@ class CommentsPage extends ContextSource { * @param int $pagerCurrent Page we are currently paged to * @param int $pagesCount The maximum page number * - * @return string: the links for paging through pages of comments + * @return string the links for paging through pages of comments */ function displayPager( $pagerCurrent, $pagesCount ) { // Middle is used to "center" pages around the current page. @@ -307,12 +307,12 @@ class CommentsPage extends ContextSource { $output .= '
  • ' . Html::rawElement( 'a', - array( + [ 'rel' => 'nofollow', 'class' => 'c-pager-link', 'href' => '#cfirst', 'data-' . $this->pageQuery => ( $pagerCurrent - 1 ), - ), + ], '<' ) . '
  • '; @@ -323,12 +323,12 @@ class CommentsPage extends ContextSource { $output .= '
  • ' . Html::rawElement( 'a', - array( + [ 'rel' => 'nofollow', 'class' => 'c-pager-link', 'href' => '#cfirst', 'data-' . $this->pageQuery => 1, - ), + ], 1 ) . '
  • '; @@ -349,12 +349,12 @@ class CommentsPage extends ContextSource { $output .= '
  • ' . Html::rawElement( 'a', - array( + [ 'rel' => 'nofollow', 'class' => 'c-pager-link', 'href' => '#cfirst', 'data-' . $this->pageQuery => $i, - ), + ], $i ) . '
  • '; @@ -371,12 +371,12 @@ class CommentsPage extends ContextSource { $output .= '
  • ' . Html::rawElement( 'a', - array( + [ 'rel' => 'nofollow', 'class' => 'c-pager-link', 'href' => '#cfirst', 'data-' . $this->pageQuery => $pagesCount, - ), + ], $pagesCount ) . '
  • '; @@ -387,12 +387,12 @@ class CommentsPage extends ContextSource { $output .= '
  • ' . Html::rawElement( 'a', - array( + [ 'rel' => 'nofollow', 'class' => 'c-pager-link', 'href' => '#cfirst', 'data-' . $this->pageQuery => ( $pagerCurrent + 1 ), - ), + ], '>' ) . '
  • '; @@ -406,22 +406,22 @@ class CommentsPage extends ContextSource { /** * Get this list of anon commenters in the given list of comments, - * and return a mapped array of IP adressess to the the number anon poster + * and return a mapped array of IP adressess to the number anon poster * (so anon posters can be called Anon#1, Anon#2, etc * * @return array */ function getAnonList() { $counter = 1; - $bucket = array(); + $bucket = []; $commentThreads = $this->comments; - $comments = array(); // convert 2nd threads array to a simple list of comments + $comments = []; // convert 2nd threads array to a simple list of comments foreach ( $commentThreads as $thread ) { $comments = array_merge( $comments, $thread ); } - usort( $comments, array( 'CommentFunctions', 'sortTime' ) ); + usort( $comments, [ 'CommentFunctions', 'sortTime' ] ); foreach ( $comments as $comment ) { if ( @@ -445,11 +445,11 @@ class CommentsPage extends ContextSource { global $wgCommentsSortDescending; if ( $this->orderBy ) { - usort( $threads, array( 'CommentFunctions', 'sortScore' ) ); + usort( $threads, [ 'CommentFunctions', 'sortScore' ] ); } elseif ( $wgCommentsSortDescending ) { - usort( $threads, array( 'CommentFunctions', 'sortDesc' ) ); + usort( $threads, [ 'CommentFunctions', 'sortDesc' ] ); } else { - usort( $threads, array( 'CommentFunctions', 'sortAsc' ) ); + usort( $threads, [ 'CommentFunctions', 'sortAsc' ] ); } return $threads; @@ -482,13 +482,13 @@ class CommentsPage extends ContextSource { // Suppress random E_NOTICE about "Undefined offset: 0", which seems to // be breaking ProblemReports (at least on my local devbox, not sure // about prod). --Jack Phoenix, 13 July 2015 - wfSuppressWarnings(); + Wikimedia\suppressWarnings(); $currentPage = $commentPages[$currentPageNum - 1]; - wfRestoreWarnings(); + Wikimedia\restoreWarnings(); // Load complete blocked list for logged in user so they don't see their comments - $blockList = array(); - if ( $this->getUser()->getID() != 0 ) { + $blockList = []; + if ( $this->getUser()->getId() != 0 ) { $blockList = CommentFunctions::getBlockList( $this->getUser()->getId() ); } @@ -515,9 +515,10 @@ class CommentsPage extends ContextSource { * * @return string HTML */ + +// ## START ## 25.05.2019 von Bernhard Linz ######################################################################################## function displayOrderForm() { - // ##START## 27.09.2017 von Bernhard Linz - $output = '
    + $output = '
    ' . wfMessage( 'comments-auto-refresher-enable' )->plain() . ' @@ -547,7 +548,7 @@ class CommentsPage extends ContextSource {

    ' . "\n"; */ - // ##ENDE## +// ## ENDE ## 25.05.2019 von Bernhard Linz ######################################################################################## return $output; } @@ -587,13 +588,13 @@ class CommentsPage extends ContextSource { htmlspecialchars( $login_title->getFullURL() ) )->text() . '
    ' . "\n"; } - // ##START## 27.09.2017 von Bernhard Linz +// ## START ## 25.05.2019 von Bernhard Linz ######################################################################################## if ( !$this->getUser()->isLoggedIn() ) { - $output .= '


    ' . "

    "; + $output .= '


    ' . "

    "; } else { $output .= '

    Benutzer:' . $this->getUser()->getName() . '

    '; } - // ##ENDE## 27.09.2017 von Bernhard Linz +// ## ENDE ## 25.05.2019 von Bernhard Linz ######################################################################################## $output .= '' . "\n"; $output .= '
    ' . "\n"; diff --git a/includes/api/CommentBlock.api.php b/includes/api/CommentBlockAPI.php similarity index 73% rename from includes/api/CommentBlock.api.php rename to includes/api/CommentBlockAPI.php index 79ae250..713cf52 100644 --- a/includes/api/CommentBlock.api.php +++ b/includes/api/CommentBlockAPI.php @@ -1,56 +1,52 @@ -selectRow( - 'Comments', - array( 'comment_username', 'comment_user_id' ), - array( 'CommentID' => $this->getMain()->getVal( 'commentID' ) ), - __METHOD__ - ); - if ( $s !== false ) { - $userID = $s->comment_user_id; - $username = $s->comment_username; - } - - CommentFunctions::blockUser( $this->getUser(), $userID, $username ); - - if ( class_exists( 'UserStatsTrack' ) ) { - $stats = new UserStatsTrack( $userID, $username ); - $stats->incStatField( 'comment_ignored' ); - } - - $result = $this->getResult(); - $result->addValue( $this->getModuleName(), 'ok', 'ok' ); - return true; - } - - public function needsToken() { - return 'csrf'; - } - - public function isWriteMode() { - return true; - } - - public function getAllowedParams() { - return array( - 'commentID' => array( - ApiBase::PARAM_REQUIRED => true, - ApiBase::PARAM_TYPE => 'integer' - ), - 'UsernameKOK' => array( - ApiBase::PARAM_REQUIRED => false, - ApiBase::PARAM_TYPE => 'string' - ) - ); - } -} +selectRow( + 'Comments', + [ 'comment_username', 'comment_user_id' ], + [ 'CommentID' => $this->getMain()->getVal( 'commentID' ) ], + __METHOD__ + ); + if ( $s !== false ) { + $userID = $s->comment_user_id; + $username = $s->comment_username; + } + + CommentFunctions::blockUser( $this->getUser(), $userID, $username ); + + if ( class_exists( 'UserStatsTrack' ) ) { + $stats = new UserStatsTrack( $userID, $username ); + $stats->incStatField( 'comment_ignored' ); + } + + $result = $this->getResult(); + $result->addValue( $this->getModuleName(), 'ok', 'ok' ); + return true; + } + + public function needsToken() { + return 'csrf'; + } + + public function isWriteMode() { + return true; + } + + public function getAllowedParams() { + return [ + 'commentID' => [ + ApiBase::PARAM_REQUIRED => true, + ApiBase::PARAM_TYPE => 'integer' + ] + ]; + } +} diff --git a/includes/api/CommentDelete.api.php b/includes/api/CommentDeleteAPI.php similarity index 80% rename from includes/api/CommentDelete.api.php rename to includes/api/CommentDeleteAPI.php index a77d2fb..7a86bfa 100644 --- a/includes/api/CommentDelete.api.php +++ b/includes/api/CommentDeleteAPI.php @@ -4,17 +4,21 @@ class CommentDeleteAPI extends ApiBase { public function execute() { $user = $this->getUser(); + + $comment = Comment::newFromID( $this->getMain()->getVal( 'commentID' ) ); // Blocked users cannot delete comments, and neither can unprivileged ones. // Also check for database read-only status if ( $user->isBlocked() || - !$user->isAllowed( 'commentadmin' ) || + !( + $user->isAllowed( 'commentadmin' ) || + $user->isAllowed( 'comment-delete-own' ) && $comment->isOwner( $user ) + ) || wfReadOnly() ) { return true; } - $comment = Comment::newFromID( $this->getMain()->getVal( 'commentID' ) ); $comment->delete(); $result = $this->getResult(); @@ -31,11 +35,11 @@ class CommentDeleteAPI extends ApiBase { } public function getAllowedParams() { - return array( - 'commentID' => array( + return [ + 'commentID' => [ ApiBase::PARAM_REQUIRED => true, ApiBase::PARAM_TYPE => 'integer' - ) - ); + ] + ]; } } diff --git a/includes/api/CommentLatestID.api.php b/includes/api/CommentLatestIdAPI.php similarity index 68% rename from includes/api/CommentLatestID.api.php rename to includes/api/CommentLatestIdAPI.php index 0348a29..7eb7079 100644 --- a/includes/api/CommentLatestID.api.php +++ b/includes/api/CommentLatestIdAPI.php @@ -3,6 +3,9 @@ class CommentLatestIdAPI extends ApiBase { public function execute() { + // To avoid API warning, register the parameter used to bust browser cache + $this->getMain()->getVal( '_' ); + $pageID = $this->getMain()->getVal( 'pageID' ); $commentsPage = new CommentsPage( $pageID, RequestContext::getMain() ); @@ -12,11 +15,11 @@ class CommentLatestIdAPI extends ApiBase { } public function getAllowedParams() { - return array( - 'pageID' => array( + return [ + 'pageID' => [ ApiBase::PARAM_REQUIRED => true, - ApiBase::PARAM_TYPE => 'int' - ) - ); + ApiBase::PARAM_TYPE => 'integer' + ] + ]; } } diff --git a/includes/api/CommentList.api.php b/includes/api/CommentListAPI.php similarity index 88% rename from includes/api/CommentList.api.php rename to includes/api/CommentListAPI.php index a14f5ee..d62c5e3 100644 --- a/includes/api/CommentList.api.php +++ b/includes/api/CommentListAPI.php @@ -22,23 +22,23 @@ class CommentListAPI extends ApiBase { } public function getAllowedParams() { - return array( - 'pageID' => array( + return [ + 'pageID' => [ ApiBase::PARAM_REQUIRED => true, ApiBase::PARAM_TYPE => 'integer' - ), - 'order' => array( + ], + 'order' => [ ApiBase::PARAM_REQUIRED => true, ApiBase::PARAM_TYPE => 'boolean' - ), - 'pagerPage' => array( + ], + 'pagerPage' => [ ApiBase::PARAM_REQUIRED => true, ApiBase::PARAM_TYPE => 'integer' - ), - 'showForm' => array( + ], + 'showForm' => [ ApiBase::PARAM_REQUIRED => false, ApiBase::PARAM_TYPE => 'integer' - ) - ); + ] + ]; } } diff --git a/includes/api/CommentSubmit.api.php b/includes/api/CommentSubmitAPI.php similarity index 73% rename from includes/api/CommentSubmit.api.php rename to includes/api/CommentSubmitAPI.php index 9383b96..7425244 100644 --- a/includes/api/CommentSubmit.api.php +++ b/includes/api/CommentSubmitAPI.php @@ -1,79 +1,79 @@ -getUser(); - // Blocked users cannot submit new comments, and neither can those users - // without the necessary privileges. Also prevent obvious cross-site request - // forgeries (CSRF) - if ( - $user->isBlocked() || - !$user->isAllowed( 'comment' ) || - wfReadOnly() - ) { - return true; - } - - $commentText = $this->getMain()->getVal( 'commentText' ); - - if ( $commentText != '' ) { - // To protect against spam, it's necessary to check the supplied text - // against spam filters (but comment admins are allowed to bypass the - // spam filters) - if ( !$user->isAllowed( 'commentadmin' ) && CommentFunctions::isSpam( $commentText ) ) { - $this->dieUsage( wfMessage( 'comments-is-spam' )->plain(), 'comments-is-spam' ); - } - - // If the comment contains links but the user isn't allowed to post - // links, reject the submission - if ( !$user->isAllowed( 'commentlinks' ) && CommentFunctions::haveLinks( $commentText ) ) { - $this->dieUsage( wfMessage( 'comments-links-are-forbidden' )->plain(), 'comments-links-are-forbidden' ); - } - - $page = new CommentsPage( $this->getMain()->getVal( 'pageID' ), $this->getContext() ); - - Comment::add( $commentText, $page, $user, $this->getMain()->getVal( 'parentID' ) ); - - if ( class_exists( 'UserStatsTrack' ) ) { - $stats = new UserStatsTrack( $user->getID(), $user->getName() ); - $stats->incStatField( 'comment' ); - } - } - - $kok_username = $this->getMain()->getVal( 'UsernameKOK' ); - - $result = $this->getResult(); - $result->addValue( $this->getModuleName(), 'ok', 'ok' ); - return true; - } - - public function needsToken() { - return 'csrf'; - } - - public function isWriteMode() { - return true; - } - - public function getAllowedParams() { - return array( - 'pageID' => array( - ApiBase::PARAM_REQUIRED => true, - ApiBase::PARAM_TYPE => 'integer' - ), - 'parentID' => array( - ApiBase::PARAM_REQUIRED => false, - ApiBase::PARAM_TYPE => 'integer' - ), - 'commentText' => array( - ApiBase::PARAM_REQUIRED => true, - ApiBase::PARAM_TYPE => 'string' - ), - 'UsernameKOK' => array( - ApiBase::PARAM_REQUIRED => false, - ApiBase::PARAM_TYPE => 'string' - ) - ); - } -} +getUser(); + // Blocked users cannot submit new comments, and neither can those users + // without the necessary privileges. Also prevent obvious cross-site request + // forgeries (CSRF) + if ( + $user->isBlocked() || + !$user->isAllowed( 'comment' ) || + wfReadOnly() + ) { + return true; + } + + $commentText = $this->getMain()->getVal( 'commentText' ); + + if ( $commentText != '' ) { + // To protect against spam, it's necessary to check the supplied text + // against spam filters (but comment admins are allowed to bypass the + // spam filters) + if ( !$user->isAllowed( 'commentadmin' ) && CommentFunctions::isSpam( $commentText ) ) { + $this->dieWithError( + $this->msg( 'comments-is-spam' )->plain(), + 'comments-is-spam' + ); + } + + // If the comment contains links but the user isn't allowed to post + // links, reject the submission + if ( !$user->isAllowed( 'commentlinks' ) && CommentFunctions::haveLinks( $commentText ) ) { + $this->dieWithError( + $this->msg( 'comments-links-are-forbidden' )->plain(), + 'comments-links-are-forbidden' + ); + } + + $page = new CommentsPage( $this->getMain()->getVal( 'pageID' ), $this->getContext() ); + + Comment::add( $commentText, $page, $user, $this->getMain()->getVal( 'parentID' ) ); + + if ( class_exists( 'UserStatsTrack' ) ) { + $stats = new UserStatsTrack( $user->getId(), $user->getName() ); + $stats->incStatField( 'comment' ); + } + } + + $result = $this->getResult(); + $result->addValue( $this->getModuleName(), 'ok', 'ok' ); + return true; + } + + public function needsToken() { + return 'csrf'; + } + + public function isWriteMode() { + return true; + } + + public function getAllowedParams() { + return [ + 'pageID' => [ + ApiBase::PARAM_REQUIRED => true, + ApiBase::PARAM_TYPE => 'integer' + ], + 'parentID' => [ + ApiBase::PARAM_REQUIRED => false, + ApiBase::PARAM_TYPE => 'integer' + ], + 'commentText' => [ + ApiBase::PARAM_REQUIRED => true, + ApiBase::PARAM_TYPE => 'string' + ] + ]; + } +} diff --git a/includes/api/CommentVote.api.php b/includes/api/CommentVoteAPI.php similarity index 86% rename from includes/api/CommentVote.api.php rename to includes/api/CommentVoteAPI.php index 5a2202f..0172bc0 100644 --- a/includes/api/CommentVote.api.php +++ b/includes/api/CommentVoteAPI.php @@ -3,10 +3,11 @@ class CommentVoteAPI extends ApiBase { public function execute() { + $user = $this->getUser(); // Blocked users cannot vote, obviously, and neither can those users without the necessary privileges if ( - $this->getUser()->isBlocked() || - !$this->getUser()->isAllowed( 'comment' ) || + $user->isBlocked() || + !$user->isAllowed( 'comment' ) || wfReadOnly() ) { return ''; @@ -22,7 +23,7 @@ class CommentVoteAPI extends ApiBase { $html = htmlspecialchars( $html ); if ( class_exists( 'UserStatsTrack' ) ) { - $stats = new UserStatsTrack( $this->getUser()->getID(), $this->getUser()->getName() ); + $stats = new UserStatsTrack( $user->getId(), $user->getName() ); // Must update stats for user doing the voting if ( $voteValue == 1 ) { @@ -58,15 +59,15 @@ class CommentVoteAPI extends ApiBase { } public function getAllowedParams() { - return array( - 'commentID' => array( + return [ + 'commentID' => [ ApiBase::PARAM_REQUIRED => true, ApiBase::PARAM_TYPE => 'integer' - ), - 'voteValue' => array( + ], + 'voteValue' => [ ApiBase::PARAM_REQUIRED => true, ApiBase::PARAM_TYPE => 'integer' - ), - ); + ], + ]; } } diff --git a/includes/parser/DisplayComments.php b/includes/parser/DisplayComments.php new file mode 100644 index 0000000..29606d1 --- /dev/null +++ b/includes/parser/DisplayComments.php @@ -0,0 +1,121 @@ +getOutput(); + $po->updateCacheExpiry( 0 ); + // If an unclosed tag is added to a page, the extension will + // go to an infinite loop...this protects against that condition. + $parser->setHook( 'comments', [ __CLASS__, 'nonDisplayComments' ] ); + + $title = $parser->getTitle(); + if ( $title->getArticleID() == 0 && $title->getDBkey() == 'CommentListGet' ) { + return self::nonDisplayComments( $input, $args, $parser ); + } + + // Add required CSS & JS via ResourceLoader + $po->addModuleStyles( 'ext.comments.css' ); + $po->addModules( 'ext.comments.js' ); + $po->addJsConfigVars( [ 'wgCommentsSortDescending' => $wgCommentsSortDescending ] ); + + // Parse arguments + // The preg_match() lines here are to support the old-style way of + // adding arguments: + // + // Allow=Foo,Bar + // Voting=Plus + // + // whereas the normal, standard MediaWiki style, which this extension + // also supports is: + $allow = ''; + if ( preg_match( '/^\s*Allow\s*=\s*(.*)/mi', $input, $matches ) ) { + $allow = htmlspecialchars( $matches[1] ); + } elseif ( !empty( $args['allow'] ) ) { + $allow = $args['allow']; + } + + $voting = ''; + if ( preg_match( '/^\s*Voting\s*=\s*(.*)/mi', $input, $matches ) ) { + $voting = htmlspecialchars( $matches[1] ); + } elseif ( + !empty( $args['voting'] ) && + in_array( strtoupper( $args['voting'] ), [ 'OFF', 'PLUS', 'MINUS' ] ) + ) { + $voting = $args['voting']; + } + + // Create a new context to execute the CommentsPage + $context = new RequestContext; + $context->setTitle( $title ); + $context->setRequest( new FauxRequest() ); + $context->setUser( $parser->getUser() ); + $context->setLanguage( $parser->getTargetLanguage() ); + + $commentsPage = new CommentsPage( $title->getArticleID(), $context ); + $commentsPage->allow = $allow; + $commentsPage->setVoting( $voting ); + + $output = '
    '; + + if ( $wgCommentsSortDescending ) { // form before comments + $output .= ''; + if ( !wfReadOnly() ) { + $output .= $commentsPage->displayForm(); + } else { + $output .= wfMessage( 'comments-db-locked' )->parse(); + } + } + + $output .= $commentsPage->displayOrderForm(); + + $output .= '
    ' . $commentsPage->display() . '
    '; + + // If the database is in read-only mode, display a message informing the + // user about that, otherwise allow them to comment + if ( !$wgCommentsSortDescending ) { // form after comments + if ( !wfReadOnly() ) { + $output .= $commentsPage->displayForm(); + } else { + $output .= wfMessage( 'comments-db-locked' )->parse(); + } + $output .= ''; + } + + $output .= '
    '; // div.comments-body + + return $output; + } + + public static function nonDisplayComments( $input, $args, $parser ) { + $attr = []; + + foreach ( $args as $name => $value ) { + $attr[] = htmlspecialchars( $name ) . '="' . htmlspecialchars( $value ) . '"'; + } + + $output = '<comments'; + if ( count( $attr ) > 0 ) { + $output .= ' ' . implode( ' ', $attr ); + } + + if ( !is_null( $input ) ) { + $output .= '>' . htmlspecialchars( $input ) . '</comments>'; + } else { + $output .= ' />'; + } + + return $output; + } +} diff --git a/includes/NumberOfComments.class.php b/includes/parser/NumberOfComments.php similarity index 75% rename from includes/NumberOfComments.class.php rename to includes/parser/NumberOfComments.php index 919c7a1..d975996 100644 --- a/includes/NumberOfComments.class.php +++ b/includes/parser/NumberOfComments.php @@ -5,22 +5,12 @@ class NumberOfComments { * Registers NUMBEROFCOMMENTS and NUMPBEROFCOMMENTSPAGE as a valid magic word identifier. * * @param array $variableIds Array of valid magic word identifiers - * @return bool + * @return bool true */ - public static function registerNumberOfCommentsMagicWord( &$variableIds ) { + public static function onMagicWordwgVariableIDs( &$variableIds ) { $variableIds[] = 'NUMBEROFCOMMENTS'; $variableIds[] = 'NUMBEROFCOMMENTSPAGE'; - return true; - } - /** - * Hook to setup parser function - * - * @param Parser $parser - * @return bool - */ - static function setupNumberOfCommentsPageParser( &$parser ) { - $parser->setFunctionHook( 'NUMBEROFCOMMENTSPAGE', 'NumberOfComments::getNumberOfCommentsPageParser', Parser::SFH_NO_HASH ); return true; } @@ -40,11 +30,11 @@ class NumberOfComments { * @param int $ret What to return to the user (in our case, the number of comments) * @return bool */ - public static function getNumberOfCommentsMagic( &$parser, &$cache, &$magicWordId, &$ret ) { + public static function onParserGetVariableValueSwitch( &$parser, &$cache, &$magicWordId, &$ret ) { global $wgMemc; if ( $magicWordId == 'NUMBEROFCOMMENTS' ) { - $key = wfMemcKey( 'comments', 'magic-word' ); + $key = $wgMemc->makeKey( 'comments', 'magic-word' ); $data = $wgMemc->get( $key ); if ( $data != '' ) { // We have it in cache? Oh goody, let's just use the cached value! @@ -56,11 +46,11 @@ class NumberOfComments { $ret = $data; } else { // Not cached → have to fetch it from the database - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $commentCount = (int)$dbr->selectField( 'Comments', 'COUNT(*) AS count', - array(), + [], __METHOD__ ); wfDebugLog( 'Comments', 'Got the amount of comments from DB' ); @@ -72,7 +62,7 @@ class NumberOfComments { } } elseif ( $magicWordId == 'NUMBEROFCOMMENTSPAGE' ) { $id = $parser->getTitle()->getArticleID(); - $ret = NumberOfComments::getNumberOfCommentsPage( $id ); + $ret = self::getNumberOfCommentsPage( $id ); } return true; @@ -85,7 +75,7 @@ class NumberOfComments { * @param string $pagename Page name * @return int Amount of comments on the given page */ - static function getNumberOfCommentsPageParser( $parser, $pagename ) { + static function getParserHandler( $parser, $pagename ) { $page = Title::newFromText( $pagename ); if ( $page instanceof Title ) { @@ -94,7 +84,7 @@ class NumberOfComments { $id = $parser->getTitle()->getArticleID(); } - return NumberOfComments::getNumberOfCommentsPage( $id ); + return self::getNumberOfCommentsPage( $id ); } /** @@ -106,18 +96,18 @@ class NumberOfComments { static function getNumberOfCommentsPage( $pageId ) { global $wgMemc; - $key = wfMemcKey( 'comments', 'numberofcommentspage', $pageId ); + $key = $wgMemc->makeKey( 'comments', 'numberofcommentspage', $pageId ); $cache = $wgMemc->get( $key ); if ( $cache ) { $val = intval( $cache ); } else { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $res = $dbr->selectField( 'Comments', 'COUNT(*)', - array( 'Comment_Page_ID' => $pageId ), + [ 'Comment_Page_ID' => $pageId ], __METHOD__ ); diff --git a/includes/specials/SpecialCommentIgnoreList.php b/includes/specials/CommentIgnoreList.php similarity index 93% rename from includes/specials/SpecialCommentIgnoreList.php rename to includes/specials/CommentIgnoreList.php index 557ca2e..b63717c 100644 --- a/includes/specials/SpecialCommentIgnoreList.php +++ b/includes/specials/CommentIgnoreList.php @@ -43,7 +43,7 @@ class CommentIgnoreList extends SpecialPage { * Redirect anonymous users to Login Page * It will automatically return them to the CommentIgnoreList page */ - if ( $user->getID() == 0 && $user_name == '' ) { + if ( $user->getId() == 0 && $user_name == '' ) { $loginPage = SpecialPage::getTitleFor( 'Userlogin' ); $out->redirect( $loginPage->getLocalURL( 'returnto=Special:CommentIgnoreList' ) ); return; @@ -70,7 +70,7 @@ class CommentIgnoreList extends SpecialPage { $user_id = 0; } - CommentFunctions::deleteBlock( $user->getID(), $user_id ); + CommentFunctions::deleteBlock( $user->getId(), $user_id ); if ( $user_id && class_exists( 'UserStatsTrack' ) ) { $stats = new UserStatsTrack( $user_id, $user_name ); $stats->decStatField( 'comment_ignored' ); @@ -93,13 +93,13 @@ class CommentIgnoreList extends SpecialPage { $lang = $this->getLanguage(); $title = $this->getPageTitle(); - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $res = $dbr->select( 'Comments_block', - array( 'cb_user_name_blocked', 'cb_date' ), - array( 'cb_user_id' => $this->getUser()->getID() ), + [ 'cb_user_name_blocked', 'cb_date' ], + [ 'cb_user_id' => $this->getUser()->getId() ], __METHOD__, - array( 'ORDER BY' => 'cb_user_name' ) + [ 'ORDER BY' => 'cb_user_name' ] ); if ( $dbr->numRows( $res ) > 0 ) { diff --git a/package.json b/package.json index b3114a4..5ee1657 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,13 @@ { - "private": true, - "scripts": { - "test": "grunt test" - }, - "devDependencies": { - "grunt": "1.0.1", - "grunt-banana-checker": "0.4.0", - "grunt-contrib-jshint": "1.0.0", - "grunt-jsonlint": "1.0.7" - } + "private": true, + "scripts": { + "test": "grunt test" + }, + "devDependencies": { + "eslint-config-wikimedia": "0.5.0", + "grunt": "1.0.3", + "grunt-banana-checker": "0.4.0", + "grunt-eslint": "20.1.0", + "grunt-jsonlint": "1.0.7" + } } diff --git a/resources/images/default_ml.gif b/resources/images/default_ml.gif deleted file mode 100644 index fc5a6a8..0000000 Binary files a/resources/images/default_ml.gif and /dev/null differ diff --git a/resources/images/default_s.gif b/resources/images/default_s.gif deleted file mode 100644 index 2d7974b..0000000 Binary files a/resources/images/default_s.gif and /dev/null differ diff --git a/resources/js/Comment.js b/resources/js/Comment.js index 2b89a2e..ffa9fdb 100644 --- a/resources/js/Comment.js +++ b/resources/js/Comment.js @@ -1,358 +1,367 @@ /** * JavaScript for the Comments extension. - * Rewritten by Jack Phoenix to be more - * object-oriented. * * @file - * @date 6 December 2013 */ ( function ( $, mw ) { -var Comment = { - submitted: 0, - isBusy: false, - timer: '', // has to have an initial value... - updateDelay: 7000, - LatestCommentID: '', - CurLatestCommentID: '', - pause: 0, + var Comment = { + submitted: 0, + isBusy: false, + timer: '', // has to have an initial value... + updateDelay: 7000, + LatestCommentID: '', + CurLatestCommentID: '', + pause: 0, - /** - * When a comment's author is ignored, "Show Comment" link will be - * presented to the user. - * If the user clicks on it, this function is called to show the hidden - * comment. - */ - show: function( id ) { - $( '#ignore-' + id ).hide( 300 ); - $( '#comment-' + id ).show( 300 ); - }, + /** + * When a comment's author is ignored, "Show Comment" link will be + * presented to the user. + * If the user clicks on it, this function is called to show the hidden + * comment. + * + * @param {string} id + */ + show: function ( id ) { + $( '#ignore-' + id ).hide( 300 ); + $( '#comment-' + id ).show( 300 ); + }, - /** - * This function is called whenever a user clicks on the "block" image to - * block another user's comments. - * - * @param username String: name of the user whose comments we want to block - * @param userID Integer: user ID number of the user whose comments we - * want to block (or 0 for anonymous users) - * @param commentID Integer: comment ID number - */ - blockUser: function( username, userID, commentID ) { - var message; + /** + * This function is called whenever a user clicks on the "block" image to + * block another user's comments. + * + * @param {string} username Name of the user whose comments we want to block + * @param {number} userID User ID number of the user whose comments we + * want to block (or 0 for anonymous users) + * @param {number} commentID Comment ID number + */ + blockUser: function ( username, userID, commentID ) { + var message; - // Display a different message depending on whether we're blocking an - // anonymous user or a registered one. - if ( !userID || userID === 0 ) { - message = mw.msg( 'comments-block-warning-anon' ); - } else { - message = mw.msg( 'comments-block-warning-user', username ); - } - - if ( window.confirm( message ) ) { - ( new mw.Api() ).postWithToken( 'csrf', { - action: 'commentblock', - commentID: commentID - } ).done( function( response ) { - if ( response.commentblock.ok ) { - $( 'a.comments-block-user[data-comments-user-id=' + userID + ']' ) - .parents( '.c-item' ).hide( 300 ) - .prev().show( 300 ); - } - } ); - } - }, - - /** - * This function is called whenever a user clicks on the "Delete Comment" - * link to delete a comment. - * - * @param commentID Integer: comment ID number - */ - deleteComment: function( commentID ) { - if ( window.confirm( mw.msg( 'comments-delete-warning' ) ) ) { - ( new mw.Api() ).postWithToken( 'csrf', { - action: 'commentdelete', - commentID: commentID - } ).done( function( response ) { - if ( response.commentdelete.ok ) { - $( '#comment-' + commentID ).hide( 2000 ); - } - } ); - } - }, - - /** - * Vote for a comment. - * - * @param commentID Integer: comment ID number - * @param voteValue Integer: vote value - */ - vote: function( commentID, voteValue ) { - ( new mw.Api() ).postWithToken( 'csrf', { - action: 'commentvote', - commentID: commentID, - voteValue: voteValue - } ).done( function( response ) { - $( '#comment-' + commentID + ' .c-score' ) - .html( response.commentvote.html ) // this will still be escaped - .html( $( '#comment-' + commentID + ' .c-score' ).text() ); // unescape - } ); - }, - - /** - * @param pageID Integer: page ID - * @param order Sorting order - * @param end Scroll to bottom after? - * @param cpage Integer: comment page number (used for pagination) - */ - viewComments: function( pageID, order, end, cpage ) { - document.commentForm.cpage.value = cpage; - document.getElementById( 'allcomments' ).innerHTML = mw.msg( 'comments-loading' ) + '

    '; - - $.ajax( { - url: mw.config.get( 'wgScriptPath' ) + '/api.php', - data: { 'action': 'commentlist', 'format': 'json', 'pageID': pageID, 'order': order, 'pagerPage': cpage }, - cache: false - } ).done( function( response ) { - document.getElementById( 'allcomments' ).innerHTML = response.commentlist.html; - Comment.submitted = 0; - if ( end ) { - window.location.hash = 'end'; - } - } ); - }, - - /** - * Submit a new comment. - */ - submit: function() { - if ( Comment.submitted === 0 ) { - Comment.submitted = 1; - - var pageID = document.commentForm.pageId.value; - var parentID; - if ( !document.commentForm.commentParentId.value ) { - parentID = 0; + // Display a different message depending on whether we're blocking an + // anonymous user or a registered one. + if ( !userID || userID === 0 ) { + message = mw.msg( 'comments-block-warning-anon' ); } else { - parentID = document.commentForm.commentParentId.value; + message = mw.msg( 'comments-block-warning-user', username ); } - var commentText = document.commentForm.commentText.value; - /* ## START ## 27.09.2017 von Bernhard Linz: Prfen ob txt_username einen Wert enthlt. wenn nicht, ignorieren */ - var UsernameKOK; - if (document.getElementById('txt_username')) { - // UsernameKOK = document.commentform.txt_username.value; /* Wert aus txt_username in die Variable bergeben, welche spter an Comments_AjaxFunctions.php bergeben wird */ - UsernameKOK = document.getElementById('txt_username').value; - } else { - UsernameKOK = "none"; /* Wenn Feld nicht existiert Variable auf "none" setzen */ - } - commentText = commentText + "#START#" + UsernameKOK + "#ENDE#"; - //window.alert( UsernameKOK ); - /* ## ENDE ## 27.09.2017 von Bernhard Linz */ - ( new mw.Api() ).postWithToken( 'csrf', { - action: 'commentsubmit', - pageID: pageID, - parentID: parentID, - commentText: commentText - //UsernameKOK: UsernameKOK - } ).done( function( response ) { - if ( response.commentsubmit && response.commentsubmit.ok ) { - document.commentForm.commentText.value = ''; - var end = 1; - if ( mw.config.get( 'wgCommentsSortDescending' ) ) { - end = 0; + + // eslint-disable-next-line no-alert + if ( window.confirm( message ) ) { + ( new mw.Api() ).postWithToken( 'csrf', { + action: 'commentblock', + commentID: commentID + } ).done( function ( response ) { + if ( response.commentblock.ok ) { + $( 'a.comments-block-user[data-comments-user-id=' + userID + ']' ) + .parents( '.c-item' ).hide( 300 ) + .prev().show( 300 ); } - Comment.viewComments( document.commentForm.pageId.value, 0, end, document.commentForm.cpage.value ); - } else { - window.alert( response.error.info ); - Comment.submitted = 0; + } ); + } + }, + + /** + * This function is called whenever a user clicks on the "Delete Comment" + * link to delete a comment. + * + * @param {number} commentID Comment ID number + */ + deleteComment: function ( commentID ) { + // eslint-disable-next-line no-alert + if ( window.confirm( mw.msg( 'comments-delete-warning' ) ) ) { + ( new mw.Api() ).postWithToken( 'csrf', { + action: 'commentdelete', + commentID: commentID + } ).done( function ( response ) { + if ( response.commentdelete.ok ) { + $( '#comment-' + commentID ).hide( 2000 ); + } + } ); + } + }, + + /** + * Vote for a comment. + * + * @param {number} commentID Comment ID number + * @param {number} voteValue Vote value + */ + vote: function ( commentID, voteValue ) { + ( new mw.Api() ).postWithToken( 'csrf', { + action: 'commentvote', + commentID: commentID, + voteValue: voteValue + } ).done( function ( response ) { + $( '#comment-' + commentID + ' .c-score' ) + .html( response.commentvote.html ) // this will still be escaped + .html( $( '#comment-' + commentID + ' .c-score' ).text() ); // unescape + } ); + }, + + /** + * @param {number} pageID Page ID + * @param {string} order Sorting order + * @param {boolean} end Scroll to bottom after? + * @param {number} cpage Comment page number (used for pagination) + */ + viewComments: function ( pageID, order, end, cpage ) { + document.commentForm.cpage.value = cpage; + document.getElementById( 'allcomments' ).innerHTML = mw.msg( 'comments-loading' ) + '

    '; + + $.ajax( { + url: mw.config.get( 'wgScriptPath' ) + '/api.php', + data: { action: 'commentlist', format: 'json', pageID: pageID, order: order, pagerPage: cpage }, + cache: false + } ).done( function ( response ) { + document.getElementById( 'allcomments' ).innerHTML = response.commentlist.html; + Comment.submitted = 0; + if ( end ) { + window.location.hash = 'end'; } } ); + }, - Comment.cancelReply(); - } - }, + /** + * Submit a new comment. + */ + submit: function () { + var pageID, parentID, commentText; - /** - * Toggle comment auto-refreshing on or off - * - * @param status - */ - toggleLiveComments: function( status ) { - if ( status ) { - Comment.pause = 0; - } else { - Comment.pause = 1; - } - var msg; - if ( status ) { - msg = mw.msg( 'comments-auto-refresher-pause' ); - } else { - msg = mw.msg( 'comments-auto-refresher-enable' ); - } + if ( Comment.submitted === 0 ) { + Comment.submitted = 1; - $( 'body' ).on( 'click', 'div#spy a', function() { - Comment.toggleLiveComments( ( status ) ? 0 : 1 ); - } ); - $( 'div#spy a' ).css( 'font-size', '10px' ).text( msg ); - - if ( !Comment.pause ) { - Comment.LatestCommentID = document.commentForm.lastCommentId.value; - Comment.timer = setTimeout( - function() { Comment.checkUpdate(); }, - Comment.updateDelay - ); - } - }, - - checkUpdate: function() { - if ( Comment.isBusy ) { - return; - } - var pageID = document.commentForm.pageId.value; - - $.ajax( { - url: mw.config.get( 'wgScriptPath' ) + '/api.php', - data: { 'action': 'commentlatestid', 'format': 'json', 'pageID': pageID }, - cache: false - } ).done( function( response ) { - if ( response.commentlatestid.id ) { - // Get last new ID - Comment.CurLatestCommentID = response.commentlatestid.id; - if ( Comment.CurLatestCommentID !== Comment.LatestCommentID ) { - Comment.viewComments( document.commentForm.pageId.value, 0, 1, document.commentForm.cpage.value ); - Comment.LatestCommentID = Comment.CurLatestCommentID; + pageID = document.commentForm.pageId.value; + if ( !document.commentForm.commentParentId.value ) { + parentID = 0; + } else { + parentID = document.commentForm.commentParentId.value; } + commentText = document.commentForm.commentText.value; +/* ## START ## 25.05.2019 von Bernhard Linz ######################################################################################## */ + var UsernameKOK; + if (document.getElementById('txt_username')) { + UsernameKOK = document.getElementById('txt_username').value; + } else { + UsernameKOK = "none"; /* Wenn Feld nicht existiert Variable auf "none" setzen */ + } + /* Da ich erfolglos versucht habe den Username als eigenen Wert zu bertragen wird dieser nun */ + /* an den Kommentar-Text angehngt und von dort spter wieder abgeschnitten (auf der PHP-Seite) */ + commentText = commentText + "#START#" + UsernameKOK + "#ENDE#"; + //window.alert( UsernameKOK ); +/* ## ENDE ## 25.05.2019 von Bernhard Linz ######################################################################################## */ + ( new mw.Api() ).postWithToken( 'csrf', { + action: 'commentsubmit', + pageID: pageID, + parentID: parentID, + commentText: commentText + } ).done( function ( response ) { + var end; + + if ( response.commentsubmit && response.commentsubmit.ok ) { + document.commentForm.commentText.value = ''; + end = 1; + if ( mw.config.get( 'wgCommentsSortDescending' ) ) { + end = 0; + } + Comment.viewComments( document.commentForm.pageId.value, 0, end, document.commentForm.cpage.value ); + } else { + // eslint-disable-next-line no-alert + window.alert( response.error.info ); + Comment.submitted = 0; + } + } ); + + Comment.cancelReply(); + } + }, + + /** + * Toggle comment auto-refreshing on or off + * + * @param {boolean} status + */ + toggleLiveComments: function ( status ) { + var msg; + + if ( status ) { + Comment.pause = 0; + } else { + Comment.pause = 1; + } + if ( status ) { + msg = mw.msg( 'comments-auto-refresher-pause' ); + } else { + msg = mw.msg( 'comments-auto-refresher-enable' ); } - Comment.isBusy = false; + $( 'body' ).on( 'click', 'div#spy a', function () { + Comment.toggleLiveComments( ( status ) ? 0 : 1 ); + } ); + $( 'div#spy a' ).css( 'font-size', '10px' ).text( msg ); + if ( !Comment.pause ) { - clearTimeout( Comment.timer ); + Comment.LatestCommentID = document.commentForm.lastCommentId.value; Comment.timer = setTimeout( - function() { Comment.checkUpdate(); }, + function () { Comment.checkUpdate(); }, Comment.updateDelay ); } - } ); + }, - Comment.isBusy = true; - return false; - }, + checkUpdate: function () { + var pageID; - /** - * Show the "reply to user X" form - * - * @param parentId Integer: parent comment (the one we're replying to) ID - * @param poster String: name of the person whom we're replying to - * @param posterGender String: gender of the person whom we're replying to - */ - reply: function( parentId, poster, posterGender ) { - $( '#replyto' ).text( - mw.msg( 'comments-reply-to', poster, posterGender ) + ' (' - ); - $( '', { - class: 'comments-cancel-reply-link', - style: 'cursor:pointer', - text: mw.msg( 'comments-cancel-reply' ) - } ).appendTo( '#replyto' ); - $( '#replyto' ).append( ')
    ' ); - - document.commentForm.commentParentId.value = parentId; - }, - - cancelReply: function() { - document.getElementById( 'replyto' ).innerHTML = ''; - document.commentForm.commentParentId.value = ''; - } -}; - -$( function() { - // Important note: these are all using $( 'body' ) as the selector - // instead of the class/ID/whatever so that they work after viewComments() - // has been called (i.e. so that "Delete comment", reply, etc. links - // continue working after you've submitted a comment yourself) - - // "Sort by X" feature - $( 'body' ).on( 'change', 'select[name="TheOrder"]', function() { - Comment.viewComments( - mw.config.get( 'wgArticleId' ), // or we could use $( 'input[name="pid"]' ).val(), too - $( this ).val(), - 0, - document.commentForm.cpage.value - ); - } ) - - // Comment auto-refresher - .on( 'click', 'div#spy a', function() { - Comment.toggleLiveComments( 1 ); - } ) - - // Voting links - .on( 'click', 'a#comment-vote-link', function() { - var that = $( this ); - Comment.vote( - that.data( 'comment-id' ), - that.data( 'vote-type' ) - ); - } ) - - // "Block this user" links - .on( 'click', 'a.comments-block-user', function() { - var that = $( this ); - Comment.blockUser( - that.data( 'comments-safe-username' ), - that.data( 'comments-user-id' ), - that.data( 'comments-comment-id' ) - ); - } ) - - // "Delete Comment" links - .on( 'click', 'a.comment-delete-link', function() { - Comment.deleteComment( $( this ).data( 'comment-id' ) ); - } ) - - // "Show this hidden comment" -- comments made by people on the user's - // personal block list - .on( 'click', 'div.c-ignored-links a', function() { - Comment.show( $( this ).data( 'comment-id' ) ); - } ) - - // Reply links - .on( 'click', 'a.comments-reply-to', function() { - Comment.reply( - $( this ).data( 'comment-id' ), - $( this ).data( 'comments-safe-username' ), - $( this ).data( 'comments-user-gender' ) - ); - } ) - - // "Reply to " links - .on( 'click', 'a.comments-cancel-reply-link', function() { - Comment.cancelReply(); - } ) - - // Handle clicks on the submit button (previously this was an onclick attr) - .on( 'click', 'div.c-form-button input[type="button"]', function() { - Comment.submit(); - } ) - - // Change page - .on( 'click', 'li.c-pager-item a.c-pager-link', function() { - var ord = 0, - commentsBody = $( this ).parents( 'div.comments-body:first' ); - - if ( commentsBody.length > 0 ) { - var ordCrtl = commentsBody.first().find( 'select[name="TheOrder"]:first' ); - if ( ordCrtl.length > 0 ) { - ord = ordCrtl.val(); + if ( Comment.isBusy ) { + return; } - } + pageID = document.commentForm.pageId.value; - Comment.viewComments( - mw.config.get( 'wgArticleId' ), // or we could use $( 'input[name="pid"]' ).val(), too - ord, - 0, - $( this ).data( 'cpage' ) - ); + $.ajax( { + url: mw.config.get( 'wgScriptPath' ) + '/api.php', + data: { action: 'commentlatestid', format: 'json', pageID: pageID }, + cache: false + } ).done( function ( response ) { + if ( response.commentlatestid.id ) { + // Get last new ID + Comment.CurLatestCommentID = response.commentlatestid.id; + if ( Comment.CurLatestCommentID !== Comment.LatestCommentID ) { + Comment.viewComments( document.commentForm.pageId.value, 0, 1, document.commentForm.cpage.value ); + Comment.LatestCommentID = Comment.CurLatestCommentID; + } + } + + Comment.isBusy = false; + if ( !Comment.pause ) { + clearTimeout( Comment.timer ); + Comment.timer = setTimeout( + function () { Comment.checkUpdate(); }, + Comment.updateDelay + ); + } + } ); + + Comment.isBusy = true; + return false; + }, + + /** + * Show the "reply to user X" form + * + * @param {number} parentId Parent comment (the one we're replying to) ID + * @param {string} poster Name of the person whom we're replying to + * @param {string} posterGender Gender of the person whom we're replying to + */ + reply: function ( parentId, poster, posterGender ) { + $( '#replyto' ).text( + mw.msg( 'comments-reply-to', poster, posterGender ) + ' (' + ); + $( '
    ', { + class: 'comments-cancel-reply-link', + style: 'cursor:pointer', + text: mw.msg( 'comments-cancel-reply' ) + } ).appendTo( '#replyto' ); + $( '#replyto' ).append( ')
    ' ); + + document.commentForm.commentParentId.value = parentId; + }, + + cancelReply: function () { + document.getElementById( 'replyto' ).innerHTML = ''; + document.commentForm.commentParentId.value = ''; + } + }; + + $( function () { + // Important note: these are all using $( 'body' ) as the selector + // instead of the class/ID/whatever so that they work after viewComments() + // has been called (i.e. so that "Delete comment", reply, etc. links + // continue working after you've submitted a comment yourself) + + // "Sort by X" feature + $( 'body' ) + .on( 'change', 'select[name="TheOrder"]', function () { + Comment.viewComments( + mw.config.get( 'wgArticleId' ), // or we could use $( 'input[name="pid"]' ).val(), too + $( this ).val(), + 0, + document.commentForm.cpage.value + ); + } ) + + // Comment auto-refresher + .on( 'click', 'div#spy a', function () { + Comment.toggleLiveComments( 1 ); + } ) + + // Voting links + .on( 'click', 'a#comment-vote-link', function () { + var that = $( this ); + Comment.vote( + that.data( 'comment-id' ), + that.data( 'vote-type' ) + ); + } ) + + // "Block this user" links + .on( 'click', 'a.comments-block-user', function () { + var that = $( this ); + Comment.blockUser( + that.data( 'comments-safe-username' ), + that.data( 'comments-user-id' ), + that.data( 'comments-comment-id' ) + ); + } ) + + // "Delete Comment" links + .on( 'click', 'a.comment-delete-link', function () { + Comment.deleteComment( $( this ).data( 'comment-id' ) ); + } ) + + // "Show this hidden comment" -- comments made by people on the user's + // personal block list + .on( 'click', 'div.c-ignored-links a', function () { + Comment.show( $( this ).data( 'comment-id' ) ); + } ) + + // Reply links + .on( 'click', 'a.comments-reply-to', function () { + Comment.reply( + $( this ).data( 'comment-id' ), + $( this ).data( 'comments-safe-username' ), + $( this ).data( 'comments-user-gender' ) + ); + } ) + + // "Reply to " links + .on( 'click', 'a.comments-cancel-reply-link', function () { + Comment.cancelReply(); + } ) + + // Handle clicks on the submit button (previously this was an onclick attr) + .on( 'click', 'div.c-form-button input[type="button"]', function () { + Comment.submit(); + } ) + + // Change page + .on( 'click', 'li.c-pager-item a.c-pager-link', function () { + var ordCrtl, ord = 0, + commentsBody = $( this ).parents( 'div.comments-body:first' ); + + if ( commentsBody.length > 0 ) { + ordCrtl = commentsBody.first().find( 'select[name="TheOrder"]:first' ); + if ( ordCrtl.length > 0 ) { + ord = ordCrtl.val(); + } + } + + Comment.viewComments( + mw.config.get( 'wgArticleId' ), // or we could use $( 'input[name="pid"]' ).val(), too + ord, + 0, + $( this ).data( 'cpage' ) + ); + } ); } ); -} ); }( jQuery, mediaWiki ) ); diff --git a/sql/comments.mssql.sql b/sql/comments.mssql.sql index b3db5c4..ad2d418 100644 --- a/sql/comments.mssql.sql +++ b/sql/comments.mssql.sql @@ -6,8 +6,9 @@ -- Tested at SQLFiddle.com against MS SQL Server 2008 & 2012 and at least this -- builds. Doesn't guarantee anything, though. -- --- Author: Jack Phoenix +-- Author: Jack Phoenix -- Date: 24 July 2013 + CREATE TABLE /*$wgDBprefix*/Comments ( CommentID INT NOT NULL PRIMARY KEY IDENTITY(0,1), Comment_Page_ID INT NOT NULL default 0, @@ -22,26 +23,3 @@ CREATE TABLE /*$wgDBprefix*/Comments ( CREATE INDEX /*i*/comment_page_id_index ON /*$wgDBprefix*/Comments (Comment_Page_ID); CREATE INDEX /*i*/wiki_user_id ON /*$wgDBprefix*/Comments (Comment_user_id); CREATE INDEX /*i*/wiki_user_name ON /*$wgDBprefix*/Comments (Comment_Username); - -CREATE TABLE /*$wgDBprefix*/Comments_Vote ( - Comment_Vote_ID INT NOT NULL default 0, - Comment_Vote_user_id INT NOT NULL default 0, - Comment_Vote_Username NVARCHAR(200) NOT NULL default '', - Comment_Vote_Score INT NOT NULL default 0, - Comment_Vote_Date DATETIME NOT NULL default '0000-00-00 00:00:00', - Comment_Vote_IP NVARCHAR(45) NOT NULL default '' -) /*$wgDBTableOptions*/; - -CREATE UNIQUE INDEX /*i*/Comments_Vote_user_id_index ON /*$wgDBprefix*/Comments_Vote (Comment_Vote_ID,Comment_Vote_Username); -CREATE INDEX /*i*/Comment_Vote_Score ON /*$wgDBprefix*/Comments_Vote (Comment_Vote_Score); -CREATE INDEX /*i*/Comment_Vote_user_id ON /*$wgDBprefix*/Comments_Vote (Comment_Vote_user_id); - -CREATE TABLE /*$wgDBprefix*/Comments_block ( - cb_id INT NOT NULL PRIMARY KEY IDENTITY(0,1), - cb_user_id INT NOT NULL default 0, - cb_user_name NVARCHAR(255) NOT NULL default '', - cb_user_id_blocked INT default NULL, - cb_user_name_blocked NVARCHAR(255) NOT NULL default '', - cb_date DATETIME default NULL -) /*$wgDBTableOptions*/; -CREATE INDEX /*i*/cb_user_id ON /*$wgDBprefix*/Comments_block (cb_user_id); diff --git a/sql/comments.oracle.sql b/sql/comments.oracle.sql index 2957692..576bb28 100644 --- a/sql/comments.oracle.sql +++ b/sql/comments.oracle.sql @@ -5,7 +5,7 @@ -- -- This DOES NOT build at SQLFiddle.com... -- --- Author: Jack Phoenix +-- Author: Jack Phoenix -- Date: 24 July 2013 -- No idea if this is needed, but /maintenance/oracle/tables.sql uses it, so I @@ -31,30 +31,3 @@ CREATE INDEX &mw_prefix.wiki_user_id ON &mw_prefix.Comments (Comment_user_id); CREATE INDEX &mw_prefix.wiki_user_name ON &mw_prefix.Comments (Comment_Username); ALTER TABLE &mw_prefix.Comments ADD CONSTRAINT &mw_prefix.Comments_pk PRIMARY KEY (CommentID); - -CREATE TABLE &mw_prefix.Comments_Vote ( - Comment_Vote_ID NUMBER NOT NULL DEFAULT 0, - Comment_Vote_user_id NUMBER NOT NULL DEFAULT 0, - Comment_Vote_Username VARCHAR2(200) NOT NULL, - Comment_Vote_Score NUMBER NOT NULL DEFAULT 0, - Comment_Vote_Date TIMESTAMP(6) WITH TIME ZONE NOT NULL, - Comment_Vote_IP VARCHAR2(45) NOT NULL -); - -CREATE UNIQUE INDEX &mw_prefix.Comments_Vote_user_id_index ON &mw_prefix.Comments_Vote (Comment_Vote_ID,Comment_Vote_Username); -CREATE INDEX &mw_prefix.Comment_Vote_Score ON &mw_prefix.Comments_Vote (Comment_Vote_Score); -CREATE INDEX &mw_prefix.Comment_Vote_user_id ON &mw_prefix.Comments_Vote (Comment_Vote_user_id); - -CREATE SEQUENCE Comments_block_cb_id_seq; - -CREATE TABLE &mw_prefix.Comments_block ( - cb_id NUMBER NOT NULL, - cb_user_id NUMBER NOT NULL DEFAULT 0, - cb_user_name VARCHAR2(255) NOT NULL, - cb_user_id_blocked NUMBER DEFAULT NULL, - cb_user_name_blocked VARCHAR2(255) NOT NULL, - cb_date TIMESTAMP(6) WITH TIME ZONE -); -CREATE INDEX &mw_prefix.cb_user_id ON &mw_prefix.Comments_block (cb_user_id); - -ALTER TABLE &mw_prefix.Comments_block ADD CONSTRAINT &mw_prefix.Comments_block_pk PRIMARY KEY (cb_id); diff --git a/sql/comments.postgres.sql b/sql/comments.postgres.sql index 8a397ff..420052c 100644 --- a/sql/comments.postgres.sql +++ b/sql/comments.postgres.sql @@ -6,8 +6,9 @@ -- Tested at SQLFiddle.com against PostgreSQL 8.3.20 & 9.1.9 and at least this -- builds. Doesn't guarantee anything, though. -- --- Author: Jack Phoenix +-- Author: Jack Phoenix -- Date: 24 July 2013 + DROP SEQUENCE IF EXISTS Comments_CommentID_seq CASCADE; CREATE SEQUENCE Comments_CommentID_seq MINVALUE 0 START WITH 0; @@ -19,35 +20,9 @@ CREATE TABLE Comments ( Comment_Text TEXT NOT NULL, Comment_Date TIMESTAMPTZ NOT NULL DEFAULT now(), Comment_Parent_ID INTEGER NOT NULL DEFAULT 0, - Comment_IP TEXT NOT NULL DEFAULT '', + Comment_IP TEXT NOT NULL DEFAULT '' ); CREATE INDEX comment_page_id_index ON Comments (Comment_Page_ID); CREATE INDEX wiki_user_id ON Comments (Comment_user_id); CREATE INDEX wiki_user_name ON Comments (Comment_Username); - -CREATE TABLE Comments_Vote ( - Comment_Vote_ID INTEGER NOT NULL DEFAULT 0, - Comment_Vote_user_id INTEGER NOT NULL DEFAULT 0, - Comment_Vote_Username TEXT NOT NULL DEFAULT '', - Comment_Vote_Score INTEGER NOT NULL DEFAULT 0, - Comment_Vote_Date TIMESTAMPTZ NOT NULL DEFAULT now(), - Comment_Vote_IP TEXT NOT NULL DEFAULT '' -); - -CREATE UNIQUE INDEX Comments_Vote_user_id_index ON Comments_Vote (Comment_Vote_ID,Comment_Vote_Username); -CREATE INDEX Comment_Vote_Score ON Comments_Vote (Comment_Vote_Score); -CREATE INDEX Comment_Vote_user_id ON Comments_Vote (Comment_Vote_user_id); - - -DROP SEQUENCE IF EXISTS Comments_block_cb_id_seq CASCADE; -CREATE SEQUENCE Comments_block_cb_id_seq MINVALUE 0 START WITH 0; -CREATE TABLE Comments_block ( - cb_id INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('Comments_block_cb_id_seq'), - cb_user_id INTEGER NOT NULL DEFAULT 0, - cb_user_name TEXT NOT NULL DEFAULT '', - cb_user_id_blocked INTEGER DEFAULT NULL, - cb_user_name_blocked TEXT NOT NULL DEFAULT '', - cb_date TIMESTAMPTZ NOT NULL DEFAULT now() -); -CREATE INDEX cb_user_id ON Comments_block (cb_user_id); diff --git a/sql/comments.sql b/sql/comments.sql index 543d6b3..0ccb779 100644 --- a/sql/comments.sql +++ b/sql/comments.sql @@ -1,4 +1,5 @@ -- MySQL/SQLite schema for the Comments extension + CREATE TABLE /*_*/Comments ( CommentID int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, Comment_Page_ID int(11) NOT NULL default 0, @@ -13,26 +14,3 @@ CREATE TABLE /*_*/Comments ( CREATE INDEX /*i*/comment_page_id_index ON /*_*/Comments (Comment_Page_ID); CREATE INDEX /*i*/wiki_user_id ON /*_*/Comments (Comment_user_id); CREATE INDEX /*i*/wiki_user_name ON /*_*/Comments (Comment_Username); - -CREATE TABLE /*_*/Comments_Vote ( - Comment_Vote_ID int(11) NOT NULL default 0, - Comment_Vote_user_id int(11) NOT NULL default 0, - Comment_Vote_Username varchar(200) NOT NULL default '', - Comment_Vote_Score int(4) NOT NULL default 0, - Comment_Vote_Date datetime NOT NULL default '0000-00-00 00:00:00', - Comment_Vote_IP varchar(45) NOT NULL default '' -) /*$wgDBTableOptions*/; - -CREATE UNIQUE INDEX /*i*/Comments_Vote_user_id_index ON /*_*/Comments_Vote (Comment_Vote_ID,Comment_Vote_Username); -CREATE INDEX /*i*/Comment_Vote_Score ON /*_*/Comments_Vote (Comment_Vote_Score); -CREATE INDEX /*i*/Comment_Vote_user_id ON /*_*/Comments_Vote (Comment_Vote_user_id); - -CREATE TABLE /*_*/Comments_block ( - cb_id int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, - cb_user_id int(5) NOT NULL default 0, - cb_user_name varchar(255) NOT NULL default '', - cb_user_id_blocked int(5) default NULL, - cb_user_name_blocked varchar(255) NOT NULL default '', - cb_date datetime default NULL -) /*$wgDBTableOptions*/; -CREATE INDEX /*i*/cb_user_id ON /*_*/Comments_block (cb_user_id); diff --git a/sql/comments_block.mssql.sql b/sql/comments_block.mssql.sql new file mode 100644 index 0000000..7738f7b --- /dev/null +++ b/sql/comments_block.mssql.sql @@ -0,0 +1,21 @@ +-- Microsoft SQL Server (MSSQL) variant of Comments' database schema +-- This is probably crazy, but so is MSSQL. I've never used MSSQL so +-- there's a fair chance that the code is full of bugs, stupid things or both. +-- Please feel free to submit patches or just go ahead and fix it. +-- +-- Tested at SQLFiddle.com against MS SQL Server 2008 & 2012 and at least this +-- builds. Doesn't guarantee anything, though. +-- +-- Author: Jack Phoenix +-- Date: 24 July 2013 + +CREATE TABLE /*$wgDBprefix*/Comments_block ( + cb_id INT NOT NULL PRIMARY KEY IDENTITY(0,1), + cb_user_id INT NOT NULL default 0, + cb_user_name NVARCHAR(255) NOT NULL default '', + cb_user_id_blocked INT default NULL, + cb_user_name_blocked NVARCHAR(255) NOT NULL default '', + cb_date DATETIME default NULL +) /*$wgDBTableOptions*/; + +CREATE INDEX /*i*/cb_user_id ON /*$wgDBprefix*/Comments_block (cb_user_id); diff --git a/sql/comments_block.oracle.sql b/sql/comments_block.oracle.sql new file mode 100644 index 0000000..826046f --- /dev/null +++ b/sql/comments_block.oracle.sql @@ -0,0 +1,27 @@ +-- Oracle variant of Comments' database schema +-- This is probably crazy, but so is Oracle. I've never used Oracle so +-- there's a fair chance that the code is full of bugs, stupid things or both. +-- Please feel free to submit patches or just go ahead and fix it. +-- +-- This DOES NOT build at SQLFiddle.com... +-- +-- Author: Jack Phoenix +-- Date: 24 July 2013 +-- No idea if this is needed, but /maintenance/oracle/tables.sql uses it, so I +-- guess it serves some purpose here, too +define mw_prefix='{$wgDBprefix}'; + +CREATE SEQUENCE Comments_block_cb_id_seq; + +CREATE TABLE &mw_prefix.Comments_block ( + cb_id NUMBER NOT NULL, + cb_user_id NUMBER NOT NULL DEFAULT 0, + cb_user_name VARCHAR2(255) NOT NULL, + cb_user_id_blocked NUMBER DEFAULT NULL, + cb_user_name_blocked VARCHAR2(255) NOT NULL, + cb_date TIMESTAMP(6) WITH TIME ZONE +); + +CREATE INDEX &mw_prefix.cb_user_id ON &mw_prefix.Comments_block (cb_user_id); + +ALTER TABLE &mw_prefix.Comments_block ADD CONSTRAINT &mw_prefix.Comments_block_pk PRIMARY KEY (cb_id); diff --git a/sql/comments_block.postgres.sql b/sql/comments_block.postgres.sql new file mode 100644 index 0000000..64ff725 --- /dev/null +++ b/sql/comments_block.postgres.sql @@ -0,0 +1,24 @@ +-- PostgreSQL variant of Comments' database schema +-- This is probably crazy, but so is PostgreSQL. I've never used PGSQL so +-- there's a fair chance that the code is full of bugs, stupid things or both. +-- Please feel free to submit patches or just go ahead and fix it. +-- +-- Tested at SQLFiddle.com against PostgreSQL 8.3.20 & 9.1.9 and at least this +-- builds. Doesn't guarantee anything, though. +-- +-- Author: Jack Phoenix +-- Date: 24 July 2013 + +DROP SEQUENCE IF EXISTS Comments_block_cb_id_seq CASCADE; +CREATE SEQUENCE Comments_block_cb_id_seq MINVALUE 0 START WITH 0; + +CREATE TABLE Comments_block ( + cb_id INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('Comments_block_cb_id_seq'), + cb_user_id INTEGER NOT NULL DEFAULT 0, + cb_user_name TEXT NOT NULL DEFAULT '', + cb_user_id_blocked INTEGER DEFAULT NULL, + cb_user_name_blocked TEXT NOT NULL DEFAULT '', + cb_date TIMESTAMPTZ NOT NULL DEFAULT now() +); + +CREATE INDEX cb_user_id ON Comments_block (cb_user_id); diff --git a/sql/comments_block.sql b/sql/comments_block.sql new file mode 100644 index 0000000..4eface2 --- /dev/null +++ b/sql/comments_block.sql @@ -0,0 +1,12 @@ +-- MySQL/SQLite schema for the Comments extension + +CREATE TABLE /*_*/Comments_block ( + cb_id int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, + cb_user_id int(5) NOT NULL default 0, + cb_user_name varchar(255) NOT NULL default '', + cb_user_id_blocked int(5) default NULL, + cb_user_name_blocked varchar(255) NOT NULL default '', + cb_date datetime default NULL +) /*$wgDBTableOptions*/; + +CREATE INDEX /*i*/cb_user_id ON /*_*/Comments_block (cb_user_id); diff --git a/sql/comments_vote.mssql.sql b/sql/comments_vote.mssql.sql new file mode 100644 index 0000000..be2f8cb --- /dev/null +++ b/sql/comments_vote.mssql.sql @@ -0,0 +1,23 @@ +-- Microsoft SQL Server (MSSQL) variant of Comments' database schema +-- This is probably crazy, but so is MSSQL. I've never used MSSQL so +-- there's a fair chance that the code is full of bugs, stupid things or both. +-- Please feel free to submit patches or just go ahead and fix it. +-- +-- Tested at SQLFiddle.com against MS SQL Server 2008 & 2012 and at least this +-- builds. Doesn't guarantee anything, though. +-- +-- Author: Jack Phoenix +-- Date: 24 July 2013 + +CREATE TABLE /*$wgDBprefix*/Comments_Vote ( + Comment_Vote_ID INT NOT NULL default 0, + Comment_Vote_user_id INT NOT NULL default 0, + Comment_Vote_Username NVARCHAR(200) NOT NULL default '', + Comment_Vote_Score INT NOT NULL default 0, + Comment_Vote_Date DATETIME NOT NULL default '0000-00-00 00:00:00', + Comment_Vote_IP NVARCHAR(45) NOT NULL default '' +) /*$wgDBTableOptions*/; + +CREATE UNIQUE INDEX /*i*/Comments_Vote_user_id_index ON /*$wgDBprefix*/Comments_Vote (Comment_Vote_ID,Comment_Vote_Username); +CREATE INDEX /*i*/Comment_Vote_Score ON /*$wgDBprefix*/Comments_Vote (Comment_Vote_Score); +CREATE INDEX /*i*/Comment_Vote_user_id ON /*$wgDBprefix*/Comments_Vote (Comment_Vote_user_id); diff --git a/sql/comments_vote.oracle.sql b/sql/comments_vote.oracle.sql new file mode 100644 index 0000000..98e1385 --- /dev/null +++ b/sql/comments_vote.oracle.sql @@ -0,0 +1,25 @@ +-- Oracle variant of Comments' database schema +-- This is probably crazy, but so is Oracle. I've never used Oracle so +-- there's a fair chance that the code is full of bugs, stupid things or both. +-- Please feel free to submit patches or just go ahead and fix it. +-- +-- This DOES NOT build at SQLFiddle.com... +-- +-- Author: Jack Phoenix +-- Date: 24 July 2013 +-- No idea if this is needed, but /maintenance/oracle/tables.sql uses it, so I +-- guess it serves some purpose here, too +define mw_prefix='{$wgDBprefix}'; + +CREATE TABLE &mw_prefix.Comments_Vote ( + Comment_Vote_ID NUMBER NOT NULL DEFAULT 0, + Comment_Vote_user_id NUMBER NOT NULL DEFAULT 0, + Comment_Vote_Username VARCHAR2(200) NOT NULL, + Comment_Vote_Score NUMBER NOT NULL DEFAULT 0, + Comment_Vote_Date TIMESTAMP(6) WITH TIME ZONE NOT NULL, + Comment_Vote_IP VARCHAR2(45) NOT NULL +); + +CREATE UNIQUE INDEX &mw_prefix.Comments_Vote_user_id_index ON &mw_prefix.Comments_Vote (Comment_Vote_ID,Comment_Vote_Username); +CREATE INDEX &mw_prefix.Comment_Vote_Score ON &mw_prefix.Comments_Vote (Comment_Vote_Score); +CREATE INDEX &mw_prefix.Comment_Vote_user_id ON &mw_prefix.Comments_Vote (Comment_Vote_user_id); diff --git a/sql/comments_vote.postgres.sql b/sql/comments_vote.postgres.sql new file mode 100644 index 0000000..f5da9a4 --- /dev/null +++ b/sql/comments_vote.postgres.sql @@ -0,0 +1,23 @@ +-- PostgreSQL variant of Comments' database schema +-- This is probably crazy, but so is PostgreSQL. I've never used PGSQL so +-- there's a fair chance that the code is full of bugs, stupid things or both. +-- Please feel free to submit patches or just go ahead and fix it. +-- +-- Tested at SQLFiddle.com against PostgreSQL 8.3.20 & 9.1.9 and at least this +-- builds. Doesn't guarantee anything, though. +-- +-- Author: Jack Phoenix +-- Date: 24 July 2013 + +CREATE TABLE Comments_Vote ( + Comment_Vote_ID INTEGER NOT NULL DEFAULT 0, + Comment_Vote_user_id INTEGER NOT NULL DEFAULT 0, + Comment_Vote_Username TEXT NOT NULL DEFAULT '', + Comment_Vote_Score INTEGER NOT NULL DEFAULT 0, + Comment_Vote_Date TIMESTAMPTZ NOT NULL DEFAULT now(), + Comment_Vote_IP TEXT NOT NULL DEFAULT '' +); + +CREATE UNIQUE INDEX Comments_Vote_user_id_index ON Comments_Vote (Comment_Vote_ID,Comment_Vote_Username); +CREATE INDEX Comment_Vote_Score ON Comments_Vote (Comment_Vote_Score); +CREATE INDEX Comment_Vote_user_id ON Comments_Vote (Comment_Vote_user_id); diff --git a/sql/comments_vote.sql b/sql/comments_vote.sql new file mode 100644 index 0000000..e7e4ecf --- /dev/null +++ b/sql/comments_vote.sql @@ -0,0 +1,14 @@ +-- MySQL/SQLite schema for the Comments extension + +CREATE TABLE /*_*/Comments_Vote ( + Comment_Vote_ID int(11) NOT NULL default 0, + Comment_Vote_user_id int(11) NOT NULL default 0, + Comment_Vote_Username varchar(200) NOT NULL default '', + Comment_Vote_Score int(4) NOT NULL default 0, + Comment_Vote_Date datetime NOT NULL default '0000-00-00 00:00:00', + Comment_Vote_IP varchar(45) NOT NULL default '' +) /*$wgDBTableOptions*/; + +CREATE UNIQUE INDEX /*i*/Comments_Vote_user_id_index ON /*_*/Comments_Vote (Comment_Vote_ID,Comment_Vote_Username); +CREATE INDEX /*i*/Comment_Vote_Score ON /*_*/Comments_Vote (Comment_Vote_Score); +CREATE INDEX /*i*/Comment_Vote_user_id ON /*_*/Comments_Vote (Comment_Vote_user_id); diff --git a/version b/version deleted file mode 100644 index 0e77934..0000000 --- a/version +++ /dev/null @@ -1,4 +0,0 @@ -Comments: master -2017-08-02T22:03:07 - -608f7af