jenkins-bot has submitted this change and it was merged.
Change subject: Add grunt test to validate i18n JSON ......................................................................
Add grunt test to validate i18n JSON
All i18n JSON files were invalid due to missing metadata blocks. weblinkchecker has missing messages in many languages.
Bug: T85335 Bug: T85336 Change-Id: Ieb1f96889848332a7163a7c1a1070e99c560dc6e --- A Gruntfile.js M add_text/en.json M archivebot/en.json M basic/en.json M blockpageschecker/en.json M capitalize_redirects/en.json M casechecker/en.json M catall/en.json M category/en.json M category_redirect/en.json M clean_sandbox/en.json M commons/en.json M commons_link/en.json M cosmetic_changes/en.json M djvutext/en.json M editarticle/en.json M featured/en.json M fixing_redirects/en.json M interwiki/en.json M isbn/en.json M lonelypages/en.json M makecat/en.json M misspelling/en.json M movepages/en.json M ndashredir/en.json M noreferences/en.json A package.json M pagefromfile/en.json M protect/en.json M pywikibot/en.json M redirect/en.json M reflinks/en.json M replace/en.json M revertbot/en.json M selflink/en.json M solve_disambiguation/en.json M spamremove/en.json M spellcheck/en.json M table2wiki/en.json M template/en.json M unlink/en.json M weblinkchecker/en.json M welcome/en.json 43 files changed, 114 insertions(+), 0 deletions(-)
Approvals: John Vandenberg: Looks good to me, but someone else must approve Xqt: Looks good to me, approved Siebrand: Looks good to me, but someone else must approve jenkins-bot: Verified
diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..e92218b --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,62 @@ +/*! + * Grunt file + */ + +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-banana-checker' ); + + grunt.initConfig( { + pkg: grunt.file.readJSON( __dirname + '/package.json' ), + banana: { + pywikibot: __dirname + '/pywikibot/', + thirdparty: __dirname + '/thirdparty/', + add_text: __dirname + '/add_text/', + archivebot: __dirname + '/archivebot/', + basic: __dirname + '/basic/', + blockpageschecker: __dirname + '/blockpageschecker/', + capitalize_redirects: __dirname + '/capitalize_redirects/', + casechecker: __dirname + '/casechecker/', + catall: __dirname + '/catall/', + category: __dirname + '/category/', + category_redirect: __dirname + '/category_redirect/', + clean_sandbox: __dirname + '/clean_sandbox/', + commons_link: __dirname + '/commons_link/', + commons: __dirname + '/commons/', + cosmetic_changes: __dirname + '/cosmetic_changes/', + delete: __dirname + '/delete/', + djvutext: __dirname + '/djvutext/', + editarticle: __dirname + '/editarticle/', + featured: __dirname + '/featured/', + fixing_redirects: __dirname + '/fixing_redirects/', + interwiki: __dirname + '/interwiki/', + isbn: __dirname + '/isbn/', + lonelypages: __dirname + '/lonelypages/', + makecat: __dirname + '/makecat/', + misspelling: __dirname + '/misspelling/', + movepages: __dirname + '/movepages/', + ndashredir: __dirname + '/ndashredir/', + noreferences: __dirname + '/noreferences/', + pagefromfile: __dirname + '/pagefromfile/', + protect: __dirname + '/protect/', + pywikibot: __dirname + '/pywikibot/', + redirect: __dirname + '/redirect/', + reflinks: __dirname + '/reflinks/', + replace: __dirname + '/replace/', + revertbot: __dirname + '/revertbot/', + selflink: __dirname + '/selflink/', + solve_disambiguation: __dirname + '/solve_disambiguation/', + spamremove: __dirname + '/spamremove/', + spellcheck: __dirname + '/spellcheck/', + table2wiki: __dirname + '/table2wiki/', + template: __dirname + '/template/', + unlink: __dirname + '/unlink/', + //missing messages: weblinkchecker: __dirname + '/weblinkchecker/', + welcome: __dirname + '/welcome/' + } + } ); + + grunt.registerTask( 'lint', ['banana'] ); + grunt.registerTask( 'test', ['lint'] ); + grunt.registerTask( 'default', ['test'] ); +}; diff --git a/add_text/en.json b/add_text/en.json index 08bb219..3a4bc91 100644 --- a/add_text/en.json +++ b/add_text/en.json @@ -1,3 +1,4 @@ { + "@metadata": [], "add_text-adding": "Bot: Adding %(adding)s" } diff --git a/archivebot/en.json b/archivebot/en.json index dd34ba1..38ab0fc 100644 --- a/archivebot/en.json +++ b/archivebot/en.json @@ -1,4 +1,5 @@ { + "@metadata": [], "archivebot-older-than": "older than %(duration)s", "archivebot-page-summary": "Bot: Archiving %(count)d {{PLURAL:%(count)d|thread|threads}} (%(why)s) to %(archives)s.", "archivebot-archiveheader": "{{talkarchive}}", diff --git a/basic/en.json b/basic/en.json index e5c0296..225de00 100644 --- a/basic/en.json +++ b/basic/en.json @@ -1,3 +1,4 @@ { + "@metadata": [], "basic-changing": "Robot: Changing ..." } diff --git a/blockpageschecker/en.json b/blockpageschecker/en.json index 12104e0..39cb502 100644 --- a/blockpageschecker/en.json +++ b/blockpageschecker/en.json @@ -1,3 +1,4 @@ { + "@metadata": [], "blockpageschecker-summary": "Bot: Deleting out-dated template" } diff --git a/capitalize_redirects/en.json b/capitalize_redirects/en.json index 9174af2..914f4a1 100644 --- a/capitalize_redirects/en.json +++ b/capitalize_redirects/en.json @@ -1,3 +1,4 @@ { + "@metadata": [], "capitalize_redirects-create-redirect": "Bot: Create redirect to [[%(to)s]]" } diff --git a/casechecker/en.json b/casechecker/en.json index c9170e4..2befd18 100644 --- a/casechecker/en.json +++ b/casechecker/en.json @@ -1,4 +1,5 @@ { + "@metadata": [], "casechecker-replacement-summary": "Bot: Case Replacements:", "casechecker-delete-summary": "Bot: This redirect contains identical looking Cyrillic and Latin letters in its title", "casechecker-replacement-linklist": "%(source)s→%(target)s", diff --git a/catall/en.json b/catall/en.json index bc0128a..1766088 100644 --- a/catall/en.json +++ b/catall/en.json @@ -1,3 +1,4 @@ { + "@metadata": [], "catall-changing": "Bot: Changing categories" } diff --git a/category/en.json b/category/en.json index 2b01716..8f780b6 100644 --- a/category/en.json +++ b/category/en.json @@ -1,4 +1,5 @@ { + "@metadata": [], "category-version-history": "Bot: Saving version history of former %(oldcat)s", "category-changing": "Bot: Changing %(oldcat)s to %(newcat)s", "category-adding": "Bot: Adding category [[:Category:%(newcat)s|%(newcat)s]]", diff --git a/category_redirect/en.json b/category_redirect/en.json index 6c76afe..898a6ce 100644 --- a/category_redirect/en.json +++ b/category_redirect/en.json @@ -1,4 +1,5 @@ { + "@metadata": [], "category_redirect-comment": "Category redirect maintenance bot", "category_redirect-change-category": "Bot: Change redirected category [[:%(oldCatLink)s|%(oldCatTitle)s]] to [[:%(newCatLink)s|%(newCatTitle)s]]", "category_redirect-add-template": "Bot: Adding category redirect template for maintenance", diff --git a/clean_sandbox/en.json b/clean_sandbox/en.json index bb80bf4..6dbe880 100644 --- a/clean_sandbox/en.json +++ b/clean_sandbox/en.json @@ -1,3 +1,4 @@ { + "@metadata": [], "clean_sandbox-cleaned": "Bot: Automatically cleaned" } diff --git a/commons/en.json b/commons/en.json index be65507..478c6e7 100644 --- a/commons/en.json +++ b/commons/en.json @@ -1,4 +1,5 @@ { + "@metadata": [], "commons-file-moved": "[[:File:%(localfile)s|File]] moved to [[:commons:File:%(commonsfile)s|commons]].", "commons-file-now-available": "File is now available on [[:commons:File:%(commonsfile)s|Wikimedia Commons]]." } diff --git a/commons_link/en.json b/commons_link/en.json index 9a7eff7..d5a8291 100644 --- a/commons_link/en.json +++ b/commons_link/en.json @@ -1,4 +1,5 @@ { + "@metadata": [], "commons_link-template-added": "Bot: Include commons template", "commons_link-cat-template-added": "Bot: Include commonscat template" } diff --git a/cosmetic_changes/en.json b/cosmetic_changes/en.json index 0ae5636..c03fd75 100644 --- a/cosmetic_changes/en.json +++ b/cosmetic_changes/en.json @@ -1,4 +1,5 @@ { + "@metadata": [], "cosmetic_changes-standalone": "Bot: Cosmetic changes", "cosmetic_changes-append": "; cosmetic changes" } diff --git a/djvutext/en.json b/djvutext/en.json index 50d00c0..d4f0c5c 100644 --- a/djvutext/en.json +++ b/djvutext/en.json @@ -1,3 +1,4 @@ { + "@metadata": [], "djvutext-creating": "Bot: Creating page with text extracted from DjVu" } diff --git a/editarticle/en.json b/editarticle/en.json index f0175bc..2408d4c 100644 --- a/editarticle/en.json +++ b/editarticle/en.json @@ -1,3 +1,4 @@ { + "@metadata": [], "editarticle-edit": "Manual edit with bot: %(description)s" } diff --git a/featured/en.json b/featured/en.json index 76319ad..573ec2f 100644 --- a/featured/en.json +++ b/featured/en.json @@ -1,4 +1,5 @@ { + "@metadata": [], "featured-good": "Bot: %(page)s is a good article", "featured-list": "Bot: %(page)s is a featured list", "featured-featured": "Bot: %(page)s is a featured article", diff --git a/fixing_redirects/en.json b/fixing_redirects/en.json index fb7805c..26aa3f8 100644 --- a/fixing_redirects/en.json +++ b/fixing_redirects/en.json @@ -1,3 +1,4 @@ { + "@metadata": [], "fixing_redirects-fixing": "Bot: Fixing redirects" } diff --git a/interwiki/en.json b/interwiki/en.json index 64410fb..2a21719 100644 --- a/interwiki/en.json +++ b/interwiki/en.json @@ -1,4 +1,5 @@ { + "@metadata": [], "interwiki-modifying": "Bot: Modifying %(modifying)s", "interwiki-adding-modifying": "Bot: Adding %(adding)s; modifying %(modifying)s", "interwiki-adding-removing": "Bot: Adding %(adding)s; removing: %(removing)s", diff --git a/isbn/en.json b/isbn/en.json index 2f4fcc0..fc83245 100644 --- a/isbn/en.json +++ b/isbn/en.json @@ -1,3 +1,4 @@ { + "@metadata": [], "isbn-formatting": "Bot: Formatting ISBN" } diff --git a/lonelypages/en.json b/lonelypages/en.json index f3aa284..c959657 100644 --- a/lonelypages/en.json +++ b/lonelypages/en.json @@ -1,4 +1,5 @@ { + "@metadata": [], "lonelypages-comment-add-disambig-template": "Bot: Adding a disambig page", "lonelypages-comment-add-template": "Bot: Orphan page, add template" } diff --git a/makecat/en.json b/makecat/en.json index f55adfe..029a688 100644 --- a/makecat/en.json +++ b/makecat/en.json @@ -1,3 +1,4 @@ { + "@metadata": [], "makecat-create": "Bot: Creation or update of category [[:Category:%(cat)s|]]" } diff --git a/misspelling/en.json b/misspelling/en.json index 316f15e..84f881c 100644 --- a/misspelling/en.json +++ b/misspelling/en.json @@ -1,3 +1,4 @@ { + "@metadata": [], "misspelling-fixing": "Bot: Fixing misspelled link to %(page)s" } diff --git a/movepages/en.json b/movepages/en.json index 6b3c5e9..24da258 100644 --- a/movepages/en.json +++ b/movepages/en.json @@ -1,3 +1,4 @@ { + "@metadata": [], "movepages-moving": "Bot: Moved page" } diff --git a/ndashredir/en.json b/ndashredir/en.json index 3381132..2063fbc 100644 --- a/ndashredir/en.json +++ b/ndashredir/en.json @@ -1,3 +1,4 @@ { + "@metadata": [], "ndashredir-create": "Bot: Creating hyphenated redirect to [[%(title)s]]" } diff --git a/noreferences/en.json b/noreferences/en.json index c586e17..6375688 100644 --- a/noreferences/en.json +++ b/noreferences/en.json @@ -1,3 +1,4 @@ { + "@metadata": [], "noreferences-add-tag": "Bot: Adding missing <references /> tag" } diff --git a/package.json b/package.json new file mode 100644 index 0000000..143ad05 --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "name": "pywikibot-i18n", + "version": "0.0.0", + "scripts": { + "test": "grunt test" + }, + "devDependencies": { + "grunt": "0.4.2", + "grunt-banana-checker": "0.2.0" + } +} diff --git a/pagefromfile/en.json b/pagefromfile/en.json index 61a6ff1..ea47a1f 100644 --- a/pagefromfile/en.json +++ b/pagefromfile/en.json @@ -1,4 +1,5 @@ { + "@metadata": [], "pagefromfile-msg_bottom": "append on bottom", "pagefromfile-msg_force": "existing text overwritten", "pagefromfile-msg_top": "append on top", diff --git a/protect/en.json b/protect/en.json index 1c2f683..8383b3c 100644 --- a/protect/en.json +++ b/protect/en.json @@ -1,4 +1,5 @@ { + "@metadata": [], "protect-links": "Bot: Protecting all pages linked from %(page)s", "protect-simple": "Bot: Protecting a list of files.", "protect-category": "Bot: Protecting all pages from category %(cat)s", diff --git a/pywikibot/en.json b/pywikibot/en.json index 9b980fc..607fb5e 100644 --- a/pywikibot/en.json +++ b/pywikibot/en.json @@ -1,4 +1,5 @@ { + "@metadata": [], "pywikibot-enter-xml-filename": "Please enter the XML dump's filename:", "pywikibot-enter-page-processing": "Which page should be processed?", "pywikibot-enter-file-links-processing": "Links to which file page should be processed?", diff --git a/redirect/en.json b/redirect/en.json index 1d8f57f..f35720b 100644 --- a/redirect/en.json +++ b/redirect/en.json @@ -1,4 +1,5 @@ { + "@metadata": [], "redirect-fix-double": "Bot: Fixing double redirect to %(to)s", "redirect-remove-broken": "Bot: Redirect to a deleted or non-existent page", "redirect-fix-broken-moved": "Bot: Fixing broken redirect to moved target page %(to)s", diff --git a/reflinks/en.json b/reflinks/en.json index ceb4ec3..46b6dd2 100644 --- a/reflinks/en.json +++ b/reflinks/en.json @@ -1,4 +1,5 @@ { + "@metadata": [], "reflinks-autogen": "autogenerated", "reflinks-comment": "Bot generated title", "reflinks-msg": "Bot: Converting bare references, using ref names to avoid duplicates, see [[%(manual)s|FAQ]]" diff --git a/replace/en.json b/replace/en.json index 6f2d54c..8d05007 100644 --- a/replace/en.json +++ b/replace/en.json @@ -1,3 +1,4 @@ { + "@metadata": [], "replace-replacing": "Bot: Automated text replacement %(description)s" } diff --git a/revertbot/en.json b/revertbot/en.json index a477dcc..acfa21c 100644 --- a/revertbot/en.json +++ b/revertbot/en.json @@ -1,3 +1,4 @@ { + "@metadata": [], "revertbot-revert": "Bot: Reverted to revision %(revid)s by %(author)s on %(timestamp)s" } diff --git a/selflink/en.json b/selflink/en.json index ba9397f..e670416 100644 --- a/selflink/en.json +++ b/selflink/en.json @@ -1,3 +1,4 @@ { + "@metadata": [], "selflink-remove": "Bot: Removing selflinks" } diff --git a/solve_disambiguation/en.json b/solve_disambiguation/en.json index aa84cf7..ad0eb92 100644 --- a/solve_disambiguation/en.json +++ b/solve_disambiguation/en.json @@ -1,4 +1,5 @@ { + "@metadata": [], "solve_disambiguation-redirect-removed": "Bot-assisted disambiguation: %(from)s - Removed link(s)", "solve_disambiguation-redirect-resolved": "Bot-assisted disambiguation: %(from)s - Changed link(s) to %(to)s", "solve_disambiguation-links-resolved": "Bot-assisted disambiguation: %(from)s - Changed link(s) to %(to)s", diff --git a/spamremove/en.json b/spamremove/en.json index 24b85ad..a4ddd40 100644 --- a/spamremove/en.json +++ b/spamremove/en.json @@ -1,3 +1,4 @@ { + "@metadata": [], "spamremove-remove": "Removing links to spamming site %(url)s" } diff --git a/spellcheck/en.json b/spellcheck/en.json index 6f1b322..19e29eb 100644 --- a/spellcheck/en.json +++ b/spellcheck/en.json @@ -1,3 +1,4 @@ { + "@metadata": [], "spellcheck-checking": "Bot-aided spell checker" } diff --git a/table2wiki/en.json b/table2wiki/en.json index d333a5d..1c9b7d3 100644 --- a/table2wiki/en.json +++ b/table2wiki/en.json @@ -1,4 +1,5 @@ { + "@metadata": [], "table2wiki-warnings": "User-controlled bot: Table syntax updated - {{PLURAL:count|1 warning|%(count)d warnings}}!", "table2wiki-no-warning": "User-controlled bot: Table syntax updated" } diff --git a/template/en.json b/template/en.json index ee8fb15..061de50 100644 --- a/template/en.json +++ b/template/en.json @@ -1,4 +1,5 @@ { + "@metadata": [], "template-removing": "Bot: Removing {{PLURAL:%(num)d|template|templates}}: %(list)s", "template-changing": "Bot: Changing {{PLURAL:%(num)d|template|templates}}: %(list)s", "template-substituting": "Bot: Substituting {{PLURAL:%(num)d|template|templates}}: %(list)s" diff --git a/unlink/en.json b/unlink/en.json index d82914e..81f5a76 100644 --- a/unlink/en.json +++ b/unlink/en.json @@ -1,3 +1,4 @@ { + "@metadata": [], "unlink-unlinking": "Bot: Unlinking "%s"" } diff --git a/weblinkchecker/en.json b/weblinkchecker/en.json index a322664..9d768f3 100644 --- a/weblinkchecker/en.json +++ b/weblinkchecker/en.json @@ -1,4 +1,5 @@ { + "@metadata": [], "weblinkchecker-archive_msg": "The web page has been saved by the Internet Archive. Please consider linking to an appropriate archived version: [%(URL)s].", "weblinkchecker-badurl": "The link provided does not seem to be a valid URL", "weblinkchecker-caption": "Dead link", diff --git a/welcome/en.json b/welcome/en.json index 93bb1a7..d899383 100644 --- a/welcome/en.json +++ b/welcome/en.json @@ -1,4 +1,5 @@ { + "@metadata": [], "welcome-welcome": "Welcome!", "welcome-bad_username": "Bot: Adding a username that needs to be checked", "welcome-updating": "Bot: Updating log"
pywikibot-commits@lists.wikimedia.org