Commit Graph

14 Commits

Author SHA1 Message Date
Niklas Laxström
2a044e1e0a Small cleanups and typo fixes
Change-Id: I4faeb4673fd5e903d2931d6071262a893d4009f5
2021-04-21 11:48:15 +00:00
Timo Tijhof
4e067715dc Remove redundant closure aliases
'mw' are '$' are globals, always have been, and aren't going
anywhere. They're every bit as real as their longer versions.
If anything, the longer ones are less "real" or 'stable" because
they're not used internally by RL and easier to accidentally
replace or override. For anecdotes and history, see 91f950d6b0.

Change-Id: I526fb8c961d9477992d88f2780a0ff4cbdc51923
2018-09-07 19:23:17 +00:00
Fomafix
74d59bf306 Remove window.pluralRuleParser
The module 'jquery.i18n' was removed in 1312b905f2 because it is
already in core. The mapping from mw.libs.pluralRuleParser to
window.pluralRuleParser is not needed here anymore.

Change-Id: I00993d43578368ba3ebc1f4055cabf4904e45783
2018-02-16 16:32:59 +01:00
Siebrand Mazeland
6a2b2e0bba Update test files
- Updated versions and order of checkers.
- Some consistency updates in Gruntfile.js.
- Updates to make jscs pass.

Change-Id: I7ed93596ff383dc713bd17af2da0472be934d59d
2016-02-18 18:51:37 +00:00
Fomafix
c329f1473d Use spaces inside of brackets in JavaScript
* For consistency
* For MediaWiki coding conventions

Change-Id: I625a8ce0119b1490073f048e1b8ad4e90762d6e2
2016-02-15 13:31:45 +00:00
Santhosh Thottingal
ac50f27d2d Fix: Live preview of languages removes labels from the language panel
MW ULS uses its api to load the localization. Avoid the conflict with
i18n.load method. Directly use the i18n message stores load method

Bug: 61990
Change-Id: I7ea7e7fc31a0831ae2b2c4b4301fbe81109fdf9d
2014-02-27 15:18:13 +05:30
jenkins-bot
ab83208b60 Merge "Encode URL parameter" 2014-02-10 12:38:32 +00:00
Timo Tijhof
c6d71015ff Various clean up
Files:
* Consistently have one (1) new line at EOF
  (.gitignore, *.css, *.sh)

JSHint:
* Separate the common (general Wikimedia code conventions) from
  the local more stricter rules (nice work!).

Maintenance:
* Use simplified $IP definition where getenv is only called once.
  Based on http://git.io/ve-mw-36fc3b59-makeStaticLoader

JavaScript:
* Use the same closure in all files:
  - No need for "undefined".
  - One linebreak between license header and start of closure
    (sometimes there were 1 or 2 empty lines).
  - ext.uls.ime.js: No need for "document" (redundant in general,
    but especially as it wasn't used anywhere in this file).
  - Use "$, mw" for all ext.* modules (one of them used "mw, $").

Change-Id: Iba5dab14bbc3fbfc9f8fe96dd2d95529587a69aa
2014-02-08 00:11:50 -08:00
Fomafix
d50ca14543 Encode URL parameter
Change-Id: I2eaf564b35624c8441cb8f54f6ab166f5d1762a2
2014-01-21 07:18:03 +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
Santhosh Thottingal
7284215879 Fix javascript error with language fallbacks
Fallbacks are handled with ApiULSLocalization.

Bug: 51923

Change-Id: I9f68e0744bf0c730aa3a410901a9b536af7623fc
2013-07-24 09:50:02 +05:30
Santhosh Thottingal
2159822145 Update jquery.i18n from upstream, use its default message store
In Iddef0805ab a custom message store was introduced for ULS, but
there were updates in jquery.i18n that allows us to use default
message store again.

(see https://github.com/wikimedia/jquery.i18n/pull/40)

Change-Id: I86cb7a44efa83e5811824cd1104c6be11b1e2925
2013-07-23 15:32:45 +05:30
Santhosh Thottingal
28154206bf Remove jquery.i18n code that the ULS extension overrides
Instead of using the whole jquery.i18n code, use only required parts
that are not customized in MW ULS. For this define a new RL module
ext.uls.i18n.

Also refactor MW message store for jquery.i18n.

Change-Id: Idda9fe505428ade409d937314d7216ebb4232c36
2013-07-15 13:28:12 +00:00