Skip to content

Commit

Permalink
FAQ entries for dots next to date labels, downloading data dumps
Browse files Browse the repository at this point in the history
Add (all time) next to stats in Siteviews for clarity

Sort langs in language selector
  • Loading branch information
MusikAnimal committed Dec 27, 2016
1 parent db71aff commit 49e8bf5
Show file tree
Hide file tree
Showing 26 changed files with 77 additions and 15 deletions.
3 changes: 2 additions & 1 deletion javascripts/siteviews/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ const templates = {

for (let block in infoHash) {
const blockId = block.toLowerCase().score();
// "all time" text is shown only for .legend-block--statistics via CSS in siteviews.scss
markup += `<div class='legend-block legend-block--${blockId}'>
<h5>${block}</h5><hr/>
<h5>${block}<span class='text-muted'>(${$.i18n('all-time').toLowerCase()})</span></h5><hr/>
<div class='legend-block--body'>`;
for (let key in infoHash[block]) {
const value = infoHash[block][key];
Expand Down
4 changes: 4 additions & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@
"faq-location-body": "The geographic location of readers on a per-page basis is not available. This is primarily for privacy reasons. You can however see the total pageviews by country across all Wikimedia sites at $1.",
"faq-referrals-title": "Can I see how readers got to the page?",
"faq-referrals-body": "Referral information is not publicly available on a per-page basis. You can however see total referral statistics across all Wikimedia sites at $1.",
"faq-date-dot": "What are the dots next to the date labels?",
"faq-date-dot-body": "This indicates the first day of the week. Pageviews tend to be low during the weekends, so this indicator can give perspective to the seven-day pattern.",
"faq-data-dumps": "Can I download the full pageviews dataset for all pages?",
"faq-data-dumps-body": "Yes. The full data dumps for all supported Wikimedia sites can be downloaded at $1.",
"faq-agents-title": "What are the \"Agents\"?",
"faq-agents-user": "includes all people who view a page. Editors, anonymous editors, and our readers.",
"faq-agents-spider": "includes search engine \"<a href='https://en.wikipedia.org/wiki/Web_crawler'>web crawlers</a>\" like Google that read pages for the purposes of improving search results. Pages can receive significant views from web crawlers, which is why by default the tool shows data only from users.",
Expand Down
4 changes: 4 additions & 0 deletions messages/qqq.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@
"faq-location-body": "FAQ - body of the section about geographic data of readers. $1 is a link to stats.wikimedia.org",
"faq-referrals-title": "FAQ - title of the section about getting referral data",
"faq-referrals-body": "FAQ - body of the section about getting referral data. $1 is a link to discovery.wmflabs.org",
"faq-date-dot": "FAQ - title of the section explaining what the dots next to the date labels are.",
"faq-date-dot-body": "FAQ - body of the section explaining what the dots next to the date labels are.",
"faq-data-dumps": "FAQ - title of the section about where to download the full pageviews datasets.",
"faq-data-dumps-body": "FAQ - body of the section about where to download the full pageviews datasets.",
"faq-agents-title": "FAQ - title of the section explaining what the 'agent' options are",
"faq-agents-user": "FAQ - explanation of the 'User' agent option",
"faq-agents-spider": "FAQ - explanation of the 'Spider' agent option",
Expand Down
4 changes: 2 additions & 2 deletions public_html/_head.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ function ( $filename ) {

$availableLanguages = array();
foreach ( $languages as $lang ) {
$availableLanguages[$lang] = $I18N->getLangName( $lang );
$availableLanguages[$lang] = ucfirst( $I18N->getLangName( $lang ) );
}
ksort( $availableLanguages );
asort( $availableLanguages );
return $availableLanguages;
}

Expand Down
2 changes: 1 addition & 1 deletion public_html/_header.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
</a>
</li>
<li class="divider" role="separator"></li>
<?php foreach (array_unique($langs) as $lang => $langName) { ?>
<?php foreach ($langs as $lang => $langName) { ?>
<li>
<a class="lang-link" href="#" data-lang="<?php echo $lang; ?>"><?php echo $langName; ?></a>
</li>
Expand Down
4 changes: 3 additions & 1 deletion public_html/faq/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@
<ul class="list-group">
<?php include "../faq_parts/_old_data.php"; ?>
<?php include "../faq_parts/_todays_data.php"; ?>
<?php include "../faq_parts/_counts.php"; ?>
<?php include "../faq_parts/_search_redirects.php"; ?>
<?php include "../faq_parts/_redirects.php"; ?>
<?php include "../faq_parts/_counts.php"; ?>
<?php include "../faq_parts/_location.php"; ?>
<?php include "../faq_parts/_referrals.php"; ?>
<?php include "../faq_parts/_date_dot.php"; ?>
<?php include "../faq_parts/_agents.php"; ?>
<?php include "../faq_parts/_chart_type.php"; ?>
<li class="list-group-item">
Expand All @@ -47,6 +48,7 @@
<?php echo $I18N->msg( 'faq-try-tool', array( 'variables' => array( "<a href='/langviews'>" . $I18N->msg( 'langviews-title' ) . "</a>" ), 'parsemag' => true ) ); ?>
</p>
</li>
<?php include "../faq_parts/_data_dumps.php"; ?>
<?php include "../faq_parts/_feedback.php"; ?>
</ul>
<div class="col-lg-12 text-center tm">
Expand Down
2 changes: 1 addition & 1 deletion public_html/faq_parts/_counts.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<strong><?php echo $I18N->msg( 'faq-counts-title' ); ?></strong>
</p>
<p>
<?php $definitionLink = "<a target='_blank' href='https://meta.wikimedia.org/wiki/Research:Page_view#Definition'>meta:Research:Page view</a>"; ?>
<?php $definitionLink = "<a target='_blank' href='https://meta.wikimedia.org/wiki/Research:Page_view'>meta:Research:Page view</a>"; ?>
<?php echo $I18N->msg( 'faq-counts-body', [ 'variables' => [ $definitionLink ] ] ); ?>
</p>
</li>
9 changes: 9 additions & 0 deletions public_html/faq_parts/_data_dumps.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<li class="list-group-item" id="data_dumps">
<p>
<strong><?php echo $I18N->msg( 'faq-data-dumps' ); ?></strong>
</p>
<p>
<?php $statsLink = "<a href='https://dumps.wikimedia.org/other/pageviews/'>dumps.wikimedia.org</a>"; ?>
<?php echo $I18N->msg( 'faq-data-dumps-body', [ 'variables' => [ $statsLink ] ] ); ?>
</p>
</li>
8 changes: 8 additions & 0 deletions public_html/faq_parts/_date_dot.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<li class="list-group-item" id="data_dumps">
<p>
<strong><?php echo $I18N->msg( 'faq-date-dot' ); ?></strong>
</p>
<p>
<?php echo $I18N->msg( 'faq-date-dot-body' ); ?>
</p>
</li>
4 changes: 3 additions & 1 deletion public_html/langviews/faq/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@
<ul class="list-group">
<?php include "../../faq_parts/_old_data.php"; ?>
<?php include "../../faq_parts/_todays_data.php"; ?>
<?php include "../../faq_parts/_redirects.php"; ?>
<?php include "../../faq_parts/_counts.php"; ?>
<?php include "../../faq_parts/_redirects.php"; ?>
<?php include "../../faq_parts/_location.php"; ?>
<?php include "../../faq_parts/_referrals.php"; ?>
<?php include "../../faq_parts/_date_dot.php"; ?>
<?php include "../../faq_parts/_agents.php"; ?>
<?php include "../../faq_parts/_data_dumps.php"; ?>
<?php include "../../faq_parts/_feedback.php"; ?>
</ul>
<div class="col-lg-12 text-center tm">
Expand Down
1 change: 1 addition & 0 deletions public_html/massviews/faq/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
<?php include "../../faq_parts/_old_data.php"; ?>
<?php include "../../faq_parts/_todays_data.php"; ?>
<?php include "../../faq_parts/_counts.php"; ?>
<?php include "../../faq_parts/_date_dot.php"; ?>
<?php include "../../faq_parts/_agents.php"; ?>
<?php include "../../faq_parts/_feedback.php"; ?>
</ul>
Expand Down
1 change: 1 addition & 0 deletions public_html/redirectviews/faq/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<?php include "../../faq_parts/_counts.php"; ?>
<?php include "../../faq_parts/_location.php"; ?>
<?php include "../../faq_parts/_referrals.php"; ?>
<?php include "../../faq_parts/_date_dot.php"; ?>
<?php include "../../faq_parts/_agents.php"; ?>
<?php include "../../faq_parts/_feedback.php"; ?>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion public_html/siteviews/application.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public_html/siteviews/application.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public_html/siteviews/faq/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
</li>
<?php include "../../faq_parts/_counts.php"; ?>
<?php include "../../faq_parts/_agents.php"; ?>
<?php include "../../faq_parts/_date_dot.php"; ?>
<?php include "../../faq_parts/_chart_type.php"; ?>
<li class="list-group-item">
<p>
Expand Down
11 changes: 11 additions & 0 deletions stylesheets/siteviews/siteviews.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,14 @@
.search-method-options {
display: none;
}

.legend-block {
h5 .text-muted {
display: none;
margin: 0 6px;
}

&--statistics h5 .text-muted {
display: inline;
}
}
4 changes: 2 additions & 2 deletions views/_head.haml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

$availableLanguages = array();
foreach ( $languages as $lang ) {
$availableLanguages[$lang] = $I18N->getLangName( $lang );
$availableLanguages[$lang] = ucfirst( $I18N->getLangName( $lang ) );
}
ksort( $availableLanguages );
asort( $availableLanguages );
return $availableLanguages;
}

Expand Down
2 changes: 1 addition & 1 deletion views/_header.haml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
%a(href="https://translatewiki.net/w/i.php?title=Special:MessageGroupStats&group=out-pageviews")
= $I18N->msg( 'help-translate' )
%li.divider(role="separator")
- foreach (array_unique($langs) as $lang => $langName)
- foreach ($langs as $lang => $langName)
%li
%a.lang-link(href="#" data-lang="#{$lang}")= $langName

Expand Down
4 changes: 3 additions & 1 deletion views/faq.haml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@
%ul.list-group
- include "../faq_parts/_old_data.php"
- include "../faq_parts/_todays_data.php"
- include "../faq_parts/_counts.php"
- include "../faq_parts/_search_redirects.php"
- include "../faq_parts/_redirects.php"
- include "../faq_parts/_counts.php"
- include "../faq_parts/_location.php"
- include "../faq_parts/_referrals.php"
- include "../faq_parts/_date_dot.php"
- include "../faq_parts/_agents.php"
- include "../faq_parts/_chart_type.php"
%li.list-group-item
Expand All @@ -37,6 +38,7 @@
%strong= $I18N->msg( 'faq-multi-lang-title' )
%p
= $I18N->msg( 'faq-try-tool', array( 'variables' => array( "<a href='/langviews'>" . $I18N->msg( 'langviews-title' ) . "</a>" ), 'parsemag' => true ) )
- include "../faq_parts/_data_dumps.php"
- include "../faq_parts/_feedback.php"

%div.col-lg-12.text-center.tm
Expand Down
2 changes: 1 addition & 1 deletion views/faq_parts/_counts.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
%p
%strong= $I18N->msg( 'faq-counts-title' )
%p
- $definitionLink = "<a target='_blank' href='https://meta.wikimedia.org/wiki/Research:Page_view#Definition'>meta:Research:Page view</a>"
- $definitionLink = "<a target='_blank' href='https://meta.wikimedia.org/wiki/Research:Page_view'>meta:Research:Page view</a>"
= $I18N->msg( 'faq-counts-body', [ 'variables' => [ $definitionLink ] ] )
6 changes: 6 additions & 0 deletions views/faq_parts/_data_dumps.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
%li.list-group-item(id="data_dumps")
%p
%strong= $I18N->msg( 'faq-data-dumps' )
%p
- $statsLink = "<a href='https://dumps.wikimedia.org/other/pageviews/'>dumps.wikimedia.org</a>"
= $I18N->msg( 'faq-data-dumps-body', [ 'variables' => [ $statsLink ] ] )
5 changes: 5 additions & 0 deletions views/faq_parts/_date_dot.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
%li.list-group-item(id="data_dumps")
%p
%strong= $I18N->msg( 'faq-date-dot' )
%p
= $I18N->msg( 'faq-date-dot-body' )
4 changes: 3 additions & 1 deletion views/langviews/faq.haml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@
%ul.list-group
- include "../../faq_parts/_old_data.php"
- include "../../faq_parts/_todays_data.php"
- include "../../faq_parts/_redirects.php"
- include "../../faq_parts/_counts.php"
- include "../../faq_parts/_redirects.php"
- include "../../faq_parts/_location.php"
- include "../../faq_parts/_referrals.php"
- include "../../faq_parts/_date_dot.php"
- include "../../faq_parts/_agents.php"
- include "../../faq_parts/_data_dumps.php"
- include "../../faq_parts/_feedback.php"

%div.col-lg-12.text-center.tm
Expand Down
1 change: 1 addition & 0 deletions views/massviews/faq.haml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
- include "../../faq_parts/_old_data.php"
- include "../../faq_parts/_todays_data.php"
- include "../../faq_parts/_counts.php"
- include "../../faq_parts/_date_dot.php"
- include "../../faq_parts/_agents.php"
- include "../../faq_parts/_feedback.php"

Expand Down
1 change: 1 addition & 0 deletions views/redirectviews/faq.haml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
- include "../../faq_parts/_counts.php"
- include "../../faq_parts/_location.php"
- include "../../faq_parts/_referrals.php"
- include "../../faq_parts/_date_dot.php"
- include "../../faq_parts/_agents.php"
- include "../../faq_parts/_feedback.php"

Expand Down
1 change: 1 addition & 0 deletions views/siteviews/faq.haml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
= $I18N->msg( 'faq-source-unique-devices' )
- include "../../faq_parts/_counts.php"
- include "../../faq_parts/_agents.php"
- include "../../faq_parts/_date_dot.php"
- include "../../faq_parts/_chart_type.php"
%li.list-group-item
%p
Expand Down

0 comments on commit 49e8bf5

Please sign in to comment.