Commit graph

123 commits

Author SHA1 Message Date
Translation updater bot a4516f2039 Merge "Localisation updates from https://translatewiki.net." into dev 2015-11-22 19:49:50 +00:00
Translation updater bot 942922b80b Localisation updates from https://translatewiki.net.
Change-Id: I2bbb8666d13e242041a4af0d2db288d925175d43
2015-11-22 20:46:05 +01:00
Translation updater bot ba69f625ab Merge "Localisation updates from https://translatewiki.net." into dev 2015-11-20 22:01:30 +00:00
Translation updater bot 8ddf27486d Localisation updates from https://translatewiki.net.
Change-Id: I2a6253e0ff04d69b93516af2e3ba8f1cb1cf7de2
2015-11-20 22:57:35 +01:00
Translation updater bot 388f36aef3 Merge "Localisation updates from https://translatewiki.net." into dev 2015-11-19 20:43:11 +00:00
Translation updater bot 614c319b99 Localisation updates from https://translatewiki.net.
Change-Id: I47ff0a8aa50be16b0630e0289329d214ace40b7d
2015-11-19 21:39:50 +01:00
jenkins-bot fcdff4b4fe Merge "Make RelatedArticles soft-depend on Cards" into dev 2015-11-19 13:48:30 +00:00
Translation updater bot 3ac8ccaf97 Merge "Localisation updates from https://translatewiki.net." into dev 2015-11-18 21:02:18 +00:00
Translation updater bot 3b75c89652 Localisation updates from https://translatewiki.net.
Change-Id: Icf963340913d2e2bf1d60cba68b6fe30f52bf3b1
2015-11-18 21:59:37 +01:00
Baha 8cf9b60ab5 Make RelatedArticles soft-depend on Cards
RelatedArticles tries to load the 'ext.cards' module and if
it succeeds it continues with showing the related articles
on the page.

Dependency: I6661527175eb889cec4193b18fa18207f332b4fc
Bug: T117108
Change-Id: I33936a3e9cd5d1f0296e48fd1c2bba77fff4e466
2015-11-18 22:22:10 +05:00
Translation updater bot f24b8aa0d3 Merge "Localisation updates from https://translatewiki.net." into dev 2015-11-17 20:57:56 +00:00
Translation updater bot 6874a47b4d Localisation updates from https://translatewiki.net.
Change-Id: I4ddad00fc080bdb67e8f2a7fad461d51c3cce983
2015-11-17 21:53:42 +01:00
jenkins-bot 0f9193e8c2 Merge "[Hygiene] Rename internal uses of "article" to "page"" into dev 2015-11-17 11:37:58 +00:00
Translation updater bot ca973045f6 Merge "Localisation updates from https://translatewiki.net." into dev 2015-11-16 21:20:36 +00:00
Translation updater bot 7b6b4271c4 Localisation updates from https://translatewiki.net.
Change-Id: Ib90ecd4d7c12e2a7f58cc87540294224f5ed730a
2015-11-16 22:17:23 +01:00
Translation updater bot 09a3b720cb Merge "Localisation updates from https://translatewiki.net." into dev 2015-11-15 21:24:38 +00:00
Translation updater bot 8fd7dd8c6c Localisation updates from https://translatewiki.net.
Change-Id: I567cccefb8a8e0a66b3d3f446d9fac94217102cf
2015-11-15 22:19:53 +01:00
Translation updater bot 7456dab2eb Merge "Localisation updates from https://translatewiki.net." into dev 2015-11-14 21:21:25 +00:00
Translation updater bot 59f91b6f6c Localisation updates from https://translatewiki.net.
Change-Id: I372ef413e1b0a4638fd0a3b41f7b3a33d81d046a
2015-11-14 22:17:41 +01:00
jhobs d08962d12d [Hygiene] Rename internal uses of "article" to "page"
Leave all public-facing uses of "article" (including classes) because
the extension is remaining named RelatedArticles. Replace all other
instances with "page" for consistency with other extensions.

Bug: T117908
Change-Id: Ib0f258f26b0d11cfe8a598dbd90ff37afbbe36ac
2015-11-13 19:03:39 -05:00
Translation updater bot 7258716594 Merge "Localisation updates from https://translatewiki.net." into dev 2015-11-13 20:36:36 +00:00
Translation updater bot ba224d1fd8 Localisation updates from https://translatewiki.net.
Change-Id: Ieebba2865d1299654c938e6a33aa7e6599a5f790
2015-11-13 21:34:35 +01:00
Sam Smith f87807e457 Limit the number of pages to 3
Bug: T116810
Change-Id: I175a1fd26d2041e3c652c80653a73b4211b992e6
2015-11-13 12:01:35 +00:00
Translation updater bot 0f554baa6e Merge "Localisation updates from https://translatewiki.net." into dev 2015-11-12 22:04:36 +00:00
Translation updater bot df530e471e Localisation updates from https://translatewiki.net.
Change-Id: Ie4dd3af0f529592595eadae54f0640fc4ef424f6
2015-11-12 23:00:40 +01:00
jenkins-bot b83e1bdc58 Merge "Optionally disable Read More using extension data" into dev 2015-11-12 15:55:01 +00:00
jenkins-bot 6a0a130a8d Merge "Remove CustomData extension dependency" into dev 2015-11-12 12:51:05 +00:00
Sam Smith 0fed50e266 Optionally disable Read More using extension data
By default, the Read More feature tries to use editor-curated articles
before using the CirrusSearch morelike: feature. Add a configuration
variable that disables the former behaviour but leave the default in
place.

Changes:

* Add the wgReadMoreOnlyUseCirrusSearch configuration variable, which
  defaults to false, and pass it in to
  mw.relatedArticles.RelatedPagesGateway at construction time
* Add the onlyUseCirrusSearch parameter to
  mw.relatedArticles.RelatedPagesGateway, which controls whether to
  ignore the editorCuratedArticles parameter

Bug: T117443
Change-Id: I0dfa67f4a68e8dc17302fef7ebf8d23c0c1d892c
2015-11-12 12:43:29 +00:00
Translation updater bot 95792e7aa8 Merge "Localisation updates from https://translatewiki.net." into dev 2015-11-11 20:59:37 +00:00
Translation updater bot 9092fac5f8 Localisation updates from https://translatewiki.net.
Change-Id: Ibe96646e5b55f1940e7bfcc32477fc12bcd059c5
2015-11-11 21:55:38 +01:00
Translation updater bot 371998e22e Merge "Localisation updates from https://translatewiki.net." into dev 2015-11-10 21:36:58 +00:00
Translation updater bot 602f7d4835 Localisation updates from https://translatewiki.net.
Change-Id: Ib4798cc237bddedf9f7450fac332131bbdfa1485
2015-11-10 22:35:55 +01:00
Timo Tijhof 529b798198 build: Simplify Grunt configuration
* Remove file pattern whitelist for JSHint and JSCS. Instead,
  use the ignore list (which we need to specify anyway to avoid
  errors when using IDE plugins and/or running these from the
  command-line directly.

* Remove redundant '*.json' pattern for banana. '**/*.json' covers
  this already as '**' is recursive from the current directory,
  otherwise it would be '*/**'.

* Remove redundant 'name' and 'version' property. These were likely
  added to suppress warnings by npm-install. However those warnings
  are intended for packages published to npmjs.org. For local build
  tools, adding private:true also suppress these warnings. For
  extensions, name and versions are already maintained in other files
  such as extension.json and others.

* Remove redundant '$' entry in jshintrc. There's no need to tolerate
  use of global variable '$'. The convention is to use 'jQuery' and
  alias it locally, which this extension already does everywhere.

* Set 'jQuery' to false instead of true in jshint globals. True
  means it allows and expects this package to assign or expose
  the 'jQuery' identifier. However that is not the case. If this
  code overwrites jQuery, that should probably trigger a warning,
  thus set to false, which means read-only global.

Change-Id: I0b159b6d684f67933e0dae506db1eb3800a6f192
2015-11-10 18:07:15 +00:00
Sam Smith 239705928d Remove CustomData extension dependency
The related pages stored via CustomData  will have been migrated to the
cached ParserOutput class over the last 30 days, per I30bd17f, so all
interactions with/references to CustomData can be removed.

Bug: T115019
Change-Id: I36919d2443f0ee02ac6baf9a4d2228b028b2e6ed
2015-11-10 17:03:06 +00:00
jenkins-bot 35193ffc66 Merge "Add event logging to read more" into dev 2015-11-10 12:35:19 +00:00
Baha 3995b7a8ef Add event logging to read more
* Schema is located at https://meta.wikimedia.org/wiki/Schema:RelatedArticles.
* Track 'ready', 'seen', and 'clicked' events.
* The sampling rate can be set using the RelatedArticlesLoggingSamplingRate variable.
  If the variable is not set, sampling will be disabled. The default sampling rate
  is 0.01.
* Events are tracked using a unique user session token.

Dependency: Iea00d534371353c3ae5c06c74a08aa10cb60047b
Bug: T114303
Change-Id: I649d0817cbd10ad734989da548d20ad33e7f7360
2015-11-10 15:23:12 +05:00
Translation updater bot 356bdf5206 Merge "Localisation updates from https://translatewiki.net." into dev 2015-11-09 20:52:06 +00:00
Translation updater bot e581445e04 Localisation updates from https://translatewiki.net.
Change-Id: Ia6d29a76da1d805e9f925fd4f53c00e7073416a4
2015-11-09 21:47:55 +01:00
Translation updater bot 631814bfb5 Merge "Localisation updates from https://translatewiki.net." into dev 2015-11-08 21:15:35 +00:00
Translation updater bot 348ac6440a Localisation updates from https://translatewiki.net.
Change-Id: I6dfc6d79e32ffd4aad190dcd2bf5b114bd769651
2015-11-08 22:12:39 +01:00
Translation updater bot 8c235cdad0 Merge "Localisation updates from https://translatewiki.net." into dev 2015-11-07 21:46:41 +00:00
Translation updater bot bdd267f6ba Localisation updates from https://translatewiki.net.
Change-Id: Ide171261caeefea32365927c2a326d43b6cbf909
2015-11-07 22:44:39 +01:00
Sam Smith 7ebe784fc2 Run JSHint and JSCS against tests
Changes:

* Extend the definition of all JavaScript files to include those in the
  tests directory
* Run JSHint and JSCS against all JavaScript files
* Fix the existing code style errors in the RelatedPagesGateway
  test

Change-Id: Ia6d8fa63e0b86760857d4480a0575b57512fa36b
2015-11-06 22:08:31 +00:00
jenkins-bot d09d128976 Merge "Put Read More behind a feature flag" into dev 2015-11-06 22:00:54 +00:00
Translation updater bot 2f08387830 Merge "Localisation updates from https://translatewiki.net." into dev 2015-11-06 21:30:28 +00:00
Translation updater bot deb6c8c6b7 Localisation updates from https://translatewiki.net.
Change-Id: I5475324a8181024f40c885b876594b8c3ecd741a
2015-11-06 22:27:29 +01:00
Sam Smith 5b5a0b288f Put Read More behind a feature flag
Changes:
* Add the RelatedArticlesShowReadMore feature flag, which is disabled by
  default
* Only consider adding the Read More bootstrap module to the output when
  the feature is enabled

Change-Id: I60fc38115257c9a5dbf04b51dbec7f091574d8f6
2015-11-06 20:12:27 +00:00
jenkins-bot 208cb50d33 Merge "Fall back to CirrusSearch's morelike: feature" into dev 2015-11-06 18:48:03 +00:00
jdlrobson e86fc3b159 Fall back to CirrusSearch's morelike: feature
When no related articles have been specified by an editor we instead
hit request pages similar to the current page using the CirrusSearch
extension's "morelike:" feature [0].

Changes:
* Config variable introduced RelatedArticlesUseCirrusSearch which allows
you to turn on use of the CirrusSearch API.
* Introduce a RelatedPagesGateway for dealing with making the API call
  and returning consistent results
* Move the "simple" API call for hydrating related pages fetched from
  the wgRelatedArticles configuration variable into RelatedPagesGateway
* Reduce the bootstrap module to just a bootstrap module!

Bug: T116707
Change-Id: Ia0ced1d7ae57c0939d1f5af275aa9d393f1420b1
2015-11-06 10:23:39 -08:00
Translation updater bot 44ef79949c Merge "Localisation updates from https://translatewiki.net." into dev 2015-11-05 20:48:13 +00:00