Erik Zachte has submitted this change and it was merged. Change subject: fix: WikiCounts expects undeerscore as delimiter in StatisticsContentNamespaces.csv, should expect dashes ......................................................................
fix: WikiCounts expects undeerscore as delimiter in StatisticsContentNamespaces.csv, should expect dashes Change-Id: I0a64c80a7ab6a3fae6b4d69b2b3abf00dadda7fe --- M dumps/perl/WikiCountsInput.pm 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Erik Zachte: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/dumps/perl/WikiCountsInput.pm b/dumps/perl/WikiCountsInput.pm index d812ebb..fd6dfc9 100644 --- a/dumps/perl/WikiCountsInput.pm +++ b/dumps/perl/WikiCountsInput.pm @@ -3142,11 +3142,13 @@ if (! -e $file_csv_content_namespaces) { abort ("Namespaces file not found: '$file_csv_content_namespaces'. Run 'collect_countable_namespaces.sh'\n") ; } + my ($language2 = $language) =~ s/_/-/g ; # wikistats (unfortunately) uses codes like 'roa_rup', not 'roa-rup' , to be changed some day + $line_content_namespaces = '' ; open FILE_NS, "<", $file_csv_content_namespaces ; while ($line = <FILE_NS>) { - if ($line =~ /^$mode\,$language\,/) + if ($line =~ /^$mode\,$language2\,/) { chomp ($line) ; $line_content_namespaces = $line ; @@ -3159,7 +3161,7 @@ if ($line_content_namespaces ne '') { &LogT ("Read content namespaces from file '$file_csv_content_namespaces': line='$line_content_namespaces'\n") ; - my ($mode,$language,$content_namespaces) = split (',', $line_content_namespaces) ; + my ($dummy_mode,$dummy_language,$content_namespaces) = split (',', $line_content_namespaces) ; foreach $id (split '\|', $content_namespaces) { $content_namespace {$id} = $true ; } &LogT ("Content namespaces for language $language: " . join (',', sort keys %content_namespace) . "\n") ; -- To view, visit https://gerrit.wikimedia.org/r/81935 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0a64c80a7ab6a3fae6b4d69b2b3abf00dadda7fe Gerrit-PatchSet: 1 Gerrit-Project: analytics/wikistats Gerrit-Branch: master Gerrit-Owner: Erik Zachte <ezac...@wikimedia.org> Gerrit-Reviewer: Erik Zachte <ezac...@wikimedia.org> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits