Commit Graph

7 Commits

Author SHA1 Message Date
Timo Tijhof
2ab168f113 Use getDefinitionSummary() in ResourceLoaderULSJsonMessageModule
* Fix inaccurate class comment that was copied from an unrelated
  module in MediaWiki core.

* Remove use of deprecated getModifiedTime(). While this implementation was
  straight forward, it is more reliable and deterministic to use a content hash
  because timestamps are not tracked by Git. This currently causes needless
  cache invalidation for all users at Wikimedia every week because git-clone
  starts with fresh timestamps on disk.

  I'm not using enableModuleContentVersion() right now because calling
  getScript() reads all files into memory which is more expensive than
  simply hashing the files. Especially because safeFileHash() is backed
  by an APC cache via FileContentsHasher.

  This matches the implementation in core ResourceLoaderFileModule.

Change-Id: If9aaefa6a3cf047c6c36e1cdd0f350412d59c849
2016-08-23 21:49:26 +00:00
jdlrobson
9e0dcbde35 Enable UniversalLanguageSelector modules for mobile
Enable several of the ULS modules so they can be used in a mobile context,
in particular by the Translate Extension

Changes:
* Create a ext.uls.common module that can be loaded safely on mobile
* Only add the ext.uls.init entry point module on desktop (ensured by
the use of targets). On mobile it has no impact other than to increase
the amount of bytes shipped to users.
* Note various modules have not been enabled for mobile usage.

Bug: T102922
Change-Id: If2808886f0bfa153f5918e3c7536e88641028da9
2016-08-17 06:43:46 +00:00
Kunal Mehta
6b8c33e763 build: Updating mediawiki/mediawiki-codesniffer to 0.7.1
Also added "composer fix" command.

Change-Id: I6f3f29f03abb607fbca9cec6f140875f2a3468a0
2016-05-09 18:30:34 -07:00
Siebrand Mazeland
49b4cc0028 Declare functions with access modifiers
Change-Id: I047d3dc6642de07130a43ad4c2fd4a8106450aac
2016-03-05 16:10:52 +01:00
Andrew Green
c00645a0a0 Update ResourceLoaderULSJsonMessageModule::getDependencies method signature
This change is for compatibility with Iee61e5b527 in MediaWiki.

This patch updates version info due to said requirement.

Change-Id: Ic63e617f51702c27104e123d4bed91983a726b7f
2015-06-09 01:23:30 +00:00
Santhosh Thottingal
328eb017c8 Json message loader clean up
* Rename JsonMessageLoader to ULSJsonMessageLoader
* Correct the return type of mw.uls.loadLocalization

Follow up: Ic39dec1c484982fb07edd167e83794c0b5f470ee

Change-Id: I13c64a5e89ac75be8a95d951658018a78534f466
2013-11-19 10:55:52 +00:00
Santhosh Thottingal
76e82e4a9c ResourceLoader Module for serving json based localization messages
ApiULSLocalization is still present since we have to provide live
language preview feature.

Moved the loading of json file to includes/JsonMessageLoader.php

Also moved all RL modules to includes folder.

Bug: 56509
Change-Id: Ic39dec1c484982fb07edd167e83794c0b5f470ee
2013-11-04 14:59:14 +00:00