Commit graph

456 commits

Author SHA1 Message Date
Translation updater bot 4cd517ede6 Localisation updates from https://translatewiki.net.
Change-Id: Ic5786e4bebbb9e45f1bfee01b9c928098d03d1f6
2014-02-08 21:24:36 +00:00
Jackmcbarn 2b06e83816 Remove message formats other than plain
Message formats other than plain should have never been exposed in this
way, as they allow link tables, etc. to be bypassed and serve no useful
purpose. This removes them, and also removes title, as it serves no
purpose without them.

Bug: 60758
Change-Id: I96284ffbe986a9cd92d2bde1ffdb746029bad989
2014-02-03 15:29:39 -05:00
jenkins-bot 7146e6922d Merge "Module namespace translations for Serbian Latin and Croatian" 2014-02-02 09:37:07 +00:00
Translation updater bot 9b49b99ca2 Localisation updates from https://translatewiki.net.
Change-Id: Ie9acd24e69554d780a8caff8ec73b5e2bcf09842
2014-02-01 19:45:25 +00:00
Marius Hoch aa943d5795 Validate the type of the tagName given to mw.html.create
Change-Id: I35f70701ba6156325dfd268903452e6279aca528
2014-01-31 02:08:11 +01:00
Brad Jorsch 5cf28c5a15 Use a child frame in frame:expandTemplate
If we don't do this, then the section edit links point to the wrong page
if we expand a template that contains section headings.

Bug: 55525
Change-Id: I00bda935be3e8b9c0f86fd0f131814207fbb34a7
2014-01-30 22:47:31 +00:00
jenkins-bot 4786af9fac Merge "Add composer.json file" 2014-01-29 19:22:55 +00:00
Adrian Lang d26c1eb961 Add composer.json file
Change-Id: Ib80bddfd3d8d40caf4f8efba4e3db6ef6fa2866d
2014-01-29 20:07:55 +01:00
Translation updater bot 45adde9f52 Localisation updates from https://translatewiki.net.
Change-Id: I7a9a1835bcfac0fd4309fb8b08344170f3718028
2014-01-28 21:21:54 +00:00
Translation updater bot aef5c07c8a Localisation updates from https://translatewiki.net.
Change-Id: Ie8eb2108922c9ff35e414c261c331719df54a9bf
2014-01-24 20:12:27 +00:00
Translation updater bot e2935310e3 Localisation updates from https://translatewiki.net.
Change-Id: Ibee9eef6a002814cc378793383cfca62328e3273
2014-01-23 20:18:56 +00:00
Translation updater bot 3e0ba646b7 Localisation updates from https://translatewiki.net.
Change-Id: I5659d67abe436992c6679eb4d60731c0887809fa
2014-01-20 20:26:01 +00:00
raymond 37d7a0c407 Module namespace translations for Serbian Latin and Croatian
By Kolega2357
https://translatewiki.net/wiki/Thread:Talk:Support/Module_namespace_-_translation_on_Serbian_Latin_and_Croatian

Change-Id: I9b3bd399ed3e0999efde61d6b885d2c33290729d
2014-01-19 21:48:34 +01:00
Marius Hoch 2bcd815d62 Allow changing the title used by Scribunto_LuaEngineTestBase
Change-Id: I8916fc855b96a566d775c947b117a31ad4a49dc8
2014-01-16 17:00:30 +01:00
jenkins-bot b1d7bac7b0 Merge "Add protectionLevels variable to mw.title output" 2014-01-15 20:21:48 +00:00
Jackmcbarn 9902ec1284 Add protectionLevels variable to mw.title output
Include a protectionLevels variable in the output of the mw.title.*
functions, containing the contents of the title's mRestrictions
array (i.e., its protection levels)

Change-Id: I79c9fed64bacfc90aee1d411a3e1b47e44c99755
2014-01-15 14:53:18 -05:00
Brad Jorsch f52136eada Handle invalid keys in Lua-to-PHP calls for LuaStandalone
PHP can't handle having arrays/objects or functions as keys in its
arrays, so make sure we don't try to pass them from Lua. Booleans aren't
really well-handled either, so let's disallow them too.

Also, add tests for proper stringification of floats and infinities when
those are used as keys.

Note this behavior change is needed to match the change in LuaSandbox
for fixing bug 54527, but isn't itself a security issue.

Change-Id: I1e2951bbe8cb78358650ad377bf7119fcac4485d
2014-01-14 10:03:42 -05:00
jenkins-bot bc65238698 Merge "Namespace translations for Serbian, Serbo-Croatian" 2014-01-08 07:51:53 +00:00
Tomasz W. Kozlowski 1c7df5a0a7 Namespace translations for Serbian, Serbo-Croatian
https://translatewiki.net/wiki/Thread:Support/Module_namespace_-_translation_on_Serbian_and_Serbo_Croatian

Change-Id: Ib5008d0281b05ef0d5703c885211e91ffc6ad45f
2014-01-08 07:48:41 +00:00
Translation updater bot b7b94fb11b Localisation updates from https://translatewiki.net.
Change-Id: I17e566581921e59d8ef6299276fc7c6aff9ac448
2014-01-07 20:46:07 +00:00
jenkins-bot b34e466b18 Merge "Add mw.html to Scribunto" 2014-01-07 14:09:46 +00:00
Translation updater bot 0ea533de53 Localisation updates from https://translatewiki.net.
Change-Id: I7bdc28c27ebb1a4fbda7815b77a579caf9d226c7
2014-01-06 20:07:35 +00:00
Bartosz Dziewoński 32b23da93a Namespace translation updates
* Renamed 'no' to 'nb'
* Added 'fi' and 'ro'

Requested at:
* bug 59014
* https://meta.wikimedia.org/wiki/User_talk:Matma_Rex#Translation_of_Module_namespace_name
* https://translatewiki.net/wiki/Thread:Support/Rename_%22module%22_namespace
* https://meta.wikimedia.org/w/index.php?title=Stewards%27_noticeboard&oldid=6929612#Renaming_namespaces

Change-Id: I69ec61305d638dd39e70406e192101c89ab7a1f4
2014-01-03 14:17:26 +01:00
Marius Hoch ac62e34952 Add mw.html to Scribunto
A module for building complex HTML from Lua using a
fluent interface. The module is originally from enwiki,
but the authors allowed us to reuse it under GPLv2+
(as stated in the file).
The module will be loaded per default and comes with
unit tests.

As discussed on wikitech-l:
http://lists.wikimedia.org/pipermail/wikitech-l/2013-December/073320.html

Change-Id: I7c8d4378091c13d5ace0dd1fcbb4e27163e8c896
2014-01-03 00:04:34 +01:00
Translation updater bot 06b58e1550 Localisation updates from https://translatewiki.net.
Change-Id: I18a3f68ae2cf1f40954f636eeff09ef9636d7cf6
2014-01-01 19:59:03 +00:00
Translation updater bot 0d58bc0145 Localisation updates from https://translatewiki.net.
Change-Id: Ic806a5a48b4ff248a87db98b0edc0190ebbfabea
2013-12-28 19:31:43 +00:00
Translation updater bot fdfb89464a Localisation updates from https://translatewiki.net.
Change-Id: I0a3d3db8ac66ccea6f86bc6a775ca8e78bc44bf3
2013-12-19 20:54:14 +00:00
Brad Jorsch 3ced70adb8 Provide access to Language::getFallbacksFor()
The other fallback-related functions in PHP all seem to be based on
this.

Bug: 48328
Change-Id: I4b54ab0c1e1535529f47443f6d0e72a59d3d120c
2013-12-16 14:12:47 -05:00
Translation updater bot fe52171f05 Localisation updates from https://translatewiki.net.
Change-Id: I61ca59d84a126834c31a4bcb5362abe7fa69f972
2013-12-13 20:08:24 +00:00
Timo Tijhof 4b31b71cfc Clean up existing code and pass jshint
Coding style:
* Avoid meaningless '_' in variable names, especially when used
  inconsistently.
* Avoid trailing line comments.
* Consistent if/else curly brace position.
* Consistently use single quotes (there are no magic quotes in js).
* Consistently use $ in variable names of jQuery-wrapped elements
  (as opposed to plain node references).
* Avoid using variable names like '_this' or 'that', instead name
  them after the object.
* Too many var statements.
* Hoist var statement.
* Fix alignment of closing parentheses in initEditPage.

Code quality:
* Remove commented out code.
* Add missing radix parameter for parseInt.
* Remove unused private function "printWithRunin".
* Remove unused parameters.
* Don't call "console.log" in production client-side code because
  the console doesn't always exist in normal browser modes (and
  would result in an Uncaught ReferenceError, aborting the script
  unexpectedly and leaving the user interface in a likely
  unresponsive state).
* Use the Promise.done and Promise.fail handlers of mw.Api,
  instead of the deprecated 'ok' and 'err' parameters.
* Use jQuery#on instead of the deprecated jQuery#bind.
* Use a local shared reference to the singleton instead of relying
  on 'this' context, this way the methods can be called
  regardless of context. Such as in the $(document).ready(), or
  when passing around setErrors callback.
* Avoid using invalid html shortcuts like <div/>, use <tag>
  for creation, and <tag>..</tag> for parsing (per style guide).
* Document inputKeydown parameter being jQuery.Event (as oppposed
  to native Event).

Misc:
* Renamed '_in' to 'in', and renamed again to 'input' ('in' is an
  illegal variable name and would've crashed).

Change-Id: I283fda1409b1e76db56a939183bdaefc95e60961
2013-12-13 00:50:13 +01:00
Translation updater bot 60cee45f4e Localisation updates from https://translatewiki.net.
Change-Id: I8db1fd2c79f87fd682c977beaf7297579f094e0b
2013-12-12 21:16:40 +00:00
jenkins-bot 88d09d10fc Merge "Revert "(bug 54951) Add Malayalam aliases for 828 and 829"" 2013-12-12 01:39:49 +00:00
Translation updater bot 89fdb02d5f Localisation updates from https://translatewiki.net.
Change-Id: I4cac1b0d4319a1aa781ea9b96c8c61a3bb9d3ca0
2013-12-11 20:28:23 +00:00
Reedy b38ef94a39 Revert "(bug 54951) Add Malayalam aliases for 828 and 829"
This doesn't have the wanted result; breaking ml projects

Bug: 58074

This reverts commit 336116f9cf.

Change-Id: I7a0ee61da14b59231009664bde62a7f7095a43cb
2013-12-11 16:58:16 +00:00
Timo Tijhof 7cd42da5fd Add .jshintrc file
Change-Id: Ib3bfa59bead56559547af05eed9ed928a2429fa3
2013-12-11 00:06:41 +01:00
jenkins-bot 3f9377cd70 Merge "Use jquery.spinner when console is pending" 2013-12-10 22:36:18 +00:00
Translation updater bot 339d888c9e Localisation updates from https://translatewiki.net.
Change-Id: I8eab8fe0b622b80aa0a1379a94ea53c4087c56f9
2013-12-10 20:44:08 +00:00
Brad Jorsch e4575c0b7c Use jquery.spinner when console is pending
This makes it more obvious to the user that something is going on.

Bug: 56472
Change-Id: I80938e0e48bd01eece4a99b8bda632a4b1375333
2013-12-10 13:07:54 -05:00
Brad Jorsch fcb6d9ff92 Add access to Language::fetchLanguageNames
Apparently this is useful on Commons, where they would like to iterate
over all language names in some of their templates.

Bug: 47833
Change-Id: I6e3291bedc72da6630c485ea9bf381d8d2f5453a
2013-12-10 12:22:09 -05:00
Brad Jorsch 0763e22292 Expose PPFrame::getTitle to Lua
This field already exists in PHP with exactly the content requested in
bug 47089, so we may as well expose it on the frame object.

Bug: 47089
Change-Id: I672820589f6ebc7c4daad29b5eb156733a5bc5cc
2013-12-10 04:26:03 +00:00
jenkins-bot 7cab36cea5 Merge "Tracking category for modules saved with errors" 2013-12-10 00:12:35 +00:00
Brad Jorsch 628c8b60ca Tracking category for modules saved with errors
When the "Allow saving code with errors" checkbox is used, an
automatically-added tracking category would be useful. And we may as
well also include the error message that would have been displayed when
trying to save without that checkbox checked.

Bug: 39605
Change-Id: Ideb72a58887fb1187b9adba80b7245cdca070ce4
2013-12-09 12:00:16 -05:00
Marius Hoch 99e69490d8 Fix a PHP Notice in Scribunto_LuaEngine
Change-Id: Ie09ec0a415c8ac72ede1ae77ba2257bbe6062505
2013-12-09 01:40:01 +01:00
Translation updater bot 6a1b0d5765 Localisation updates from https://translatewiki.net.
Change-Id: If26ffbd6e5e2696e0d378cb1901f1bcc91c27540
2013-12-08 20:27:28 +00:00
Translation updater bot dbbf1803c6 Localisation updates from https://translatewiki.net.
Change-Id: I1d60e9a2d12c44f0785ff11f7b9960f0f7696f31
2013-12-07 01:48:39 +00:00
Translation updater bot 1d65fd705b Localisation updates from https://translatewiki.net.
Change-Id: I7d4527b810069e7e21adea63bf9cf2b3d084c8e6
2013-11-24 20:36:03 +00:00
Translation updater bot e2c24b043b Localisation updates from https://translatewiki.net.
Change-Id: Ic27d05bbae53dc06c449ec1f3ea228196c0c6a6c
2013-11-21 20:40:17 +00:00
Tomasz W. Kozlowski 336116f9cf (bug 54951) Add Malayalam aliases for 828 and 829
This patch adds Malayalam language aliases for NS
828 and 829 per bug 54951 comment 7 (by praveenp)
and Santhosh's suggestion in bug 54951 comment 9.

Bug: 54951
Change-Id: I933f81782f3482334c9a8d820d4ea2b1120f5c59
2013-11-15 18:02:51 +01:00
Ebrahim Byagowi 6126644d92 Add CKB namespace aliases
Change-Id: I12aa46856c5ec43ddf5bf876dfe5fa8d1eaee3a2
2013-11-11 17:43:23 +00:00
jenkins-bot a18a762fd7 Merge "Add mw.isSubsting()" 2013-11-06 18:26:56 +00:00