[MediaWiki-commits] [Gerrit] translatewiki[master]: Decrease the default export threshold for 2018
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/404771 ) Change subject: Decrease the default export threshold for 2018 .. Decrease the default export threshold for 2018 35% is in my opinion too much: it can mean a lot of effort has already been done but not exported. I would go for lower but let's start with this step. Change-Id: I31ca26a69c84b0b1c4efaa9101b753a564f95e09 --- M repong/repong.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/71/404771/1 diff --git a/repong/repong.php b/repong/repong.php index fae3f90..c06d0fa 100644 --- a/repong/repong.php +++ b/repong/repong.php @@ -314,7 +314,7 @@ $defaultOptions = [ 'group' => null, 'quiet' => true, - 'threshold' => 35, + 'threshold' => 25, 'target' => $this->getBase(), ]; -- To view, visit https://gerrit.wikimedia.org/r/404771 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I31ca26a69c84b0b1c4efaa9101b753a564f95e09 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Fix for https://github.com/commons-app/apps-android-commons/...
Nikerabbit has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403889 ) Change subject: Fix for https://github.com/commons-app/apps-android-commons/issues/1059 .. Fix for https://github.com/commons-app/apps-android-commons/issues/1059 Change-Id: If9a052e947d72edf9398bb1887f36dc365a890ed --- M groups/Wikimedia/CommonsAndroid.yaml 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Divadsn: Looks good to me, but someone else must approve jenkins-bot: Verified Nikerabbit: Looks good to me, approved diff --git a/groups/Wikimedia/CommonsAndroid.yaml b/groups/Wikimedia/CommonsAndroid.yaml index a376643..9608222 100644 --- a/groups/Wikimedia/CommonsAndroid.yaml +++ b/groups/Wikimedia/CommonsAndroid.yaml @@ -19,6 +19,7 @@ qqq: qq roa-tara: b+roa+tara sr-ec: sr + sr-el: b+sr+Latn skr-arab: skr tg-cyrl: b+tg+Cyrl ug-arab: ug -- To view, visit https://gerrit.wikimedia.org/r/403889 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If9a052e947d72edf9398bb1887f36dc365a890ed Gerrit-PatchSet: 2 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nicolas Raoul Gerrit-Reviewer: Divadsn Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: Remove search.png for Translate
Nikerabbit has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/402039 ) Change subject: Remove search.png for Translate .. Remove search.png for Translate Bug: T178484 Change-Id: Ib9692ee4f0bf60223b801906739d7292b65881aa --- M resources/css/ext.translate.groupselector.less M resources/css/ext.translate.special.managetranslatorsandbox.css M resources/css/ext.translate.special.translate.css D resources/images/search.png 4 files changed, 5 insertions(+), 7 deletions(-) Approvals: jenkins-bot: Verified Nikerabbit: Looks good to me, approved diff --git a/resources/css/ext.translate.groupselector.less b/resources/css/ext.translate.groupselector.less index 411cad7..f1d6764 100644 --- a/resources/css/ext.translate.groupselector.less +++ b/resources/css/ext.translate.groupselector.less @@ -60,7 +60,7 @@ } .tux-groupselector__filter__search__icon { - .background-image-svg( '../images/search.svg', '../images/search.png' ); + .background-image( '../images/search.svg' ); background-repeat: no-repeat; background-position: right center; background-size: 25px; diff --git a/resources/css/ext.translate.special.managetranslatorsandbox.css b/resources/css/ext.translate.special.managetranslatorsandbox.css index 56efa55..46c7bf5 100644 --- a/resources/css/ext.translate.special.managetranslatorsandbox.css +++ b/resources/css/ext.translate.special.managetranslatorsandbox.css @@ -21,9 +21,8 @@ } .grid .search.pane { - background: url( ../images/search.png ) no-repeat scroll left top transparent; - /* @embed */ - background-image: linear-gradient( transparent, transparent ), url( ../images/search.svg ); + background: no-repeat scroll left top transparent; + background-image: /* @embed */ linear-gradient( transparent, transparent ), url( ../images/search.svg ); background-size: 25px; padding-left: 25px; } diff --git a/resources/css/ext.translate.special.translate.css b/resources/css/ext.translate.special.translate.css index 8de825b..a026c32 100644 --- a/resources/css/ext.translate.special.translate.css +++ b/resources/css/ext.translate.special.translate.css @@ -205,9 +205,8 @@ } .tux-message-filter-wrapper { - background: url( ../images/search.png ) no-repeat scroll left center transparent; - /* @embed */ - background-image: linear-gradient( transparent, transparent ), url( ../images/search.svg ); + background: no-repeat scroll left center transparent; + background-image: /* @embed */ linear-gradient( transparent, transparent ), url( ../images/search.svg ); background-size: 25px; padding-left: 30px; } diff --git a/resources/images/search.png b/resources/images/search.png deleted file mode 100644 index 46ec2ad..000 --- a/resources/images/search.png +++ /dev/null Binary files differ -- To view, visit https://gerrit.wikimedia.org/r/402039 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib9692ee4f0bf60223b801906739d7292b65881aa Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Eflyjason Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: Fix broken delete icon in Special:PageMigration
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403164 ) Change subject: Fix broken delete icon in Special:PageMigration .. Fix broken delete icon in Special:PageMigration Some quick cleanups to the CSS while at it. This page could migrate from our custom grid to CSS flexbox quite easily. Change-Id: Ie811322878b29317b2b3f53035fc9ebc51622626 --- M resources/css/ext.translate.special.pagemigration.css 1 file changed, 11 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/64/403164/1 diff --git a/resources/css/ext.translate.special.pagemigration.css b/resources/css/ext.translate.special.pagemigration.css index b879fe5..09c313b 100644 --- a/resources/css/ext.translate.special.pagemigration.css +++ b/resources/css/ext.translate.special.pagemigration.css @@ -9,10 +9,6 @@ width: 35%; } -.mw-tpm-sp-unit__actions { - border: 2px solid transparent; -} - .hide { display: none; } @@ -26,6 +22,10 @@ padding-bottom: 10px; } +.grid .mw-tpm-sp-unit textarea { + padding: 10px; +} + .mw-tpm-sp-unit__source, .mw-tpm-sp-unit__target, .mw-tpm-sp-unit__actions { @@ -33,27 +33,26 @@ } .mw-tpm-sp-action { - width: 10%; - height: 10%; - float: left; - margin-left: 5%; - margin-right: 5%; + width: 25px; + height: 150px; cursor: pointer; display: inline-block; + margin-left: 20px; + + background-position: center; + background-repeat: no-repeat; + background-size: 25px 25px; } .mw-tpm-sp-action--delete { - background: transparent no-repeat; background-image: linear-gradient( transparent, transparent ), url( ../images/trash_darkgray.svg ); } .mw-tpm-sp-action--swap { - background: transparent no-repeat; background-image: linear-gradient( transparent, transparent ), url( ../images/switch.svg ); } .mw-tpm-sp-action--add { - background: transparent no-repeat; background-image: linear-gradient( transparent, transparent ), url( ../images/plus_darkgray.svg ); } -- To view, visit https://gerrit.wikimedia.org/r/403164 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie811322878b29317b2b3f53035fc9ebc51622626 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Fix auto-merge for operations/dumps/dcat
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/402782 ) Change subject: Fix auto-merge for operations/dumps/dcat .. Fix auto-merge for operations/dumps/dcat Change-Id: Ic239e2d5e338d7e3586609f3c894154bd057fd44 --- M repoconfig.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/82/402782/1 diff --git a/repoconfig.yaml b/repoconfig.yaml index 59024bb..a1d4b86 100644 --- a/repoconfig.yaml +++ b/repoconfig.yaml @@ -181,7 +181,7 @@ intuition-tools: group: int-* - auto-merge: ^research/recommendation-api|labs/tools/guc|labs/tools/heritage + auto-merge: ^operations/dumps/dcat|labs/tools/guc|labs/tools/heritage repos: int-dcatap: type: wmgerrit -- To view, visit https://gerrit.wikimedia.org/r/402782 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic239e2d5e338d7e3586609f3c894154bd057fd44 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Fix udpcast
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/402769 ) Change subject: Fix udpcast .. Fix udpcast Change-Id: I000de795234f5bba155af870523f46ea9a995a6b --- M bin/udpcast 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/69/402769/1 diff --git a/bin/udpcast b/bin/udpcast index f690e61..35fe7a5 100755 --- a/bin/udpcast +++ b/bin/udpcast @@ -2,6 +2,6 @@ set -o nounset -o errexit DIRSCRIPT=$(dirname "$(readlink -f "$0")") -WHO=${SUDO_USER-$USER} +WHO=${SUDO_USER-${USER-}} php "${DIRSCRIPT}/scripts/snedUdpMessage.php" --host=127.0.0.1 --port=8966 --quiet=1 "[$WHO]" "$@" -- To view, visit https://gerrit.wikimedia.org/r/402769 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I000de795234f5bba155af870523f46ea9a995a6b Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Upgrade puppet-lint and puppet-syntax checks
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/402358 ) Change subject: Upgrade puppet-lint and puppet-syntax checks .. Upgrade puppet-lint and puppet-syntax checks Ignore vendor modules and update puppet itself to the version we are using. Change-Id: I754f4b7469317bde89c45842a42f216647eaf673 --- M Gemfile M Rakefile M puppet/modules/users/manifests/init.pp 3 files changed, 8 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/58/402358/1 diff --git a/Gemfile b/Gemfile index 88617d9..a8b6157 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,7 @@ source 'https://rubygems.org' -gem 'puppet', ENV['PUPPET_GEM_VERSION'] || '~> 3.7.0' -gem 'puppet-lint', '1.1.0' -gem 'puppetlabs_spec_helper', '< 2.0.0' +gem 'puppet', ENV['PUPPET_GEM_VERSION'] || '~> 4.10.9' +gem 'puppetlabs_spec_helper', '< 3.0.0' # Puppet 3.7 fails on ruby 2.2+ # https://tickets.puppetlabs.com/browse/PUP-3796 diff --git a/Rakefile b/Rakefile index 9cd5ff5..6c01b89 100644 --- a/Rakefile +++ b/Rakefile @@ -17,6 +17,9 @@ require 'puppet-lint/tasks/puppet-lint' require 'puppet-syntax/tasks/puppet-syntax' +PuppetSyntax.exclude_paths = ["puppet/vendor/**/*"] +PuppetLint.configuration.pattern = "puppet/modules/**/*.pp" + task :default => [:help] desc 'Show the help' diff --git a/puppet/modules/users/manifests/init.pp b/puppet/modules/users/manifests/init.pp index dfb8f66..7b7de88 100644 --- a/puppet/modules/users/manifests/init.pp +++ b/puppet/modules/users/manifests/init.pp @@ -278,8 +278,8 @@ key=> 'C3NzaC1lZDI1NTE5IHxdP9KdKSwuVpRaaevBbuCgPTV+2rvIe6Y57iOP57I6'; 'fjalapeno_ssh': ensure => present, - user => 'fjalapeno', - type => 'rsa', - key => 'B3NzaC1yc2EBIwAAAQEA0FskuPOIjhNL4BGfI9p9FyWLt6DM5hjVMqPSz/puQ96Q1/Q92CTHT5gfthLVla/J/j14wW8G2vvz4ZBC1j123xNM4jbLo2jtbKitSTjr4vVf+Q4KPZ3R2ow/dOoWutKuoNwBBRSBBjjPv/F38aQRba4GRBflKhdOCmn6tUeE/Sk8U7WC7oSIfv2cZ1OC+PP9xFuG7a3FgWflzS+hwDyL3LGRlGlK6k3kI2IyOEwYlaZe/BTGZpC7Af+B1ad7z6PlzpKGDIomvMr8Q6r7GjEnAQnVJtXkMxsT0j4gSbcyUQMoBCzRDe7BR4CkiZXljxrvCGkhATav5gGI2DKT/uijlw=='; + user => 'fjalapeno', + type => 'rsa', + key=> 'B3NzaC1yc2EBIwAAAQEA0FskuPOIjhNL4BGfI9p9FyWLt6DM5hjVMqPSz/puQ96Q1/Q92CTHT5gfthLVla/J/j14wW8G2vvz4ZBC1j123xNM4jbLo2jtbKitSTjr4vVf+Q4KPZ3R2ow/dOoWutKuoNwBBRSBBjjPv/F38aQRba4GRBflKhdOCmn6tUeE/Sk8U7WC7oSIfv2cZ1OC+PP9xFuG7a3FgWflzS+hwDyL3LGRlGlK6k3kI2IyOEwYlaZe/BTGZpC7Af+B1ad7z6PlzpKGDIomvMr8Q6r7GjEnAQnVJtXkMxsT0j4gSbcyUQMoBCzRDe7BR4CkiZXljxrvCGkhATav5gGI2DKT/uijlw=='; } } -- To view, visit https://gerrit.wikimedia.org/r/402358 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I754f4b7469317bde89c45842a42f216647eaf673 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Update oregano
Nikerabbit has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/402336 ) Change subject: Update oregano .. Update oregano Doesn't yet pass shellcheck Change-Id: I63ce8f177140ddbb8ec7a9f78b10b2ec1bc3c09a --- M bin/oregano 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Nikerabbit: Looks good to me, approved diff --git a/bin/oregano b/bin/oregano index 0b36190..b304e11 100755 --- a/bin/oregano +++ b/bin/oregano @@ -1,8 +1,8 @@ #!/bin/sh +set -o nounset -o errexit # Author: Niklas Laxström # License: MIT -set -e COMMAND=$1 -- To view, visit https://gerrit.wikimedia.org/r/402336 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I63ce8f177140ddbb8ec7a9f78b10b2ec1bc3c09a Gerrit-PatchSet: 3 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Update wiki update scripts
Nikerabbit has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/402335 ) Change subject: Update wiki update scripts .. Update wiki update scripts Change-Id: If6c6ef2ae9ba7f0430403e4a9e5ace702873aa93 --- M bin/dev-update-all M bin/twn-update-all M bin/udpcast M bin/wikiupdate M bin/wikiupdate-repo 5 files changed, 26 insertions(+), 41 deletions(-) Approvals: jenkins-bot: Verified Nikerabbit: Looks good to me, approved diff --git a/bin/dev-update-all b/bin/dev-update-all index 2ed7897..7258e2a 100755 --- a/bin/dev-update-all +++ b/bin/dev-update-all @@ -1,20 +1,18 @@ #!/bin/bash +set -o nounset -o pipefail -o errexit # Used for updating sandwiki, nikes playground # do not touch :) -set -e - -BASEDIR=$(dirname "$0") -BASEDIR=$(cd "$BASEDIR" && pwd) +DIRSCRIPT=$(dirname "$(readlink -f "$0")") WIKINAME="dev.translatewiki.net" WIKI="/www/$WIKINAME/docroot/w" cd "$WIKI" REV=$(git log --pretty="%h %ci (%cr)" -n 1) -"$BASEDIR/udpcast" "updating $WIKINAME from $REV..." +"$DIRSCRIPT/udpcast" "updating $WIKINAME from $REV..." -"$BASEDIR/wikiupdate" "$WIKI" +"$DIRSCRIPT/wikiupdate" "$WIKI" REV=$(git log --pretty="%h %ci (%cr)" -n 1) -"$BASEDIR/udpcast" "updated $WIKINAME to $REV" +"$DIRSCRIPT/udpcast" "updated $WIKINAME to $REV" diff --git a/bin/twn-update-all b/bin/twn-update-all index 56b7c8d..57f05e1 100755 --- a/bin/twn-update-all +++ b/bin/twn-update-all @@ -1,21 +1,19 @@ #!/bin/bash +set -o nounset -o pipefail -o errexit -set -e - -BASEDIR=$(dirname "$0") -BASEDIR=$(cd "$BASEDIR" && pwd) +DIRSCRIPT=$(dirname "$(readlink -f "$0")") WIKINAME="translatewiki.net" WIKI="/srv/mediawiki/workdir" cd "$WIKI" REV=$(git log --pretty="%h %ci (%cr)" -n 1) -"$BASEDIR/udpcast" "updating $WIKINAME from $REV..." +"$DIRSCRIPT/udpcast" "updating $WIKINAME from $REV..." CURRENTTIME=$(date +"%T") echo "*** $CURRENTTIME: Updating config ***" -sudo -u betawiki "$BASEDIR/wikiupdate-repo" /home/betawiki/config +sudo -u betawiki "$DIRSCRIPT/wikiupdate-repo" /home/betawiki/config -sudo -H -u betawiki "$BASEDIR/wikiupdate" "$WIKI" +sudo -H -u betawiki "$DIRSCRIPT/wikiupdate" "$WIKI" REV=$(git log --pretty="%h %ci (%cr)" -n 1) -"$BASEDIR/udpcast" "updated $WIKINAME to $REV" +"$DIRSCRIPT/udpcast" "updated $WIKINAME to $REV" diff --git a/bin/udpcast b/bin/udpcast index 6b73535..f690e61 100755 --- a/bin/udpcast +++ b/bin/udpcast @@ -1,9 +1,7 @@ -#!/bin/bash -set -e +#!/bin/sh +set -o nounset -o errexit -DIRSCRIPT="`dirname \"$0\"`" -DIRSCRIPT="`( cd \"$DIRSCRIPT\" && pwd )`" - +DIRSCRIPT=$(dirname "$(readlink -f "$0")") WHO=${SUDO_USER-$USER} -php ${DIRSCRIPT}/scripts/snedUdpMessage.php --host=127.0.0.1 --port=8966 --quiet=1 \[$WHO\] $@ +php "${DIRSCRIPT}/scripts/snedUdpMessage.php" --host=127.0.0.1 --port=8966 --quiet=1 "[$WHO]" "$@" diff --git a/bin/wikiupdate b/bin/wikiupdate index ea4d698..25192b8 100755 --- a/bin/wikiupdate +++ b/bin/wikiupdate @@ -1,23 +1,16 @@ #!/bin/bash +set -o nounset -o pipefail -o errexit -set -e - +DIRSCRIPT=$(dirname "$(readlink -f "$0")") WIKI=$1 -BASEDIR=$(dirname "$0") -BASEDIR=$(cd "$BASEDIR" && pwd) CURRENTTIME=$(date +"%T") echo "*** $CURRENTTIME: Updating core and extensions ***" -find "$WIKI" "$WIKI"/extensions/* "$WIKI"/skins/* -maxdepth 1 -type d -name .git | - xargs -n1 dirname | - xargs -n1 -P5 "$BASEDIR/wikiupdate-repo" +find "$WIKI" "$WIKI"/extensions/* "$WIKI"/skins/* -maxdepth 1 -type d -name .git -print0 | + xargs -0 -n1 dirname | + xargs -n1 -P5 "$DIRSCRIPT/wikiupdate-repo" -if [ -f "$WIKI/composer.json" ] -then - composer -n -d="$WIKI" update -else - echo "Skipping composer update" -fi +composer -n -d="$WIKI" update CURRENTTIME=$(date +"%T") echo "*** $CURRENTTIME: Rebuilding caches ***" diff --git a/bin/wikiupdate-repo b/bin/wikiupdate-repo index 0d94eb4..07629d2 100755 --- a/bin/wikiupdate-repo +++ b/bin/wikiupdate-repo @@ -1,12 +1,10 @@ #!/bin/bash - -set -e +set -o nounset -o pipefail -o errexit cd "$1" -OUTPUT=$(git pull --quiet --rebase 2>&1 >&-; git submodule update --init) -CODE=$? - -if [ $CODE -ne 0 ]; then - printf "\033[31m%s failed to update\033[0m\n" "$1" +if ! OUTPUT=$(git pull --quiet --rebase 2>&1 >&- && git submodule update --init); then + CODE=$? + printf "\\033[31m%s failed to update\\033[0m\\n" "$1" echo "$OUTPUT" + exit "$CODE" fi -- To view, visit https://gerrit.wikimedia.org/r/402335 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If6c6ef2ae9ba7f0430403e4a9e5ace702873aa93 Gerrit-PatchSet: 3 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailma
[MediaWiki-commits] [Gerrit] translatewiki[master]: Update stats scripts
Nikerabbit has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/402334 ) Change subject: Update stats scripts .. Update stats scripts Now pass shellcheck Change-Id: Iee1342070b23a309e31f9e64a3404b8ef617792c --- M bin/stats-mediawiki M bin/stats-newcorelangs M bin/twn-wikistats D bin/wikistats 4 files changed, 95 insertions(+), 62 deletions(-) Approvals: jenkins-bot: Verified Nikerabbit: Looks good to me, approved diff --git a/bin/stats-mediawiki b/bin/stats-mediawiki index fc2e835..728126e 100755 --- a/bin/stats-mediawiki +++ b/bin/stats-mediawiki @@ -1,19 +1,64 @@ -# Siebrand / 2008-02-09 +#!/bin/bash +set -o errexit -o nounset -o pipefail -# create basic stats file for groups the most relevant groups to indicate coverage. -cd /srv/mediawiki/targets/production/extensions/Translate/scripts -/usr/bin/php groupStatistics.php --skipzero --groups=core-0-mostused,core,ext-0-wikimedia-main,ext-0-wikimedia,ext-0-all,ext-translate-0-all,ext-installer --skiplanguages="test, qqq, aeb, als, be-x-old, crh, de-at, de-ch, de-formal, dk, en-ca, en-gb, es-formal, fiu-vro, gan, got, hif, hu-formal, kbd, kk, kk-cn, iu, kk-kz, kk-tr, ko-kp, ku, ku-arab, nl-informal, no, ruq, simple, sr, tg, tp, tt, ug, zh, zh-classical, zh-cn, zh-sg, zh-hk, zh-min-nan, zh-mo, zh-my, zh-tw, zh-yue, bbc, ady" > $HOME/temp/groupstats.txt +WIKI=/srv/mediawiki/targets/production +MESSAGEGROUPS=( + core-0-mostused + core + ext-0-wikimedia-main + ext-0-wikimedia + ext-0-all + ext-translate-0-all + mediawiki-installer +) +SKIPLANGUAGES=( + ady + aeb + bbc + be-x-old + crh + dk + en + fiu-vro + gan + gom + hif + iu + kbd + kk + kk-cn + kk-kz + kk-tr + ko-kp + ku + ku-arab + no + qqq + ruq + simple + sr + test + tg + tp + tt + ug + zh + zh-classical + zh-cn + zh-hk + zh-min-nan + zh-mo + zh-my + zh-sg + zh-tw + zh-yue +) -# compile Wiki statistics page -/bin/echo "Start" > $HOME/temp/stats_page -/bin/echo "StartTitleTranslating:Group_statisticsStopTitle" >> $HOME/temp/stats_page -/bin/echo "{{Translating:Group statistics/Header10}}" >> $HOME/temp/stats_page -/usr/bin/tail -n +12 $HOME/temp/groupstats.txt >> $HOME/temp/stats_page -/bin/echo "End" >> $HOME/temp/stats_page +G=$(IFS=,;echo "${MESSAGEGROUPS[*]}") +S=$(IFS=,;echo "${SKIPLANGUAGES[*]}") -# upload stats page to translatewiki.net -/usr/bin/python /home/betawiki/software/pywikibot/pagefromfile.py -force -summary:"Updating statistics" -notitle -titlestart:StartTitle -titleend:StopTitle -file:$HOME/temp/stats_page -start:Start -end:End - -# house keeping -/bin/rm $HOME/temp/groupstats.txt -/bin/rm $HOME/temp/stats_page +{ + echo "{{Translating:Group statistics/Header10}}" + php "$WIKI/extensions/Translate/scripts/groupStatistics.php" --skipzero --groups="$G" --skiplanguages="$S" | + tail -n +12 +} | php "$WIKI/maintenance/edit.php" --user=MaintenanceBot --summary="Updating statistics" Translating:Group_statistics diff --git a/bin/stats-newcorelangs b/bin/stats-newcorelangs index 899989e..8898497 100755 --- a/bin/stats-newcorelangs +++ b/bin/stats-newcorelangs @@ -1,18 +1,11 @@ -# Create a basic log of newly added language files in MediaWiki core -INPUT="$HOME/temp/langs_page" -CHECKOUT="/resources/projects/mediawiki/master" # Ensure it's committed upstream +#!/bin/bash +set -o errexit -o nounset -o pipefail -cd $CHECKOUT +WIKI=/srv/mediawiki/targets/production -# compile Wiki statistics page -/bin/echo "Start" > $INPUT -/bin/echo "StartTitleTranslating:MediaWiki/New_languagesStopTitle" >> $INPUT -/bin/echo "{{/Header1}}" >> $INPUT -git log --format="format:%ci" --name-only --diff-filter=A languages/i18n/ >> $INPUT -/bin/echo "End" >> $INPUT - -# upload stats page to translatewiki.net; if no difference, MediaWiki will not save it -/usr/bin/python /home/betawiki/software/pywikibot/pagefromfile.py -force -summary:"Updating statistics" -notitle -titlestart:StartTitle -titleend:StopTitle -file:$INPUT -start:Start -end:End - -# house keeping -/bin/rm $INPUT +cd /resources/projects/mediawiki/master +{ + echo "{{/Header1}}" + git log --format="format:%ci" --name-only --diff-filter=A languages/i18n/ + echo "" +} | php "$WIKI/maintenance/edit.php" --user=MaintenanceBot --summary="Updating statistics" Translating:MediaWiki/New_languages diff --git a/bin/twn-wikistats b/bin/twn-wikistats index fdfe399..2bb88b5 100755 --- a/bin/twn-wikistats +++ b/bin/twn-wikistats @@ -1,21 +1,29 @@ #!/bin/bash +set -o nounset -o pipefail -o errexit -set -e - -BASEDIR=$(dirname $0) WIKI=/srv/mediawiki/targets/production -USER=MaintenanceBot -PARAMS="--skipzero --skipla
[MediaWiki-commits] [Gerrit] translatewiki[master]: Remove stats-translatewiki
Nikerabbit has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/402333 ) Change subject: Remove stats-translatewiki .. Remove stats-translatewiki It has been broken since 2016-04-16 and nobody noticed and complained: https://translatewiki.net/w/i.php?title=Translating:Translatewiki.net/stats&oldid=6789349 Change-Id: I6b5bbc9ed0be0022d35a1c94359db7fe1bd07f17 --- D bin/stats-translatewiki M puppet/modules/wiki/templates/wikistats.erb 2 files changed, 0 insertions(+), 31 deletions(-) Approvals: jenkins-bot: Verified Nikerabbit: Looks good to me, approved diff --git a/bin/stats-translatewiki b/bin/stats-translatewiki deleted file mode 100755 index 3ce121a..000 --- a/bin/stats-translatewiki +++ /dev/null @@ -1,30 +0,0 @@ -# Siebrand / 2008-02-09 - -COMMAND="/usr/bin/php groupStatistics.php --skipzero --groups=wiki-twn-mainpage,ext-translate-0-all,wiki-betawiki,page-Project_list,page-User:FuzzyBot,page-Translating:How_to_start,page-Translating:Intro --skiplanguages=test,qqq,aeb,als,be-x-old,crh,de-at,de-ch,de-formal,dk,en-gb,fiu-vro,gan,got,hif,kbd,kk,kk-cn,iu,kk-kz,kk-tr,ko-kp,ku,ku-arab,no,nl-informal,ruq,simple,sr,tg,tp,tt,ug,zh,zh-classical,zh-cn,zh-sg,zh-hk,zh-min-nan,zh-mo,zh-my,zh-tw,zh-yue,ady,bbc" -STATSPAGE=$HOME/temp/twn - -# create basic stats file for groups 'most used', 'core', 'Wikimedia extensions', and 'All extensions' -cd /srv/mediawiki/targets/production/extensions/Translate/scripts -/usr/bin/nice $COMMAND > $STATSPAGE.txt - -# compile Wiki statistics page -/bin/echo "Start" > $STATSPAGE -/bin/echo "StartTitleTranslating:Translatewiki.net/statsStopTitle" >> $STATSPAGE -/bin/echo "Stats on ~" >> $STATSPAGE -/bin/echo "$COMMAND" >> $STATSPAGE -/bin/sed -e 's/Translatewiki.net main page/[[Special:Translate\/wiki-twn-mainpage\|Main page]]/' $STATSPAGE.txt | - /bin/sed -e 's/User:FuzzyBot/\{\{\/pagetranslationlink\|User:FuzzyBot\}\}/' | - /bin/sed -e 's/Translating:How to start/\{\{\/pagetranslationlink\|Translating%3AHow+to+start\|How to start\}\}/' | - /bin/sed -e 's/Translating:Intro/\{\{\/pagetranslationlink\|Translating%3AIntro\|Introduction\}\}/' | - /bin/sed -e 's/Project list/\{\{\/pagetranslationlink\|Project_list\|Project list\}\}/' | - /bin/sed -e 's/Translatewiki.net/[[Special:Translate\/wiki-betawiki\|Translatewiki.net]]/' | - /bin/sed -e 's/!Translate/![[Special:Translate\/ext-translate-0-all\|Translate extension]]/' | - /bin/sed -e 's/Translating:How to start/\{\{\/pagetranslationlink\|Translating%3AIntro\|Introduction\}\}/' >> $STATSPAGE -/bin/echo "End" >> $STATSPAGE - -# upload stats page to Betawiki -/usr/bin/python /home/betawiki/software/pywikibot/pagefromfile.py -force -summary:"Updating statistics" -notitle -titlestart:StartTitle -titleend:StopTitle -file:$STATSPAGE -start:Start -end:End - -# house keeping -/bin/rm $STATSPAGE.txt -/bin/rm $STATSPAGE diff --git a/puppet/modules/wiki/templates/wikistats.erb b/puppet/modules/wiki/templates/wikistats.erb index 6d12cf3..4e1c2da 100644 --- a/puppet/modules/wiki/templates/wikistats.erb +++ b/puppet/modules/wiki/templates/wikistats.erb @@ -2,4 +2,3 @@ 45 21 * * * <%= @user %> <%= @config %>/bin/stats-mediawiki >> /dev/null 2>&1 18 22 * * * <%= @user %> <%= @config %>/bin/stats-newcorelangs >> /dev/null 2>&1 31 22 * * * <%= @user %> <%= @config %>/bin/twn-wikistats >> /dev/null 2>&1 -54 23 * * * <%= @user %> <%= @config %>/bin/stats-translatewiki >> /dev/null 2>&1 -- To view, visit https://gerrit.wikimedia.org/r/402333 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6b5bbc9ed0be0022d35a1c94359db7fe1bd07f17 Gerrit-PatchSet: 3 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Fix broken quoting in merge-wmgerrit-patches
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/402340 ) Change subject: Fix broken quoting in merge-wmgerrit-patches .. Fix broken quoting in merge-wmgerrit-patches Change-Id: I6385932eca83bf00a4f70617bdb69c324673ecc9 --- M bin/merge-wmgerrit-patches 1 file changed, 4 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/40/402340/1 diff --git a/bin/merge-wmgerrit-patches b/bin/merge-wmgerrit-patches index fe1d898..3fa0911 100755 --- a/bin/merge-wmgerrit-patches +++ b/bin/merge-wmgerrit-patches @@ -1,13 +1,11 @@ #!/bin/bash - -set -e -set -o pipefail +set -o nounset -o pipefail -o errexit U="l10n-bot" -GERRIT="$u...@gerrit.wikimedia.org -p 29418" +GERRIT=("$u...@gerrit.wikimedia.org" -p 29418) -ssh "$GERRIT" gerrit query --format=TEXT "owner:$U" "project:$1" status:open | +ssh "${GERRIT[@]}" gerrit query --format=TEXT "owner:$U" "project:$1" status:open | grep ' url:' | cut -d/ -f5 | sort | -xargs -I ssh "$GERRIT" gerrit review ,1 --code-review 2 --verified 2 --submit +xargs -I ssh "${GERRIT[@]}" gerrit review ,1 --code-review 2 --verified 2 --submit -- To view, visit https://gerrit.wikimedia.org/r/402340 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6385932eca83bf00a4f70617bdb69c324673ecc9 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Update rest of the scripts
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/402341 ) Change subject: Update rest of the scripts .. Update rest of the scripts Change-Id: Ia36bbf19a0c634f9047a042339b390dbe033444c --- M bin/checkmsg M bin/clupdate-bzr-repo M bin/clupdate-git-repo M bin/clupdate-svn-repo M bin/createmi M bin/fuzzy M bin/fuzzyr 7 files changed, 20 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/41/402341/1 diff --git a/bin/checkmsg b/bin/checkmsg index 6251489..588faa6 100755 --- a/bin/checkmsg +++ b/bin/checkmsg @@ -1,3 +1,7 @@ +#!/bin/bash +set -o nounset -o pipefail -o errexit + # check if a message is being used. May give some false positives. # use 'grep -v to clean up. -grep -r $1 $PWD/* |egrep -v "(svn|[.]ser|[.]cdb|i18n[.]php|Messages[A-Z]|l10n_cache|messages-mediawiki-bw_)" +grep -r "$1" "$PWD"/* | + grep -vE "(svn|[.]ser|[.]cdb|i18n[.]php|Messages[A-Z]|l10n_cache|messages-mediawiki-bw_)" diff --git a/bin/clupdate-bzr-repo b/bin/clupdate-bzr-repo index 3eb9f70..6df3f9c 100755 --- a/bin/clupdate-bzr-repo +++ b/bin/clupdate-bzr-repo @@ -1,6 +1,5 @@ #!/bin/bash -set -e -set -u +set -o nounset -o pipefail -o errexit URL=$1 DIR=$2 @@ -12,5 +11,5 @@ bzr revert --quiet bzr pull "$BRANCH" --quiet --overwrite else - bzr checkout ${URL}/${BRANCH} "$DIR" + bzr checkout "${URL}/${BRANCH}" "$DIR" fi diff --git a/bin/clupdate-git-repo b/bin/clupdate-git-repo index 018362b..e80be77 100755 --- a/bin/clupdate-git-repo +++ b/bin/clupdate-git-repo @@ -1,12 +1,7 @@ #!/bin/bash -set -e -set -u +set -o nounset -o pipefail -o errexit -DIRSCRIPT="`dirname \"$0\"`" -DIRSCRIPT="`( cd \"$DIRSCRIPT\" && pwd )`" - -ME=`basename "$0"` - +ME=$(basename "$0") URL=$1 DIR=$2 BRANCH=${3:-master} @@ -14,7 +9,7 @@ if [ -d "$DIR/.git" ] then ( - cd $DIR + cd "$DIR" git rebase --abort &>/dev/null || : git checkout -qf "$BRANCH" git fetch -q diff --git a/bin/clupdate-svn-repo b/bin/clupdate-svn-repo index 109e041..2ca4cda 100755 --- a/bin/clupdate-svn-repo +++ b/bin/clupdate-svn-repo @@ -1,14 +1,13 @@ #!/bin/bash -set -e -set -u +set -o nounset -o pipefail -o errexit URL=$1 DIR=$2 if [ -d "$DIR/.svn" ] -then +then ( cd "$DIR" svn up -q "$DIR" -else +) else svn checkout -q "$URL" "$DIR" fi diff --git a/bin/createmi b/bin/createmi index 7a9ac1f..a91dfbd 100755 --- a/bin/createmi +++ b/bin/createmi @@ -1,4 +1,5 @@ #!/bin/bash +set -o nounset -o pipefail -o errexit # ensure correct permissions sudo -u betawiki hhvm -vEval.Jit=false /srv/mediawiki/targets/production/extensions/Translate/scripts/createMessageIndex.php --quiet diff --git a/bin/fuzzy b/bin/fuzzy index 7fe1cbb..15a22d7 100755 --- a/bin/fuzzy +++ b/bin/fuzzy @@ -1,7 +1,6 @@ #!/bin/bash -# fuzzy dry run -# $1 message ID -# $2 reason +set -o nounset -o pipefail -o errexit + if [ "$#" -gt "2" ]; then echo "Only two parameters allowed for fuzzy dry run:" echo "\$1 is the message key (replace spaces by underscores; use a trailing /)" @@ -10,4 +9,4 @@ fi cd /srv/mediawiki/targets/production/extensions/Translate/scripts -php fuzzy.php --skiplanguages=en,test,qqq $1 --comment="$2" +php fuzzy.php --skiplanguages=en,test,qqq "$1" --comment="$2" diff --git a/bin/fuzzyr b/bin/fuzzyr index 38d44ff..72a05a0 100755 --- a/bin/fuzzyr +++ b/bin/fuzzyr @@ -1,5 +1,6 @@ #!/bin/bash -# fuzzy dry run +set -o nounset -o pipefail -o errexit + if [ "$#" -gt "2" ]; then echo "Only two parameters allowed for fuzzy:" echo "\$1 is the message key (replace spaces by underscores; use a trailing /)" @@ -8,4 +9,4 @@ fi cd /srv/mediawiki/targets/production/extensions/Translate/scripts -php fuzzy.php --skiplanguages=en,test,qqq $1 --really --comment="$2" +php fuzzy.php --skiplanguages=en,test,qqq "$1" --really --comment="$2" -- To view, visit https://gerrit.wikimedia.org/r/402341 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia36bbf19a0c634f9047a042339b390dbe033444c Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Update remaining scripts
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/402338 ) Change subject: Update remaining scripts .. Update remaining scripts These all now pass shellcheck Change-Id: Id681fc52f4fe7b8328993d2cae23b25a2032c436 --- M bin/checkmsg M bin/clupdate-bzr-repo M bin/clupdate-git-repo M bin/clupdate-svn-repo M bin/createmi M bin/findexportroot M bin/fuzzy M bin/fuzzyr M bin/merge-wmgerrit-patches 9 files changed, 26 insertions(+), 28 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/38/402338/1 diff --git a/bin/checkmsg b/bin/checkmsg index 6251489..588faa6 100755 --- a/bin/checkmsg +++ b/bin/checkmsg @@ -1,3 +1,7 @@ +#!/bin/bash +set -o nounset -o pipefail -o errexit + # check if a message is being used. May give some false positives. # use 'grep -v to clean up. -grep -r $1 $PWD/* |egrep -v "(svn|[.]ser|[.]cdb|i18n[.]php|Messages[A-Z]|l10n_cache|messages-mediawiki-bw_)" +grep -r "$1" "$PWD"/* | + grep -vE "(svn|[.]ser|[.]cdb|i18n[.]php|Messages[A-Z]|l10n_cache|messages-mediawiki-bw_)" diff --git a/bin/clupdate-bzr-repo b/bin/clupdate-bzr-repo index 3eb9f70..6df3f9c 100755 --- a/bin/clupdate-bzr-repo +++ b/bin/clupdate-bzr-repo @@ -1,6 +1,5 @@ #!/bin/bash -set -e -set -u +set -o nounset -o pipefail -o errexit URL=$1 DIR=$2 @@ -12,5 +11,5 @@ bzr revert --quiet bzr pull "$BRANCH" --quiet --overwrite else - bzr checkout ${URL}/${BRANCH} "$DIR" + bzr checkout "${URL}/${BRANCH}" "$DIR" fi diff --git a/bin/clupdate-git-repo b/bin/clupdate-git-repo index 018362b..e80be77 100755 --- a/bin/clupdate-git-repo +++ b/bin/clupdate-git-repo @@ -1,12 +1,7 @@ #!/bin/bash -set -e -set -u +set -o nounset -o pipefail -o errexit -DIRSCRIPT="`dirname \"$0\"`" -DIRSCRIPT="`( cd \"$DIRSCRIPT\" && pwd )`" - -ME=`basename "$0"` - +ME=$(basename "$0") URL=$1 DIR=$2 BRANCH=${3:-master} @@ -14,7 +9,7 @@ if [ -d "$DIR/.git" ] then ( - cd $DIR + cd "$DIR" git rebase --abort &>/dev/null || : git checkout -qf "$BRANCH" git fetch -q diff --git a/bin/clupdate-svn-repo b/bin/clupdate-svn-repo index 109e041..2ca4cda 100755 --- a/bin/clupdate-svn-repo +++ b/bin/clupdate-svn-repo @@ -1,14 +1,13 @@ #!/bin/bash -set -e -set -u +set -o nounset -o pipefail -o errexit URL=$1 DIR=$2 if [ -d "$DIR/.svn" ] -then +then ( cd "$DIR" svn up -q "$DIR" -else +) else svn checkout -q "$URL" "$DIR" fi diff --git a/bin/createmi b/bin/createmi index 7a9ac1f..a91dfbd 100755 --- a/bin/createmi +++ b/bin/createmi @@ -1,4 +1,5 @@ #!/bin/bash +set -o nounset -o pipefail -o errexit # ensure correct permissions sudo -u betawiki hhvm -vEval.Jit=false /srv/mediawiki/targets/production/extensions/Translate/scripts/createMessageIndex.php --quiet diff --git a/bin/findexportroot b/bin/findexportroot index e97562a..a572df0 100755 --- a/bin/findexportroot +++ b/bin/findexportroot @@ -1,4 +1,6 @@ #!/bin/sh +set -o nounset -o errexit + # Used by repo* scripts to find the repository root # similar to how like git tries to find .git diff --git a/bin/fuzzy b/bin/fuzzy index 7fe1cbb..15a22d7 100755 --- a/bin/fuzzy +++ b/bin/fuzzy @@ -1,7 +1,6 @@ #!/bin/bash -# fuzzy dry run -# $1 message ID -# $2 reason +set -o nounset -o pipefail -o errexit + if [ "$#" -gt "2" ]; then echo "Only two parameters allowed for fuzzy dry run:" echo "\$1 is the message key (replace spaces by underscores; use a trailing /)" @@ -10,4 +9,4 @@ fi cd /srv/mediawiki/targets/production/extensions/Translate/scripts -php fuzzy.php --skiplanguages=en,test,qqq $1 --comment="$2" +php fuzzy.php --skiplanguages=en,test,qqq "$1" --comment="$2" diff --git a/bin/fuzzyr b/bin/fuzzyr index 38d44ff..72a05a0 100755 --- a/bin/fuzzyr +++ b/bin/fuzzyr @@ -1,5 +1,6 @@ #!/bin/bash -# fuzzy dry run +set -o nounset -o pipefail -o errexit + if [ "$#" -gt "2" ]; then echo "Only two parameters allowed for fuzzy:" echo "\$1 is the message key (replace spaces by underscores; use a trailing /)" @@ -8,4 +9,4 @@ fi cd /srv/mediawiki/targets/production/extensions/Translate/scripts -php fuzzy.php --skiplanguages=en,test,qqq $1 --really --comment="$2" +php fuzzy.php --skiplanguages=en,test,qqq "$1" --really --comment="$2" diff --git a/bin/merge-wmgerrit-patches b/bin/merge-wmgerrit-patches index fe1d898..3fa0911 100755 --- a/bin/merge-wmgerrit-patches +++ b/bin/merge-wmgerrit-patches @@ -1,13 +1,11 @@ #!/bin/bash - -set -e -set -o pipefail +set -o nounset -o pipefail -o errexit U="l10n-bot" -GERRIT="$u...@gerrit.wikimedia.org -p 29418" +GERRIT=("$u...@gerrit.wikimedia.org" -p 29418) -ssh "$GERRIT" gerrit query --format=TEXT "owner:$U" "project:$1" status:open | +ssh "${GERRIT[@]}" gerrit query --format=TEXT "owner:$U" "project:$1" status:open | grep ' url:' | cut -d/ -f5 | sort | -xargs -I ssh "$GERRIT" gerrit review
[MediaWiki-commits] [Gerrit] translatewiki[master]: Add missing exectuable bits to clupdate-bzr-repo
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/402332 ) Change subject: Add missing exectuable bits to clupdate-bzr-repo .. Add missing exectuable bits to clupdate-bzr-repo Change-Id: I794a66fd6562a6f6da54feeb5cabe04d73852dd6 --- M bin/clupdate-bzr-repo 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/32/402332/1 diff --git a/bin/clupdate-bzr-repo b/bin/clupdate-bzr-repo old mode 100644 new mode 100755 -- To view, visit https://gerrit.wikimedia.org/r/402332 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I794a66fd6562a6f6da54feeb5cabe04d73852dd6 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Remove wmf.csv
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/402330 ) Change subject: Remove wmf.csv .. Remove wmf.csv There are zero hits in our access logs for this file in 2017 excluding web crawlers. The functionality in Translate is not removed in this commit so it is easy to revert. Change-Id: Ibd7eacbe8ff3a77c43fa094d2a589916bc59b832 --- D bin/stats-wmf M puppet/modules/wiki/templates/wikistats.erb 2 files changed, 0 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/30/402330/1 diff --git a/bin/stats-wmf b/bin/stats-wmf deleted file mode 100755 index fa07029..000 --- a/bin/stats-wmf +++ /dev/null @@ -1,7 +0,0 @@ -# Siebrand / 2009-12-28 - -STATSFILE="/www/translatewiki.net/docroot/static/stats/wmf.csv" - -# create stats file -cd /srv/mediawiki/targets/production/extensions/Translate/scripts -/usr/bin/php groupStatistics.php --wmfscore > $STATSFILE diff --git a/puppet/modules/wiki/templates/wikistats.erb b/puppet/modules/wiki/templates/wikistats.erb index cf1d4f9..6d12cf3 100644 --- a/puppet/modules/wiki/templates/wikistats.erb +++ b/puppet/modules/wiki/templates/wikistats.erb @@ -3,6 +3,3 @@ 18 22 * * * <%= @user %> <%= @config %>/bin/stats-newcorelangs >> /dev/null 2>&1 31 22 * * * <%= @user %> <%= @config %>/bin/twn-wikistats >> /dev/null 2>&1 54 23 * * * <%= @user %> <%= @config %>/bin/stats-translatewiki >> /dev/null 2>&1 - -# Creation of https://translatewiki.net/static/stats/wmf.csv -34 4 * * 4 <%= @user %> <%= @config %>/bin/stats-wmf >> /dev/null 2>&1 -- To view, visit https://gerrit.wikimedia.org/r/402330 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibd7eacbe8ff3a77c43fa094d2a589916bc59b832 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Clean up repo* scripts
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/402331 ) Change subject: Clean up repo* scripts .. Clean up repo* scripts Fixing shellcheck warnings and using consistent style. Also used symlinks to reduce code duplication. Change-Id: I5002853e02b6ebd54787309b2b0bfc67353ce8ed --- M bin/repo M bin/repocommit D bin/repoexport A bin/repoexport D bin/repoupdate A bin/repoupdate 6 files changed, 19 insertions(+), 50 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/31/402331/1 diff --git a/bin/repo b/bin/repo index 41705fa..9756d0a 100755 --- a/bin/repo +++ b/bin/repo @@ -1,15 +1,14 @@ #!/bin/bash -set -e +set -o errexit -o nounset -o pipefail + umask 0002 -DIRSCRIPT="`dirname \"$0\"`" -DIRSCRIPT="`( cd \"$DIRSCRIPT\" && pwd )`" -DIRLOG=/home/betawiki/logs/repo - +DIRSCRIPT=$(dirname "$(readlink -f "$0")") +LOG=/home/betawiki/logs/repo +DIR=/resources/projects COMMAND=$1 PROJECT=$2 -DIR=/resources/projects -echo "$(date --rfc-3339=seconds --utc) [$(whoami) at $DIR] $0 $@" >> ${DIRLOG} - -sudo -u betawiki "${DIRSCRIPT}/repo$COMMAND" "$PROJECT" "$DIR" +cd "$DIR" +echo "$(date --rfc-3339=seconds --utc) [$(whoami) at $DIR] $0 $*" >> "$LOG" +sudo -u betawiki "$DIRSCRIPT/repo$COMMAND" "$PROJECT" diff --git a/bin/repocommit b/bin/repocommit index 2216cd9..2a69905 100755 --- a/bin/repocommit +++ b/bin/repocommit @@ -1,15 +1,14 @@ #!/bin/bash -set -e +set -o errexit -o nounset -o pipefail -DIRSCRIPT="`dirname \"$0\"`" -DIRSCRIPT="`( cd \"$DIRSCRIPT\" && pwd )`" -DIRLOG=/home/betawiki/logs/repo +DIRSCRIPT=$(dirname "$(readlink -f "$0")") +# shellcheck source=bin/findexportroot +. "$DIRSCRIPT/findexportroot" +LOG=/home/betawiki/logs/repo +ME=$(basename "$0") +COMMAND=${ME:4} PROJECT=$1 -DIR=$2 -: ${DIR:=`pwd`} -source ${DIRSCRIPT}/findexportroot -echo "$(date --rfc-3339=seconds --utc) [$(whoami) at $DIR] $0 $@" >> ${DIRLOG} - -php "$DIRSCRIPT/../repong/repong.php" commit "$PROJECT" +echo "$(date --rfc-3339=seconds --utc) [$(whoami) at $DIR] $0 $*" >> "$LOG" +php "$DIRSCRIPT/../repong/repong.php" "$COMMAND" "$PROJECT" diff --git a/bin/repoexport b/bin/repoexport deleted file mode 100755 index eccfff4..000 --- a/bin/repoexport +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -set -e - -DIRSCRIPT="`dirname \"$0\"`" -DIRSCRIPT="`( cd \"$DIRSCRIPT\" && pwd )`" -DIRLOG=/home/betawiki/logs/repo -PROJECT=$1 - -DIR=$2 -: ${DIR:=`pwd`} -source ${DIRSCRIPT}/findexportroot -cd "$DIR" - -echo "$(date --rfc-3339=seconds --utc) [$(whoami) at $DIR] $0 $@" >> ${DIRLOG} - -php "$DIRSCRIPT/../repong/repong.php" export "$PROJECT" diff --git a/bin/repoexport b/bin/repoexport new file mode 12 index 000..ee92e7e --- /dev/null +++ b/bin/repoexport @@ -0,0 +1 @@ +repocommit \ No newline at end of file diff --git a/bin/repoupdate b/bin/repoupdate deleted file mode 100755 index b57c66f..000 --- a/bin/repoupdate +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -set -u - -DIRSCRIPT=$(dirname "$0") -DIRSCRIPT=$(cd "$DIRSCRIPT" && pwd) -DIRLOG=/home/betawiki/logs/repo -PROJECT=$1 - -DIR=${2:-$(pwd)} -source "$DIRSCRIPT/findexportroot" -cd "$DIR" || exit - -echo "$(date --rfc-3339=seconds --utc) [$(whoami) at $DIR] $0 $*" >> $DIRLOG - -php "$DIRSCRIPT/../repong/repong.php" update "$PROJECT" diff --git a/bin/repoupdate b/bin/repoupdate new file mode 12 index 000..ee92e7e --- /dev/null +++ b/bin/repoupdate @@ -0,0 +1 @@ +repocommit \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/402331 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5002853e02b6ebd54787309b2b0bfc67353ce8ed Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Update autoimport/export scripts
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/402337 ) Change subject: Update autoimport/export scripts .. Update autoimport/export scripts Now pass shellcheck Change-Id: I5bcd007f2b335b72d354b7b90c74b25421980db7 --- M bin/autoexport M bin/autoimport M bin/autoimport-mediawiki 3 files changed, 16 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/37/402337/1 diff --git a/bin/autoexport b/bin/autoexport index fecd9cf..004d476 100755 --- a/bin/autoexport +++ b/bin/autoexport @@ -1,10 +1,7 @@ -#!/bin/sh +#!/bin/bash +set -o nounset -o pipefail -o errexit -set -e -set -u - -DIRSCRIPT=$(dirname "$0") -DIRSCRIPT=$(cd "$DIRSCRIPT" && pwd) +DIRSCRIPT=$(dirname "$(readlink -f "$0")") case "$(basename "$0")" in autoexport) @@ -24,14 +21,15 @@ ( eval "$(ssh-agent -s)" + trap "ssh-agent -k" INT TERM EXIT ssh-add /home/betawiki/id_rsa for i in $PROJECTS; do echo "${_b}$i${b_}" - "$DIRSCRIPT/repoupdate" "$i" && - "$DIRSCRIPT/repoexport" "$i" && - "$DIRSCRIPT/repocommit" "$i" || : + { + "$DIRSCRIPT/repoupdate" "$i" && + "$DIRSCRIPT/repoexport" "$i" && + "$DIRSCRIPT/repocommit" "$i" + } || : done - - ssh-agent -k ) diff --git a/bin/autoimport b/bin/autoimport index 59992e1..509c9ea 100755 --- a/bin/autoimport +++ b/bin/autoimport @@ -1,13 +1,11 @@ #!/bin/bash +set -o nounset -o pipefail -o errexit -set -o pipefail - -DIRSCRIPT="`dirname \"$0\"`" -DIRSCRIPT="`( cd \"$DIRSCRIPT\" && pwd )`" +DIRSCRIPT=$(dirname "$(readlink -f "$0")") NAME="non-mediawiki" cd /resources/projects -php "$DIRSCRIPT/../repong/repong.php" list | grep -v ^mediawiki | xargs -n1 -P4 "$DIRSCRIPT/repo" update +php "$DIRSCRIPT/../repong/repong.php" list | grep -v ^mediawiki | xargs -n1 -P4 "$DIRSCRIPT/repo" update || : php /srv/mediawiki/targets/production/extensions/Translate/scripts/processMessageChanges.php \ --name "$NAME" --safe-import --group=* --skipgroup=ext-*,core,mediawiki* \ diff --git a/bin/autoimport-mediawiki b/bin/autoimport-mediawiki index e793485..6ced56e 100755 --- a/bin/autoimport-mediawiki +++ b/bin/autoimport-mediawiki @@ -1,11 +1,11 @@ -#!/bin/sh +#!/bin/bash +set -o nounset -o pipefail -o errexit -DIRSCRIPT="`dirname \"$0\"`" -DIRSCRIPT="`( cd \"$DIRSCRIPT\" && pwd )`" +DIRSCRIPT=$(dirname "$(readlink -f "$0")") NAME=mediawiki cd /resources/projects -php "$DIRSCRIPT/../repong/repong.php" list | grep ^mediawiki | xargs -n1 -P4 "$DIRSCRIPT/repo" update +php "$DIRSCRIPT/../repong/repong.php" list | grep ^mediawiki | xargs -n1 -P4 "$DIRSCRIPT/repo" update || : php /srv/mediawiki/targets/production/extensions/Translate/scripts/processMessageChanges.php \ --name $NAME --group=core,ext-*,mediawiki* --quiet -- To view, visit https://gerrit.wikimedia.org/r/402337 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5bcd007f2b335b72d354b7b90c74b25421980db7 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Update stats scripts
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/402334 ) Change subject: Update stats scripts .. Update stats scripts Now pass shellcheck Change-Id: Iee1342070b23a309e31f9e64a3404b8ef617792c --- M bin/stats-mediawiki M bin/stats-newcorelangs M bin/twn-wikistats D bin/wikistats 4 files changed, 95 insertions(+), 62 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/34/402334/1 diff --git a/bin/stats-mediawiki b/bin/stats-mediawiki index fc2e835..728126e 100755 --- a/bin/stats-mediawiki +++ b/bin/stats-mediawiki @@ -1,19 +1,64 @@ -# Siebrand / 2008-02-09 +#!/bin/bash +set -o errexit -o nounset -o pipefail -# create basic stats file for groups the most relevant groups to indicate coverage. -cd /srv/mediawiki/targets/production/extensions/Translate/scripts -/usr/bin/php groupStatistics.php --skipzero --groups=core-0-mostused,core,ext-0-wikimedia-main,ext-0-wikimedia,ext-0-all,ext-translate-0-all,ext-installer --skiplanguages="test, qqq, aeb, als, be-x-old, crh, de-at, de-ch, de-formal, dk, en-ca, en-gb, es-formal, fiu-vro, gan, got, hif, hu-formal, kbd, kk, kk-cn, iu, kk-kz, kk-tr, ko-kp, ku, ku-arab, nl-informal, no, ruq, simple, sr, tg, tp, tt, ug, zh, zh-classical, zh-cn, zh-sg, zh-hk, zh-min-nan, zh-mo, zh-my, zh-tw, zh-yue, bbc, ady" > $HOME/temp/groupstats.txt +WIKI=/srv/mediawiki/targets/production +MESSAGEGROUPS=( + core-0-mostused + core + ext-0-wikimedia-main + ext-0-wikimedia + ext-0-all + ext-translate-0-all + mediawiki-installer +) +SKIPLANGUAGES=( + ady + aeb + bbc + be-x-old + crh + dk + en + fiu-vro + gan + gom + hif + iu + kbd + kk + kk-cn + kk-kz + kk-tr + ko-kp + ku + ku-arab + no + qqq + ruq + simple + sr + test + tg + tp + tt + ug + zh + zh-classical + zh-cn + zh-hk + zh-min-nan + zh-mo + zh-my + zh-sg + zh-tw + zh-yue +) -# compile Wiki statistics page -/bin/echo "Start" > $HOME/temp/stats_page -/bin/echo "StartTitleTranslating:Group_statisticsStopTitle" >> $HOME/temp/stats_page -/bin/echo "{{Translating:Group statistics/Header10}}" >> $HOME/temp/stats_page -/usr/bin/tail -n +12 $HOME/temp/groupstats.txt >> $HOME/temp/stats_page -/bin/echo "End" >> $HOME/temp/stats_page +G=$(IFS=,;echo "${MESSAGEGROUPS[*]}") +S=$(IFS=,;echo "${SKIPLANGUAGES[*]}") -# upload stats page to translatewiki.net -/usr/bin/python /home/betawiki/software/pywikibot/pagefromfile.py -force -summary:"Updating statistics" -notitle -titlestart:StartTitle -titleend:StopTitle -file:$HOME/temp/stats_page -start:Start -end:End - -# house keeping -/bin/rm $HOME/temp/groupstats.txt -/bin/rm $HOME/temp/stats_page +{ + echo "{{Translating:Group statistics/Header10}}" + php "$WIKI/extensions/Translate/scripts/groupStatistics.php" --skipzero --groups="$G" --skiplanguages="$S" | + tail -n +12 +} | php "$WIKI/maintenance/edit.php" --user=MaintenanceBot --summary="Updating statistics" Translating:Group_statistics diff --git a/bin/stats-newcorelangs b/bin/stats-newcorelangs index 899989e..8898497 100755 --- a/bin/stats-newcorelangs +++ b/bin/stats-newcorelangs @@ -1,18 +1,11 @@ -# Create a basic log of newly added language files in MediaWiki core -INPUT="$HOME/temp/langs_page" -CHECKOUT="/resources/projects/mediawiki/master" # Ensure it's committed upstream +#!/bin/bash +set -o errexit -o nounset -o pipefail -cd $CHECKOUT +WIKI=/srv/mediawiki/targets/production -# compile Wiki statistics page -/bin/echo "Start" > $INPUT -/bin/echo "StartTitleTranslating:MediaWiki/New_languagesStopTitle" >> $INPUT -/bin/echo "{{/Header1}}" >> $INPUT -git log --format="format:%ci" --name-only --diff-filter=A languages/i18n/ >> $INPUT -/bin/echo "End" >> $INPUT - -# upload stats page to translatewiki.net; if no difference, MediaWiki will not save it -/usr/bin/python /home/betawiki/software/pywikibot/pagefromfile.py -force -summary:"Updating statistics" -notitle -titlestart:StartTitle -titleend:StopTitle -file:$INPUT -start:Start -end:End - -# house keeping -/bin/rm $INPUT +cd /resources/projects/mediawiki/master +{ + echo "{{/Header1}}" + git log --format="format:%ci" --name-only --diff-filter=A languages/i18n/ + echo "" +} | php "$WIKI/maintenance/edit.php" --user=MaintenanceBot --summary="Updating statistics" Translating:MediaWiki/New_languages diff --git a/bin/twn-wikistats b/bin/twn-wikistats index fdfe399..2bb88b5 100755 --- a/bin/twn-wikistats +++ b/bin/twn-wikistats @@ -1,21 +1,29 @@ #!/bin/bash +set -o nounset -o pipefail -o errexit -set -e - -BASEDIR=$(dirname $0) WIKI=/srv/mediawiki/targets/production -USER=MaintenanceBot -PARAMS="--skipzero --skiplan
[MediaWiki-commits] [Gerrit] translatewiki[master]: Update oregano
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/402336 ) Change subject: Update oregano .. Update oregano Doesn't yet pass shellcheck Change-Id: I63ce8f177140ddbb8ec7a9f78b10b2ec1bc3c09a --- M bin/oregano 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/36/402336/1 diff --git a/bin/oregano b/bin/oregano index 0b36190..b304e11 100755 --- a/bin/oregano +++ b/bin/oregano @@ -1,8 +1,8 @@ #!/bin/sh +set -o nounset -o errexit # Author: Niklas Laxström # License: MIT -set -e COMMAND=$1 -- To view, visit https://gerrit.wikimedia.org/r/402336 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I63ce8f177140ddbb8ec7a9f78b10b2ec1bc3c09a Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Remove some unused scripts
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/402329 ) Change subject: Remove some unused scripts .. Remove some unused scripts Change-Id: I4accc4ae67a8e93d03d83ea94b2e4df5ae351bc6 --- D bin/do-stats D bin/generate-translation-documentation D bin/sync-extmaintained 3 files changed, 0 insertions(+), 56 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/29/402329/1 diff --git a/bin/do-stats b/bin/do-stats deleted file mode 100755 index 0b3d7eb..000 --- a/bin/do-stats +++ /dev/null @@ -1,44 +0,0 @@ -# Siebrand / 2012-06-24 -# To run properly, set GROUPS, WIKIPAGE - -GROUPS= -WIKIPAGE= - -while getopts "g:w" OPTION -do - case $OPTION in - g) - echo $OPTARG - GROUP=$OPTARG - ;; - w) - echo $OPTARG - GROUP="$OPTARG" - ;; - esac -done - -echo "$GROUPS" -echo "$WIKIPAGE" -exit -STATSFILE="$HOME/temp/stats.txt" -SKIPLANGS="test, aeb, be-x-old, crh, de-ch, dk, en, fiu-vro, gan, gom, got, hif, kbd, kk, kk-cn, iu, kk-kz, kk-tr, ko-kp, ku, ku-arab, no, ruq, simple, sr, tg, tp, tt, ug, zh, zh-classical, zh-cn, zh-sg, zh-hk, zh-min-nan, zh-mo, zh-my, zh-tw, zh-yue, bbc, ady" - -# create basic stats file for $GROUPS -/usr/bin/php /srv/mediawiki/targets/production/extensions/Translate/scripts/groupStatistics.php --fuzzy --skipzero --groups="${GROUPS}" --skiplanguages="${SKIPLANGS}" > ${STATSFILE} - -STATSPAGE="${HOME}/temp/stats_page" - -# compile Wiki statistics page -/bin/echo "Start" > ${STATSPAGE} -/bin/echo "StartTitle${WIKIPAGE}StopTitle" >> ${STATSPAGE} -/bin/date >> ${STATSPAGE} -/bin/cat ${STATSFILE} >> ${STATSPAGE} -/bin/echo "End" >> ${STATSPAGE} - -# upload stats page to Betawiki -/usr/bin/python /home/betawiki/software/pywikibot/i18n/pagefromfile.py -force -summary:"Updating statistics" -notitle -titlestart:StartTitle -titleend:StopTitle -file:${STATSPAGE} -start:Start -end:End - -# house keeping -#/bin/rm ${STATSFILE} -#/bin/rm ${STATSPAGE} diff --git a/bin/generate-translation-documentation b/bin/generate-translation-documentation deleted file mode 100755 index 1356351..000 --- a/bin/generate-translation-documentation +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -TAGFILE="/home/betawiki/doxygen-tagfile.xml" - -wget -nv -O "$TAGFILE" https://doc.wikimedia.org/mediawiki-core/master/php/html/tagfile.xml -sudo -u betawiki doxygen /home/betawiki/config/doxygen.conf - -rm "$TAGFILE" diff --git a/bin/sync-extmaintained b/bin/sync-extmaintained deleted file mode 100755 index 231d9f2..000 --- a/bin/sync-extmaintained +++ /dev/null @@ -1,4 +0,0 @@ -# Siebrand / 2008-07-13 -# sync externally maintained languages to local database -cd /srv/mediawiki/targets/production/extensions/Translate/scripts -php sync-group.php --group=$1 --lang=en,qqq -- To view, visit https://gerrit.wikimedia.org/r/402329 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4accc4ae67a8e93d03d83ea94b2e4df5ae351bc6 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Remove stats-translatewiki
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/402333 ) Change subject: Remove stats-translatewiki .. Remove stats-translatewiki It has been broken since 2016-04-16 and nobody noticed and complained: https://translatewiki.net/w/i.php?title=Translating:Translatewiki.net/stats&oldid=6789349 Change-Id: I6b5bbc9ed0be0022d35a1c94359db7fe1bd07f17 --- D bin/stats-translatewiki M puppet/modules/wiki/templates/wikistats.erb 2 files changed, 0 insertions(+), 31 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/33/402333/1 diff --git a/bin/stats-translatewiki b/bin/stats-translatewiki deleted file mode 100755 index 3ce121a..000 --- a/bin/stats-translatewiki +++ /dev/null @@ -1,30 +0,0 @@ -# Siebrand / 2008-02-09 - -COMMAND="/usr/bin/php groupStatistics.php --skipzero --groups=wiki-twn-mainpage,ext-translate-0-all,wiki-betawiki,page-Project_list,page-User:FuzzyBot,page-Translating:How_to_start,page-Translating:Intro --skiplanguages=test,qqq,aeb,als,be-x-old,crh,de-at,de-ch,de-formal,dk,en-gb,fiu-vro,gan,got,hif,kbd,kk,kk-cn,iu,kk-kz,kk-tr,ko-kp,ku,ku-arab,no,nl-informal,ruq,simple,sr,tg,tp,tt,ug,zh,zh-classical,zh-cn,zh-sg,zh-hk,zh-min-nan,zh-mo,zh-my,zh-tw,zh-yue,ady,bbc" -STATSPAGE=$HOME/temp/twn - -# create basic stats file for groups 'most used', 'core', 'Wikimedia extensions', and 'All extensions' -cd /srv/mediawiki/targets/production/extensions/Translate/scripts -/usr/bin/nice $COMMAND > $STATSPAGE.txt - -# compile Wiki statistics page -/bin/echo "Start" > $STATSPAGE -/bin/echo "StartTitleTranslating:Translatewiki.net/statsStopTitle" >> $STATSPAGE -/bin/echo "Stats on ~" >> $STATSPAGE -/bin/echo "$COMMAND" >> $STATSPAGE -/bin/sed -e 's/Translatewiki.net main page/[[Special:Translate\/wiki-twn-mainpage\|Main page]]/' $STATSPAGE.txt | - /bin/sed -e 's/User:FuzzyBot/\{\{\/pagetranslationlink\|User:FuzzyBot\}\}/' | - /bin/sed -e 's/Translating:How to start/\{\{\/pagetranslationlink\|Translating%3AHow+to+start\|How to start\}\}/' | - /bin/sed -e 's/Translating:Intro/\{\{\/pagetranslationlink\|Translating%3AIntro\|Introduction\}\}/' | - /bin/sed -e 's/Project list/\{\{\/pagetranslationlink\|Project_list\|Project list\}\}/' | - /bin/sed -e 's/Translatewiki.net/[[Special:Translate\/wiki-betawiki\|Translatewiki.net]]/' | - /bin/sed -e 's/!Translate/![[Special:Translate\/ext-translate-0-all\|Translate extension]]/' | - /bin/sed -e 's/Translating:How to start/\{\{\/pagetranslationlink\|Translating%3AIntro\|Introduction\}\}/' >> $STATSPAGE -/bin/echo "End" >> $STATSPAGE - -# upload stats page to Betawiki -/usr/bin/python /home/betawiki/software/pywikibot/pagefromfile.py -force -summary:"Updating statistics" -notitle -titlestart:StartTitle -titleend:StopTitle -file:$STATSPAGE -start:Start -end:End - -# house keeping -/bin/rm $STATSPAGE.txt -/bin/rm $STATSPAGE diff --git a/puppet/modules/wiki/templates/wikistats.erb b/puppet/modules/wiki/templates/wikistats.erb index 6d12cf3..4e1c2da 100644 --- a/puppet/modules/wiki/templates/wikistats.erb +++ b/puppet/modules/wiki/templates/wikistats.erb @@ -2,4 +2,3 @@ 45 21 * * * <%= @user %> <%= @config %>/bin/stats-mediawiki >> /dev/null 2>&1 18 22 * * * <%= @user %> <%= @config %>/bin/stats-newcorelangs >> /dev/null 2>&1 31 22 * * * <%= @user %> <%= @config %>/bin/twn-wikistats >> /dev/null 2>&1 -54 23 * * * <%= @user %> <%= @config %>/bin/stats-translatewiki >> /dev/null 2>&1 -- To view, visit https://gerrit.wikimedia.org/r/402333 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6b5bbc9ed0be0022d35a1c94359db7fe1bd07f17 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Update wiki update scripts
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/402335 ) Change subject: Update wiki update scripts .. Update wiki update scripts Change-Id: If6c6ef2ae9ba7f0430403e4a9e5ace702873aa93 --- M bin/dev-update-all M bin/twn-update-all M bin/udpcast M bin/wikiupdate M bin/wikiupdate-repo 5 files changed, 26 insertions(+), 41 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/35/402335/1 diff --git a/bin/dev-update-all b/bin/dev-update-all index 2ed7897..7258e2a 100755 --- a/bin/dev-update-all +++ b/bin/dev-update-all @@ -1,20 +1,18 @@ #!/bin/bash +set -o nounset -o pipefail -o errexit # Used for updating sandwiki, nikes playground # do not touch :) -set -e - -BASEDIR=$(dirname "$0") -BASEDIR=$(cd "$BASEDIR" && pwd) +DIRSCRIPT=$(dirname "$(readlink -f "$0")") WIKINAME="dev.translatewiki.net" WIKI="/www/$WIKINAME/docroot/w" cd "$WIKI" REV=$(git log --pretty="%h %ci (%cr)" -n 1) -"$BASEDIR/udpcast" "updating $WIKINAME from $REV..." +"$DIRSCRIPT/udpcast" "updating $WIKINAME from $REV..." -"$BASEDIR/wikiupdate" "$WIKI" +"$DIRSCRIPT/wikiupdate" "$WIKI" REV=$(git log --pretty="%h %ci (%cr)" -n 1) -"$BASEDIR/udpcast" "updated $WIKINAME to $REV" +"$DIRSCRIPT/udpcast" "updated $WIKINAME to $REV" diff --git a/bin/twn-update-all b/bin/twn-update-all index 56b7c8d..57f05e1 100755 --- a/bin/twn-update-all +++ b/bin/twn-update-all @@ -1,21 +1,19 @@ #!/bin/bash +set -o nounset -o pipefail -o errexit -set -e - -BASEDIR=$(dirname "$0") -BASEDIR=$(cd "$BASEDIR" && pwd) +DIRSCRIPT=$(dirname "$(readlink -f "$0")") WIKINAME="translatewiki.net" WIKI="/srv/mediawiki/workdir" cd "$WIKI" REV=$(git log --pretty="%h %ci (%cr)" -n 1) -"$BASEDIR/udpcast" "updating $WIKINAME from $REV..." +"$DIRSCRIPT/udpcast" "updating $WIKINAME from $REV..." CURRENTTIME=$(date +"%T") echo "*** $CURRENTTIME: Updating config ***" -sudo -u betawiki "$BASEDIR/wikiupdate-repo" /home/betawiki/config +sudo -u betawiki "$DIRSCRIPT/wikiupdate-repo" /home/betawiki/config -sudo -H -u betawiki "$BASEDIR/wikiupdate" "$WIKI" +sudo -H -u betawiki "$DIRSCRIPT/wikiupdate" "$WIKI" REV=$(git log --pretty="%h %ci (%cr)" -n 1) -"$BASEDIR/udpcast" "updated $WIKINAME to $REV" +"$DIRSCRIPT/udpcast" "updated $WIKINAME to $REV" diff --git a/bin/udpcast b/bin/udpcast index 6b73535..f690e61 100755 --- a/bin/udpcast +++ b/bin/udpcast @@ -1,9 +1,7 @@ -#!/bin/bash -set -e +#!/bin/sh +set -o nounset -o errexit -DIRSCRIPT="`dirname \"$0\"`" -DIRSCRIPT="`( cd \"$DIRSCRIPT\" && pwd )`" - +DIRSCRIPT=$(dirname "$(readlink -f "$0")") WHO=${SUDO_USER-$USER} -php ${DIRSCRIPT}/scripts/snedUdpMessage.php --host=127.0.0.1 --port=8966 --quiet=1 \[$WHO\] $@ +php "${DIRSCRIPT}/scripts/snedUdpMessage.php" --host=127.0.0.1 --port=8966 --quiet=1 "[$WHO]" "$@" diff --git a/bin/wikiupdate b/bin/wikiupdate index ea4d698..25192b8 100755 --- a/bin/wikiupdate +++ b/bin/wikiupdate @@ -1,23 +1,16 @@ #!/bin/bash +set -o nounset -o pipefail -o errexit -set -e - +DIRSCRIPT=$(dirname "$(readlink -f "$0")") WIKI=$1 -BASEDIR=$(dirname "$0") -BASEDIR=$(cd "$BASEDIR" && pwd) CURRENTTIME=$(date +"%T") echo "*** $CURRENTTIME: Updating core and extensions ***" -find "$WIKI" "$WIKI"/extensions/* "$WIKI"/skins/* -maxdepth 1 -type d -name .git | - xargs -n1 dirname | - xargs -n1 -P5 "$BASEDIR/wikiupdate-repo" +find "$WIKI" "$WIKI"/extensions/* "$WIKI"/skins/* -maxdepth 1 -type d -name .git -print0 | + xargs -0 -n1 dirname | + xargs -n1 -P5 "$DIRSCRIPT/wikiupdate-repo" -if [ -f "$WIKI/composer.json" ] -then - composer -n -d="$WIKI" update -else - echo "Skipping composer update" -fi +composer -n -d="$WIKI" update CURRENTTIME=$(date +"%T") echo "*** $CURRENTTIME: Rebuilding caches ***" diff --git a/bin/wikiupdate-repo b/bin/wikiupdate-repo index 0d94eb4..07629d2 100755 --- a/bin/wikiupdate-repo +++ b/bin/wikiupdate-repo @@ -1,12 +1,10 @@ #!/bin/bash - -set -e +set -o nounset -o pipefail -o errexit cd "$1" -OUTPUT=$(git pull --quiet --rebase 2>&1 >&-; git submodule update --init) -CODE=$? - -if [ $CODE -ne 0 ]; then - printf "\033[31m%s failed to update\033[0m\n" "$1" +if ! OUTPUT=$(git pull --quiet --rebase 2>&1 >&- && git submodule update --init); then + CODE=$? + printf "\\033[31m%s failed to update\\033[0m\\n" "$1" echo "$OUTPUT" + exit "$CODE" fi -- To view, visit https://gerrit.wikimedia.org/r/402335 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If6c6ef2ae9ba7f0430403e4a9e5ace702873aa93 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Update ve-wmf path
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/402183 ) Change subject: Update ve-wmf path .. Update ve-wmf path Change-Id: Ica2d375fd06b54484e14ee60b9490df977bcfe0a --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/83/402183/1 diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index 93c6f1c..8b52fbb 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -2513,7 +2513,7 @@ VisualEditor (WMF) id = ext-visualeditor-ve-wmf descmsg = visualeditor-desc -file = VisualEditor/modules/ve-wmf/i18n/%CODE%.json +file = VisualEditor/i18n/ve-wmf/%CODE%.json optional = visualeditor-help-link Vote NY -- To view, visit https://gerrit.wikimedia.org/r/402183 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ica2d375fd06b54484e14ee60b9490df977bcfe0a Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Stars must align
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/401932 ) Change subject: Stars must align .. Stars must align Change-Id: I23a6855d82747b763e1cb95c78d9d37868a6 --- M modules/ui/widgets/mw.cx.ui.PageSelectorWidget.js M modules/ui/widgets/mw.cx.ui.PublishSettingsWidget.js M modules/ui/widgets/mw.cx.ui.TitleOptionWidget.js M modules/widgets/templates/mw.cx.widgets.TemplateParamOptionWidget.js 4 files changed, 21 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/32/401932/1 diff --git a/modules/ui/widgets/mw.cx.ui.PageSelectorWidget.js b/modules/ui/widgets/mw.cx.ui.PageSelectorWidget.js index 8b22cab..fed4556 100644 --- a/modules/ui/widgets/mw.cx.ui.PageSelectorWidget.js +++ b/modules/ui/widgets/mw.cx.ui.PageSelectorWidget.js @@ -1,9 +1,9 @@ /*! -* Content Translation UserInterface PageSelectorWidget class. -* -* @copyright See AUTHORS.txt -* @license GPL-2.0-or-later -*/ + * Content Translation UserInterface PageSelectorWidget class. + * + * @copyright See AUTHORS.txt + * @license GPL-2.0-or-later + */ 'use strict'; diff --git a/modules/ui/widgets/mw.cx.ui.PublishSettingsWidget.js b/modules/ui/widgets/mw.cx.ui.PublishSettingsWidget.js index 21a9f8a..e1eb631 100644 --- a/modules/ui/widgets/mw.cx.ui.PublishSettingsWidget.js +++ b/modules/ui/widgets/mw.cx.ui.PublishSettingsWidget.js @@ -1,9 +1,9 @@ /*! -* Content Translation UserInterface PublishSettingsWidget class. -* -* @copyright See AUTHORS.txt -* @license GPL-2.0-or-later -*/ + * Content Translation UserInterface PublishSettingsWidget class. + * + * @copyright See AUTHORS.txt + * @license GPL-2.0-or-later + */ 'use strict'; diff --git a/modules/ui/widgets/mw.cx.ui.TitleOptionWidget.js b/modules/ui/widgets/mw.cx.ui.TitleOptionWidget.js index 9a1ff83..d66eae6 100644 --- a/modules/ui/widgets/mw.cx.ui.TitleOptionWidget.js +++ b/modules/ui/widgets/mw.cx.ui.TitleOptionWidget.js @@ -1,9 +1,9 @@ /*! -* Content Translation UserInterface adaptation of MediaWiki Widget TitleOptionWidget. -* -* @copyright See AUTHORS.txt -* @license GPL-2.0-or-later -*/ + * Content Translation UserInterface adaptation of MediaWiki Widget TitleOptionWidget. + * + * @copyright See AUTHORS.txt + * @license GPL-2.0-or-later + */ 'use strict'; diff --git a/modules/widgets/templates/mw.cx.widgets.TemplateParamOptionWidget.js b/modules/widgets/templates/mw.cx.widgets.TemplateParamOptionWidget.js index 1357ee1..a629b14 100644 --- a/modules/widgets/templates/mw.cx.widgets.TemplateParamOptionWidget.js +++ b/modules/widgets/templates/mw.cx.widgets.TemplateParamOptionWidget.js @@ -1,10 +1,10 @@ /*! - * ContentTranslation Widgets - TemplateParamOptionWidget class. - * Used in template editor. - * - * @copyright See AUTHORS.txt - * @license GPL-2.0-or-later - */ + * ContentTranslation Widgets - TemplateParamOptionWidget class. + * Used in template editor. + * + * @copyright See AUTHORS.txt + * @license GPL-2.0-or-later + */ ( function ( $, mw ) { 'use strict'; /** -- To view, visit https://gerrit.wikimedia.org/r/401932 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I23a6855d82747b763e1cb95c78d9d37868a6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: [puppet] Add .puppet-lint.rc
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/401441 ) Change subject: [puppet] Add .puppet-lint.rc .. [puppet] Add .puppet-lint.rc I forgot to commit this earlier Change-Id: Ic8872c82a3caaccbbdcf118827bb75aeb3166785 --- A puppet/.puppet-lint.rc 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/41/401441/1 diff --git a/puppet/.puppet-lint.rc b/puppet/.puppet-lint.rc new file mode 100644 index 000..b0d12b7 --- /dev/null +++ b/puppet/.puppet-lint.rc @@ -0,0 +1 @@ +--no-80chars-check -- To view, visit https://gerrit.wikimedia.org/r/401441 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic8872c82a3caaccbbdcf118827bb75aeb3166785 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Remove unused doxygen.conf
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/401440 ) Change subject: Remove unused doxygen.conf .. Remove unused doxygen.conf We used to generate doxygen documentation for Translate many years ago, but we no longer do it. Change-Id: I95b62412ddd10fb211dae963aea996e144f06dab --- D doxygen.conf 1 file changed, 0 insertions(+), 1,522 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/40/401440/1 diff --git a/doxygen.conf b/doxygen.conf deleted file mode 100644 index 226d648..000 --- a/doxygen.conf +++ /dev/null @@ -1,1522 +0,0 @@ -# Doxyfile 1.5.8 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--- -# Project related configuration options -#--- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = "MediaWiki Translate Extension" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -# PROJECT_NUMBER = v1 - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = /www/translatewiki.net/docroot/docs/Translate - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, -# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, -# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, -# Spanish, Swedish, and Ukrainian. - -OUTPUT_LANGUAGE= English - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF t
[MediaWiki-commits] [Gerrit] translatewiki[master]: [repoconfig] Remove unused REPOCONF files
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/401439 ) Change subject: [repoconfig] Remove unused REPOCONF files .. [repoconfig] Remove unused REPOCONF files Migration period is long over. Change-Id: I4428dab8b6c84789ac3083786b8fdda3c443bf3e --- D REPOCONF D REPOCONF.commit 2 files changed, 0 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/39/401439/1 diff --git a/REPOCONF b/REPOCONF deleted file mode 100644 index f103469..000 --- a/REPOCONF +++ /dev/null @@ -1,5 +0,0 @@ -# If not set, will not setup l10n-bot commit stuff for MediaWiki git extensions -#REPO_RW=yes - -REPO_MWEXTGIT=https://gerrit.wikimedia.org/r/p/mediawiki/extensions -REPO_MWSKINGIT=https://gerrit.wikimedia.org/r/p/mediawiki/skins diff --git a/REPOCONF.commit b/REPOCONF.commit deleted file mode 100644 index d3449c1..000 --- a/REPOCONF.commit +++ /dev/null @@ -1,6 +0,0 @@ -# If REPO_RW=yes, will set up commit stuff -REPO_RW=yes - -# MediaWiki -REPO_MWEXTGIT=ssh://l10n-...@gerrit.wikimedia.org:29418/mediawiki/extensions -REPO_MWSKINGIT=ssh://l10n-...@gerrit.wikimedia.org:29418/mediawiki/skins -- To view, visit https://gerrit.wikimedia.org/r/401439 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4428dab8b6c84789ac3083786b8fdda3c443bf3e Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Add Mermaid
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/401438 ) Change subject: Add Mermaid .. Add Mermaid Change-Id: Iede16185fc0bd79c786f4682c660caa1dc42c74c --- M groups/MediaWiki/mwgithub.yaml M repoconfig.yaml 2 files changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/38/401438/1 diff --git a/groups/MediaWiki/mwgithub.yaml b/groups/MediaWiki/mwgithub.yaml index c09ece5..4428547 100644 --- a/groups/MediaWiki/mwgithub.yaml +++ b/groups/MediaWiki/mwgithub.yaml @@ -20,6 +20,17 @@ INSERTABLES: class: MediaWikiInsertablesSuggester + +--- +BASIC: + id: mwgithub-mermaid + label: Mermaid + description: "{{Special:MyLanguage/MediaWiki:Mermaid-desc/en}}" + +FILES: + class: JsonFFS + sourcePattern: "%GROUPROOT%/mwgithub/SemanticMediaWiki/Mermaid/i18n/%CODE%.json" + --- BASIC: id: mwgithub-semanticbreadcrumblinks @@ -29,6 +40,7 @@ FILES: class: JsonFFS sourcePattern: "%GROUPROOT%/mwgithub/SemanticMediaWiki/SemanticBreadcrumbLinks/i18n/%CODE%.json" + --- BASIC: id: mwgithub-semanticcite diff --git a/repoconfig.yaml b/repoconfig.yaml index dfe1e4f..59024bb 100644 --- a/repoconfig.yaml +++ b/repoconfig.yaml @@ -363,6 +363,10 @@ type: github url: https://github.com/OrganicDesign/extensions.git url|export: g...@github.com:OrganicDesign/extensions.git +mwgithub/SemanticMediaWiki/Mermaid: + type: github + url: https://github.com/SemanticMediaWiki/Mermaid.git + url|export: g...@github.com:SemanticMediaWiki/Mermaid.git mwgithub/SemanticMediaWiki/SemanticBreadcrumbLinks: type: github url: https://github.com/SemanticMediaWiki/SemanticBreadcrumbLinks.git -- To view, visit https://gerrit.wikimedia.org/r/401438 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iede16185fc0bd79c786f4682c660caa1dc42c74c Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: [repong] Fix auto-merging of some patches
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/401054 ) Change subject: [repong] Fix auto-merging of some patches .. [repong] Fix auto-merging of some patches The repo type check was using the last item from the loop, which does not make sense. Removed the check that is no longer necessary. Also fixed merge-wmgerrit-patches to fail on errors so that these things are more apparent. Change-Id: Id6ef5e7e34159a0eb9195903128e4996cffcacfb --- M bin/merge-wmgerrit-patches M repong/repong.php 2 files changed, 12 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/54/401054/1 diff --git a/bin/merge-wmgerrit-patches b/bin/merge-wmgerrit-patches index 05448f8..fe1d898 100755 --- a/bin/merge-wmgerrit-patches +++ b/bin/merge-wmgerrit-patches @@ -1,10 +1,13 @@ #!/bin/bash -U="l10n-bot" -GERRIT="$u...@gerrit.wikimedia.org -p 29418 gerrit" -PROJECT="$1" +set -e +set -o pipefail -for i in `ssh $GERRIT query --format=TEXT owner:$U project:$PROJECT status:open | grep ' url:' |cut -d/ -f5 |sort` -do -ssh $GERRIT review $i,1 --code-review 2 --verified 2 --submit -done +U="l10n-bot" +GERRIT="$u...@gerrit.wikimedia.org -p 29418" + +ssh "$GERRIT" gerrit query --format=TEXT "owner:$U" "project:$1" status:open | +grep ' url:' | +cut -d/ -f5 | +sort | +xargs -I ssh "$GERRIT" gerrit review ,1 --code-review 2 --verified 2 --submit diff --git a/repong/repong.php b/repong/repong.php index 4cc7328..fae3f90 100644 --- a/repong/repong.php +++ b/repong/repong.php @@ -425,8 +425,9 @@ // Merge patch sets submitted to Wikimedia's Gerrit. $mergePattern = $config[ 'auto-merge' ] ?? false; - if ( $repo['type'] === 'wmgerrit' && $mergePattern ) { + if ( $mergePattern ) { $command = $this->bindir . "/merge-wmgerrit-patches '$mergePattern'"; + echo $command . "\n"; $mergeProcess = new Process( $command ); $mergeProcess->setTimeout( 600 ); $mergeProcess->mustRun(); -- To view, visit https://gerrit.wikimedia.org/r/401054 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id6ef5e7e34159a0eb9195903128e4996cffcacfb Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: Add some padding in message group selector filter
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/400704 ) Change subject: Add some padding in message group selector filter .. Add some padding in message group selector filter So that it doesn't look so ugly Change-Id: I24fd8d5e52e6e71c084f7dcc646ad26b95a290ac --- M resources/css/ext.translate.groupselector.less 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/04/400704/1 diff --git a/resources/css/ext.translate.groupselector.less b/resources/css/ext.translate.groupselector.less index 4ff32ca..a1d01a6 100644 --- a/resources/css/ext.translate.groupselector.less +++ b/resources/css/ext.translate.groupselector.less @@ -56,6 +56,7 @@ width: 100%; height: 28px; border: 1px solid #c9c9c9; + padding: 2px; } .tux-groupselector__filter__search__icon { -- To view, visit https://gerrit.wikimedia.org/r/400704 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I24fd8d5e52e6e71c084f7dcc646ad26b95a290ac Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: Add hover background color to message group selector
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/400701 ) Change subject: Add hover background color to message group selector .. Add hover background color to message group selector This is the same color as in the message table. Change-Id: Iaf36be9bdd719d9d8b96fb1923f2c89fb86c7c0a --- M resources/css/ext.translate.groupselector.less 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/01/400701/1 diff --git a/resources/css/ext.translate.groupselector.less b/resources/css/ext.translate.groupselector.less index 95b039e..abdb81d 100644 --- a/resources/css/ext.translate.groupselector.less +++ b/resources/css/ext.translate.groupselector.less @@ -113,6 +113,10 @@ border-bottom: 1px solid #eee; height: 50px; cursor: pointer; + + &:hover { + background-color: #f8f8f8 + } } .grid .tux-grouplist__item__label { -- To view, visit https://gerrit.wikimedia.org/r/400701 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaf36be9bdd719d9d8b96fb1923f2c89fb86c7c0a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: Rename group selector from css to less
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/400700 ) Change subject: Rename group selector from css to less .. Rename group selector from css to less Change-Id: Ib629055ffaa1ee41aee07fc8b04fb172b2d8f735 --- M Resources.php R resources/css/ext.translate.groupselector.less 2 files changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/00/400700/1 diff --git a/Resources.php b/Resources.php index 0304fbe..f1d7396 100644 --- a/Resources.php +++ b/Resources.php @@ -122,7 +122,7 @@ ] + $resourcePaths; $wgResourceModules['ext.translate.groupselector'] = [ - 'styles' => 'resources/css/ext.translate.groupselector.css', + 'styles' => 'resources/css/ext.translate.groupselector.less', 'scripts' => 'resources/js/ext.translate.groupselector.js', 'position' => 'top', 'dependencies' => [ diff --git a/resources/css/ext.translate.groupselector.css b/resources/css/ext.translate.groupselector.less similarity index 100% rename from resources/css/ext.translate.groupselector.css rename to resources/css/ext.translate.groupselector.less -- To view, visit https://gerrit.wikimedia.org/r/400700 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib629055ffaa1ee41aee07fc8b04fb172b2d8f735 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: Clean up unused and ineffective CSS in message group selector
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/400703 ) Change subject: Clean up unused and ineffective CSS in message group selector .. Clean up unused and ineffective CSS in message group selector Change-Id: Ib6c82e120712fcd8e8130e91114f5eb2d36a42d7 --- M resources/css/ext.translate.groupselector.less 1 file changed, 0 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/03/400703/1 diff --git a/resources/css/ext.translate.groupselector.less b/resources/css/ext.translate.groupselector.less index 75a0b7b..4ff32ca 100644 --- a/resources/css/ext.translate.groupselector.less +++ b/resources/css/ext.translate.groupselector.less @@ -9,19 +9,13 @@ right: 0; z-index: 1000; display: none; - float: left; margin-top: 13px; - min-width: 600px; width: 600px; padding: 0; border: 1px solid #a2a9b1; background-color: #f0f0f0; border-radius: 5px; box-shadow: 0 5px 10px rgba( 0, 0, 0, 0.2 ); - -webkit-background-clip: padding-box; - -moz-background-clip: padding; - background-clip: padding-box; - text-align: left; } /* The triangle shaped callout */ @@ -54,7 +48,6 @@ } .tux-groupselector__filter { - height: 30px; padding-top: 10px; } @@ -71,13 +64,6 @@ background-position: right center; background-size: 25px; height: 28px; - width: 28px; -} - -.tux-groupselector button { - height: 32px; - margin: 5px; - font-weight: bold; } /* @@ -85,7 +71,6 @@ */ .tux-grouptab { color: #222; - box-sizing: border-box; line-height: 30px; height: 30px; cursor: pointer; @@ -124,7 +109,6 @@ .grid .tux-grouplist__item__label { padding-bottom: 0; /* grid override */ padding-left: 15px; /* grid override */ - font-weight: normal; line-height: 32px; cursor: pointer; white-space: nowrap; @@ -143,14 +127,12 @@ /* Keep this in sync with js! */ background-size: 32px; height: 50px; - width: 50px; } .grid .row .tux-grouplist__item__subgroups { color: #72777d; position: absolute; /* grid override */ padding: 0 15px 2px 0; /* grid override */ - font-weight: normal; line-height: 1.25em; bottom: 0; right: 0; -- To view, visit https://gerrit.wikimedia.org/r/400703 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib6c82e120712fcd8e8130e91114f5eb2d36a42d7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: Use .background-image-svg in message group selector
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/400702 ) Change subject: Use .background-image-svg in message group selector .. Use .background-image-svg in message group selector Change-Id: Ie53a43be61e8cb20fe775d3bfc2c275892a0224d --- M resources/css/ext.translate.groupselector.less 1 file changed, 8 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/02/400702/1 diff --git a/resources/css/ext.translate.groupselector.less b/resources/css/ext.translate.groupselector.less index abdb81d..75a0b7b 100644 --- a/resources/css/ext.translate.groupselector.less +++ b/resources/css/ext.translate.groupselector.less @@ -1,3 +1,5 @@ +@import 'mediawiki.mixins'; + /** * Group selector */ @@ -64,9 +66,9 @@ } .tux-groupselector__filter__search__icon { - background: url( ../images/search.png ) no-repeat scroll right center transparent; - /* @embed */ - background-image: linear-gradient( transparent, transparent ), url( ../images/search.svg ); + .background-image-svg( '../images/search.svg', '../images/search.png' ); + background-repeat: no-repeat; + background-position: right center; background-size: 25px; height: 28px; width: 28px; @@ -135,9 +137,9 @@ } .tux-grouplist__item__icon { - background: url( ../images/project.png ) no-repeat scroll right center transparent; - /* @embed */ - background-image: linear-gradient( transparent, transparent ), url( ../images/project.svg ); + .background-image-svg( '../images/project.svg', '../images/project.png' ); + background-repeat: no-repeat; + background-position: right center; /* Keep this in sync with js! */ background-size: 32px; height: 50px; -- To view, visit https://gerrit.wikimedia.org/r/400702 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie53a43be61e8cb20fe775d3bfc2c275892a0224d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Fix typo in comment
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/400681 ) Change subject: Fix typo in comment .. Fix typo in comment Change-Id: I3f5f4e82832fd45dc0dc8ddc6f7a56233ff8c416 --- M modules/ui/mw.cx.ui.LanguageFilter.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/81/400681/1 diff --git a/modules/ui/mw.cx.ui.LanguageFilter.js b/modules/ui/mw.cx.ui.LanguageFilter.js index f2c6529..69003d1 100644 --- a/modules/ui/mw.cx.ui.LanguageFilter.js +++ b/modules/ui/mw.cx.ui.LanguageFilter.js @@ -14,7 +14,7 @@ * @class * @extends OO.ui.Widget * @param {Object} [config] Configuration object - * @cfg {boolean} [canBeSame=false] True if source and target language can be the same langauge + * @cfg {boolean} [canBeSame=false] True if source and target language can be the same language * @cfg {boolean} [canBeUndefined=false] True if source or target language can be unset * @cfg {boolean} [updateLocalStorage=false] True if this language selector can update local storage, * when source or target language changes -- To view, visit https://gerrit.wikimedia.org/r/400681 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f5f4e82832fd45dc0dc8ddc6f7a56233ff8c416 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Fix typos in comments
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/400636 ) Change subject: Fix typos in comments .. Fix typos in comments Change-Id: I66065c53bf99af76aa587e41b322f082dbf9a528 --- M resources/ext.cirrus.explore-similar.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/36/400636/1 diff --git a/resources/ext.cirrus.explore-similar.js b/resources/ext.cirrus.explore-similar.js index 0f9b1d3..1790f30 100644 --- a/resources/ext.cirrus.explore-similar.js +++ b/resources/ext.cirrus.explore-similar.js @@ -414,7 +414,7 @@ /** * Sets a CSS class to animate the Explore Similar button. -* Button can be animated slowely or quickly depending on wether +* Button can be animated slowly or quickly depending on whether * it's the first button in the set the user hovers over. * * @param {jQuery} $this - button element wrapped in jQuery object -- To view, visit https://gerrit.wikimedia.org/r/400636 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I66065c53bf99af76aa587e41b322f082dbf9a528 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SemanticGenealogy[master]: Fix typo in comment
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/400632 ) Change subject: Fix typo in comment .. Fix typo in comment Change-Id: I8115e583e729eb049ff520d8dee3c3f1b6800036 --- M src/Tree/DescendantListFamilyTree.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticGenealogy refs/changes/32/400632/1 diff --git a/src/Tree/DescendantListFamilyTree.php b/src/Tree/DescendantListFamilyTree.php index 94bb130..ff64590 100644 --- a/src/Tree/DescendantListFamilyTree.php +++ b/src/Tree/DescendantListFamilyTree.php @@ -20,7 +20,7 @@ * * @param PersonPageValues $person * @param string $pellissier I don't know -* @param integer $endcounter to know wether we should stop +* @param integer $endcounter to know whether we should stop * * @return void */ -- To view, visit https://gerrit.wikimedia.org/r/400632 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8115e583e729eb049ff520d8dee3c3f1b6800036 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticGenealogy Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: [puppet] Pin elasticsearch to avoid cron spam
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/400608 ) Change subject: [puppet] Pin elasticsearch to avoid cron spam .. [puppet] Pin elasticsearch to avoid cron spam Change-Id: I8f0ff555c6a4b88468e926f5074f31d3d88527ba --- M puppet/modules/profile/manifests/mwelasticsearch.pp 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/08/400608/1 diff --git a/puppet/modules/profile/manifests/mwelasticsearch.pp b/puppet/modules/profile/manifests/mwelasticsearch.pp index 0335c33..de77919 100644 --- a/puppet/modules/profile/manifests/mwelasticsearch.pp +++ b/puppet/modules/profile/manifests/mwelasticsearch.pp @@ -4,6 +4,7 @@ # class profile::mwelasticsearch { include ::nginx + include ::apt file { '/etc/nginx/sites/es.translatewiki.net': source => 'puppet:///modules/profile/es.translatewiki.net', @@ -11,6 +12,12 @@ notify => Service['nginx'], } + apt::pin { 'elasticsearch': +packages => 'elasticsearch', +priority => 1000, +version => '5.5.2', + } + class { 'java': distribution => 'jre' } class { 'elasticsearch': -- To view, visit https://gerrit.wikimedia.org/r/400608 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8f0ff555c6a4b88468e926f5074f31d3d88527ba Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: [puppet] Manage mailman with librarian-puppet
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/400565 ) Change subject: [puppet] Manage mailman with librarian-puppet .. [puppet] Manage mailman with librarian-puppet As a bonus make test now passes without any errors. Change-Id: I8425d20ca37050e47f3a6607cfed5953985a89ce --- D .gitmodules D puppet/.gitmodules M puppet/Puppetfile M puppet/Puppetfile.lock D puppet/modules/mailman 5 files changed, 3 insertions(+), 34 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/65/400565/1 diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 1822057..000 --- a/.gitmodules +++ /dev/null @@ -1,33 +0,0 @@ -[submodule "puppet/modules/elasticsearch"] - path = puppet/modules/elasticsearch - url = https://github.com/elastic/puppet-elasticsearch.git -[submodule "puppet/modules/stdlib"] - path = puppet/modules/stdlib - url = https://github.com/puppetlabs/puppetlabs-stdlib -[submodule "puppet/modules/apt"] - path = puppet/modules/apt - url = https://github.com/puppetlabs/puppetlabs-apt.git -[submodule "puppet/modules/mysql"] - path = puppet/modules/mysql - url = https://github.com/puppetlabs/puppetlabs-mysql.git -[submodule "puppet/modules/puppi"] - path = puppet/modules/puppi - url = https://github.com/example42/puppi.git -[submodule "puppet/modules/exim"] - path = puppet/modules/exim - url = https://github.com/example42/puppet-exim.git -[submodule "puppet/modules/mailman"] - path = puppet/modules/mailman - url = https://github.com/cjsoftuk/puppet-mailman.git -[submodule "puppet/modules/sysctl"] - path = puppet/modules/sysctl - url = https://github.com/thias/puppet-sysctl -[submodule "puppet/modules/git"] - path = puppet/modules/git - url = https://github.com/puppetlabs/puppetlabs-git.git -[submodule "puppet/modules/java"] - path = puppet/modules/java - url = https://github.com/puppetlabs/puppetlabs-java.git -[submodule "puppet/modules/datacat"] - path = puppet/modules/datacat - url = https://github.com/richardc/puppet-datacat.git diff --git a/puppet/.gitmodules b/puppet/.gitmodules deleted file mode 100644 index e69de29..000 --- a/puppet/.gitmodules +++ /dev/null diff --git a/puppet/Puppetfile b/puppet/Puppetfile index 0064830..089a028 100644 --- a/puppet/Puppetfile +++ b/puppet/Puppetfile @@ -5,3 +5,4 @@ mod 'thias-sysctl', '1.0.6' mod 'puppetlabs-java', '2.3.0' mod 'puppet-letsencrypt', '2.1.0' +mod 'thias-mailman', '0.1.4' diff --git a/puppet/Puppetfile.lock b/puppet/Puppetfile.lock index f2e1d4d..2a328be 100644 --- a/puppet/Puppetfile.lock +++ b/puppet/Puppetfile.lock @@ -29,6 +29,7 @@ richardc-datacat (0.6.2) stahnma-epel (1.3.0) puppetlabs-stdlib (>= 3.0.0) +thias-mailman (0.1.4) thias-sysctl (1.0.6) DEPENDENCIES @@ -36,5 +37,6 @@ puppet-letsencrypt (= 2.1.0) puppetlabs-java (= 2.3.0) puppetlabs-mysql (= 5.1.0) + thias-mailman (= 0.1.4) thias-sysctl (= 1.0.6) diff --git a/puppet/modules/mailman b/puppet/modules/mailman deleted file mode 16 index d4f880f..000 --- a/puppet/modules/mailman +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d4f880fee47376e0eb8df8e6cfd432f547c7b7bb -- To view, visit https://gerrit.wikimedia.org/r/400565 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8425d20ca37050e47f3a6607cfed5953985a89ce Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: [puppet] Add puppet-lint and make pass
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/400564 ) Change subject: [puppet] Add puppet-lint and make pass .. [puppet] Add puppet-lint and make pass make test now passes except for modules/mailman which is the only remaining vendor module not managed by puppet-librarian. Change-Id: Ic31db0ab997564bf974221e917de5f1154571932 --- M puppet/Makefile M puppet/modules/hhvm/files/development.ini M puppet/modules/hhvm/files/hhvm-development.service M puppet/modules/hhvm/files/hhvm.service M puppet/modules/hhvm/files/server.ini M puppet/modules/nginx/files/error.html M puppet/modules/nginx/files/logrotate M puppet/modules/sshd/files/sshd_config M puppet/modules/wiki/files/irc-log-relay.service M puppet/modules/wiki/files/irc-rc-relay.service M puppet/modules/wiki/files/mw-jobrunner.service M puppet/modules/wiki/files/phplog2irc.service 12 files changed, 17 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/64/400564/1 diff --git a/puppet/Makefile b/puppet/Makefile index 24d2034..bbc1dff 100644 --- a/puppet/Makefile +++ b/puppet/Makefile @@ -1,12 +1,15 @@ .PHONY: test testpp checkheaders apply -test: testpp checkheaders +test: testpp checkheaders lint checkheaders: - for files in modules/*/files; do find $$files -type f |xargs -r grep -L 'file managed by puppet'; done + for files in modules/*/files; do find $$files -type f |xargs -r grep -L 'managed by puppet'; done testpp: git ls-files | grep "\.pp$$" | xargs -r /opt/puppetlabs/bin/puppet parser validate +lint: + puppet-lint modules + noop: librarian-puppet install --path ./vendor sudo /opt/puppetlabs/bin/puppet apply --noop --test --modulepath './modules:./vendor:$$basemodulepath' site.pp diff --git a/puppet/modules/hhvm/files/development.ini b/puppet/modules/hhvm/files/development.ini index ce1fa9c..3644d07 100644 --- a/puppet/modules/hhvm/files/development.ini +++ b/puppet/modules/hhvm/files/development.ini @@ -1,3 +1,4 @@ +; This file is managed by puppet ; php options pid = /run/hhvm-development/hhvm.pid diff --git a/puppet/modules/hhvm/files/hhvm-development.service b/puppet/modules/hhvm/files/hhvm-development.service index f3d8e12..010bf8b 100644 --- a/puppet/modules/hhvm/files/hhvm-development.service +++ b/puppet/modules/hhvm/files/hhvm-development.service @@ -1,3 +1,4 @@ +# This file is managed by puppet [Unit] Description=HHVM for development site diff --git a/puppet/modules/hhvm/files/hhvm.service b/puppet/modules/hhvm/files/hhvm.service index 743639d..11aae6b 100644 --- a/puppet/modules/hhvm/files/hhvm.service +++ b/puppet/modules/hhvm/files/hhvm.service @@ -1,3 +1,4 @@ +# This file is managed by puppet [Unit] Description=HHVM for production site diff --git a/puppet/modules/hhvm/files/server.ini b/puppet/modules/hhvm/files/server.ini index aaafb33..6a44a5a 100644 --- a/puppet/modules/hhvm/files/server.ini +++ b/puppet/modules/hhvm/files/server.ini @@ -1,3 +1,4 @@ +; This file is managed by puppet ; php options pid = /run/hhvm/hhvm.pid diff --git a/puppet/modules/nginx/files/error.html b/puppet/modules/nginx/files/error.html index 7eb8f0f..4047832 100644 --- a/puppet/modules/nginx/files/error.html +++ b/puppet/modules/nginx/files/error.html @@ -1,4 +1,5 @@ + @@ -9,4 +10,4 @@ It looks like our backend is currently unable to process your request. Please try again later. https://translatewiki.net/static/logo.png";> - \ No newline at end of file + diff --git a/puppet/modules/nginx/files/logrotate b/puppet/modules/nginx/files/logrotate index cd2a62a..c339342 100644 --- a/puppet/modules/nginx/files/logrotate +++ b/puppet/modules/nginx/files/logrotate @@ -1,3 +1,4 @@ +# This file is managed by puppet /var/log/nginx/*.log { weekly missingok diff --git a/puppet/modules/sshd/files/sshd_config b/puppet/modules/sshd/files/sshd_config index 24e7ed4..da5bb34 100644 --- a/puppet/modules/sshd/files/sshd_config +++ b/puppet/modules/sshd/files/sshd_config @@ -1,3 +1,4 @@ +# This file is managed by puppet # Package generated configuration file # See the sshd_config(5) manpage for details diff --git a/puppet/modules/wiki/files/irc-log-relay.service b/puppet/modules/wiki/files/irc-log-relay.service index 9f628d4..ac314b0 100644 --- a/puppet/modules/wiki/files/irc-log-relay.service +++ b/puppet/modules/wiki/files/irc-log-relay.service @@ -1,3 +1,4 @@ +# This file is managed by puppet [Unit] Description=IRC relay for PHP error log After=network.target diff --git a/puppet/modules/wiki/files/irc-rc-relay.service b/puppet/modules/wiki/files/irc-rc-relay.service index 3748512..a668a8f 100644 --- a/puppet/modules/wiki/files/irc-rc-relay.service +++ b/puppet/modules/wiki/files/irc-rc-relay.service @@ -1,3 +1,4 @@ +# This file is managed by puppet [Unit] Description=IRC relay for MediaWiki r
[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: Harden YAML parsing by disallowing serialization
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/400484 ) Change subject: Harden YAML parsing by disallowing serialization .. Harden YAML parsing by disallowing serialization Change-Id: I325e2b0ed68171d9c7c4d5c20ea3425764ae28a4 --- A tests/phpunit/TranslateYamlTest.php M utils/TranslateYaml.php 2 files changed, 56 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/84/400484/1 diff --git a/tests/phpunit/TranslateYamlTest.php b/tests/phpunit/TranslateYamlTest.php new file mode 100644 index 000..d7ff512 --- /dev/null +++ b/tests/phpunit/TranslateYamlTest.php @@ -0,0 +1,48 @@ +assertEquals( $expected, $output, $comment ); + } + + public function provideTestLoadString() { + $tests = []; + $tests[] = [ + 'a: b', + [ 'a' => 'b' ], + 'Simple key-value' + ]; + + $tests[] = [ + 'a: !php/object "O:8:\"stdClass\":1:{s:1:\"a\";s:1:\"b\";}"', + [ 'a' => null ], + 'PHP objects should not be unserialized' + ]; + + return $tests; + } +} diff --git a/utils/TranslateYaml.php b/utils/TranslateYaml.php index 004df05..6b93431 100644 --- a/utils/TranslateYaml.php +++ b/utils/TranslateYaml.php @@ -24,14 +24,20 @@ switch ( $wgTranslateYamlLibrary ) { case 'phpyaml': - $ret = yaml_parse( $text ); + // Harden: do not support unserializing objects. + // Method 1: PHP ini setting (not supported by HHVM) + // Method 2: Callback handler for !php/object + $previousValue = ini_set( 'yaml.decode_php', false ); + $ignored = 0; + $callback = function () { return null; }; + $ret = yaml_parse( $text, 0, $ignored, [ '!php/object' => $callback ] ); + ini_set( 'yaml.decode_php', $previousValue ); if ( $ret === false ) { // Convert failures to exceptions throw new InvalidArgumentException( 'Invalid Yaml string' ); } return $ret; - case 'spyc': $yaml = spyc_load( $text ); -- To view, visit https://gerrit.wikimedia.org/r/400484 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I325e2b0ed68171d9c7c4d5c20ea3425764ae28a4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: [puppet] Update elastic-elasticsearch
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/400472 ) Change subject: [puppet] Update elastic-elasticsearch .. [puppet] Update elastic-elasticsearch Change-Id: I27bf55c5b27f59801f406dce4aea4c35baa6a598 --- M puppet/Puppetfile M puppet/Puppetfile.lock 2 files changed, 4 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/72/400472/1 diff --git a/puppet/Puppetfile b/puppet/Puppetfile index 413f02d..0064830 100644 --- a/puppet/Puppetfile +++ b/puppet/Puppetfile @@ -1,7 +1,7 @@ forge "https://forgeapi.puppetlabs.com"; mod 'puppetlabs-mysql', '5.1.0' -mod 'elastic-elasticsearch', '6.0.0' +mod 'elastic-elasticsearch', '6.1.0' mod 'thias-sysctl', '1.0.6' mod 'puppetlabs-java', '2.3.0' mod 'puppet-letsencrypt', '2.1.0' diff --git a/puppet/Puppetfile.lock b/puppet/Puppetfile.lock index b10f3f5..f2e1d4d 100644 --- a/puppet/Puppetfile.lock +++ b/puppet/Puppetfile.lock @@ -1,10 +1,9 @@ FORGE remote: https://forgeapi.puppetlabs.com specs: -elastic-elasticsearch (6.0.0) - puppet-tea (< 1.0.0, >= 0.2.0) +elastic-elasticsearch (6.1.0) puppetlabs-apt (< 5.0.0, >= 2.0.0) - puppetlabs-stdlib (< 5.0.0, >= 4.6.0) + puppetlabs-stdlib (< 5.0.0, >= 4.13.0) richardc-datacat (< 1.0.0, >= 0.6.2) puppet-archive (2.2.0) puppetlabs-stdlib (< 5.0.0, >= 4.13.1) @@ -14,7 +13,6 @@ puppetlabs-vcsrepo (< 2.0.0, >= 1.3.1) stahnma-epel (< 2.0.0, >= 1.0.0) puppet-staging (2.2.0) -puppet-tea (0.2.0) puppetlabs-apt (4.4.1) puppetlabs-stdlib (< 5.0.0, >= 4.16.0) puppetlabs-inifile (1.6.0) @@ -34,7 +32,7 @@ thias-sysctl (1.0.6) DEPENDENCIES - elastic-elasticsearch (= 6.0.0) + elastic-elasticsearch (= 6.1.0) puppet-letsencrypt (= 2.1.0) puppetlabs-java (= 2.3.0) puppetlabs-mysql (= 5.1.0) -- To view, visit https://gerrit.wikimedia.org/r/400472 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I27bf55c5b27f59801f406dce4aea4c35baa6a598 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Fix auto-merge pattern for intuition-tools
Nikerabbit has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/398897 ) Change subject: Fix auto-merge pattern for intuition-tools .. Fix auto-merge pattern for intuition-tools Change-Id: Icd6b93613c0f4ca52397a51fde3262b83e632e3e --- M repoconfig.yaml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Nikerabbit: Looks good to me, approved diff --git a/repoconfig.yaml b/repoconfig.yaml index 6a196ca..f21d568 100644 --- a/repoconfig.yaml +++ b/repoconfig.yaml @@ -181,7 +181,7 @@ intuition-tools: group: int-* - auto-merge: ^research/recommendation-api|labs/tools/guc|tools/heritage + auto-merge: ^research/recommendation-api|labs/tools/guc|labs/tools/heritage repos: int-dcatap: type: wmgerrit -- To view, visit https://gerrit.wikimedia.org/r/398897 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icd6b93613c0f4ca52397a51fde3262b83e632e3e Gerrit-PatchSet: 2 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Fix docroot for dev for letsencrypt
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/399571 ) Change subject: Fix docroot for dev for letsencrypt .. Fix docroot for dev for letsencrypt Change-Id: I743cae95d280858d066d33e0a59e933e85f11d0c --- M puppet/modules/nginx/manifests/ssl.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/71/399571/1 diff --git a/puppet/modules/nginx/manifests/ssl.pp b/puppet/modules/nginx/manifests/ssl.pp index 2a9a86c..0060ed9 100644 --- a/puppet/modules/nginx/manifests/ssl.pp +++ b/puppet/modules/nginx/manifests/ssl.pp @@ -38,7 +38,7 @@ '/www/translatewiki.net/docroot', '/usr/lib/cgi-bin/mailman', '/www/stats.translatewiki.net', - '/www/translatewiki.net/docroot', + '/www/dev.translatewiki.net/docroot', ], } } -- To view, visit https://gerrit.wikimedia.org/r/399571 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I743cae95d280858d066d33e0a59e933e85f11d0c Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add tags for undo edits
Nikerabbit has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395744 ) Change subject: Add tags for undo edits .. Add tags for undo edits Follow up on Ie7f637fcec. Bug: T167656 Change-Id: I763844e4bf7c3b5ca7a436cc4aa22a92f70f79d0 --- M includes/DefaultSettings.php M includes/changetags/ChangeTags.php M includes/page/WikiPage.php M languages/i18n/en.json M languages/i18n/qqq.json 5 files changed, 14 insertions(+), 2 deletions(-) Approvals: jenkins-bot: Verified Nikerabbit: Checked; Looks good to me, approved diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index c17bf7e..2ee27ab 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -6951,6 +6951,7 @@ * - 'mw-blank': Edit completely blanks the page * - 'mw-replace': Edit removes more than 90% of the content * - 'mw-rollback': Edit is a rollback, made through the rollback link or rollback API + * - 'mw-undo': Edit made through an undo link * * @var array * @since 1.31 @@ -6962,7 +6963,8 @@ 'mw-changed-redirect-target' => true, 'mw-blank' => true, 'mw-replace' => true, - 'mw-rollback' => true + 'mw-rollback' => true, + 'mw-undo' => true, ]; /** diff --git a/includes/changetags/ChangeTags.php b/includes/changetags/ChangeTags.php index b4a8ca8..db1f599 100644 --- a/includes/changetags/ChangeTags.php +++ b/includes/changetags/ChangeTags.php @@ -39,7 +39,8 @@ 'mw-changed-redirect-target', 'mw-blank', 'mw-replace', - 'mw-rollback' + 'mw-rollback', + 'mw-undo', ]; /** diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index ff997ab..67e4d0d 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -1624,6 +1624,11 @@ $tags[] = $tag; } + // Check for undo tag + if ( $undidRevId !== 0 && in_array( 'mw-undo', ChangeTags::getSoftwareTags() ) ) { + $tags[] = 'mw-undo'; + } + // Provide autosummaries if summary is not provided and autosummaries are enabled if ( $wgUseAutomaticEditSummaries && ( $flags & EDIT_AUTOSUMMARY ) && $summary == '' ) { $summary = $handler->getAutosummary( $old_content, $content, $flags ); diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 7254b92..70230fe 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -3888,6 +3888,8 @@ "tag-mw-replace-description": "Edits that remove more than 90% of the content of a page", "tag-mw-rollback": "Rollback", "tag-mw-rollback-description": "Edits that roll back previous edits using the rollback link", + "tag-mw-undo": "Undo", + "tag-mw-undo-description": "Edits that undo previous edits using the undo link", "tags-title": "Tags", "tags-intro": "This page lists the tags that the software may mark an edit with, and their meaning.", "tags-tag": "Tag name", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 0497396..54b2ee0 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -4083,6 +4083,8 @@ "tag-mw-replace-description": "Description for \"replace\" change tag", "tag-mw-rollback": "Change tag for rolling back an edit\n{{Identical|Rollback}}", "tag-mw-rollback-description": "Description for \"rollback\" change tag", + "tag-mw-undo": "Change tag for undoing an edit", + "tag-mw-undo-description": "Description for \"undo\" change tag", "tags-title": "The title of [[Special:Tags]].\n{{Identical|Tag}}", "tags-intro": "Explanation on top of [[Special:Tags]]. For more information on tags see [[mw:Manual:Tags|MediaWiki]].", "tags-tag": "Caption of a column in [[Special:Tags]]. For more information on tags see [[mw:Manual:Tags|MediaWiki]].", -- To view, visit https://gerrit.wikimedia.org/r/395744 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I763844e4bf7c3b5ca7a436cc4aa22a92f70f79d0 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Petar.petkovic Gerrit-Reviewer: Anomie Gerrit-Reviewer: Catrope Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: Petar.petkovic Gerrit-Reviewer: Siebrand Gerrit-Reviewer: TTO Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: Remove deprecated jQuery.fn.hover in stats table
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/399421 ) Change subject: Remove deprecated jQuery.fn.hover in stats table .. Remove deprecated jQuery.fn.hover in stats table Also removed the usage of mw-sp-translate-table. That is only used by Special:Translations now. Instead use statstable class, while not ideal as unprefixed thing, already exists. Change-Id: I32466c3653ab39276d13151cfdbfc5060cd91d28 --- M resources/css/ext.translate.special.languagestats.css M resources/js/ext.translate.special.languagestats.js M utils/StatsTable.php 3 files changed, 25 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/21/399421/1 diff --git a/resources/css/ext.translate.special.languagestats.css b/resources/css/ext.translate.special.languagestats.css index 74d1d4d..0e9a7bb 100644 --- a/resources/css/ext.translate.special.languagestats.css +++ b/resources/css/ext.translate.special.languagestats.css @@ -1,4 +1,4 @@ -.mw-sp-translate-table.wikitable tr:hover td { +.statstable tr:hover td { background: #fff; } diff --git a/resources/js/ext.translate.special.languagestats.js b/resources/js/ext.translate.special.languagestats.js index b0b1a54..1f63edd 100644 --- a/resources/js/ext.translate.special.languagestats.js +++ b/resources/js/ext.translate.special.languagestats.js @@ -10,7 +10,7 @@ $( function () { var $allChildRows, $allTogglesCache, $toggleAllButton, - $translateTable = $( '.mw-sp-translate-table' ), + $translateTable = $( '.statstable' ), $metaRows = $( 'tr.AggregateMessageGroup', $translateTable ); // Quick return @@ -104,27 +104,30 @@ $( function () { // It is possible that the first event we get is hover-out, in // which case the colors will get stuck wrong. Ignore it. - var seenHoverIn = false; + var eventHandlers, seenHoverIn = false; - $( '.mw-sp-translate-table.wikitable tr' ).hover( function () { - seenHoverIn = true; - $( '> td.hover-color', this ) - // 30% more brightness - .css( 'background-color', function ( i, val ) { - // @codingStandardsIgnoreStart Bug in CodeSniffer? - return $.colorUtil.getColorBrightness( val, +0.3 ); - // codingStandardsIgnoreEnd - } ); - }, function () { - if ( !seenHoverIn ) { - return; + eventHandlers = { + mouseenter: function () { + seenHoverIn = true; + $( this ).children( '.hover-color' ) + // 30% more brightness + .css( 'background-color', function ( i, val ) { + return $.colorUtil.getColorBrightness( val, +0.3 ); + } ); + }, + mouseleave: function () { + if ( !seenHoverIn ) { + return; + } + $( this ).children( '.hover-color' ) + // 30% less brightness + .css( 'background-color', function ( i, val ) { + return $.colorUtil.getColorBrightness( val, -0.3 ); + } ); } - $( '> td.hover-color', this ) - // 30% less brightness - .css( 'background-color', function ( i, val ) { - return $.colorUtil.getColorBrightness( val, -0.3 ); - } ); - } ); + }; + + $( '.statstable' ).on( eventHandlers, 'tr' ); } ); } ); diff --git a/utils/StatsTable.php b/utils/StatsTable.php index ecd9c2a..877fdd2 100644 --- a/utils/StatsTable.php +++ b/utils/StatsTable.php @@ -147,7 +147,7 @@ // Create table header
[MediaWiki-commits] [Gerrit] translatewiki[master]: Add svg site logo
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/399410 ) Change subject: Add svg site logo .. Add svg site logo Change-Id: Ic18d00be78966dafe097882a42868992ec7cfc58 --- M TranslatewikiSettings.php 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/10/399410/1 diff --git a/TranslatewikiSettings.php b/TranslatewikiSettings.php index 1feb378..ecade2d 100644 --- a/TranslatewikiSettings.php +++ b/TranslatewikiSettings.php @@ -57,7 +57,10 @@ $wgSitename = 'translatewiki.net'; $wgEnableCanonicalServerLink = true; -$wgLogo = "//translatewiki.net/static/logo.png"; +$wgLogo = "https://translatewiki.net/static/logo.png";; +$wgLogoHD = [ + 'svg' => 'https://translatewiki.net/static/logo.svg', +]; $wgGrammarForms['fi']['genitive']['translatewiki.net'] = 'translatewiki.netin'; $wgGrammarForms['fi']['inessive']['translatewiki.net'] = 'translatewiki.netissä'; -- To view, visit https://gerrit.wikimedia.org/r/399410 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic18d00be78966dafe097882a42868992ec7cfc58 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Fix auto-merge pattern for intuition-tools
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/398897 ) Change subject: Fix auto-merge pattern for intuition-tools .. Fix auto-merge pattern for intuition-tools Change-Id: Icd6b93613c0f4ca52397a51fde3262b83e632e3e --- M repoconfig.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/97/398897/1 diff --git a/repoconfig.yaml b/repoconfig.yaml index 6a196ca..f21d568 100644 --- a/repoconfig.yaml +++ b/repoconfig.yaml @@ -181,7 +181,7 @@ intuition-tools: group: int-* - auto-merge: ^research/recommendation-api|labs/tools/guc|tools/heritage + auto-merge: ^research/recommendation-api|labs/tools/guc|labs/tools/heritage repos: int-dcatap: type: wmgerrit -- To view, visit https://gerrit.wikimedia.org/r/398897 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icd6b93613c0f4ca52397a51fde3262b83e632e3e Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: autoexport: continue if one project fails
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/398893 ) Change subject: autoexport: continue if one project fails .. autoexport: continue if one project fails Change-Id: Ia4f987f72dfc875311b7c871ad7418e81791d76f --- M bin/autoexport 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/93/398893/1 diff --git a/bin/autoexport b/bin/autoexport index 655c23e..fecd9cf 100755 --- a/bin/autoexport +++ b/bin/autoexport @@ -30,7 +30,7 @@ echo "${_b}$i${b_}" "$DIRSCRIPT/repoupdate" "$i" && "$DIRSCRIPT/repoexport" "$i" && - "$DIRSCRIPT/repocommit" "$i" + "$DIRSCRIPT/repocommit" "$i" || : done ssh-agent -k -- To view, visit https://gerrit.wikimedia.org/r/398893 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia4f987f72dfc875311b7c871ad7418e81791d76f Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Puppetize certbot
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/398703 ) Change subject: Puppetize certbot .. Puppetize certbot Change-Id: I02965dc636f28609c670c3e5bb6efd0c70626a15 --- M puppet/Puppetfile M puppet/Puppetfile.lock D puppet/modules/nginx/files/rapidssl.pem D puppet/modules/nginx/files/ssl.conf M puppet/modules/nginx/files/translatewiki.net M puppet/modules/nginx/manifests/ssl.pp 6 files changed, 36 insertions(+), 79 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/03/398703/1 diff --git a/puppet/Puppetfile b/puppet/Puppetfile index 017ca1b..413f02d 100644 --- a/puppet/Puppetfile +++ b/puppet/Puppetfile @@ -4,3 +4,4 @@ mod 'elastic-elasticsearch', '6.0.0' mod 'thias-sysctl', '1.0.6' mod 'puppetlabs-java', '2.3.0' +mod 'puppet-letsencrypt', '2.1.0' diff --git a/puppet/Puppetfile.lock b/puppet/Puppetfile.lock index f9c7986..b10f3f5 100644 --- a/puppet/Puppetfile.lock +++ b/puppet/Puppetfile.lock @@ -8,10 +8,16 @@ richardc-datacat (< 1.0.0, >= 0.6.2) puppet-archive (2.2.0) puppetlabs-stdlib (< 5.0.0, >= 4.13.1) +puppet-letsencrypt (2.1.0) + puppetlabs-inifile (< 2.0.0, >= 1.4.1) + puppetlabs-stdlib (< 5.0.0, >= 4.13.1) + puppetlabs-vcsrepo (< 2.0.0, >= 1.3.1) + stahnma-epel (< 2.0.0, >= 1.0.0) puppet-staging (2.2.0) puppet-tea (0.2.0) puppetlabs-apt (4.4.1) puppetlabs-stdlib (< 5.0.0, >= 4.16.0) +puppetlabs-inifile (1.6.0) puppetlabs-java (2.3.0) puppet-archive (< 3.0.0, >= 1.1.0) puppetlabs-stdlib (< 5.0.0, >= 4.13.1) @@ -21,11 +27,15 @@ puppetlabs-translate (< 2.0.0, >= 1.0.0) puppetlabs-stdlib (4.24.0) puppetlabs-translate (1.1.0) +puppetlabs-vcsrepo (1.5.0) richardc-datacat (0.6.2) +stahnma-epel (1.3.0) + puppetlabs-stdlib (>= 3.0.0) thias-sysctl (1.0.6) DEPENDENCIES elastic-elasticsearch (= 6.0.0) + puppet-letsencrypt (= 2.1.0) puppetlabs-java (= 2.3.0) puppetlabs-mysql (= 5.1.0) thias-sysctl (= 1.0.6) diff --git a/puppet/modules/nginx/files/rapidssl.pem b/puppet/modules/nginx/files/rapidssl.pem deleted file mode 100644 index 8149c78..000 --- a/puppet/modules/nginx/files/rapidssl.pem +++ /dev/null @@ -1,45 +0,0 @@ --BEGIN CERTIFICATE- -MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT -MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i -YWwgQ0EwHhcNMDIwNTIxMDQwMDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQG -EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMSR2VvVHJ1c3Qg -R2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD9 -9BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjoBbdq -fnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDv -iS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU -1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+ -bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5aszPeE4uwc2hGKceeoW -MPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTA -ephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVkDBF9qn1l -uMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKIn -Z57QzxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfS -tQWVYrmm3ok9Nns4d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcF -PseKUgzbFbS9bZvlxrFUaKnjaZC2mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Un -hw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6pXE0zX5IJL4hmXXeXxx12E6nV -5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvmMw== --END CERTIFICATE- --BEGIN CERTIFICATE- -MIIEJTCCAw2gAwIBAgIDAjp3MA0GCSqGSIb3DQEBCwUAMEIxCzAJBgNVBAYTAlVT -MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i -YWwgQ0EwHhcNMTQwODI5MjEzOTMyWhcNMjIwNTIwMjEzOTMyWjBHMQswCQYDVQQG -EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXUmFwaWRTU0wg -U0hBMjU2IENBIC0gRzMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCv -VJvZWF0eLFbG1eh/9H0WA//Qi1rkjqfdVC7UBMBdmJyNkA+8EGVf2prWRHzAn7Xp -SowLBkMEu/SW4ib2YQGRZjEiwzQ0Xz8/kS9EX9zHFLYDn4ZLDqP/oIACg8PTH2lS -1p1kD8mD5xvEcKyU58Okaiy9uJ5p2L4KjxZjWmhxgHsw3hUEv8zTvz5IBVV6s9cQ -DAP8m/0Ip4yM26eO8R5j3LMBL3+vV8M8SKeDaCGnL+enP/C1DPz1hNFTvA5yT2AM -QriYrRmIV9cE7Ie/fodOoyH5U/02mEiN1vi7SPIpyGTRzFRIU4uvt2UevykzKdkp -YEj4/5G8V1jlNS67abZZAgMBAAGjggEdMIIBGTAfBgNVHSMEGDAWgBTAephojYn7 -qwVkDBF9qn1luMrMTjAdBgNVHQ4EFgQUw5zz/NNGCDS7zkZ/oHxb8+IIy1kwEgYD -VR0TAQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8EBAMCAQYwNQYDVR0fBC4wLDAqoCig -JoYkaHR0cDovL2cuc3ltY2IuY29tL2NybHMvZ3RnbG9iYWwuY3JsMC4GCCsGAQUF -BwEBBCIwIDAeBggrBgEFBQcwAYYSaHR0cDovL2cuc3ltY2QuY29tMEwGA1UdIARF -MEMwQQYKYIZIAYb4RQEHNjAzMDEGCCsGAQUFBwIBFiVodHRwOi8vd3d3Lmdlb3Ry -dXN0LmNvbS9yZXNvdXJjZXMvY3BzMA0GCSqGSIb3DQEBCwUAA4IBAQCjWB7GQzKs -rC+TeLfqrlRARy1+eI1Q9vhmrNZPc9ZE768LzFvB9E+aj0l+YK/CJ8cW8fuTgZCp -fO9vfm5FlBaEvexJ8cQO9K8EWYOHDyw7l8NaEpt7BDV7o5UzCHuTcSJCs6nZb0+B -kvwHtnm8hEqddwnxxYny8LScVKoSew26T++TGezvfU5ho452nFnPjJSxhJf3GrkH -uLLGTxN5279PURt/aQ1RKsHWFf83UTRlUfQevjhq7A6rvz17OQV79PP7GqHQyH5O -
[MediaWiki-commits] [Gerrit] translatewiki[master]: Upgrade ElasticSearch to 5.5.2
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/398469 ) Change subject: Upgrade ElasticSearch to 5.5.2 .. Upgrade ElasticSearch to 5.5.2 Also updating the puppet module Change-Id: I86aa25454885dac608f4867e08d4362bd10af1b0 --- M puppet/Puppetfile M puppet/Puppetfile.lock M puppet/modules/profile/manifests/mwelasticsearch.pp 3 files changed, 19 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/69/398469/1 diff --git a/puppet/Puppetfile b/puppet/Puppetfile index 5d62330..017ca1b 100644 --- a/puppet/Puppetfile +++ b/puppet/Puppetfile @@ -1,5 +1,6 @@ forge "https://forgeapi.puppetlabs.com"; mod 'puppetlabs-mysql', '5.1.0' -mod 'elastic-elasticsearch', '5.1.1' +mod 'elastic-elasticsearch', '6.0.0' mod 'thias-sysctl', '1.0.6' +mod 'puppetlabs-java', '2.3.0' diff --git a/puppet/Puppetfile.lock b/puppet/Puppetfile.lock index ac40070..f9c7986 100644 --- a/puppet/Puppetfile.lock +++ b/puppet/Puppetfile.lock @@ -1,22 +1,20 @@ FORGE remote: https://forgeapi.puppetlabs.com specs: -elastic-elasticsearch (5.1.1) - puppet-yum (>= 0.9.6) - puppetlabs-apt (< 3.0.0, >= 2.0.0) - puppetlabs-java (< 2.0.0, >= 1.0.0) +elastic-elasticsearch (6.0.0) + puppet-tea (< 1.0.0, >= 0.2.0) + puppetlabs-apt (< 5.0.0, >= 2.0.0) puppetlabs-stdlib (< 5.0.0, >= 4.6.0) richardc-datacat (< 1.0.0, >= 0.6.2) -puppet-staging (2.2.0) -puppet-yum (2.1.0) - puppetlabs-concat (< 5.0.0, >= 1.2.5) - puppetlabs-stdlib (< 5.0.0, >= 4.10.0) -puppetlabs-apt (2.4.0) - puppetlabs-stdlib (< 5.0.0, >= 4.13.0) -puppetlabs-concat (4.1.1) +puppet-archive (2.2.0) puppetlabs-stdlib (< 5.0.0, >= 4.13.1) -puppetlabs-java (1.6.0) - puppetlabs-stdlib (< 5.0.0, >= 2.4.0) +puppet-staging (2.2.0) +puppet-tea (0.2.0) +puppetlabs-apt (4.4.1) + puppetlabs-stdlib (< 5.0.0, >= 4.16.0) +puppetlabs-java (2.3.0) + puppet-archive (< 3.0.0, >= 1.1.0) + puppetlabs-stdlib (< 5.0.0, >= 4.13.1) puppetlabs-mysql (5.1.0) puppet-staging (< 3.0.0, >= 1.0.1) puppetlabs-stdlib (< 5.0.0, >= 3.2.0) @@ -27,7 +25,8 @@ thias-sysctl (1.0.6) DEPENDENCIES - elastic-elasticsearch (= 5.1.1) + elastic-elasticsearch (= 6.0.0) + puppetlabs-java (= 2.3.0) puppetlabs-mysql (= 5.1.0) thias-sysctl (= 1.0.6) diff --git a/puppet/modules/profile/manifests/mwelasticsearch.pp b/puppet/modules/profile/manifests/mwelasticsearch.pp index 9c12bfe..0335c33 100644 --- a/puppet/modules/profile/manifests/mwelasticsearch.pp +++ b/puppet/modules/profile/manifests/mwelasticsearch.pp @@ -11,11 +11,11 @@ notify => Service['nginx'], } + class { 'java': distribution => 'jre' } + class { 'elasticsearch': -manage_repo => true, repo_version => '5.x', -java_install => true, -version => '5.1.2', +version => '5.5.2', jvm_options => [ '-Xms8g', '-Xmx10g' @@ -24,7 +24,7 @@ elasticsearch::instance { 'es-01': } - elasticsearch::plugin { 'org.wikimedia.search:extra:5.1.2': + elasticsearch::plugin { 'org.wikimedia.search:extra:5.5.2.3': instances => 'es-01', module_dir => 'extra' } -- To view, visit https://gerrit.wikimedia.org/r/398469 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I86aa25454885dac608f4867e08d4362bd10af1b0 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Miminal migration to puppet 4 Change-Id: I23f4bb4bdca9422f29...
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/398457 ) Change subject: Miminal migration to puppet 4 Change-Id: I23f4bb4bdca9422f291837171e45a9d1e5454a17 .. Miminal migration to puppet 4 Change-Id: I23f4bb4bdca9422f291837171e45a9d1e5454a17 --- A puppet/.gitignore M puppet/Makefile A puppet/Puppetfile A puppet/Puppetfile.lock M puppet/README D puppet/modules/apt D puppet/modules/datacat D puppet/modules/elasticsearch D puppet/modules/exim M puppet/modules/eximconf/manifests/es.pp M puppet/modules/eximconf/manifests/init.pp M puppet/modules/eximconf/manifests/web1.pp D puppet/modules/git D puppet/modules/java D puppet/modules/mysql D puppet/modules/puppi D puppet/modules/stdlib D puppet/modules/sysctl 18 files changed, 64 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/57/398457/1 diff --git a/puppet/.gitignore b/puppet/.gitignore new file mode 100644 index 000..7f8ade6 --- /dev/null +++ b/puppet/.gitignore @@ -0,0 +1,2 @@ +.tmp +.librarian diff --git a/puppet/Makefile b/puppet/Makefile index fbf3174..675e864 100644 --- a/puppet/Makefile +++ b/puppet/Makefile @@ -5,10 +5,12 @@ for files in modules/*/files; do find $$files -type f |xargs -r grep -L 'file managed by puppet'; done testpp: - git ls-files | grep "\.pp$$" | xargs -r puppet parser validate + git ls-files | grep "\.pp$$" | xargs -r /opt/puppetlabs/bin/puppet parser validate noop: - puppet apply --noop --verbose --show_diff --modulepath ./modules site.pp + librarian-puppet install --path ./vendor + /opt/puppetlabs/bin/puppet apply --noop --test --modulepath './modules:./vendor:$$basemodulepath' site.pp apply: site.pp - puppet apply --modulepath ./modules site.pp + librarian-puppet install --path ./vendor + /opt/puppetlabs/bin/puppet apply --modulepath './modules:./vendor:$$basemodulepath' site.pp diff --git a/puppet/Puppetfile b/puppet/Puppetfile new file mode 100644 index 000..5d62330 --- /dev/null +++ b/puppet/Puppetfile @@ -0,0 +1,5 @@ +forge "https://forgeapi.puppetlabs.com"; + +mod 'puppetlabs-mysql', '5.1.0' +mod 'elastic-elasticsearch', '5.1.1' +mod 'thias-sysctl', '1.0.6' diff --git a/puppet/Puppetfile.lock b/puppet/Puppetfile.lock new file mode 100644 index 000..ac40070 --- /dev/null +++ b/puppet/Puppetfile.lock @@ -0,0 +1,33 @@ +FORGE + remote: https://forgeapi.puppetlabs.com + specs: +elastic-elasticsearch (5.1.1) + puppet-yum (>= 0.9.6) + puppetlabs-apt (< 3.0.0, >= 2.0.0) + puppetlabs-java (< 2.0.0, >= 1.0.0) + puppetlabs-stdlib (< 5.0.0, >= 4.6.0) + richardc-datacat (< 1.0.0, >= 0.6.2) +puppet-staging (2.2.0) +puppet-yum (2.1.0) + puppetlabs-concat (< 5.0.0, >= 1.2.5) + puppetlabs-stdlib (< 5.0.0, >= 4.10.0) +puppetlabs-apt (2.4.0) + puppetlabs-stdlib (< 5.0.0, >= 4.13.0) +puppetlabs-concat (4.1.1) + puppetlabs-stdlib (< 5.0.0, >= 4.13.1) +puppetlabs-java (1.6.0) + puppetlabs-stdlib (< 5.0.0, >= 2.4.0) +puppetlabs-mysql (5.1.0) + puppet-staging (< 3.0.0, >= 1.0.1) + puppetlabs-stdlib (< 5.0.0, >= 3.2.0) + puppetlabs-translate (< 2.0.0, >= 1.0.0) +puppetlabs-stdlib (4.24.0) +puppetlabs-translate (1.1.0) +richardc-datacat (0.6.2) +thias-sysctl (1.0.6) + +DEPENDENCIES + elastic-elasticsearch (= 5.1.1) + puppetlabs-mysql (= 5.1.0) + thias-sysctl (= 1.0.6) + diff --git a/puppet/README b/puppet/README index cc9c052..5d37651 100644 --- a/puppet/README +++ b/puppet/README @@ -4,7 +4,10 @@ apt-get update apt-get dist-upgrade -apt-get install -y git puppet make +wget https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb +dpkg -i puppetlabs-release-pc1-xenial.deb +apt-get install -y git puppet-agent make +gem install librarian-puppet cd /root git clone https://gerrit.wikimedia.org/r/translatewiki cd /root/translatewiki diff --git a/puppet/modules/apt b/puppet/modules/apt deleted file mode 16 index f746a83..000 --- a/puppet/modules/apt +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f746a8349af054aa4b242aa441d8a6d80e622102 diff --git a/puppet/modules/datacat b/puppet/modules/datacat deleted file mode 16 index 5a6114c..000 --- a/puppet/modules/datacat +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5a6114cd41823160bdb01dad6eb0e2af85a8fa69 diff --git a/puppet/modules/elasticsearch b/puppet/modules/elasticsearch deleted file mode 16 index aa8c21d..000 --- a/puppet/modules/elasticsearch +++ /dev/null @@ -1 +0,0 @@ -Subproject commit aa8c21de803ed23386223c66cf516a4d5567dc33 diff --git a/puppet/modules/exim b/puppet/modules/exim deleted file mode 16 index ada0611..000 --- a/puppet/modules/exim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ada06114bd090f4a1999650a49326b9f52cd8a22 diff --git a/puppet/modules/eximconf/manifests/es.pp b/puppet/modules/eximcon
[MediaWiki-commits] [Gerrit] translatewiki[master]: Add some simple HTTP per https://securityheaders.io/
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/398435 ) Change subject: Add some simple HTTP per https://securityheaders.io/ .. Add some simple HTTP per https://securityheaders.io/ Change-Id: Ie69d8fc9593c0dba6facddf5d228ab33951953b0 --- M puppet/modules/nginx/files/translatewiki.net 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/35/398435/1 diff --git a/puppet/modules/nginx/files/translatewiki.net b/puppet/modules/nginx/files/translatewiki.net index 90f64b3..3c63e15 100644 --- a/puppet/modules/nginx/files/translatewiki.net +++ b/puppet/modules/nginx/files/translatewiki.net @@ -16,6 +16,9 @@ server_name translatewiki.net; root /www/$host/docroot; + add_header Referrer-Policy no-referrer-when-downgrade; + add_header X-Xss-Protection "1; mode=block" always; + location = / { rewrite ^ /w/index.php; } -- To view, visit https://gerrit.wikimedia.org/r/398435 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie69d8fc9593c0dba6facddf5d228ab33951953b0 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: Fix empty files in export in native format
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/398423 ) Change subject: Fix empty files in export in native format .. Fix empty files in export in native format https://translatewiki.net/wiki/Thread:Support/Export_generates_empty_resources/ Change-Id: I4f063961440936aa59aad17618c2b06c36687192 --- M specials/SpecialExportTranslations.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/23/398423/1 diff --git a/specials/SpecialExportTranslations.php b/specials/SpecialExportTranslations.php index f16afe2..4e0a4ba 100644 --- a/specials/SpecialExportTranslations.php +++ b/specials/SpecialExportTranslations.php @@ -241,6 +241,8 @@ $collection->filter( 'ignored' ); } + $collection->loadTranslations(); + return $collection; } -- To view, visit https://gerrit.wikimedia.org/r/398423 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4f063961440936aa59aad17618c2b06c36687192 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Use PSR-4 autoloader in extension.json
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/398016 ) Change subject: Use PSR-4 autoloader in extension.json .. Use PSR-4 autoloader in extension.json Rest of the files should also be moved into a suitable namespace, such as ContentTranslation\Api and ContentTranslation\SpecialPage. Bug: T182754 Change-Id: Ic7bf8b0caf6a1d5cf4fcb61c9e2924155c05c663 --- M extension.json 1 file changed, 3 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/16/398016/1 diff --git a/extension.json b/extension.json index 086cc12..0b6d644 100644 --- a/extension.json +++ b/extension.json @@ -83,28 +83,12 @@ "ApiQueryPublishedTranslations": "api/ApiQueryPublishedTranslations.php", "ApiQueryTranslatorStats": "api/ApiQueryTranslatorStats.php", "ContentTranslationHooks": "ContentTranslation.hooks.php", - "ContentTranslation\\AbuseFilterCheck": "includes/AbuseFilterCheck.php", - "ContentTranslation\\CorporaLookup": "includes/CorporaLookup.php", - "ContentTranslation\\Database": "includes/Database.php", - "ContentTranslation\\DateManipulator": "includes/DateManipulator.php", - "ContentTranslation\\EchoNotificationPresentationModel": "includes/EchoNotificationPresentationModel.php", - "ContentTranslation\\JsonDumpFormatter": "includes/JsonDumpFormatter.php", - "ContentTranslation\\Notification": "includes/Notification.php", - "ContentTranslation\\RestbaseClient": "includes/RestbaseClient.php", - "ContentTranslation\\SiteMapper": "includes/SiteMapper.php", - "ContentTranslation\\Stats": "includes/Stats.php", - "ContentTranslation\\Suggestion": "includes/Suggestion.php", - "ContentTranslation\\SuggestionList": "includes/SuggestionList.php", - "ContentTranslation\\SuggestionListManager": "includes/SuggestionListManager.php", - "ContentTranslation\\TmxDumpFormatter": "includes/TmxDumpFormatter.php", - "ContentTranslation\\Translation": "includes/Translation.php", - "ContentTranslation\\TranslationStorageManager": "includes/TranslationStorageManager.php", - "ContentTranslation\\TranslationUnit": "includes/TranslationUnit.php", - "ContentTranslation\\TranslationWork": "includes/TranslationWork.php", - "ContentTranslation\\Translator": "includes/Translator.php", "SpecialContentTranslation": "specials/SpecialContentTranslation.php", "SpecialContentTranslationStats": "specials/SpecialContentTranslationStats.php" }, + "AutoloadNamespaces": { + "ContentTranslation\\": "includes/" + }, "DefaultUserOptions": { "echo-subscriptions-web-cx": true }, -- To view, visit https://gerrit.wikimedia.org/r/398016 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic7bf8b0caf6a1d5cf4fcb61c9e2924155c05c663 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: WIP: Reduce queries on typical ApiQueryTranslationsAids api ...
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/397898 ) Change subject: WIP: Reduce queries on typical ApiQueryTranslationsAids api call .. WIP: Reduce queries on typical ApiQueryTranslationsAids api call This replaces hundreds of queries with just single database query. The actual amount of queries depends on how many translations for a message exists in the database. There where multiple issues: * The static cache in TranslationAid::getTranslations did not work. It seemed like it should have worked, maybe HHVM bug but not sure. This caused all queries to be executed twice. * There was one query to find all the page titles for translations, and a second query to load the text contents. * After that we would query the revtag table once for each language * We would also query the message index once per each language. The fix is to create a new class that caches the query results. Instances of the new class is injected into the translation aids, so the cache lifetime is nicely bound. The old static cache, if it worked, could grow indefinitely and leak memory. The new class does everything in one query and uses simple string manipulation to avoid querying the message index. TODO: This uses Revision::getQueryInfo which needs BC code to support MediaWiki >= 1.29. The new query has the following query plan: *** 1. row *** id: 1 select_type: SIMPLE table: bw_page type: range possible_keys: PRIMARY,name_title key: name_title key_len: 261 ref: NULL rows: 109 Extra: Using index condition *** 2. row *** id: 1 select_type: SIMPLE table: bw_revtag type: eq_ref possible_keys: rt_type_page_revision,rt_revision_type key: rt_type_page_revision key_len: 70 ref: const,translatewiki_net.bw_page.page_id,translatewiki_net.bw_page.page_latest rows: 1 Extra: Using where; Using index; Not exists *** 3. row *** id: 1 select_type: SIMPLE table: bw_revision type: eq_ref possible_keys: PRIMARY,rev_id,page_timestamp,page_user_timestamp key: PRIMARY key_len: 8 ref: translatewiki_net.bw_page.page_id,translatewiki_net.bw_page.page_latest rows: 1 Extra: *** 4. row *** id: 1 select_type: SIMPLE table: bw_text type: eq_ref possible_keys: PRIMARY key: PRIMARY key_len: 4 ref: translatewiki_net.bw_revision.rev_text_id rows: 1 Extra: Change-Id: I22f0bfdd948f3777bdecad85bf92719307da3a02 --- M Autoload.php M api/ApiQueryTranslationAids.php M specials/SpecialSearchTranslations.php M translationaids/InOtherLanguagesAid.php M translationaids/InsertablesAid.php M translationaids/MachineTranslationAid.php M translationaids/MessageDefinitionAid.php M translationaids/TTMServerAid.php M translationaids/TranslationAid.php A translationaids/TranslationAidDataProvider.php M translationaids/UpdatedDefinitionAid.php M utils/TranslationHelpers.php 12 files changed, 172 insertions(+), 107 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/98/397898/1 diff --git a/Autoload.php b/Autoload.php index 450ec2c..32edd69 100644 --- a/Autoload.php +++ b/Autoload.php @@ -248,8 +248,8 @@ $al['SupportAid'] = "$dir/translationaids/SupportAid.php"; $al['TTMServerAid'] = "$dir/translationaids/TTMServerAid.php"; $al['TranslationAid'] = "$dir/translationaids/TranslationAid.php"; -$al['UnsupportedTranslationAid'] = - "$dir/translationaids/UnsupportedTranslationAid.php"; +$al['TranslationAidDataProvider'] = "$dir/translationaids/TranslationAidDataProvider.php"; +$al['UnsupportedTranslationAid'] = "$dir/translationaids/UnsupportedTranslationAid.php"; $al['UpdatedDefinitionAid'] = "$dir/translationaids/UpdatedDefinitionAid.php"; /** diff --git a/api/ApiQueryTranslationAids.php b/api/ApiQueryTranslationAids.php index f394509..b2946a1 100644 --- a/api/ApiQueryTranslationAids.php +++ b/api/ApiQueryTranslationAids.php @@ -65,6 +65,8 @@ // Create list of aids, populate web services queries $aids = []; + + $dataProvider = new TranslationAidDataProvider( $handle ); foreach ( $props as $type ) { // Do not proceed if translation aid is not supported for this message group if ( !isset( $types[$type] ) ) { @@ -72,7 +74,7 @@ } $class = $types[$type]; - $obj = new $class( $group, $handle, $this ); + $obj = new $class( $group, $hand
[MediaWiki-commits] [Gerrit] translatewiki[master]: Puppet tweaks
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/396582 ) Change subject: Puppet tweaks .. Puppet tweaks * Increase memcached memory (already used this amount, still full) * Increase hhvm mysql timeout (less spammy, already used this value) Change-Id: I61f600bf40b5c739353a3d0b684ff0c580678f32 --- M puppet/modules/hhvm/files/server.ini M puppet/modules/memcached/files/memcached.conf 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/82/396582/1 diff --git a/puppet/modules/hhvm/files/server.ini b/puppet/modules/hhvm/files/server.ini index c2534c2..aaafb33 100644 --- a/puppet/modules/hhvm/files/server.ini +++ b/puppet/modules/hhvm/files/server.ini @@ -31,4 +31,4 @@ hhvm.jit_pseudomain = false hhvm.mysql.read_timeout = 3 -hhvm.mysql.slow_query_threshold = 1 +hhvm.mysql.slow_query_threshold = 15000 diff --git a/puppet/modules/memcached/files/memcached.conf b/puppet/modules/memcached/files/memcached.conf index 43cfc7d..ee0f0d5 100644 --- a/puppet/modules/memcached/files/memcached.conf +++ b/puppet/modules/memcached/files/memcached.conf @@ -22,7 +22,7 @@ # Start with a cap of 64 megs of memory. It's reasonable, and the daemon default # Note that the daemon will grow to this size, but does not start out holding this much # memory --m 1280 +-m 2048 # Default connection port is 11211 -p 11211 -- To view, visit https://gerrit.wikimedia.org/r/396582 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I61f600bf40b5c739353a3d0b684ff0c580678f32 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Rename import&export scripts for consistency
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/396579 ) Change subject: Rename import&export scripts for consistency .. Rename import&export scripts for consistency * Drop .sh from autosync and autosync-mediawiki * Rename autosync* to autoimport* * Rename nike-export-all to autoexport * Add autoexport-mediawiki to complement autoimport-mediawiki * Fix findexportroot to look for repoconfig.yaml, REPOCONF is dead * Shellscheck fixes Now we have this nice set of easy to use scripts: * autoimport (all \ mediawiki in gerrit) * autoimport-mediawiki * autoexport (all \ mediawiki in gerrit) * autoexport-mediawiki Reasons for separation is that Raimond still handles MediaWiki while I (or someone else) does all the rest, including MediaWiki extensions not hosted in Gerrit. Change-Id: If518f556b1de8e9306755cac65c6f664eda2771f --- A bin/autoexport A bin/autoexport-mediawiki R bin/autoimport R bin/autoimport-mediawiki M bin/findexportroot D bin/nike-export-all M puppet/modules/wiki/templates/wikimaintenance.erb 7 files changed, 45 insertions(+), 31 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/79/396579/1 diff --git a/bin/autoexport b/bin/autoexport new file mode 100755 index 000..655c23e --- /dev/null +++ b/bin/autoexport @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e +set -u + +DIRSCRIPT=$(dirname "$0") +DIRSCRIPT=$(cd "$DIRSCRIPT" && pwd) + +case "$(basename "$0")" in +autoexport) + PROJECTS=$(php "$DIRSCRIPT/../repong/repong.php" list | grep -v ^mediawiki) + ;; +autoexport-mediawiki) + PROJECTS=$(php "$DIRSCRIPT/../repong/repong.php" list | grep ^mediawiki) + ;; +*) + echo "I don't know what to export" + exit 1 + ;; +esac + +_b=$(tput bold) +b_=$(tput sgr0) + +( + eval "$(ssh-agent -s)" + ssh-add /home/betawiki/id_rsa + + for i in $PROJECTS; do + echo "${_b}$i${b_}" + "$DIRSCRIPT/repoupdate" "$i" && + "$DIRSCRIPT/repoexport" "$i" && + "$DIRSCRIPT/repocommit" "$i" + done + + ssh-agent -k +) diff --git a/bin/autoexport-mediawiki b/bin/autoexport-mediawiki new file mode 12 index 000..24e70ec --- /dev/null +++ b/bin/autoexport-mediawiki @@ -0,0 +1 @@ +autoexport \ No newline at end of file diff --git a/bin/autosync.sh b/bin/autoimport similarity index 100% rename from bin/autosync.sh rename to bin/autoimport diff --git a/bin/autosync-mediawiki.sh b/bin/autoimport-mediawiki similarity index 100% rename from bin/autosync-mediawiki.sh rename to bin/autoimport-mediawiki diff --git a/bin/findexportroot b/bin/findexportroot index c480a87..e97562a 100755 --- a/bin/findexportroot +++ b/bin/findexportroot @@ -1,20 +1,19 @@ -#!/bin/bash +#!/bin/sh # Used by repo* scripts to find the repository root # similar to how like git tries to find .git while true do - if [ ! -f "$DIR/REPOCONF" ] + if [ ! -f "$DIR/repoconfig.yaml" ] then - DIR=`dirname $DIR` + DIR=$(dirname "$DIR") else - . "$DIR/REPOCONF" break fi if [ "$DIR" = "/" ] then - echo "Fatal: Could not find REPOCONF file" - exit 1; + echo "Fatal: Could not find repoconfig.yaml" + exit 1 fi done diff --git a/bin/nike-export-all b/bin/nike-export-all deleted file mode 100755 index ae38cfc..000 --- a/bin/nike-export-all +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -DIRSCRIPT="`dirname \"$0\"`" -DIRSCRIPT="`( cd \"$DIRSCRIPT\" && pwd )`" - -PROJECTS=$(php "$DIRSCRIPT/../repong/repong.php" list | grep -v ^mediawiki) - -_b=$(tput bold) -b_=$(tput sgr0) - -( - eval `ssh-agent -s` - ssh-add /home/betawiki/id_rsa - - for i in $PROJECTS; do - echo "${_b}$i${b_}" - "$DIRSCRIPT/repoupdate" $i && - "$DIRSCRIPT/repoexport" $i && - "$DIRSCRIPT/repocommit" $i - done - - ssh-agent -k -) diff --git a/puppet/modules/wiki/templates/wikimaintenance.erb b/puppet/modules/wiki/templates/wikimaintenance.erb index 6011e66..11f9ab2 100644 --- a/puppet/modules/wiki/templates/wikimaintenance.erb +++ b/puppet/modules/wiki/templates/wikimaintenance.erb @@ -1,6 +1,6 @@ # file managed by puppet @weekly www-data find /www/translatewiki.net/docroot/images/thumb/ -name "*.png" -type f -print0 | nice xargs -0 -P4 -I{} optipng -o7 {} 1> /dev/null @weekly <%= @user %> nice php /srv/mediawiki/targets/production/maintenance/generateSitemap.php --fspath /www/translatewiki.net/docroot/sitemap/ --skip-redirects --urlpath https://translatewiki.net/sitemap/ -48 6,8,10,12,14,16,18,20,22 * * * <%= @user %> <%= @config %>/bin/autosync.sh > /dev/null -48 7,13,21 * * * <%= @user %> <%= @config %>/bin/autosync-mediawiki.sh > /dev/null +48 6,8,10,12,14,16,18,20,22 * * * <%
[MediaWiki-commits] [Gerrit] translatewiki[master]: Removing deprecated export scripts
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/396578 ) Change subject: Removing deprecated export scripts .. Removing deprecated export scripts bclean, bexport and bexport all refer to $HOME, but we should not be exporting to home directories. They also don't follow the configuration specified for groups in repoconfig.yaml. Change-Id: I68dd18c60764042356982c7a0fe9729ed5791947 --- D bin/bclean D bin/bexport D bin/bexportall D bin/bx D bin/bxa 5 files changed, 0 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/78/396578/1 diff --git a/bin/bclean b/bin/bclean deleted file mode 100755 index d5ff6ee..000 --- a/bin/bclean +++ /dev/null @@ -1,2 +0,0 @@ -rm -rf $HOME/export/* - diff --git a/bin/bexport b/bin/bexport deleted file mode 100755 index 26a4db8..000 --- a/bin/bexport +++ /dev/null @@ -1,2 +0,0 @@ -cd /srv/mediawiki/targets/production/extensions/Translate/scripts -php export.php --target=$HOME/export --group=$1 --lang="$2" diff --git a/bin/bexportall b/bin/bexportall deleted file mode 100755 index 7a5a4d1..000 --- a/bin/bexportall +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -EXPORTPATH=$HOME/export -SCRIPTPATH=/srv/mediawiki/targets/production/extensions/Translate/scripts - -cd $SCRIPTPATH - -if [ "$#" -gt "2" ]; then - echo "Only two parameters allowed" - exit; -fi - -if [ -z $2 ]; then - php export.php --target=$EXPORTPATH --skip=en --group=$1 --lang='*' -else - echo "Only exporting more than $2% translated" - php export.php --target=$EXPORTPATH --skip=en --group=$1 --lang='*' --threshold=$2 -fi diff --git a/bin/bx b/bin/bx deleted file mode 12 index c2daf35..000 --- a/bin/bx +++ /dev/null @@ -1 +0,0 @@ -bexport \ No newline at end of file diff --git a/bin/bxa b/bin/bxa deleted file mode 12 index de72ea7..000 --- a/bin/bxa +++ /dev/null @@ -1 +0,0 @@ -bexportall \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/396578 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I68dd18c60764042356982c7a0fe9729ed5791947 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TwnMainPage[master]: Use more appropriate word breaking rule for stats boxes
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/396358 ) Change subject: Use more appropriate word breaking rule for stats boxes .. Use more appropriate word breaking rule for stats boxes The current one causes bad wrapping for Finnish, for example, which is avoidable. Change-Id: I69b1cd730673d3eb0c9a1378eeb5065cbae0cd2b --- M resources/css/ext.translate.mainpage.css 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TwnMainPage refs/changes/58/396358/1 diff --git a/resources/css/ext.translate.mainpage.css b/resources/css/ext.translate.mainpage.css index aabbe40..4097071 100644 --- a/resources/css/ext.translate.mainpage.css +++ b/resources/css/ext.translate.mainpage.css @@ -158,7 +158,7 @@ font-size: 1em; opacity: 0.85; font-weight: normal; - word-break: break-all; + overflow-wrap: break-word; } .main-widget { -- To view, visit https://gerrit.wikimedia.org/r/396358 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I69b1cd730673d3eb0c9a1378eeb5065cbae0cd2b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TwnMainPage Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: RepoNG: Change failure to get state from exception to warning.
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/396018 ) Change subject: RepoNG: Change failure to get state from exception to warning. .. RepoNG: Change failure to get state from exception to warning. Change-Id: Ibb75e05a38c1e0a25d355eb0189b2d6fd3f860c4 --- M repong/repong.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/18/396018/1 diff --git a/repong/repong.php b/repong/repong.php index 5ebfd17..7f0698b 100644 --- a/repong/repong.php +++ b/repong/repong.php @@ -264,7 +264,7 @@ if ( $process->isSuccessful() ) { $state = trim( $process->getOutput() ); } else { - throw new ProcessFailedException( $process ); + $output->writeln( "Unable to synchronize the state for repository $name" ); } } -- To view, visit https://gerrit.wikimedia.org/r/396018 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibb75e05a38c1e0a25d355eb0189b2d6fd3f860c4 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: RepoNG: Remove username convresion feature
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/396017 ) Change subject: RepoNG: Remove username convresion feature .. RepoNG: Remove username convresion feature I accidentally broke it, and now it is no longer required Change-Id: I070c8e9a862e6fce435c79ad1cbcf1172ccb29da --- M repong/repong.php 1 file changed, 0 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/17/396017/1 diff --git a/repong/repong.php b/repong/repong.php index ac7462d..5ebfd17 100644 --- a/repong/repong.php +++ b/repong/repong.php @@ -16,9 +16,6 @@ abstract class RepoNgCommand extends Command { protected $bindir; protected $config; - protected $usernameConversion = [ - 'nike' => 'nikerabbit', - ]; protected $parallelism = 1; protected $base; protected $defaultVariant; @@ -272,11 +269,6 @@ } if ( $type === 'git' ) { - $userName = $this->usernameConversion[ $userName ] ?? get_current_user(); - - $repoUrl = $repo['url']; - $repoUrl = str_replace( 'USERNAME', $userName, $repoUrl ); - $command = "$bindir/clupdate-git-repo '$repoUrl' '$base/$name' '$branch'"; } elseif ( $type === 'github' ) { $command = "$bindir/clupdate-github-repo '{$repo['url']}' '$base/$name' '$branch'"; -- To view, visit https://gerrit.wikimedia.org/r/396017 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I070c8e9a862e6fce435c79ad1cbcf1172ccb29da Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Update export url for FreeCol
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/396016 ) Change subject: Update export url for FreeCol .. Update export url for FreeCol They added permissions for translatewiki acccount on SourceForge. This should be the last project that was depending on a personal account. Change-Id: Id96228ce53e49e2b2060abc2ff13955ef8323f7b --- M repoconfig.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/16/396016/1 diff --git a/repoconfig.yaml b/repoconfig.yaml index e0f0171..b19ab1f 100644 --- a/repoconfig.yaml +++ b/repoconfig.yaml @@ -89,7 +89,7 @@ freecol: type: git url: git://git.code.sf.net/p/freecol/git - url|export: ssh://usern...@git.code.sf.net/p/freecol/git + url|export: ssh://translatew...@git.code.sf.net/p/freecol/git fudforum: group: out-fudforum -- To view, visit https://gerrit.wikimedia.org/r/396016 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id96228ce53e49e2b2060abc2ff13955ef8323f7b Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: RepoNG: Run gerrit merges serially
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395475 ) Change subject: RepoNG: Run gerrit merges serially .. RepoNG: Run gerrit merges serially This is slower, but at least it works. Gerrit seems to have a race condition and it breaks if many merges are coming simultaneously. Bug: T18 Change-Id: Ife5314577c4d30c19ae003d35c8a46613afd0b39 --- M repoconfig.yaml M repong/repong.php 2 files changed, 21 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/75/395475/1 diff --git a/repoconfig.yaml b/repoconfig.yaml index 6907ef3..e0f0171 100644 --- a/repoconfig.yaml +++ b/repoconfig.yaml @@ -51,6 +51,7 @@ crosswatch: group: crosswatch + auto-merge: labs/tools/crosswatch repos: crosswatch: type: wmgerrit @@ -101,6 +102,7 @@ gapfinder: group: gapfinder + auto-merge: research/recommendation-api repos: recommendation-api: type: wmgerrit @@ -179,6 +181,7 @@ intuition-tools: group: int-* + auto-merge: ^research/recommendation-api|labs/tools/guc|tools/heritage repos: int-dcatap: type: wmgerrit @@ -256,6 +259,7 @@ no-export-languages: test,aeb,be-x-old,crh,dk,en,fiu-vro,gan,gom,hif,kbd,kk,kk-cn,iu,kk-kz,kk-tr,ko-kp,ku,ku-arab,no,ruq,simple,sr,tg,tp,tt,ug,zh,zh-classical,zh-cn,zh-sg,zh-hk,zh-min-nan,zh-mo,zh-my,zh-tw,zh-yue,bbc,ady export-threshold: 13 group: core,ext-installer,mediawiki-api + auto-merge: mediawiki/core repos: mediawiki/master: type: wmgerrit @@ -267,6 +271,7 @@ no-export-languages: test,aeb,be-x-old,crh,dk,en,fiu-vro,gan,gom,hif,kbd,kk,kk-cn,iu,kk-kz,kk-tr,ko-kp,ku,ku-arab,no,ruq,simple,sr,tg,tp,tt,ug,zh,zh-classical,zh-cn,zh-sg,zh-hk,zh-min-nan,zh-mo,zh-my,zh-tw,zh-yue,bbc,ady export-threshold: 0 group: ext-* + auto-merge: ^mediawiki/extensions/.* repos: '@generator': php ../groups/MediaWiki/repong-generator.php extensions @@ -275,6 +280,7 @@ no-export-languages: test,aeb,be-x-old,crh,dk,en,fiu-vro,gan,gom,hif,kbd,kk,kk-cn,iu,kk-kz,kk-tr,ko-kp,ku,ku-arab,no,ruq,simple,sr,tg,tp,tt,ug,zh,zh-classical,zh-cn,zh-sg,zh-hk,zh-min-nan,zh-mo,zh-my,zh-tw,zh-yue,bbc,ady export-threshold: 0 group: mediawiki-skin-* + auto-merge: ^mediawiki/skins/.* repos: '@generator': php ../groups/MediaWiki/repong-generator.php skins @@ -290,6 +296,7 @@ mwgerrit: group: mwgerrit-* + auto-merge: ^data-values/value-view|oojs/ui|VisualEditor/VisualEditor repos: mwgerrit/data-values/value-view: type: wmgerrit @@ -474,6 +481,7 @@ proveit: group: proveit + auto-merge: wikipedia/gadgets/ProveIt repos: proveit: type: wmgerrit @@ -483,6 +491,7 @@ pywikibot: group: out-pywikipedia-* export-threshold: 1 + auto-merge: pywikibot/i18n repos: pywikibot: type: wmgerrit @@ -536,6 +545,7 @@ wikidata: group: wikidata-* + auto-merge: wikidata/query/gui repos: wikidata/query/gui: type: wmgerrit @@ -553,6 +563,7 @@ wikimania: group: out-wikimania-scholarships-app + auto-merge: wikimedia/wikimania-scholarships repos: wikimania: type: wmgerrit @@ -561,6 +572,7 @@ wikimedia-portals: group: wikimedia-portals + auto-merge: wikimedia/portals repos: wikimedia-portals: type: wmgerrit @@ -581,7 +593,6 @@ wikipedia-android: type: wmgerrit url: https://gerrit.wikimedia.org/r/apps/android/wikipedia - auto-merge: false url|export: ssh://l10n-...@gerrit.wikimedia.org:29418/apps/android/wikipedia wikipedia-ios: diff --git a/repong/repong.php b/repong/repong.php index 8e37947..ac7462d 100644 --- a/repong/repong.php +++ b/repong/repong.php @@ -427,21 +427,18 @@ $process->setTimeout( 120 ); $process->setWorkingDirectory( $base ); $processes->attach( $process ); - - $autoMerge = $repo['auto-merge'] ?? true; - - // Merge patch sets submitted to Wikimedia's Gerrit. - if ( $repo['type'] === 'wmgerrit' && $autoMerge ) { - $project = str_replace( 'ssh://l10n-...@gerrit.wikimedia.org:29418/', '', $repo['url'] ); - $command = $this->bindir . "/merge-wmgerrit-patches '$project'"; - - $mergeProcess = new Process( $command ); - $mergeProcess->setTimeout( 120 ); - $processes->attach( $mergeProcess, $process ); - } } $this->runParallelWithOutput( $processes, $output ); + + // Merge patch sets submitted to Wikimedia's Gerrit. + $mergePattern = $config[ 'auto-merge' ] ?? false; + if ( $repo['type'] === 'wmgerrit' && $mergePattern ) { +
[MediaWiki-commits] [Gerrit] translatewiki[master]: Add Wikimedia Phabricator for translation
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395196 ) Change subject: Add Wikimedia Phabricator for translation .. Add Wikimedia Phabricator for translation Change-Id: I4acd6f422586ac3d71eb0c4afe4f58bc6d1be88f --- M TranslateSettings.php A groups/Phabricator/Phabricator.yaml A groups/Phabricator/PhabricatorAgg.yaml A groups/Phabricator/generate-yaml.php M repoconfig.yaml 5 files changed, 792 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/96/395196/1 diff --git a/TranslateSettings.php b/TranslateSettings.php index ad5dfb4..4a13726 100644 --- a/TranslateSettings.php +++ b/TranslateSettings.php @@ -440,3 +440,9 @@ 'url' => 'https://github.com/dissemin/dissemin/issues/new', 'params' => $githubParams, ]; + +wfAddNamespace( 1274, 'Phabricator' ); +$wgCapitalLinkOverrides[NS_PHABRICATOR] = false; +$wgCapitalLinkOverrides[NS_PHABRICATOR_TALK] = false; +$wgTranslateGroupFiles[] = "$GROUPS/Phabricator/PhabricatorAgg.yaml"; +$wgTranslateGroupFiles[] = "$GROUPS/Phabricator/Phabricator.yaml"; diff --git a/groups/Phabricator/Phabricator.yaml b/groups/Phabricator/Phabricator.yaml new file mode 100644 index 000..2b386cc --- /dev/null +++ b/groups/Phabricator/Phabricator.yaml @@ -0,0 +1,742 @@ +TEMPLATE: + BASIC: +icon: wiki://Phacility_phabricator_logo.svg +class: FileBasedMessageGroup +namespace: NS_PHABRICATOR + + FILES: +class: JsonFFS + + CHECKER: +class: MediaWikiMessageChecker +checks: + - wikiParameterCheck + - braceBalanceCheck + + MANGLER: +class: StringMatcher +patterns: + - "*" + + INSERTABLES: +class: MediaWikiInsertablesSuggester + +--- +BASIC: + id: phabricator-arcanist-core + label: Phabricator (arcanist > core) +FILES: + sourcePattern: '%GROUPROOT%/phabricator/projects/arcanist/core/%CODE%.json' +MANGLER: + prefix: arcanist-core- + +--- +BASIC: + id: phabricator-libphutil-core + label: Phabricator (libphutil > core) +FILES: + sourcePattern: '%GROUPROOT%/phabricator/projects/libphutil/core/%CODE%.json' +MANGLER: + prefix: libphutil-core- + +--- +BASIC: + id: phabricator-phabricator-almanac + label: Phabricator (phabricator > almanac) +FILES: + sourcePattern: '%GROUPROOT%/phabricator/projects/phabricator/almanac/%CODE%.json' +MANGLER: + prefix: phabricator-almanac- + +--- +BASIC: + id: phabricator-phabricator-aphlict + label: Phabricator (phabricator > aphlict) +FILES: + sourcePattern: '%GROUPROOT%/phabricator/projects/phabricator/aphlict/%CODE%.json' +MANGLER: + prefix: phabricator-aphlict- + +--- +BASIC: + id: phabricator-phabricator-audit + label: Phabricator (phabricator > audit) +FILES: + sourcePattern: '%GROUPROOT%/phabricator/projects/phabricator/audit/%CODE%.json' +MANGLER: + prefix: phabricator-audit- + +--- +BASIC: + id: phabricator-phabricator-auth + label: Phabricator (phabricator > auth) +FILES: + sourcePattern: '%GROUPROOT%/phabricator/projects/phabricator/auth/%CODE%.json' +MANGLER: + prefix: phabricator-auth- + +--- +BASIC: + id: phabricator-phabricator-badges + label: Phabricator (phabricator > badges) +FILES: + sourcePattern: '%GROUPROOT%/phabricator/projects/phabricator/badges/%CODE%.json' +MANGLER: + prefix: phabricator-badges- + +--- +BASIC: + id: phabricator-phabricator-base + label: Phabricator (phabricator > base) +FILES: + sourcePattern: '%GROUPROOT%/phabricator/projects/phabricator/base/%CODE%.json' +MANGLER: + prefix: phabricator-base- + +--- +BASIC: + id: phabricator-phabricator-cache + label: Phabricator (phabricator > cache) +FILES: + sourcePattern: '%GROUPROOT%/phabricator/projects/phabricator/cache/%CODE%.json' +MANGLER: + prefix: phabricator-cache- + +--- +BASIC: + id: phabricator-phabricator-calendar + label: Phabricator (phabricator > calendar) +FILES: + sourcePattern: '%GROUPROOT%/phabricator/projects/phabricator/calendar/%CODE%.json' +MANGLER: + prefix: phabricator-calendar- + +--- +BASIC: + id: phabricator-phabricator-celerity + label: Phabricator (phabricator > celerity) +FILES: + sourcePattern: '%GROUPROOT%/phabricator/projects/phabricator/celerity/%CODE%.json' +MANGLER: + prefix: phabricator-celerity- + +--- +BASIC: + id: phabricator-phabricator-chatlog + label: Phabricator (phabricator > chatlog) +FILES: + sourcePattern: '%GROUPROOT%/phabricator/projects/phabricator/chatlog/%CODE%.json' +MANGLER: + prefix: phabricator-chatlog- + +--- +BASIC: + id: phabricator-phabricator-conduit + label: Phabricator (phabricator > conduit) +FILES: + sourcePattern: '%GROUPROOT%/phabricator/projects/phabricator/conduit/%CODE%.json' +MANGLER: + prefix: phabricator-conduit- + +--- +BASIC: + id: phabricator-phabricator-config + label: Phabricator (phabricator > config) +FILES: + sourcePattern: '%GROUPROOT%/phabricator/projects/phabricator/config/%CODE%.json' +MANGLER: + prefix: ph
[MediaWiki-commits] [Gerrit] translatewiki[master]: Use more of ?? operator in RepoNG
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395195 ) Change subject: Use more of ?? operator in RepoNG .. Use more of ?? operator in RepoNG Change-Id: Icff84e8d1647d32d56bebaf18fbaa784c14842b3 --- M repong/repong.php 1 file changed, 3 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/95/395195/1 diff --git a/repong/repong.php b/repong/repong.php index 5780232..8e37947 100644 --- a/repong/repong.php +++ b/repong/repong.php @@ -244,7 +244,7 @@ // could be ahead of the state that has been processed in the wiki. // With state synchronization we ensure we do not overwrite any // changes that have been made in the between. - $stateDir = isset( $meta[ 'state-directory' ] ) ? $meta[ 'state-directory' ] : false; + $stateDir = $meta[ 'state-directory' ] ?? false; $processes = new SplObjectStorage(); @@ -272,10 +272,7 @@ } if ( $type === 'git' ) { - $userName = get_current_user(); - if ( isset( $this->usernameConversion[$userName] ) ) { - $userName = $this->usernameConversion[$userName]; - } + $userName = $this->usernameConversion[ $userName ] ?? get_current_user(); $repoUrl = $repo['url']; $repoUrl = str_replace( 'USERNAME', $userName, $repoUrl ); @@ -431,7 +428,7 @@ $process->setWorkingDirectory( $base ); $processes->attach( $process ); - $autoMerge = isset( $repo['auto-merge'] ) ? $repo['auto-merge'] : true; + $autoMerge = $repo['auto-merge'] ?? true; // Merge patch sets submitted to Wikimedia's Gerrit. if ( $repo['type'] === 'wmgerrit' && $autoMerge ) { -- To view, visit https://gerrit.wikimedia.org/r/395195 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icff84e8d1647d32d56bebaf18fbaa784c14842b3 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Fix autosyncs
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395186 ) Change subject: Fix autosyncs .. Fix autosyncs Change-Id: Id2330ea78f277ff116af6ae077fe5bad5f76553c --- M bin/autosync-mediawiki.sh M bin/autosync.sh 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/86/395186/1 diff --git a/bin/autosync-mediawiki.sh b/bin/autosync-mediawiki.sh index e54df2d..e793485 100755 --- a/bin/autosync-mediawiki.sh +++ b/bin/autosync-mediawiki.sh @@ -4,6 +4,7 @@ DIRSCRIPT="`( cd \"$DIRSCRIPT\" && pwd )`" NAME=mediawiki +cd /resources/projects php "$DIRSCRIPT/../repong/repong.php" list | grep ^mediawiki | xargs -n1 -P4 "$DIRSCRIPT/repo" update php /srv/mediawiki/targets/production/extensions/Translate/scripts/processMessageChanges.php \ diff --git a/bin/autosync.sh b/bin/autosync.sh index f4c70f0..59992e1 100755 --- a/bin/autosync.sh +++ b/bin/autosync.sh @@ -6,6 +6,7 @@ DIRSCRIPT="`( cd \"$DIRSCRIPT\" && pwd )`" NAME="non-mediawiki" +cd /resources/projects php "$DIRSCRIPT/../repong/repong.php" list | grep -v ^mediawiki | xargs -n1 -P4 "$DIRSCRIPT/repo" update php /srv/mediawiki/targets/production/extensions/Translate/scripts/processMessageChanges.php \ -- To view, visit https://gerrit.wikimedia.org/r/395186 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id2330ea78f277ff116af6ae077fe5bad5f76553c Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Rename message group id for github skins
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395030 ) Change subject: Rename message group id for github skins .. Rename message group id for github skins Cannot use 'mediawiki-' prefix as that would lead them being processed by wrong autosync. Change-Id: Ie1fcc14c283b67aa08c289bc8b0b3a410d00f25e --- M groups/MediaWiki/SkinsAgg.yaml M groups/MediaWiki/mwgithub.yaml M repoconfig.yaml 3 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/30/395030/1 diff --git a/groups/MediaWiki/SkinsAgg.yaml b/groups/MediaWiki/SkinsAgg.yaml index d1c383d..68b9ce5 100644 --- a/groups/MediaWiki/SkinsAgg.yaml +++ b/groups/MediaWiki/SkinsAgg.yaml @@ -13,4 +13,4 @@ GROUPS: - mediawiki-skin-* - - mediawiki-skingithub-* + - mwgithubskin-* diff --git a/groups/MediaWiki/mwgithub.yaml b/groups/MediaWiki/mwgithub.yaml index 6b395b2..4b869f2 100644 --- a/groups/MediaWiki/mwgithub.yaml +++ b/groups/MediaWiki/mwgithub.yaml @@ -279,7 +279,7 @@ --- BASIC: - id: mediawiki-skingithub-chameleon + id: mwgithubskin-chameleon label: Chameleon description: "{{Special:MyLanguage/MediaWiki:Chameleon-desc/en}}" @@ -368,7 +368,7 @@ --- BASIC: - id: mediawiki-skingithub-foreground + id: mwgithubskin-foreground label: Foreground description: "{{Special:MyLanguage/MediaWiki:foreground-desc/en}}" diff --git a/repoconfig.yaml b/repoconfig.yaml index 19dcd6e..67161e9 100644 --- a/repoconfig.yaml +++ b/repoconfig.yaml @@ -306,7 +306,7 @@ mwgithub: always-export-languages: en-ca,en-gb,es-formal,de-formal,de-at,de-ch,hu-formal,nl-informal - group: mwgithub-*,mediawiki-skingithub-* + group: mwgithub-*,mwgithub-skin-* repos: mwgithub/cmln/Chameleon: type: github -- To view, visit https://gerrit.wikimedia.org/r/395030 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie1fcc14c283b67aa08c289bc8b0b3a410d00f25e Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Fix group id for foreground
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395027 ) Change subject: Fix group id for foreground .. Fix group id for foreground Change-Id: I8fd45a632b908abba8d94da7ba574ad1f78d7eab --- M groups/MediaWiki/mwgithub.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/27/395027/1 diff --git a/groups/MediaWiki/mwgithub.yaml b/groups/MediaWiki/mwgithub.yaml index af58764..6b395b2 100644 --- a/groups/MediaWiki/mwgithub.yaml +++ b/groups/MediaWiki/mwgithub.yaml @@ -368,7 +368,7 @@ --- BASIC: - id: mediawiki-skingithub + id: mediawiki-skingithub-foreground label: Foreground description: "{{Special:MyLanguage/MediaWiki:foreground-desc/en}}" -- To view, visit https://gerrit.wikimedia.org/r/395027 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8fd45a632b908abba8d94da7ba574ad1f78d7eab Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Add Foreground skin
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395021 ) Change subject: Add Foreground skin .. Add Foreground skin Bug: T163448 Change-Id: Ieb62918d19f6523b43a57a13daa18b392e05c9de --- M groups/MediaWiki/mwgithub.yaml M repoconfig.yaml 2 files changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/21/395021/1 diff --git a/groups/MediaWiki/mwgithub.yaml b/groups/MediaWiki/mwgithub.yaml index 652776b..af58764 100644 --- a/groups/MediaWiki/mwgithub.yaml +++ b/groups/MediaWiki/mwgithub.yaml @@ -365,3 +365,14 @@ FILES: class: JsonFFS sourcePattern: "%GROUPROOT%/mwgithub/miraheze/ManageWiki/i18n/%CODE%.json" + +--- +BASIC: + id: mediawiki-skingithub + label: Foreground + description: "{{Special:MyLanguage/MediaWiki:foreground-desc/en}}" + +FILES: + class: JsonFFS + sourcePattern: "%GROUPROOT%/mwgithub/thingles/foreground/i18n/%CODE%.json" + diff --git a/repoconfig.yaml b/repoconfig.yaml index 0bd757e..19dcd6e 100644 --- a/repoconfig.yaml +++ b/repoconfig.yaml @@ -420,6 +420,10 @@ type: github url: https://github.com/SemanticMediaWiki/WhatsNearby.git url|export: g...@github.com:SemanticMediaWiki/WhatsNearby.git +mwgithub/thingles/foreground: + type: github + url: https://github.com/thingles/foreground.git + url|export: g...@github.com:thingles/foreground.git nfcring-control: group: nfcring-control -- To view, visit https://gerrit.wikimedia.org/r/395021 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieb62918d19f6523b43a57a13daa18b392e05c9de Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Add .git to these git URLs for consistency
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395014 ) Change subject: Add .git to these git URLs for consistency .. Add .git to these git URLs for consistency Change-Id: Id1ed31f71741ae49ac6975e9ff270b7081cd5ae5 --- M repoconfig.yaml 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/14/395014/1 diff --git a/repoconfig.yaml b/repoconfig.yaml index a7c718b..462807e 100644 --- a/repoconfig.yaml +++ b/repoconfig.yaml @@ -346,8 +346,8 @@ url|export: g...@github.com:Nikerabbit/mediawiki-extensions-FinnFrameNet.git mwgithub/OrganicDesign/extensions: type: github - url: https://github.com/OrganicDesign/extensions - url|export: g...@github.com:OrganicDesign/extensions + url: https://github.com/OrganicDesign/extensions.git + url|export: g...@github.com:OrganicDesign/extensions.git mwgithub/SemanticMediaWiki/SemanticBreadcrumbLinks: type: github url: https://github.com/SemanticMediaWiki/SemanticBreadcrumbLinks.git -- To view, visit https://gerrit.wikimedia.org/r/395014 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id1ed31f71741ae49ac6975e9ff270b7081cd5ae5 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Add CreateWiki and ManageWiki
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395013 ) Change subject: Add CreateWiki and ManageWiki .. Add CreateWiki and ManageWiki Change-Id: Ia16c58cc561df83a8d3d6990a4f824b9e05f65f1 --- M groups/MediaWiki/mwgithub.yaml M repoconfig.yaml 2 files changed, 28 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/13/395013/1 diff --git a/groups/MediaWiki/mwgithub.yaml b/groups/MediaWiki/mwgithub.yaml index 34421e2..652776b 100644 --- a/groups/MediaWiki/mwgithub.yaml +++ b/groups/MediaWiki/mwgithub.yaml @@ -345,3 +345,23 @@ prefix: purge- patterns: - "*" + +--- +BASIC: + id: mwgithub-createwiki + label: Create Wiki + description: "{{Special:MyLanguage/MediaWiki:createwiki-desc/en}}" + +FILES: + class: JsonFFS + sourcePattern: "%GROUPROOT%/mwgithub/miraheze/CreateWiki/i18n/%CODE%.json" + +--- +BASIC: + id: mwgithub-managewiki + label: Manage Wiki + description: "{{Special:MyLanguage/MediaWiki:managewiki-desc/en}}" + +FILES: + class: JsonFFS + sourcePattern: "%GROUPROOT%/mwgithub/miraheze/ManageWiki/i18n/%CODE%.json" diff --git a/repoconfig.yaml b/repoconfig.yaml index a7c718b..b103519 100644 --- a/repoconfig.yaml +++ b/repoconfig.yaml @@ -340,6 +340,14 @@ type: github url: https://github.com/JeroenDeDauw/Validator.git url|export: g...@github.com:JeroenDeDauw/Validator.git +mwgithub/miraheze/CreateWiki: + type: github + url: https://github.com/miraheze/CreateWiki.git + url|export: g...@github.com:miraheze/CreateWiki.git +mwgithub/miraheze/ManageWiki: + type: github + url: https://github.com/miraheze/ManageWiki.git + url|export: g...@github.com:miraheze/ManageWiki.git mwgithub/Nikerabbit/mediawiki-extensions-FinnFrameNet: type: github url: https://github.com/Nikerabbit/mediawiki-extensions-FinnFrameNet.git -- To view, visit https://gerrit.wikimedia.org/r/395013 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia16c58cc561df83a8d3d6990a4f824b9e05f65f1 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Viva il RepoNG!
Nikerabbit has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/394853 ) Change subject: Viva il RepoNG! .. Viva il RepoNG! Moved MediaWiki skins and extensions to RepoNG. This completes the migration of old scripts to RepoNG. Notice: extensions have been moved from mediawiki-extensions/extensions to one level up to mediawiki-extensions! Old extensions directory should be deleted afterwards. * Implemented @generator option so that list of repositories can be constructred dynamically. Generator must return JSON. * Created a script that creates repositories from mediawiki-extensions.txt or mediawiki-skins.txt by using the name or first part of file = ... declaration to figure out the name of the repository. * Some tweaks in TranslateSettings to simplify code. * Deleted bunch of now unused scripts. * Simplified repo{export,commit,update} scripts and removed repocreate. * Added list command to RepoNG so that we don't have to maintain EXTERNAL-PROJECTS, REPONG-PROJECTS or the list in nike-export-all anymore. * Increased parallelism in autosync scripts. * Added a small optimization in RepoNG exports so that we only run two scripts instead of three if always-export-languages is defined. * Removed --hours parameter from mediawiki and its extensions and skins. RepoNG should be fast enough for this. Change-Id: I04064dda5ab4f2ad1de00bf50010586864658d9c --- M TranslateSettings.php D bin/EXTERNAL-PROJECTS D bin/REPONG-PROJECTS D bin/add-extensions M bin/autosync-mediawiki.sh M bin/autosync.sh D bin/export-by-prefix M bin/nike-export-all M bin/repocommit D bin/repocreate M bin/repoexport M bin/repoupdate D bin/update-externals A groups/MediaWiki/repong-generator.php M repoconfig.yaml M repong/repong.php 16 files changed, 122 insertions(+), 402 deletions(-) Approvals: jenkins-bot: Verified Nikerabbit: Looks good to me, approved diff --git a/TranslateSettings.php b/TranslateSettings.php index 21a074a..ad5dfb4 100644 --- a/TranslateSettings.php +++ b/TranslateSettings.php @@ -98,47 +98,31 @@ $deps[] = new FileDependency( realpath( $code ) ); }; -$wgHooks['TranslatePostInitGroups'][] = [ 'setupMediaWikiExtensions' ]; -function setupMediaWikiExtensions( &$list, &$deps, &$autoload ) { - global $GROUPS; - +$wgHooks['TranslatePostInitGroups'][] = function ( &$list, &$deps, &$autoload ) use ( $GROUPS ) { $def = "$GROUPS/MediaWiki/mediawiki-extensions.txt"; - $path = '%GROUPROOT%/mediawiki-extensions/extensions/'; + $path = '%GROUPROOT%/mediawiki-extensions/'; $foo = new PremadeMediawikiExtensionGroups( $def, $path ); $foo->register( $list, $deps, $autoload ); +}; - return true; -} - -$wgHooks['TranslatePostInitGroups'][] = [ 'setupMediaWikiSkins' ]; -function setupMediaWikiSkins( &$list, &$deps, &$autoload ) { - global $GROUPS; - +$wgHooks['TranslatePostInitGroups'][] = function ( &$list, &$deps, &$autoload ) use ( $GROUPS ) { $def = "$GROUPS/MediaWiki/mediawiki-skins.txt"; $path = '%GROUPROOT%/mediawiki-skins/'; $foo = new PremadeMediawikiExtensionGroups( $def, $path ); - $foo->setNamespace( NS_MEDIAWIKI ); $foo->setGroupPrefix( 'mediawiki-skin-' ); $foo->setUseConfigure( false ); $foo->register( $list, $deps, $autoload ); +}; - return true; -} - -$wgHooks['TranslatePostInitGroups'][] = [ 'setupIntuition' ]; -function setupIntuition( &$list, &$deps, &$autoload ) { - global $GROUPS; - +$wgHooks['TranslatePostInitGroups'][] = function ( &$list, &$deps, &$autoload ) use ( $GROUPS ) { $def = "$GROUPS/Intuition/intuition-textdomains.txt"; $path = '%GROUPROOT%/intuition/language/messages/'; $foo = new PremadeIntuitionTextdomains( $def, $path ); $foo->register( $list, $deps, $autoload ); - - return true; -} +}; $wgTranslateAuthorBlacklist[] = [ 'black', '/^.*;.*;(Andre Engels|Gangleri|Jon Harald Søby|IAlex|M.M.S.|BotMultichill|Nike|Piivaat|Raymond|RobertL|SieBot|Siebrand|SPQRobin|Suradnik13|Verdy p)$/Ui' ]; $wgTranslateAuthorBlacklist[] = [ 'black', '/^.*;da;(Wegge|Morten)$/Ui' ]; # are both credited under other names diff --git a/bin/EXTERNAL-PROJECTS b/bin/EXTERNAL-PROJECTS deleted file mode 100644 index 203a3e1..000 --- a/bin/EXTERNAL-PROJECTS +++ /dev/null @@ -1,47 +0,0 @@ -blockly -citationhunt -codev -commons-android -copypatrol -crosswatch -dissemin -eol -etherpad-lite -freecol -fudforum -gapfinder -hivejs -huggle -ia-upload -inaturalist -internetarchivebot -intuition -intuition-tools -jquery.uls -kiwix -lib.reviews -mantis -mathjax -mifos -mwgerrit -mwgithub -nfcring-control -nocc -oppia -osm -pageviews -proveit -pywikibot -vicuna -video2commons -waymarked-trails-site -wiki-ai -wikiblame -wikidata -wikiedudashboard -wikimania -wikimedia-portals -wikinity -wikipedia-android -wikipedia-ios -xtools diff --git a/bin
[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: Add MessageIndex::getKeys()
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/394960 ) Change subject: Add MessageIndex::getKeys() .. Add MessageIndex::getKeys() And optimize the implementation in CdbMessageIndex. Trying to fix a timeout in Special:TranslationStash by using the optimized getKeys(). Change-Id: I92eeaa38279053ea2fbf5dac5ec2412670312735 --- M messagegroups/SandboxMessageGroup.php M utils/MessageIndex.php 2 files changed, 19 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/60/394960/1 diff --git a/messagegroups/SandboxMessageGroup.php b/messagegroups/SandboxMessageGroup.php index 6628128..6fcd47f 100644 --- a/messagegroups/SandboxMessageGroup.php +++ b/messagegroups/SandboxMessageGroup.php @@ -77,10 +77,8 @@ $list[$index] = ''; } - // Message index of all known messages - $mi = MessageIndex::singleton(); // Get some random keys - $all = array_keys( $mi->retrieve() ); + $all = MessageIndex::singleton->getKeys(); // In case there aren't any messages if ( $all === [] ) { return $list; diff --git a/utils/MessageIndex.php b/utils/MessageIndex.php index 3d132f9..6ccbed6 100644 --- a/utils/MessageIndex.php +++ b/utils/MessageIndex.php @@ -126,6 +126,13 @@ */ abstract public function retrieve( $forRebuild = false ); + /** +* @since 2018.01 +*/ + public function getKeys() { + return array_keys( $this->retrieve() ); + } + abstract protected function store( array $array, array $diff ); protected function lock() { @@ -615,6 +622,16 @@ return $this->index; } + $this->index = []; + foreach ( $this->getKeys() as $key ) { + $this->index[$key] = $this->unserialize( $reader->get( $key ) ); + } + + return $this->index; + } + + public function getKeys() { + $reader = $this->getReader(); $keys = []; while ( true ) { $key = $keys === [] ? $reader->firstkey() : $reader->nextkey(); @@ -624,12 +641,7 @@ $keys[] = $key; } - $this->index = []; - foreach ( $keys as $key ) { - $this->index[$key] = $this->unserialize( $reader->get( $key ) ); - } - - return $this->index; + return $keys; } protected function get( $key ) { -- To view, visit https://gerrit.wikimedia.org/r/394960 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I92eeaa38279053ea2fbf5dac5ec2412670312735 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove unuseful debug messages
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/394959 ) Change subject: Remove unuseful debug messages .. Remove unuseful debug messages I spotted one of these in my debug log. Without context it is not useful nor informative. Given it can actually come from tree places, it is useless. Change-Id: Ic293d8944e9a1a8152c5a5e0b695c5ddc07ee6aa --- M includes/context/RequestContext.php M includes/media/SVG.php M includes/resourceloader/ResourceLoaderContext.php 3 files changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/59/394959/1 diff --git a/includes/context/RequestContext.php b/includes/context/RequestContext.php index 7cabd40..c2d0de1 100644 --- a/includes/context/RequestContext.php +++ b/includes/context/RequestContext.php @@ -308,7 +308,6 @@ # Validate $code if ( !$code || !Language::isValidCode( $code ) || $code === 'qqq' ) { - wfDebug( "Invalid user language code\n" ); $code = $wgLanguageCode; } diff --git a/includes/media/SVG.php b/includes/media/SVG.php index 2b13893..0dba57a 100644 --- a/includes/media/SVG.php +++ b/includes/media/SVG.php @@ -511,7 +511,6 @@ } elseif ( $name == 'lang' ) { // Validate $code if ( $value === '' || !Language::isValidCode( $value ) ) { - wfDebug( "Invalid user language code\n" ); return false; } diff --git a/includes/resourceloader/ResourceLoaderContext.php b/includes/resourceloader/ResourceLoaderContext.php index cbb0bec..7478266 100644 --- a/includes/resourceloader/ResourceLoaderContext.php +++ b/includes/resourceloader/ResourceLoaderContext.php @@ -182,7 +182,6 @@ $lang = $this->getRequest()->getRawVal( 'lang', '' ); // Stricter version of RequestContext::sanitizeLangCode() if ( !Language::isValidBuiltInCode( $lang ) ) { - wfDebug( "Invalid user language code\n" ); $lang = $this->getResourceLoader()->getConfig()->get( 'LanguageCode' ); } $this->language = $lang; -- To view, visit https://gerrit.wikimedia.org/r/394959 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic293d8944e9a1a8152c5a5e0b695c5ddc07ee6aa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: CdbMessageIndex: do not store keys twice
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/394950 ) Change subject: CdbMessageIndex: do not store keys twice .. CdbMessageIndex: do not store keys twice The CDB supports fetching the keys from the file. There is no need to store the keys separately using #keys. Using the native interface is both faster (because we do not need to serialize array of 75k values) and saves space. Change-Id: Ibd09ce9091e0251fa04f833624bff7a7a4a08f48 --- M utils/MessageIndex.php 1 file changed, 10 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/50/394950/1 diff --git a/utils/MessageIndex.php b/utils/MessageIndex.php index 2e40718..cf81ce4 100644 --- a/utils/MessageIndex.php +++ b/utils/MessageIndex.php @@ -615,7 +615,16 @@ return $this->index; } - $keys = (array)$this->unserialize( $reader->get( '#keys' ) ); + $keys = []; + $key = $reader->firstkey(); + if ( $key !== false ) { + $keys[] = $key; + } + + while ( $key = $reader->nextkey() !== false ) { + $keys[] = $key; + } + $this->index = []; foreach ( $keys as $key ) { $this->index[$key] = $this->unserialize( $reader->get( $key ) ); @@ -650,8 +659,6 @@ $file = TranslateUtils::cacheFile( $this->filename ); $cache = \Cdb\Writer::open( $file ); - $keys = array_keys( $array ); - $cache->set( '#keys', $this->serialize( $keys ) ); foreach ( $array as $key => $value ) { $value = $this->serialize( $value ); -- To view, visit https://gerrit.wikimedia.org/r/394950 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibd09ce9091e0251fa04f833624bff7a7a4a08f48 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Add rudimentary state synchronization
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/394864 ) Change subject: Add rudimentary state synchronization .. Add rudimentary state synchronization The purpose is to prevent accidental overriding of commits that happen between our last synchronization to translatewiki.net and us exporting those changes. For example: 1. Update read-only repo 2. Synchronize into the wiki 3. Update read-write repo 4. Export and commit translations In step 3 the read-write repo could get ahead of the read-only repo. Now, if possible, we read the git commit from step 1 to reduce the likelyhood. This is not completely safe yet, because there is no guarantee that step 2 has happened. For humans this should be fairly obvious, because our scripts always alert after step 1 (which is automatized) that there are pending changes to check. For fully automatic exports this is not safe enough. Step 4 is amended to attempt automatic rebase before pushing to avoid failing on non-conflicting changes. Removed update-reset-repo which is now enhanced and inlined in clupdate-git-repo. State synchronization is not really possible when we are committing to a different branch or repository. Different branch is detected automatically and state is not synchronized then. For different repos there is new option no-state-sync that can be set to disable synching. This commit uses the null coalescing operator (??) available in PHP7 and HHVM. Change-Id: I979cbc20f31cf827a58bfd0fdd9ca2a7803ae345 --- M bin/clupdate-git-repo D bin/update-reset-repo M repoconfig.yaml M repong/repong.php 4 files changed, 47 insertions(+), 43 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/64/394864/1 diff --git a/bin/clupdate-git-repo b/bin/clupdate-git-repo index bff3343..018362b 100755 --- a/bin/clupdate-git-repo +++ b/bin/clupdate-git-repo @@ -10,11 +10,17 @@ URL=$1 DIR=$2 BRANCH=${3:-master} +COMMIT=${4:-origin/$BRANCH} if [ -d "$DIR/.git" ] -then - "$DIRSCRIPT/update-reset-repo" "$DIR" "" "$BRANCH" -else +then ( + cd $DIR + git rebase --abort &>/dev/null || : + git checkout -qf "$BRANCH" + git fetch -q + git reset -q --hard "$COMMIT" + git clean -q -f -d &>/dev/null +) else git clone "$URL" "$DIR" -b "$BRANCH" if [ "$ME" = 'clupdate-gerrit-repo' ] diff --git a/bin/update-reset-repo b/bin/update-reset-repo deleted file mode 100755 index 900fb56..000 --- a/bin/update-reset-repo +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -set -e - -# Allow for passing a base path and repo folder name in two parameters -# or a single full path as parameter. -if [ $# -eq 2 ] -then - # Concatenate base path and folder name - DIR=$1/$2 -else - DIR=$1 -fi - -BRANCH=${3:-master} - -# Updates the repository in the current directory and resets it. -# Sets OUTPUT to the output of the git operations -# Sets CODE to the return value of the pipeline. -update_reset() { - OUTPUT=$(git fetch -q && git reset -q --hard origin/$BRANCH && git clean -q -f -d 2>&1 >&-) - CODE=$? -} - -cd $DIR -update_reset - -if [ $CODE -ne 0 ]; then - cd $DIR - echo "Retry $DIR" - update_reset - if [ $CODE -ne 0 ]; then - printf "\033[31m%s failed to update\033[0m\n" "$DIR"; - echo $OUTPUT; - fi -fi diff --git a/repoconfig.yaml b/repoconfig.yaml index 9493bb9..a7c718b 100644 --- a/repoconfig.yaml +++ b/repoconfig.yaml @@ -2,6 +2,7 @@ '@meta': export: php /srv/mediawiki/targets/production/extensions/Translate/scripts/export.php expand: php /srv/mediawiki/targets/production/extensions/Translate/scripts/expand-groupspec.php --exportable + state-directory|export: /resources/projects blockly: group: out-blockly* diff --git a/repong/repong.php b/repong/repong.php index 9b4ab4c..c034271 100644 --- a/repong/repong.php +++ b/repong/repong.php @@ -235,15 +235,41 @@ protected function execute( InputInterface $input, OutputInterface $output ) { $project = $input->getArgument( 'project' ); $variant = $input->getOption( 'variant' ) ?: $this->defaultVariant; + $defaultConfig = $this->getConfig( $project, $this->defaultVariant ); $config = $this->getConfig( $project, $variant ); + $meta = $this->getConfig( '@meta', $variant ); $base = $this->getBase(); $bindir = $this->bindir; + // Without state synchronization, the repository we make commits + // could be ahead of the state that has been processed in the wiki. + // With state synchronization we ensure we do not overwrite any + // changes that have been made in the between. + $stateDir = isset( $meta[ 'state-directory' ] ) ? $meta[ 'state-directory' ] : false; $
[MediaWiki-commits] [Gerrit] translatewiki[master]: Viva il RepoNG!
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/394853 ) Change subject: Viva il RepoNG! .. Viva il RepoNG! Moved MediaWiki skins and extensions to RepoNG. This completes the migration of old scripts to RepoNG. Notice: extensions have been moved from mediawiki-extensions/extensions to one level up to mediawiki-extensions! Old extensions directory should be deleted afterwards. * Implemented @generator option so that list of repositories can be constructred dynamically. Generator must return JSON. * Created a script that creates repositories from mediawiki-extensions.txt or mediawiki-skins.txt by using the name or first part of file = ... declaration to figure out the name of the repository. * Some tweaks in TranslateSettings to simplify code. * Deleted bunch of now unused scripts. * Simplified repo{export,commit,update} scripts and removed repocreate. * Added list command to RepoNG so that we don't have to maintain EXTERNAL-PROJECTS, REPONG-PROJECTS or the list in nike-export-all anymore. * Increased parallelism in autosync scripts. * Added a small optimization in RepoNG exports so that we only run two scripts instead of three if always-export-languages is defined. * Removed --hours parameter from mediawiki and its extensions and skins. RepoNG should be fast enough for this. Change-Id: I04064dda5ab4f2ad1de00bf50010586864658d9c --- M TranslateSettings.php D bin/EXTERNAL-PROJECTS D bin/REPONG-PROJECTS D bin/add-extensions M bin/autosync-mediawiki.sh M bin/autosync.sh D bin/export-by-prefix M bin/nike-export-all M bin/repocommit D bin/repocreate M bin/repoexport M bin/repoupdate D bin/update-externals A groups/MediaWiki/repong-generator.php M repoconfig.yaml M repong/repong.php 16 files changed, 119 insertions(+), 399 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/53/394853/1 diff --git a/TranslateSettings.php b/TranslateSettings.php index 21a074a..869d51a 100644 --- a/TranslateSettings.php +++ b/TranslateSettings.php @@ -98,46 +98,30 @@ $deps[] = new FileDependency( realpath( $code ) ); }; -$wgHooks['TranslatePostInitGroups'][] = [ 'setupMediaWikiExtensions' ]; -function setupMediaWikiExtensions( &$list, &$deps, &$autoload ) { - global $GROUPS; - +$wgHooks['TranslatePostInitGroups'][] = function ( &$list, &$deps, &$autoload ) use ( $GROUPS ) { $def = "$GROUPS/MediaWiki/mediawiki-extensions.txt"; - $path = '%GROUPROOT%/mediawiki-extensions/extensions/'; + $path = '%GROUPROOT%/mediawiki-extensions/'; $foo = new PremadeMediawikiExtensionGroups( $def, $path ); $foo->register( $list, $deps, $autoload ); - - return true; } -$wgHooks['TranslatePostInitGroups'][] = [ 'setupMediaWikiSkins' ]; -function setupMediaWikiSkins( &$list, &$deps, &$autoload ) { - global $GROUPS; - +$wgHooks['TranslatePostInitGroups'][] = function ( &$list, &$deps, &$autoload ) use ( $GROUPS ) { $def = "$GROUPS/MediaWiki/mediawiki-skins.txt"; $path = '%GROUPROOT%/mediawiki-skins/'; $foo = new PremadeMediawikiExtensionGroups( $def, $path ); - $foo->setNamespace( NS_MEDIAWIKI ); $foo->setGroupPrefix( 'mediawiki-skin-' ); $foo->setUseConfigure( false ); $foo->register( $list, $deps, $autoload ); - - return true; } -$wgHooks['TranslatePostInitGroups'][] = [ 'setupIntuition' ]; -function setupIntuition( &$list, &$deps, &$autoload ) { - global $GROUPS; - +$wgHooks['TranslatePostInitGroups'][] = function ( &$list, &$deps, &$autoload ) use ( $GROUPS ) { $def = "$GROUPS/Intuition/intuition-textdomains.txt"; $path = '%GROUPROOT%/intuition/language/messages/'; $foo = new PremadeIntuitionTextdomains( $def, $path ); $foo->register( $list, $deps, $autoload ); - - return true; } $wgTranslateAuthorBlacklist[] = [ 'black', '/^.*;.*;(Andre Engels|Gangleri|Jon Harald Søby|IAlex|M.M.S.|BotMultichill|Nike|Piivaat|Raymond|RobertL|SieBot|Siebrand|SPQRobin|Suradnik13|Verdy p)$/Ui' ]; diff --git a/bin/EXTERNAL-PROJECTS b/bin/EXTERNAL-PROJECTS deleted file mode 100644 index 203a3e1..000 --- a/bin/EXTERNAL-PROJECTS +++ /dev/null @@ -1,47 +0,0 @@ -blockly -citationhunt -codev -commons-android -copypatrol -crosswatch -dissemin -eol -etherpad-lite -freecol -fudforum -gapfinder -hivejs -huggle -ia-upload -inaturalist -internetarchivebot -intuition -intuition-tools -jquery.uls -kiwix -lib.reviews -mantis -mathjax -mifos -mwgerrit -mwgithub -nfcring-control -nocc -oppia -osm -pageviews -proveit -pywikibot -vicuna -video2commons -waymarked-trails-site -wiki-ai -wikiblame -wikidata -wikiedudashboard -wikimania -wikimedia-portals -wikinity -wikipedia-android -wikipedia-ios -xtools diff --git a/bin/REPONG-PROJECTS b/bin/REPONG-PROJECTS deleted file mode 100644 index 5d71130..000 --- a/bin/REPONG-PROJECTS +++ /dev/null @
[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: Remove MediawikiExtensionFFS
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/394850 ) Change subject: Remove MediawikiExtensionFFS .. Remove MediawikiExtensionFFS * All extensions have been converted to JsonFFS * It is a bad format and I want to discourage its use Change-Id: I7e5d96d0a6d4081672e15db85358c2aa0573f046 --- D ffs/MediaWikiExtensionFFS.php M ffs/MediaWikiExtensions.php M tests/phpunit/MediaWikiExtensionTest.php D tests/phpunit/data/MediaWikiExtensionTest-conf1.yaml M tests/phpunit/data/MediaWikiExtensionTest-conf2.yaml M tests/phpunit/data/MediaWikiExtensionTest-conf4.yaml M tests/phpunit/data/mediawiki-extensions.txt D tests/phpunit/ffs/MediaWikiExtensionFFSTest.php 8 files changed, 7 insertions(+), 462 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/50/394850/1 diff --git a/ffs/MediaWikiExtensionFFS.php b/ffs/MediaWikiExtensionFFS.php deleted file mode 100644 index a1aef9d..000 --- a/ffs/MediaWikiExtensionFFS.php +++ /dev/null @@ -1,288 +0,0 @@ -group->getSourceFilePath( $code ); - if ( !file_exists( $filename ) ) { - return false; - } - - if ( isset( self::$cache[$filename]['parsed'][$code] ) ) { - return self::$cache[$filename]['parsed'][$code]; - } - - if ( !isset( self::$cache[$filename] ) ) { - // Clear the cache if the filename changes to reduce memory use - self::$cache = []; - - $contents = file_get_contents( $filename ); - self::$cache[$filename]['sections'] = - $this->splitSections( $contents, $filename ); - } - - // Shorten - $cache = &self::$cache[$filename]; - - $value = false; - if ( isset( $cache['sections'][$code] ) ) { - $value = $this->readFromVariable( $cache['sections'][$code] ); - } - - $cache['parsed'][$code] = $value; - - return $value; - } - - /** -* @param string $data -* @return array Parsed data. -* @throws MWException -*/ - public function readFromVariable( $data ) { - $messages = []; - eval( $data ); - - $c = count( $messages ); - if ( $c !== 1 ) { - throw new MWException( "MWEFFS3: Expected 1, got $c: $data" ); - } - - $messages = array_shift( $messages ); - $mangler = $this->group->getMangler(); - $messages = $mangler->mangle( $messages ); - - return [ - 'MESSAGES' => $messages, - ]; - } - - // Handled in writeReal - protected function tryReadSource( $filename, MessageCollection $collection ) { - } - - /** -* @param MessageCollection $collection -* @return string -*/ - protected function writeReal( MessageCollection $collection ) { - $mangler = $this->group->getMangler(); - $code = $collection->getLanguage(); - - $block = $this->generateMessageBlock( $collection, $mangler ); - if ( $block === false ) { - return ''; - } - - // Ugly code, relies on side effects - // Avoid parsing stuff with fake language code - // Premature optimization - $this->read( 'mul' ); - $filename = $this->group->getSourceFilePath( $code ); - $cache = &self::$cache[$filename]; - - // Generating authors - if ( isset( $cache['sections'][$code] ) ) { - // More premature optimization - $fromFile = self::parseAuthorsFromString( $cache['sections'][$code] ); - $collection->addCollectionAuthors( $fromFile ); - } - - $authors = $collection->getAuthors(); - $authors = $this->filterAuthors( $authors, $code ); - - $authorList = ''; - foreach ( $authors as $author ) { - $authorList .= "\n * @author $author"; - } - - // And putting all together - $name = TranslateUtils::getLanguageName( $code ); - $native = TranslateUtils::getLanguageName( $code, $code ); - - $section = <getSourceLanguage(), - $wgTranslateDocumentationLanguageCode, - ]; - foreach ( $codes as $pcode ) { - if ( isset( $sections[$pcode] ) ) { - $priority[] = $sections[$pcode]; - unset( $sec
[MediaWiki-commits] [Gerrit] translatewiki[master]: Drop iHRIS
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/394319 ) Change subject: Drop iHRIS .. Drop iHRIS Last release in 2015-09-24 Change-Id: I2e0999b7561a625ae923a584d6bc273a768bf2dc --- M REPOCONF M REPOCONF.commit M TranslateSettings.php M bin/EXTERNAL-PROJECTS M bin/repocommit M bin/repocreate M bin/repoexport M bin/repoupdate M bin/twn-wikistats D groups/IHRIS/IHRIS.yaml D groups/IHRIS/IHRISCommon.yaml D groups/IHRIS/IHRISI2ce.yaml D groups/IHRIS/IHRISManage.yaml D groups/IHRIS/IHRISQualify.yaml D groups/IHRIS/IHRISTrain.yaml D groups/IHRIS/Suggester.php 16 files changed, 5 insertions(+), 2,554 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/19/394319/1 diff --git a/REPOCONF b/REPOCONF index b1f4826..f103469 100644 --- a/REPOCONF +++ b/REPOCONF @@ -3,7 +3,3 @@ REPO_MWEXTGIT=https://gerrit.wikimedia.org/r/p/mediawiki/extensions REPO_MWSKINGIT=https://gerrit.wikimedia.org/r/p/mediawiki/skins - -REPO_IHRIS=http://bazaar.launchpad.net/~intrahealth%2Binformatics -REPO_IHRIS_BRANCH="4.2-dev" -REPO_IHRIS_MODULES="i2ce ihris-common ihris-manage ihris-qualify ihris-train" diff --git a/REPOCONF.commit b/REPOCONF.commit index 6229e2c..d3449c1 100644 --- a/REPOCONF.commit +++ b/REPOCONF.commit @@ -4,8 +4,3 @@ # MediaWiki REPO_MWEXTGIT=ssh://l10n-...@gerrit.wikimedia.org:29418/mediawiki/extensions REPO_MWSKINGIT=ssh://l10n-...@gerrit.wikimedia.org:29418/mediawiki/skins - -# other -REPO_IHRIS=http://bazaar.launchpad.net/~intrahealth%2Binformatics -REPO_IHRIS_BRANCH="4.2" -REPO_IHRIS_MODULES="i2ce ihris-common ihris-manage ihris-qualify ihris-train" diff --git a/TranslateSettings.php b/TranslateSettings.php index 20957c0..21a074a 100644 --- a/TranslateSettings.php +++ b/TranslateSettings.php @@ -313,17 +313,8 @@ # No longer in use. wfAddNamespace( 1226, 'Shapado' ); +# No longer in use. wfAddNamespace( 1228, 'iHRIS' ); -$wgTranslateGroupFiles[] = "$GROUPS/IHRIS/IHRISCommon.yaml"; -$wgTranslateGroupFiles[] = "$GROUPS/IHRIS/IHRISI2ce.yaml"; -$wgTranslateGroupFiles[] = "$GROUPS/IHRIS/IHRISManage.yaml"; -$wgTranslateGroupFiles[] = "$GROUPS/IHRIS/IHRISQualify.yaml"; -$wgTranslateGroupFiles[] = "$GROUPS/IHRIS/IHRISTrain.yaml"; -$wgTranslateGroupFiles[] = "$GROUPS/IHRIS/IHRIS.yaml"; -$wgTranslateSupportUrlNamespace[NS_IHRIS] = [ - 'page' => 'Translating_talk:iHRIS', - 'params' => $lqtParams, -]; wfAddNamespace( 1230, 'Mifos' ); $wgTranslateGroupFiles[] = "$GROUPS/Mifos/Mifos.yaml"; diff --git a/bin/EXTERNAL-PROJECTS b/bin/EXTERNAL-PROJECTS index 1419956..203a3e1 100644 --- a/bin/EXTERNAL-PROJECTS +++ b/bin/EXTERNAL-PROJECTS @@ -13,7 +13,6 @@ hivejs huggle ia-upload -ihris inaturalist internetarchivebot intuition diff --git a/bin/repocommit b/bin/repocommit index ab890b4..820a61d 100755 --- a/bin/repocommit +++ b/bin/repocommit @@ -14,13 +14,6 @@ COMMITMSG="Localisation updates from https://translatewiki.net."; -gitCommit() { - cd "$1" - git add . - git commit -m "$COMMITMSG" - git push origin "${2:-master}" -} - gitCommitGerrit() { cd $1 git add . @@ -36,16 +29,7 @@ fi done -if [ "$PROJECT" = "ihris" ] -then - for MODULE in $REPO_IHRIS_MODULES - do - cd "$DIR/$PROJECT/$MODULE" - bzr add . - bzr commit -m "$COMMITMSG" - done - -elif [ "$PROJECT" = "mediawiki-extensions" ] +if [ "$PROJECT" = "mediawiki-extensions" ] then for i in `ls "$DIR/$PROJECT/extensions"` do diff --git a/bin/repocreate b/bin/repocreate index 9552432..ebf9877 100755 --- a/bin/repocreate +++ b/bin/repocreate @@ -13,32 +13,7 @@ echo "$(date --rfc-3339=seconds --utc) [$(whoami) at $DIR] $0 $@" >> ${DIRLOG} -checkVar() { - if [ -z "${!1}" ] - then echo "Add ${1} to REPOCONF"; exit 1 - fi -} - -if [ "$PROJECT" = "ihris" ] -then - checkVar 'REPO_IHRIS_MODULES' - mkdir $PROJECT - cd $PROJECT - for MODULE in $REPO_IHRIS_MODULES - do - if [ "$REPO_RW" = "yes" ] - then - bzr checkout lp:${MODULE}/${REPO_IHRIS_BRANCH} ${MODULE} - else - bzr branch ${REPO_IHRIS}/${MODULE}/${REPO_IHRIS_BRANCH}/ ${MODULE} - fi - - cd ${MODULE} - bzr pull --remember `bzr info |grep "checkout of branch" |cut -d" " -f 6` - cd .. - done - -elif [ "$PROJECT" = "mediawiki-extensions" ] +if [ "$PROJECT" = "mediawiki-extensions" ] then mkdir -p $PROJECT/extensions diff --git a/bin/repoexport b/bin/repoexport index 2d93c65..bf007e3 100755 --- a/bin/repoexport +++ b/bin/repoexport @@ -5,7 +5,6 @@ DIRSCRIPT="`( cd \"$DIRSCRIPT\" && pwd )`" DIRLOG=/home/betawiki/logs/repo PROJECT=$1 -WIKI=/srv/mediawiki/targets/production DIR=$2 : ${DIR:=`pwd`} @@ -13,10 +12,6 @@ cd
[MediaWiki-commits] [Gerrit] translatewiki[master]: Add Bazaar support to RepoNG
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/394315 ) Change subject: Add Bazaar support to RepoNG .. Add Bazaar support to RepoNG Untested Change-Id: Icaaa5ca3058a7196a83b4de20c6f347b0c0f37ef --- A bin/clupdate-bzr-repo M repong/repong.php 2 files changed, 22 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/15/394315/1 diff --git a/bin/clupdate-bzr-repo b/bin/clupdate-bzr-repo new file mode 100644 index 000..1153500 --- /dev/null +++ b/bin/clupdate-bzr-repo @@ -0,0 +1,16 @@ +#!/bin/bash +set -e +set -u + +URL=$1 +DIR=$2 +BRANCH=${3:-master} + +if [ -d "$DIR/.bzr" ] +then + cd "$DIR" +bzr revert --quiet + bzr pull "$BRANCH" --quiet --overwrite +else + bzr checkout ${URL}/${BRANCH} "$DIR" +fi diff --git a/repong/repong.php b/repong/repong.php index c58863f..851af4f 100644 --- a/repong/repong.php +++ b/repong/repong.php @@ -241,6 +241,8 @@ $command = "$bindir/clupdate-gerrit-repo '{$repo['url']}' '$base/$name' '$branch'"; } elseif ( $type === 'svn' ) { $command = "$bindir/clupdate-svn-repo '{$repo['url']}' '$base/$name'"; + } elseif ( $type === 'bzr' ) { + $command = "$bindir/clupdate-bzr-repo '{$repo['url']}' '$base/$name' '$branch'"; } else { throw new RuntimeException( 'Unknown repo type' ); } @@ -373,6 +375,10 @@ "cd '$dir'; " . "svn add --force * --auto-props --parents --depth infinity -q$extra; " . "svn commit --message '$message'"; + } elseif ( $repo['type'] === 'bzr' ) { + $dir = "$base/$name"; + $branch = isset( $repo['branch'] ) ? $repo['branch'] : 'master'; + $command = "cd '$dir'; bzr add .;bzr commit -m '$message'"; } else { throw new RuntimeException( 'Unknown repo type' ); } -- To view, visit https://gerrit.wikimedia.org/r/394315 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icaaa5ca3058a7196a83b4de20c6f347b0c0f37ef Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Merge repoconfig.yaml and repoconfig.commit.yaml
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/394294 ) Change subject: Merge repoconfig.yaml and repoconfig.commit.yaml .. Merge repoconfig.yaml and repoconfig.commit.yaml One config can now have multiple different variants. Variant name is given after | character. Variant overrides must be set after the default value (without any variant) is set. Variants can be set at any point in the structure. New repoconfig.yaml is generated programmatically by merging the two files. Variant can be choosen with the --variant option. If no value is specified for that variant, it will fallback to the default value. I hacked the repo* scripts to support VARIANT environment variable so that one now has to do VARIANT=export repoupdate foo (similarly for repoexport and repocommit) when exporting. Change-Id: Ia4638c1e2688c4e2af29d45b9f82ec31a20cb26a --- M bin/nike-export-all M bin/repo M bin/repocommit M bin/repoexport M bin/repoupdate M repoconfig.yaml M repong/repong.php 7 files changed, 146 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/94/394294/1 diff --git a/bin/nike-export-all b/bin/nike-export-all index e6e65df..0496501 100755 --- a/bin/nike-export-all +++ b/bin/nike-export-all @@ -59,6 +59,7 @@ ( eval `ssh-agent -s` ssh-add /home/betawiki/id_rsa + export VARIANT=export for i in $PROJECTS; do echo "${_b}$i${b_}" diff --git a/bin/repo b/bin/repo index 41705fa..4065e22 100755 --- a/bin/repo +++ b/bin/repo @@ -12,4 +12,5 @@ echo "$(date --rfc-3339=seconds --utc) [$(whoami) at $DIR] $0 $@" >> ${DIRLOG} +unset VARIANT sudo -u betawiki "${DIRSCRIPT}/repo$COMMAND" "$PROJECT" "$DIR" diff --git a/bin/repocommit b/bin/repocommit index ab890b4..21b8547 100755 --- a/bin/repocommit +++ b/bin/repocommit @@ -31,7 +31,7 @@ for i in $REPONG; do if [ "$i" = "$PROJECT" ] then - php "$DIRSCRIPT/../repong/repong.php" commit "$PROJECT" + php "$DIRSCRIPT/../repong/repong.php" commit "$PROJECT" --variant "${VARIANT:-default}" exit 0 fi done diff --git a/bin/repoexport b/bin/repoexport index 88e4fc6..5752b15 100755 --- a/bin/repoexport +++ b/bin/repoexport @@ -22,8 +22,8 @@ for i in $REPONG; do if [ "$i" = "$PROJECT" ] then - php "$DIRSCRIPT/../repong/repong.php" export "$PROJECT" - exit 0; + php "$DIRSCRIPT/../repong/repong.php" export "$PROJECT" --variant "${VARIANT:-default}" + exit 0 fi done diff --git a/bin/repoupdate b/bin/repoupdate index f4dc17a..38d3a9d 100755 --- a/bin/repoupdate +++ b/bin/repoupdate @@ -48,7 +48,7 @@ for i in $REPONG; do if [ "$i" = "$PROJECT" ] then - php "$DIRSCRIPT/../repong/repong.php" update "$PROJECT" + php "$DIRSCRIPT/../repong/repong.php" update "$PROJECT" --variant "${VARIANT:-default}" exit 0 fi done diff --git a/repoconfig.yaml b/repoconfig.yaml index f5f4658..c8618f4 100644 --- a/repoconfig.yaml +++ b/repoconfig.yaml @@ -9,9 +9,11 @@ blockly: type: github url: https://github.com/google/blockly.git + url|export: g...@github.com:google/blockly.git blockly-games: type: github url: https://github.com/google/blockly-games.git + url|export: g...@github.com:google/blockly-games.git citationhunt: group: citationhunt @@ -19,6 +21,7 @@ citationhunt: type: github url: https://github.com/eggpi/citationhunt.git + url|export: g...@github.com:eggpi/citationhunt.git codev: group: codev @@ -26,6 +29,7 @@ codev: type: github url: https://github.com/mantisbt-plugins/codev.git + url|export: g...@github.com:mantisbt-plugins/codev.git commons-android: group: commons-android-* @@ -34,6 +38,7 @@ commons-android: type: github url: https://github.com/commons-app/apps-android-commons.git + url|export: g...@github.com:commons-app/apps-android-commons.git copypatrol: group: copypatrol @@ -41,6 +46,7 @@ copypatrol: type: github url: https://github.com/wikimedia/CopyPatrol.git + url|export: g...@github.com:wikimedia/CopyPatrol.git crosswatch: group: crosswatch @@ -48,6 +54,7 @@ crosswatch: type: wmgerrit url: https://gerrit.wikimedia.org/r/labs/tools/crosswatch + url|export: ssh://l10n-...@gerrit.wikimedia.org:29418/labs/tools/crosswatch dissemin: group: dissemin-* @@ -55,6 +62,7 @@ dissemin: type: github url: https://github.com/dissemin/dissemin.git + url|export: g...@github.com:dissemin/dissemin.git eol: group: out-eol-* @@ -62,6 +70,7 @@ eol: type: github url: https://github.com/EOL/eol.git + url|export: g...@github.com:EOL/eol.git
[MediaWiki-commits] [Gerrit] translatewiki[master]: Convert repoconfig to Yaml
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/394293 ) Change subject: Convert repoconfig to Yaml .. Convert repoconfig to Yaml We already use Yaml for message group configuration, so why not for repository configuration too. It is so much nicer to read and edit. Conversion was done by PHP using yaml_emit after sorting the keys alphabetically and some manual tweaks such as adding empty lines. Change-Id: I905b45f72e218c6b625637d3bcdf487dbb8cd76b --- D repoconfig.commit.json A repoconfig.commit.yaml D repoconfig.json A repoconfig.yaml M repong/repong.php 5 files changed, 978 insertions(+), 1,251 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/93/394293/1 diff --git a/repoconfig.commit.json b/repoconfig.commit.json deleted file mode 100644 index b323b89..000 --- a/repoconfig.commit.json +++ /dev/null @@ -1,624 +0,0 @@ -{ - "@meta": { - "export": "php /srv/mediawiki/targets/production/extensions/Translate/scripts/export.php", - "expand": "php /srv/mediawiki/targets/production/extensions/Translate/scripts/expand-groupspec.php --exportable" - }, - "blockly": { - "group": "out-blockly*", - "repos": { - "blockly": { - "type": "github", - "url": "g...@github.com:google/blockly.git" - }, - "blockly-games": { - "type": "github", - "url": "g...@github.com:google/blockly-games.git" - } - } - }, - "citationhunt": { - "group": "citationhunt", - "repos": { - "citationhunt": { - "type": "github", - "url": "g...@github.com:eggpi/citationhunt.git" - } - } - }, - "codev": { - "group": "codev", - "repos": { - "codev": { - "type": "github", - "url": "g...@github.com:mantisbt-plugins/codev.git" - } - } - }, - "commons-android": { - "group": "commons-android-*", - "no-export-languages": "ksh,zh,en", - "repos": { - "commons-android": { - "type": "github", - "url": "g...@github.com:commons-app/apps-android-commons.git" - } - } - }, - "copypatrol": { - "group": "copypatrol", - "repos": { - "copypatrol": { - "type": "github", - "url": "g...@github.com:wikimedia/CopyPatrol.git" - } - } - }, - "crosswatch": { - "group": "crosswatch", - "repos": { - "crosswatch": { - "type": "wmgerrit", - "url": "ssh://l10n-...@gerrit.wikimedia.org:29418/labs/tools/crosswatch" - } - } - }, - "dissemin": { - "group": "dissemin-*", - "repos": { - "dissemin": { - "type": "github", - "url": "g...@github.com:dissemin/dissemin.git" - } - } - }, - "eol": { - "group": "out-eol-*", - "repos": { - "eol": { - "type": "github", - "url": "g...@github.com:EOL/eol.git" - } - } - }, - "ia-upload": { - "group": "ia-upload", - "repos": { - "ia-upload": { - "type": "github", - "url": "g...@github.com:wikisource/ia-upload.git" - } - } - }, - "internetarchivebot": { - "group": "internetarchivebot", - "repos": { - "internetarchivebot": { - "type": "github", - "url": "g...@github.com:cyberpower678/Cyberbot_II.git" - } - } - }, - "intuition": { - "group": "tsint-*", - "export-threshold": 1, - "repos": { - "intuition": { - "type": "github", - "url": "g...@github.com:Krinkle/intuition.g
[MediaWiki-commits] [Gerrit] translatewiki[master]: Add parallelism to repong
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/394118 ) Change subject: Add parallelism to repong .. Add parallelism to repong Change-Id: Ic9ae1290a7230ec1df0912e229d212149731ba8d --- M repoconfig.commit.json M repoconfig.json M repong/repong.php 3 files changed, 140 insertions(+), 34 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/18/394118/1 diff --git a/repoconfig.commit.json b/repoconfig.commit.json index cda897c..3686f90 100644 --- a/repoconfig.commit.json +++ b/repoconfig.commit.json @@ -1,6 +1,7 @@ { "@meta": { - "export": "php /srv/mediawiki/targets/production/extensions/Translate/scripts/export.php" + "export": "php /srv/mediawiki/targets/production/extensions/Translate/scripts/export.php", + "expand": "php /srv/mediawiki/targets/production/extensions/Translate/scripts/expand-groupspec.php" }, "blockly": { "group": "out-blockly*", diff --git a/repoconfig.json b/repoconfig.json index 83c6d32..56b3885 100644 --- a/repoconfig.json +++ b/repoconfig.json @@ -1,6 +1,7 @@ { "@meta": { - "export": "php /srv/mediawiki/targets/production/extensions/Translate/scripts/export.php" + "export": "php /srv/mediawiki/targets/production/extensions/Translate/scripts/export.php", +"expand": "php /srv/mediawiki/targets/production/extensions/Translate/scripts/expand-groupspec.php" }, "blockly": { "group": "out-blockly*", diff --git a/repong/repong.php b/repong/repong.php index 9ba684f..cbc538c 100644 --- a/repong/repong.php +++ b/repong/repong.php @@ -6,6 +6,8 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Process\Exception\ProcessFailedException; +use Symfony\Component\Process\Exception\ProcessTimedOutException; use Symfony\Component\Process\Process; require_once __DIR__ . '/vendor/autoload.php'; @@ -16,6 +18,7 @@ protected $usernameConversion = [ 'nike' => 'nikerabbit', ]; + protected $parallelism = 1; public function initialize() { $base = $this->getBase(); @@ -31,6 +34,11 @@ $json = file_get_contents( "$base/repoconfig.json" ); $this->config = json_decode( $json, true ); + + $cores = preg_match_all( '/^processor/m', file_get_contents( '/proc/cpuinfo' ) ); + if ( $cores ) { + $this->parallelism = (int)$cores; + } } protected function getBase() { @@ -71,6 +79,89 @@ return $str; } + + protected function runParallelWithOutput( SplObjectStorage $processes, OutputInterface $output ) { + $this->runParaller( + $processes, + function ( $process ) use ( $output ) { + $output->writeln( $process->getCommandLine(), OutputInterface::VERBOSITY_VERBOSE ); + }, + function ( $process, $exception = null ) use ( $output ) { + if ( $process->isSuccessful() ) { + $processOutput = $process->getOutput(); + if ( trim( $processOutput ) ) { + $formatter = $output->getFormatter(); + $command = $formatter->escape( $process->getCommandLine() ); + $stdout = $formatter->escape( $processOutput ); + $output->write( "$command\n$stdout\n" ); + } + } elseif ( $exception ) { + throw $exception; + } else { + throw new ProcessFailedException( $process ); + } + } + ); + } + + protected function runParaller( + SplObjectStorage $queue, + callable $onStart = null, + callable $onEnd = null + ) { + $running = []; + do { + while ( count( $running ) < $this->parallelism ) { + list( $ok, $process ) = self::getNextExecutableProcessIndex( $queue ); + + // Check if anything to execute + if ( $ok === 'NONE' ) { + break; + } + + unset( $queue[ $process ]
[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: Add a script that expands message group spec
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/394067 ) Change subject: Add a script that expands message group spec .. Add a script that expands message group spec Specification is a comma separated list of message groups ids which allows wildcards * and ?. I am planning to make RepoNG to take advantage of parallelism. In twn config we have groupspec such as mwgithub-* and RepoNG cannot parallelize exports if it doesn't know the full list of message groups that wildcard matches. This script provides that. Change-Id: I2bc6be824ccd5aa19e2ee15378150952f82e33a5 --- A scripts/expand-groupspec.php 1 file changed, 42 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/67/394067/1 diff --git a/scripts/expand-groupspec.php b/scripts/expand-groupspec.php new file mode 100644 index 000..44dd36d --- /dev/null +++ b/scripts/expand-groupspec.php @@ -0,0 +1,42 @@ +mDescription = 'Expands a message group specification.'; + $this->addArg( + 'specification', + 'For example page-*,main', + true, /*required*/ + false /*has arg*/ + ); + } + + public function execute() { + $spec = $this->getArg( 0 ); + $patterns = explode( ',', trim( $spec ) ); + $ids = MessageGroups::expandWildcards( $patterns ); + if ( $ids !== [] ) { + // This should not be affected by --quiet + echo implode( "\n", $ids ) . "\n"; + } + } +} + +$maintClass = 'TranslateExpandGroupSpec'; +require_once RUN_MAINTENANCE_IF_MAIN; -- To view, visit https://gerrit.wikimedia.org/r/394067 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2bc6be824ccd5aa19e2ee15378150952f82e33a5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: Update jquery.uls to 98fff1b
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/394051 ) Change subject: Update jquery.uls to 98fff1b .. Update jquery.uls to 98fff1b * Translation updates * Change for SVG background image styles * Use searchAPI always when provided Change-Id: I5a90d76d5acc1939cc7b670df43c4ea3347dfcb3 --- M lib/jquery.uls/css/jquery.uls.css M lib/jquery.uls/i18n/af.json M lib/jquery.uls/i18n/anp.json M lib/jquery.uls/i18n/ckb.json M lib/jquery.uls/i18n/hoc.json M lib/jquery.uls/src/jquery.uls.languagefilter.js 6 files changed, 54 insertions(+), 59 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/51/394051/1 diff --git a/lib/jquery.uls/css/jquery.uls.css b/lib/jquery.uls/css/jquery.uls.css index 5c1e9ca..6af44a5 100644 --- a/lib/jquery.uls/css/jquery.uls.css +++ b/lib/jquery.uls/css/jquery.uls.css @@ -1,8 +1,5 @@ .uls-trigger { - /* @embed */ background: url('../images/icon-language.png') no-repeat left center; - /* @embed */ - background-image: -webkit-linear-gradient(transparent, transparent), url('../images/icon-language.svg'); /* @embed */ background-image: linear-gradient(transparent, transparent), url('../images/icon-language.svg'); padding-left: 30px; @@ -69,7 +66,6 @@ .uls-search-label { background: url('../images/search.png') no-repeat center center; - background-image: -webkit-linear-gradient(transparent, transparent), url('../images/search.svg'); /* @embed */ background-image: linear-gradient(transparent, transparent), url('../images/search.svg'); background-size: 20px; @@ -115,7 +111,6 @@ .uls-languagefilter-clear { background: url('../images/clear.png') no-repeat left center; - background-image: -webkit-linear-gradient(transparent, transparent), url('../images/clear.svg'); /* @embed */ background-image: linear-gradient(transparent, transparent), url('../images/clear.svg'); background-size: 15px; diff --git a/lib/jquery.uls/i18n/af.json b/lib/jquery.uls/i18n/af.json index 2b9d83d..36a24de 100644 --- a/lib/jquery.uls/i18n/af.json +++ b/lib/jquery.uls/i18n/af.json @@ -18,8 +18,8 @@ "uls-region-PA": "Stille Oseaan", "uls-region-all": "Alle tale", "uls-no-results-found": "Geen resultate gevind nie", - "uls-common-languages": "Voorgestelde Tale", + "uls-common-languages": "Voorgestelde tale", "uls-no-results-suggestion-title": "U mag geïnteresseerd wees in:", - "uls-search-help": "Soektogte kan volgende taalnaam, skripnaam, ISO-kode, of volgens streek geskied.", + "uls-search-help": "Soek gerus volgens taalnaam, skrifnaam of ISO-kode, of blaai volgens streek.", "uls-search-placeholder": "Soek na ’n taal" } diff --git a/lib/jquery.uls/i18n/anp.json b/lib/jquery.uls/i18n/anp.json index 0a61cc0..95d5ee5 100644 --- a/lib/jquery.uls/i18n/anp.json +++ b/lib/jquery.uls/i18n/anp.json @@ -12,9 +12,10 @@ "uls-region-AS": "एशिया", "uls-region-ME": "मध्य पूर्व", "uls-region-PA": "प्रशांत", + "uls-region-all": "सब्भे भाषा", "uls-no-results-found": "कोय परिणाम नै मिललै", - "uls-common-languages": "आम भाषा सीनी", + "uls-common-languages": "आम भाषा सिनी", "uls-no-results-suggestion-title": "आपन॑ लेली संभवतः उपयोगी:", "uls-search-help": "आपन॑ भाषा केरऽ नाम , स्क्रिप्ट केरऽ नाम , भाषा केरऽ आईएसओ कोड सं॑ खोज॑ सकै छहो या आपन॑ क्षेत्र के नाम सं॑ ब्राउज़ कर॑ सकै छहऽ.", - "uls-search-placeholder": "भाषा खोज" + "uls-search-placeholder": "भाषा लेली खोजऽ" } diff --git a/lib/jquery.uls/i18n/ckb.json b/lib/jquery.uls/i18n/ckb.json index 695ac35..fa8e23b 100644 --- a/lib/jquery.uls/i18n/ckb.json +++ b/lib/jquery.uls/i18n/ckb.json @@ -3,7 +3,8 @@ "authors": [ "Calak", "Asoxor", - "Lost Whispers" + "Lost Whispers", + "Épine" ] }, "uls-region-WW": "لە گشت جیھاندا", diff --git a/lib/jquery.uls/i18n/hoc.json b/lib/jquery.uls/i18n/hoc.json index db58388..cdbfa72 100644 --- a/lib/jquery.uls/i18n/hoc.json +++ b/lib/jquery.uls/i18n/hoc.json @@ -10,7 +10,12 @@ "uls-region-AF": "𑢡𑣘𑣗𑣜𑣂𑣌𑣁", "uls-region-EU": "𑢥𑣃𑣜𑣉𑣉𑣘", "uls-region-AS": "𑢨𑣈𑣞𑣂𑣅𑣁", + "uls-region-ME": "𑢵𑣚𑣁-𑣕𑣃𑣜 𑣞𑣄", + "uls-region-PA": "𑢸𑣈𑣞𑣂𑣘𑣂𑣌", "uls-region-all": "𑢾𑣗𑣈𑣓 𑣎𑣈𑣋𑣁𑣜 𑣌𑣉", "uls-no-results-found": "𑢮𑣁𑣓𑣄 𑣌𑣁 𑣓𑣖 𑣎𑣓𑣁", + "uls-common-languages": "𑢨𑣒𑣄 𑣎𑣈𑣋𑣁𑣜 𑣌𑣉", + "uls-no-results-suggestion-title": "𑢳𑣈𑣓𑣁 𑣌𑣉 𑣏𑣂 𑣗𑣈𑣓 𑣓𑣖 𑣕𑣓𑣁:", + "uls-search-help": "𑢮𑣈𑣋𑣁𑣜 𑣓𑣃𑣕𑣃𑣖 𑣕𑣈, 𑣏𑣂𑣕𑣂 𑣓𑣃𑣕𑣃𑣖 𑣕𑣈, 𑣎𑣈𑣋𑣁𑣜 𑣜𑣈𑣅𑣄 ISO 𑣌𑣉𑣉𑣑 𑣕𑣈 𑣌𑣁𑣜𑣈 𑣕𑣅𑣑 𑣓𑣃𑣕𑣃𑣖 𑣕𑣈 𑣉𑣉 𑣓𑣖-𑣓𑣈𑣚 𑣔𑣆𑣅𑣉𑣄𑣁.", "uls-search-placeholder": "𑢶𑣂𑣈𑣑 𑣎𑣈𑣋𑣁𑣓 𑣓𑣈𑣚-𑣓𑣖𑣈" } diff --git a/lib/j
[MediaWiki-commits] [Gerrit] mediawiki...cxserver[master]: Segmentation: ES6 syntax clean up
Nikerabbit has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/393005 ) Change subject: Segmentation: ES6 syntax clean up .. Segmentation: ES6 syntax clean up Change-Id: Ife554b709dbfdb019802041d7631714bf0556588 --- M lib/segmentation/CXSegmenter.js M lib/segmentation/languages/SegmenterAm.js M lib/segmentation/languages/SegmenterDefault.js M lib/segmentation/languages/SegmenterHi.js M lib/segmentation/languages/SegmenterHy.js M lib/segmentation/languages/SegmenterJa.js M lib/segmentation/languages/SegmenterZh.js M lib/segmentation/languages/index.js 8 files changed, 29 insertions(+), 31 deletions(-) Approvals: KartikMistry: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/segmentation/CXSegmenter.js b/lib/segmentation/CXSegmenter.js index 0df6630..ce6e960 100644 --- a/lib/segmentation/CXSegmenter.js +++ b/lib/segmentation/CXSegmenter.js @@ -1,6 +1,6 @@ 'use strict'; -var segmenters = require( __dirname + '/languages' ).Segmenters; +const segmenters = require( __dirname + '/languages' ).Segmenters; class CXSegmenter { diff --git a/lib/segmentation/languages/SegmenterAm.js b/lib/segmentation/languages/SegmenterAm.js index efdc0f3..5b1458f 100644 --- a/lib/segmentation/languages/SegmenterAm.js +++ b/lib/segmentation/languages/SegmenterAm.js @@ -1,6 +1,6 @@ 'use strict'; -var findAll = require( '../../lineardoc' ).Utils.findAll; +const findAll = require( '../../lineardoc' ).Utils.findAll; /** * Test a possible Ethiopic sentence boundary match @@ -11,7 +11,7 @@ */ function findBoundary( text, match ) { - var tail = text.slice( match.index + 1, text.length ); + const tail = text.slice( match.index + 1, text.length ); // Trailing non-final punctuation: not a sentence boundary if ( tail.match( /^[,;:]/ ) ) { diff --git a/lib/segmentation/languages/SegmenterDefault.js b/lib/segmentation/languages/SegmenterDefault.js index 7b80980..d1dc337 100644 --- a/lib/segmentation/languages/SegmenterDefault.js +++ b/lib/segmentation/languages/SegmenterDefault.js @@ -1,6 +1,6 @@ 'use strict'; -var findAll = require( '../../lineardoc' ).Utils.findAll; +const findAll = require( '../../lineardoc' ).Utils.findAll; /** * Test a possible English sentence boundary match @@ -10,10 +10,8 @@ * @return {number|null} The boundary offset, or null if not a sentence boundary */ function findBoundary( text, match ) { - var tail, head, lastWord; - - tail = text.slice( match.index + 1, text.length ); - head = text.slice( 0, match.index ); + const tail = text.slice( match.index + 1, text.length ); + const head = text.slice( 0, match.index ); // Trailing non-final punctuation: not a sentence boundary if ( tail.match( /^[,;:]/ ) ) { @@ -25,7 +23,7 @@ } // Do not break in abbreviations. Example D. John, St. Peter - lastWord = head.match( /(\w*)$/ )[ 0 ]; + const lastWord = head.match( /(\w*)$/ )[ 0 ]; // Exclude at most 2 letter abbreviations. Examples: T. Dr. St. Jr. Sr. Ms. Mr. // But not all caps like "UK." as in "UK. Not US", if ( lastWord.length <= 2 && lastWord.match( /^\W*[A-Z][a-z]?$/ ) && tail.match( /^\W*[A-Z]/ ) ) { @@ -49,5 +47,5 @@ } module.exports = { - getBoundaries: getBoundaries + getBoundaries }; diff --git a/lib/segmentation/languages/SegmenterHi.js b/lib/segmentation/languages/SegmenterHi.js index fb1b7bd..26a9d41 100644 --- a/lib/segmentation/languages/SegmenterHi.js +++ b/lib/segmentation/languages/SegmenterHi.js @@ -1,6 +1,6 @@ 'use strict'; -var findAll = require( '../../lineardoc' ).Utils.findAll; +const findAll = require( '../../lineardoc' ).Utils.findAll; /** * Test a possible Hindi sentence boundary match @@ -10,7 +10,7 @@ * @return {number|null} The boundary offset, or null if not a sentence boundary */ function findBoundary( text, match ) { - var tail = text.slice( match.index + 1, text.length ); + const tail = text.slice( match.index + 1, text.length ); // Include any trailing space return match.index + 1 + tail.match( /^\s*/ )[ 0 ].length; } @@ -28,5 +28,5 @@ } module.exports = { - getBoundaries: getBoundaries + getBoundaries }; diff --git a/lib/segmentation/languages/SegmenterHy.js b/lib/segmentation/languages/SegmenterHy.js index 3bd3d2c..98c6d4a 100644 --- a/lib/segmentation/languages/SegmenterHy.js +++ b/lib/segmentation/languages/SegmenterHy.js @@ -1,6 +1,6 @@ 'use strict'; -var findAll = require( '../../lineardoc' ).Utils.findAll; +const findAll = require( '../../lineardoc' ).Utils.findAll; /** * Test a possible Armenian sentence boundary match @@ -10,7 +10,7 @@ * @return {number|null} The boundary offset, or null if not a sentence boundary */ function findBoundary( text, match ) { - var tail = text.slice( match.index + 1, t
[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: Improve ULS language search api
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/393589 ) Change subject: Improve ULS language search api .. Improve ULS language search api * Store prefixes and infixes separately in the data * First match language code, then prefixes, then infixes * Try to use suggestion either in user language or autonym first * use formatversion=2 to avoid escaping Unicode Using Language::fetchLanguageName might can have a small performance impact. On the other hand there is now check to skip languages we already found, avoiding some fuzzy matching. This is in a preparation for a change in jquery.uls to use the search API more, while trying to reduce the amount of weird autocompletion suggestions we show to the user. Bug: T73891 Change-Id: Id94c5352d9a591969bf90144d1d2d5e758d08301 --- M api/ApiLanguageSearch.php M data/LanguageNameIndexer.php M data/LanguageNameSearch.php M data/LanguageNameSearchData.php M resources/js/ext.uls.mediawiki.js 5 files changed, 51,613 insertions(+), 46,552 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/89/393589/1 -- To view, visit https://gerrit.wikimedia.org/r/393589 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id94c5352d9a591969bf90144d1d2d5e758d08301 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Make dump-corpora.php streaming to reduce memory usage
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/393212 ) Change subject: Make dump-corpora.php streaming to reduce memory usage .. Make dump-corpora.php streaming to reduce memory usage == Test script == mkdir -p test/{a,b,c,d,e,f,g,h} php dump-corpora.php --plaintext --format=json --outputdir=test/a php dump-corpora.php --plaintext --format=tmx --outputdir=test/b php dump-corpora.php --format=json --outputdir=test/c php dump-corpora.php --source-language=fi --outputdir=test/d php dump-corpora.php --target-language=fi --outputdir=test/e php dump-corpora.php --split-at=10 --outputdir=test/f php dump-corpora.php --split-at=1 --outputdir=test/g php dump-corpora.php --split-at=1 --target-language=fi --outputdir=test/h == Differences == a,c-e are identical === b === TMX output differs slightly because " are turned into entities now in TMX format === f === The files are little bit different now: new/f: cx-corpora._2fi.html.json cx-corpora._2_.html.json cx-corpora.fi2en.html.json old/f: cx-corpora._2_.html.json cx-corpora.fi2en.html.json But the contents are the same (few bytes difference comes from the json begin/end) du -cs {old,new}/f 10112 old/f 10116 new/f === g === g is simlar to f: new/g: cx-corpora.de2eo.html.json cx-corpora.en2la.html.json cx-corpora.et2fi.html.json cx-corpora.de2fi.html.json cx-corpora.en2nb.html.json cx-corpora.fi2en.html.json cx-corpora.en2cy.html.json cx-corpora.en2pt.html.json cx-corpora.fi2se.html.json cx-corpora.en2de.html.json cx-corpora.en2ru.html.json cx-corpora.he2ca.html.json cx-corpora.en2es.html.json cx-corpora.en2yi.html.json cx-corpora.no2nn.html.json cx-corpora.en2fi.html.json cx-corpora.es2ca.html.json cx-corpora.pt2en.html.json old/g: cx-corpora.de2fi.html.json cx-corpora.en2nb.html.json cx-corpora.fi2en.html.json cx-corpora.en2cy.html.json cx-corpora.en2pt.html.json cx-corpora.fi2se.html.json cx-corpora.en2de.html.json cx-corpora.en2ru.html.json cx-corpora.he2ca.html.json cx-corpora.en2es.html.json cx-corpora.en2yi.html.json cx-corpora.no2nn.html.json cx-corpora.en2fi.html.json cx-corpora.es2ca.html.json cx-corpora.pt2en.html.json cx-corpora.en2la.html.json cx-corpora.et2fi.html.json But again the contents are the same: du -cs {old,new}/g 10144 old/g 10148 new/g In addition this command shows that every unique ID exists twice, which means that assuming there are no bugs that cause duplicate IDs in the output, both old and new export exactly the same set of units: cat -u {old,new}/g/* | grep '"id"' | sort | uniq -c | sort -r == Benchmarks == For JSON format: for i in {0..10}; do \time -v php dump-corpora.php 2>> timings-json; done; For TMX format: for i in {0..10}; do \time -v php dump-corpora.php --format=tmx --plaintext 2>> timings-tmx; done; Main findings: For JSON format the runtime was about equivalent (too small dataset, too much variance). For JSON format the Maximum resident size went down from ~160M to ~134M. For TMX format the runtime was about equivalent (too small dataset, too much variance). For TMX format the Maximum resident size was unchanged at ~121M. Bug: T180264 Change-Id: Ia2c26c82b70197672fde497875b7458865631bfc --- M extension.json A includes/JsonDumpFormatter.php A includes/TmxDumpFormatter.php M includes/Translation.php M includes/Translator.php M scripts/dump-corpora.php 6 files changed, 393 insertions(+), 288 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/12/393212/1 diff --git a/extension.json b/extension.json index 78c283f..c33c1a8 100644 --- a/extension.json +++ b/extension.json @@ -88,6 +88,7 @@ "ContentTranslation\\Database": "includes/Database.php", "ContentTranslation\\DateManipulator": "includes/DateManipulator.php", "ContentTranslation\\EchoNotificationPresentationModel": "includes/EchoNotificationPresentationModel.php", + "ContentTranslation\\JsonDumpFormatter": "includes/JsonDumpFormatter.php", "ContentTranslation\\Notification": "includes/Notification.php", "ContentTranslation\\RestbaseClient": "includes/RestbaseClient.php", "ContentTranslation\\SiteMapper": "includes/SiteMapper.php", @@ -95,6 +96,7 @@ "ContentTranslation\\Suggestion": "includes/Suggestion.php", "ContentTranslation\\SuggestionList": "includes/SuggestionList.php", "ContentTranslation\\SuggestionListManager": "includes/SuggestionListManager.php", + "ContentTranslation\\TmxDumpFormatter": "includes/TmxDumpFormatter.php", "ContentTranslation\\Translation": "includes/Translation.php", "ContentTranslation\\TranslationStorageManager": "includes/TranslationStorageManager.php", "ContentTranslation\
[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: 2nd fix for TTMServer::sortSuggestions() must be of the type...
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/393074 ) Change subject: 2nd fix for TTMServer::sortSuggestions() must be of the type array, null given .. 2nd fix for TTMServer::sortSuggestions() must be of the type array, null given Apart from empty strings as an input, a translation memory service can fail in other ways too, for example because of a timeout. TTMServerAid::formatSuggestions was not properly checking the return value of TranslationWebService::getResultData. Also correct return type for that method which can be anything what a TranslationWebService subclass decides to return. Tested manually by injecting a fault in RemoteTTMServerWebService and observing that the error is gone. Bug: T166104 Change-Id: I3152ca2ea25c1869ead3a80ce4eeb6c6c27b2a42 --- M translationaids/TTMServerAid.php M webservices/TranslationWebService.php 2 files changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/74/393074/1 diff --git a/translationaids/TTMServerAid.php b/translationaids/TTMServerAid.php index 174e912..1159841 100644 --- a/translationaids/TTMServerAid.php +++ b/translationaids/TTMServerAid.php @@ -84,7 +84,12 @@ $sourceLanguage = $queryData['language']; $sourceText = $queryData['text']; + // getResultData returns null instead of throwing an exception $sugs = $service->getResultData( $response ); + if ( $sugs === null ) { + return []; + } + foreach ( $sugs as &$sug ) { $sug += [ 'service' => $service->getName(), diff --git a/webservices/TranslationWebService.php b/webservices/TranslationWebService.php index 0d57419..fea8a4e 100644 --- a/webservices/TranslationWebService.php +++ b/webservices/TranslationWebService.php @@ -101,7 +101,7 @@ * Get the web service specific response returned by QueryAggregator. * * @param TranslationQueryResponse $response -* @return string|null +* @return mixed|null Returns null on error. * @since 2015.12 */ public function getResultData( TranslationQueryResponse $response ) { -- To view, visit https://gerrit.wikimedia.org/r/393074 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3152ca2ea25c1869ead3a80ce4eeb6c6c27b2a42 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Enable the new recent changes filters
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392305 ) Change subject: Enable the new recent changes filters .. Enable the new recent changes filters This requires disabling the "clean" listing from clean changes. In practice this is not an issue due to use script we have that makes the user tool links compact with JavaScript. I fixed that to use the wikipage.content hook so it works well with the new filters. This also removes the annoying bug that headings are duplicated in the recent changes listings. Change-Id: I9f14e03320b6f478f19a2a0c0a1bbd2d980be773 --- M TranslatewikiSettings.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/05/392305/1 diff --git a/TranslatewikiSettings.php b/TranslatewikiSettings.php index 852d820..1feb378 100644 --- a/TranslatewikiSettings.php +++ b/TranslatewikiSettings.php @@ -233,6 +233,8 @@ wfLoadExtension( 'CleanChanges' ); $wgCCUserFilter = true; $wgCCTrailerFilter = true; +$wgStructuredChangeFiltersShowPreference = true; +$wgCCFiltersOnly = true; $wgNamespacesToBeSearchedDefault[NS_MAIN] = true; $wgNamespacesToBeSearchedDefault[NS_MEDIAWIKI] = true; -- To view, visit https://gerrit.wikimedia.org/r/392305 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9f14e03320b6f478f19a2a0c0a1bbd2d980be773 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Disable DataTypes
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/391761 ) Change subject: Disable DataTypes .. Disable DataTypes Localisation has moved. Will re-enable the new place in a separate patch. Bug: T180459 Change-Id: I0a9ebe21181d5289f87f7f828efb00ceb11aa86f --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/61/391761/1 diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index bc1de49..ecf9035 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -733,8 +733,6 @@ aliasfile = DataTransfer/languages/DT_Aliases.php optional = dt_filetype_xml, dt_filetype_csv -Data Types - Date Diff Debug Mode -- To view, visit https://gerrit.wikimedia.org/r/391761 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0a9ebe21181d5289f87f7f828efb00ceb11aa86f Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Impprove the site notice html.
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/391758 ) Change subject: Impprove the site notice html. .. Impprove the site notice html. Was no longer centering. Change-Id: Iadcfb7413e06955a14a28251b10c0cc9b0d35bbd --- M TranslatewikiSettings.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/58/391758/1 diff --git a/TranslatewikiSettings.php b/TranslatewikiSettings.php index 861bf20..d184ad6 100644 --- a/TranslatewikiSettings.php +++ b/TranslatewikiSettings.php @@ -376,8 +376,8 @@ if ( $wgCanonicalServer !== "https://translatewiki.net"; ) { $wgHooks['SiteNoticeAfter'][] = function ( &$siteNotice ) { $siteNotice = " - This is not a production site! - Go to translatewiki.net!"; + This is not a production site! + Go to translatewiki.net!"; return true; }; } -- To view, visit https://gerrit.wikimedia.org/r/391758 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iadcfb7413e06955a14a28251b10c0cc9b0d35bbd Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Tweak dump-corpora.php
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/391001 ) Change subject: Tweak dump-corpora.php .. Tweak dump-corpora.php Instead of doing FormatJson::encode for whole big array, do it for individual sections instead and stitch it together for one big file. In other words, home-made streaming json encoder. This should reduce the memory usage somewhat. If that is not enough there are further possibilities to improve this script: 1) write to the sink directly, instead of buffering into a string. 2) start streaming to the formatter, so that we do not load all sections into the memory before we start formatting them. Regressions were checked for by comparing the output of this script before and after this change (default parameters). Only difference is that this one adds a trailing new line, which is a good thing in my opinion. Bug: T180264 Change-Id: Iddbbe85d2db3d444e2ad645bee32fae9bc0ac975 --- M scripts/dump-corpora.php 1 file changed, 16 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/01/391001/1 diff --git a/scripts/dump-corpora.php b/scripts/dump-corpora.php index 13c0e98..5e3a961 100644 --- a/scripts/dump-corpora.php +++ b/scripts/dump-corpora.php @@ -78,9 +78,6 @@ 'plaintext', '(optional) Strip away html.' ); - - $this->resets = []; - $this->tags = []; } private function getPath( $source, $target ) { @@ -248,13 +245,15 @@ * @return string|null */ public function formatJSON( array $targets ) { - $output = []; + $output = ''; + $indent = ''; + foreach ( $targets as $translation ) { foreach ( $translation['corpora'] as $id => $unit ) { unset( $unit['source']['timestamp'], $unit['user']['timestamp'], $unit['mt']['timestamp'] ); $globalId = "{$translation['translationId']}/$id"; - $output[] = [ + $section = [ 'id' => $globalId, 'sourceLanguage' => $translation['sourceLanguage'], 'targetLanguage' => $translation['targetLanguage'], @@ -262,22 +261,27 @@ 'mt' => $unit['mt'], 'target' => $unit['user'], ]; + + $json = FormatJson::encode( $section, $indent, FormatJson::ALL_OK ); + $output .= self::indent( $indent, $json ) . ",\n"; } } if ( $output ) { - // MediaWiki has a workaround that cleans up formatting with a regexp - // with certain PHP versions. As $output can be huge, it will run out - // of memory trying to do that. In this case, it is better to skip - // pretty formatting than to have nothing at all. - $prettyFormat = json_encode( [], JSON_PRETTY_PRINT ) === '[]'; - - return FormatJson::encode( $output, $prettyFormat, FormatJson::ALL_OK ); + // Remove the trailing comma and newline after it + $output = trim( $output, "\n," ); + return "[\n$output\n]\n"; } else { return null; } } + public static function indent( $indent, $text ) { + // Assuming literal newlines do not occur within strings + $text = $indent . str_replace( "\n", "\n$indent", $text ); + return $text; + } + /** * @param array $targets * @param string $sourceLanguage Language code. -- To view, visit https://gerrit.wikimedia.org/r/391001 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iddbbe85d2db3d444e2ad645bee32fae9bc0ac975 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: Remove fonts for Malayalam from font repo
Nikerabbit has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390948 ) Change subject: Remove fonts for Malayalam from font repo .. Remove fonts for Malayalam from font repo * I maintain these fonts in upstream and there we several releases since these fonts were added. * Malayalam has better support in operating systems compared to 2012 when these fonts were added. * Reduce font metadata size for wikipedia pages when webfonts are enabled. Change-Id: Ie5b54cc866b1c67849b094a9701b2c80d876b55f --- D data/fontrepo/fonts/AnjaliOldLipi/AnjaliOldLipi.ttf D data/fontrepo/fonts/AnjaliOldLipi/AnjaliOldLipi.woff D data/fontrepo/fonts/AnjaliOldLipi/AnjaliOldLipi.woff2 D data/fontrepo/fonts/AnjaliOldLipi/font.ini D data/fontrepo/fonts/Meera/Meera.ttf D data/fontrepo/fonts/Meera/Meera.woff D data/fontrepo/fonts/Meera/Meera.woff2 D data/fontrepo/fonts/Meera/font.ini M resources/js/ext.uls.webfonts.repository.js 9 files changed, 0 insertions(+), 27 deletions(-) Approvals: jenkins-bot: Verified Nikerabbit: Looks good to me, approved diff --git a/data/fontrepo/fonts/AnjaliOldLipi/AnjaliOldLipi.ttf b/data/fontrepo/fonts/AnjaliOldLipi/AnjaliOldLipi.ttf deleted file mode 100644 index 6c76fa7..000 --- a/data/fontrepo/fonts/AnjaliOldLipi/AnjaliOldLipi.ttf +++ /dev/null Binary files differ diff --git a/data/fontrepo/fonts/AnjaliOldLipi/AnjaliOldLipi.woff b/data/fontrepo/fonts/AnjaliOldLipi/AnjaliOldLipi.woff deleted file mode 100644 index 835a05e..000 --- a/data/fontrepo/fonts/AnjaliOldLipi/AnjaliOldLipi.woff +++ /dev/null Binary files differ diff --git a/data/fontrepo/fonts/AnjaliOldLipi/AnjaliOldLipi.woff2 b/data/fontrepo/fonts/AnjaliOldLipi/AnjaliOldLipi.woff2 deleted file mode 100644 index 5feffa1..000 --- a/data/fontrepo/fonts/AnjaliOldLipi/AnjaliOldLipi.woff2 +++ /dev/null Binary files differ diff --git a/data/fontrepo/fonts/AnjaliOldLipi/font.ini b/data/fontrepo/fonts/AnjaliOldLipi/font.ini deleted file mode 100644 index b3852fa..000 --- a/data/fontrepo/fonts/AnjaliOldLipi/font.ini +++ /dev/null @@ -1,6 +0,0 @@ -[AnjaliOldLipi] -languages=ml -version=.0.730 -license=OFL-1.1 -licensefile=OFL.txt -url=https://sites.google.com/site/cibu/anjalioldlipi-font diff --git a/data/fontrepo/fonts/Meera/Meera.ttf b/data/fontrepo/fonts/Meera/Meera.ttf deleted file mode 100644 index c54a55b..000 --- a/data/fontrepo/fonts/Meera/Meera.ttf +++ /dev/null Binary files differ diff --git a/data/fontrepo/fonts/Meera/Meera.woff b/data/fontrepo/fonts/Meera/Meera.woff deleted file mode 100644 index cef8b92..000 --- a/data/fontrepo/fonts/Meera/Meera.woff +++ /dev/null Binary files differ diff --git a/data/fontrepo/fonts/Meera/Meera.woff2 b/data/fontrepo/fonts/Meera/Meera.woff2 deleted file mode 100644 index e638955..000 --- a/data/fontrepo/fonts/Meera/Meera.woff2 +++ /dev/null Binary files differ diff --git a/data/fontrepo/fonts/Meera/font.ini b/data/fontrepo/fonts/Meera/font.ini deleted file mode 100644 index 1b56134..000 --- a/data/fontrepo/fonts/Meera/font.ini +++ /dev/null @@ -1,6 +0,0 @@ -[Meera] -languages=ml -version=6.0 -license=GPL-3.0.0+-with-font-exception -licensefile=gpl-3.0.txt -url=https://savannah.nongnu.org/projects/smc diff --git a/resources/js/ext.uls.webfonts.repository.js b/resources/js/ext.uls.webfonts.repository.js index 97d9c96..5ed0715 100644 --- a/resources/js/ext.uls.webfonts.repository.js +++ b/resources/js/ext.uls.webfonts.repository.js @@ -260,11 +260,6 @@ "system", "OpenDyslexic" ], - "ml": [ - "system", - "AnjaliOldLipi", - "Meera" - ], "ms": [ "system", "ComicNeue", @@ -467,11 +462,6 @@ "woff": "amiri/amiri-slanted.woff?7d658", "woff2": "amiri/amiri-slanted.woff2?a90a0" }, - "AnjaliOldLipi": { - "ttf": "AnjaliOldLipi/AnjaliOldLipi.ttf?b47e8", - "woff": "AnjaliOldLipi/AnjaliOldLipi.woff?1f259", - "woff2": "AnjaliOldLipi/AnjaliOldLipi.woff2?7db63" - }, "Artaxerxes": { "ttf": "Artaxerxes/Artaxerxes.ttf?79a74", "woff": "Artaxerxes/Artaxerxes.woff?c1ed7", @@ -671,11 +661,6 @@ "ttf": "madan/madan.ttf?a9297", "woff": "madan/madan.woff?cee7d", "woff2": "madan/madan.woff2?81dd1" - }, - "Meera": { - "ttf": "Meera/Meera.ttf?8895f", - "woff": "Meera/Meera.woff?9e162", - "woff2": "Meera/Meera.woff2?b597d" }, "Miriam CLM": {
[MediaWiki-commits] [Gerrit] mediawiki...MixedNamespaceSearchSuggestions[master]: Fix PHP notice
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390416 ) Change subject: Fix PHP notice .. Fix PHP notice A rookie mistake that simple testing would have caught. Change-Id: If5c398c8ec9ce6d6ada0f4a4fb1d0601b9284922 --- M MixedNamespaceSearchSuggestionsHooks.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MixedNamespaceSearchSuggestions refs/changes/16/390416/1 diff --git a/MixedNamespaceSearchSuggestionsHooks.php b/MixedNamespaceSearchSuggestionsHooks.php index 0b51555..986fe98 100644 --- a/MixedNamespaceSearchSuggestionsHooks.php +++ b/MixedNamespaceSearchSuggestionsHooks.php @@ -9,7 +9,7 @@ * This is a hook function. * @param OutputPage $out The OutputPage, which wasn't yet obvious to the linter. */ - public function onBeforePageDisplay( OutputPage $out ) { + public static function onBeforePageDisplay( OutputPage $out ) { $out->addModules( 'ext.mnss.search' ); } } -- To view, visit https://gerrit.wikimedia.org/r/390416 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If5c398c8ec9ce6d6ada0f4a4fb1d0601b9284922 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MixedNamespaceSearchSuggestions Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CleanChanges[master]: Add wgCCFiltersOnly
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390235 ) Change subject: Add wgCCFiltersOnly .. Add wgCCFiltersOnly This extension doesn't work well with structured filters, but the language and user filters have not yet been implemented in core. Hence it makes useful to be able to disable the changes to the changes list but keep the filters available. Change-Id: I692928e45a469af489b6415a5da85f61f99c2e1f --- M CleanChanges_body.php M extension.json 2 files changed, 8 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CleanChanges refs/changes/35/390235/1 diff --git a/CleanChanges_body.php b/CleanChanges_body.php index c95a1a5..0ebace4 100644 --- a/CleanChanges_body.php +++ b/CleanChanges_body.php @@ -12,7 +12,7 @@ * @return bool */ public static function hook( User $user, Skin $skin, &$list ) { - global $wgCCTrailerFilter; + global $wgCCTrailerFilter, $wgCCFiltersOnly; $list = null; @@ -20,6 +20,10 @@ $skin->getOutput()->addModules( 'ext.cleanchanges.uls' ); } + if ( $wgCCFiltersOnly ) { + return; + } + /* allow override */ $request = $skin->getRequest(); if ( $request->getBool( 'cleanrc' ) ) { diff --git a/extension.json b/extension.json index dcfd94f..e718077 100644 --- a/extension.json +++ b/extension.json @@ -1,6 +1,6 @@ { "name": "Clean Changes", - "version": "2017-10-30", + "version": "2017-11-09", "author": "Niklas Laxström", "url": "https://www.mediawiki.org/wiki/Extension:CleanChanges";, "descriptionmsg": "cleanchanges-desc", @@ -12,7 +12,8 @@ }, "config": { "CCTrailerFilter": false, - "CCUserFilter": true + "CCUserFilter": true, + "CCFiltersOnly": false }, "Hooks": { "FetchChangesList": [ -- To view, visit https://gerrit.wikimedia.org/r/390235 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I692928e45a469af489b6415a5da85f61f99c2e1f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CleanChanges Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Export ext-3d
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390208 ) Change subject: Export ext-3d .. Export ext-3d Bug: T180098 Change-Id: I5d1a88e3af15df57ac42c037773aac1c5896217b --- M bin/repoexport 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/08/390208/1 diff --git a/bin/repoexport b/bin/repoexport index bce336a..88e4fc6 100755 --- a/bin/repoexport +++ b/bin/repoexport @@ -38,7 +38,7 @@ PREFIXES="ext-c ext-s ext-m ext-p ext-t ext-w ext-a ext-b ext-d ext-e ext-f \ ext-g ext-h ext-i ext-j ext-k ext-l ext-n ext-o ext-q ext-r ext-u ext-v \ - ext-x ext-y ext-z" + ext-x ext-y ext-z ext-3" echo $PREFIXES | xargs -n1 -P4 ${DIRSCRIPT}/export-by-prefix $DIR $PROJECT . -- To view, visit https://gerrit.wikimedia.org/r/390208 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5d1a88e3af15df57ac42c037773aac1c5896217b Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ShortUrl[master]: Make compatible with SemanticMediaWiki
Nikerabbit has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/389994 ) Change subject: Make compatible with SemanticMediaWiki .. Make compatible with SemanticMediaWiki Bug: T78018 Change-Id: I74b828d294d850c80b9506bb169e4031577fc97d --- M ShortUrl.hooks.php 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ShortUrl refs/changes/94/389994/1 diff --git a/ShortUrl.hooks.php b/ShortUrl.hooks.php index 3374d55..2b18d2e 100644 --- a/ShortUrl.hooks.php +++ b/ShortUrl.hooks.php @@ -19,9 +19,7 @@ public static function setupUrlRouting( $router ) { global $wgShortUrlTemplate; if ( $wgShortUrlTemplate ) { - $router->add( $wgShortUrlTemplate, - [ 'title' => SpecialPage::getTitleFor( 'ShortUrl', '$1' )->getPrefixedText() ] - ); + $router->add( $wgShortUrlTemplate, [ 'title' => 'Special:ShortUrl/$1' ] ); } return true; } -- To view, visit https://gerrit.wikimedia.org/r/389994 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I74b828d294d850c80b9506bb169e4031577fc97d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ShortUrl Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits