|Resolved||• Lea_WMDE||T143664 Improve page view statistics (#15)|
|Resolved||None||T120497 Pageview Stats tool|
|Resolved||None||T127856 Add links to https://tools.wmflabs.org/pageviews from top 10 wikis|
|Resolved||Johan||T130682 Talk to top ten language WP communities about linking to new Pageviews Analysis from Pageinfo|
|Resolved||MusikAnimal||T128770 Add language selector to Settings interface in pageviews tool|
|Resolved||kaldari||T128768 Register pageviews tool with translatewiki.net|
|Resolved||kaldari||T128103 Add i18n support to pageviews tool with Intuition|
Got some info from Krinkle. Looks like the client-side should be doable also. The only parts that are still sketch are the 3rd party tools such as daterangepicker.js and select2.js (it actually looks like Chart.js doesn't need to be modified). @MusikAnimal, do you think we should fork those within pageviews to add i18n support? Maybe we could upstream the changes afterwards.
For daterangepicker, you can pass in a locale object to change the labels, formats, etc. Check "locale" on the config generator to see examples. Not sure about Select2, but I think we could probably get away with not translating it. It's intuitive enough that the instructional text is just a bonus and not needed. If you're up for forking it and adding i18n then I've no opposition, though!
Commented on the PR... essentially I want to get this other branch merged in before merging in the i18n branch. With the advent of PHP we'll need to rework the views and I think we'll have a lot of conflicts. Sorry for making this so difficult... once we get these two branches in I think any new concurrent development should go more smoothly.
@kaldari Hey! I've merged in the semi-complete topviews app (a sneak peak at http://tools.wmflabs.org/topviews). I now want to work off of your i18n PR to render partials for the header/footer, etc, and adjust the directory structure to accommodate our new PHP setup.
A question... how do we set the language? You said their language preference persists across other Intuition apps. Since we only have English right now, would non-English users have any labels, or does it default to English?
A question... how do we set the language?
It defaults to English, but once we have other json files, you'll be able to change it by setting a cookie. There is a function in Intuition for getting all the currently supported languages. We can use that to create a select list in the Settings if we want to provide a manual way to change the language (other than changing your browser's language setting).
Alright, I've reworked the app to be all PHP views and ditching HAML entirely. The PR is at https://github.com/MusikAnimal/pageviews/pull/31 and I've got it up and running at http://tools.wmflabs.org/pageviews-test I've noticed the PHP version is marginally slower than the static HTML, but that's OK.
So next up is to merge in your changes to that branch and do some final testing, since this is such a major overhaul.
Should we go ahead and recruit some volunteers to do the translating?
@kaldari Done! But for this i18n work let's keep it on the php branch. I want to keep that and the old code separated just during the testing phase. Let me write up the deploy process and then I will add you as a maintainer of toollabs:pageviews-test, and eventually the main app too :-)