Commit graph

1614 commits

Author SHA1 Message Date
Moritz Schubotz (physikerwelt) f0c8840148
Add math related styles and script via appropriate hook
Create MathDataUpdater class that checks if statements
are using math and adds the stlyes required for math in that case.

This patch has no effect until
I5bc0622ee7338f3215d14e15331a0a1931ca1ae0
is merged.

After both changes are in effect
I0abd6acbfa12fd503d11476f0c8c8c8a8a851cdc
can be merged.

Bug: T173949
Change-Id: I0e24bbb53e6e01d549f534744780ca1afc49fdd7
2018-07-24 16:40:52 +02:00
Translation updater bot cc33a3092d Localisation updates from https://translatewiki.net.
Change-Id: Idfeba66af546d84cc6798f595e65ae1f5812f62a
2018-07-03 22:16:43 +02:00
Translation updater bot 30283282a2 Localisation updates from https://translatewiki.net.
Change-Id: Iba53a77aa0500cd9954dd218fe077aed2d0b3b9b
2018-06-27 22:19:29 +02:00
Translation updater bot 183c4fcc6f Localisation updates from https://translatewiki.net.
Change-Id: Ie3515f340a4d09e203211d073c0d04beec784a33
2018-06-24 22:25:48 +02:00
Translation updater bot 96716ed27f Localisation updates from https://translatewiki.net.
Change-Id: Ib815dfb5a6bdef36c58bf83156670660880db679
2018-06-21 22:42:36 +02:00
jenkins-bot b01297823c Merge "Remove unnecessary else statements and indenting" 2018-06-21 13:40:36 +00:00
jenkins-bot f77d9e1f87 Merge "remove problematic texvc from VE suggestions" 2018-06-21 08:09:13 +00:00
Debenben 19d97c4377 remove problematic texvc from VE suggestions
The patch removes the following texvc macros conflicting with generic LaTeX syntax from the autocomplete suggestions of the visual formula editor:
* \and
* \or
* \pagecolor
* \part
* \ang
* \C
* \H
* \bold
* \Bbb
and replaces the following commands with the LaTeX equivalents in the visual formula editors math dialogue
* \and -> \land
* \or -> \lor
according to https://www.mediawiki.org/w/index.php?title=Extension:Math/Roadmap&oldid=2808288

Bug: T197842
Change-Id: Id3a085dc0a7551b582a9a0a759a838411d1ecf71
2018-06-21 05:15:09 +00:00
Thiemo Kreuz 97000ed8b0 Fix "@param $…" missing the type
Change-Id: I8d20ae852100a6ecc39df05eab3aa8e2b9c09480
2018-06-20 11:10:43 +02:00
jenkins-bot d5a3fd8a16 Merge "Improve test coverage for MathSource" 2018-06-17 16:52:51 +00:00
Moritz Schubotz (physikerwelt) 2f5d249821
Cleanup: Remove Makefile
The folder the makefile referes to was deleted.

Bug: T195847
Change-Id: I443099c1ae570b6c667bd9b028d77ba314dbae6b
2018-06-17 14:34:17 +02:00
Translation updater bot 5d9e158241 Localisation updates from https://translatewiki.net.
Change-Id: Ib51aaad45c12b24fc11131bda5d214b932a96e6a
2018-06-13 22:23:05 +02:00
Translation updater bot 0fe1ec90bb Localisation updates from https://translatewiki.net.
Change-Id: Ic8f860e151bdb285ebdc30d602505cae41ab5a5c
2018-06-11 22:34:04 +02:00
James D. Forrester 0e47032839 MWLatexDialog: Fix hard-coded line height
This changed after the OOUI font-size change. Also reduce
the preview height which is measure in em's so that it is
closer to its original pixel value.

Also fix line height for error messages.

Change-Id: I3537d33dc1889e0154f4574bb33b22b3c006fe9c
2018-06-08 19:12:21 +01:00
Moritz Schubotz (physikerwelt) 9a04cd6de3
Improve test coverage for MathSource
Change-Id: I82d76db4b087b6472c2856806c70f4ef1ffbc8df
2018-06-08 16:25:11 +02:00
Reedy f46452a196 Remove unnecessary else statements and indenting
Change-Id: Ifa36998ca089d2a045e821bc1b941c5eec7e9474
2018-06-07 02:06:59 +01:00
jenkins-bot ec99401072 Merge "Make use of the …::class feature whenever possible" 2018-06-06 12:24:31 +00:00
Moritz Schubotz (physikerwelt) e359eafe6c Improve tests coverage for MathPng
Change-Id: Ibb5138512afd20304983be44e0ab45a244634b4b
2018-06-06 10:30:53 +00:00
Thiemo Kreuz 5648b8e2c3 Make use of the …::class feature whenever possible
Note that a class is not resolved this was. …::class is not a function
call. It's more like a named string constant. Technically still a
string. The advantage is that IDEs and tools like linters can much easier
understand that these strings refer to a class, and list them in usage
reports, renames, and such.

Change-Id: I5225543dbb837685a1840837cb2772dd576cca38
2018-06-06 12:13:04 +02:00
Ed Sanders 9b2ba59ac9 Move icons to RL image module and generate variants
Bug: T196050
Change-Id: Ie6acbeac3d74b99278b8d5b0db3ca1d349065d5e
2018-06-02 21:56:49 +01:00
Translation updater bot b8dbfe7d87 Localisation updates from https://translatewiki.net.
Change-Id: If1c2baa7f3bd3192dfc9c8704d9f70f963486935
2018-06-01 22:27:37 +02:00
Moritz Schubotz (physikerwelt) aa2c4cf913 Improve tests coverage for MathMathML
* deprecate and fix pickHost. It was broken and never used.
* simplify inputTypeSelection
* remove superfluous is_array check for the result of explode

Change-Id: I392f22f074facfe30b97d53a3002f464a471b67e
2018-06-01 15:36:35 +00:00
Moritz Schubotz (physikerwelt) c1c4e42c86 Improve tests coverage for MathFormatter
Change-Id: I2c9141753b59d99a1caf84279a0afcaf8431e631
2018-06-01 14:45:04 +00:00
Translation updater bot 6f32168683 Localisation updates from https://translatewiki.net.
Change-Id: I86e4be45559253e83163f5a87100110f83191f80
2018-05-31 22:28:37 +02:00
jenkins-bot c9f3df706a Merge "Remove dead texvc code from the math extension" 2018-05-31 12:33:08 +00:00
Translation updater bot 7d420d87ab Localisation updates from https://translatewiki.net.
Change-Id: I52a32ddf6f8ad95f60b67fa06ad3c50241cda4a0
2018-05-29 22:24:58 +02:00
Moritz Schubotz (physikerwelt) 4156f1c9b7
Remove dead texvc code from the math extension
In T74240 support for LaTeX based rendering of the <math/>-tags was
removed. This change eliminates the unused code from the repository.

Bug: T195871
Change-Id: Ic57d83fa49f090b574ce8b82fd2ebc84a5350318
2018-05-29 17:41:53 +02:00
jenkins-bot 8879b5b7a1 Merge "Delete Selenium tests in Ruby" 2018-05-29 11:28:55 +00:00
Translation updater bot e4fe0f4362 Localisation updates from https://translatewiki.net.
Change-Id: I130712dca0971b54b8fc0da81b7f65251489e855
2018-05-28 22:42:21 +02:00
libraryupgrader 2587469834 build: Updating mediawiki/mediawiki-codesniffer to 20.0.0
Change-Id: I4385a05df9b40d4da19f280bd211e8c261d22c41
2018-05-26 04:26:21 +00:00
Željko Filipin 88e9149e3e Delete Selenium tests in Ruby
They are replaced by Selenuium tests in Node.js.

Bug: T162455
Change-Id: I1f5bc8f9c5cd687a6ba116f2f0461eb2992096c7
Depends-On: Ibd8a39cc75231932f872456b8d3ec1fe41ef23e2
2018-05-25 05:58:17 +00:00
jenkins-bot 5581b9779a Merge "Selenium tests for Math" 2018-05-24 16:14:52 +00:00
Translation updater bot db1b5ac764 Localisation updates from https://translatewiki.net.
Change-Id: Iead36f61b847672ce9356b9da2182704c294d586
2018-05-23 22:20:19 +02:00
Translation updater bot 9886918fe5 Localisation updates from https://translatewiki.net.
Change-Id: Ia43294cac9a175031e4a572425e81a685b94c14c
2018-05-21 22:10:26 +02:00
Moritz Schubotz (physikerwelt) b5cf0e0b77
Serve png mode from mathoid
* Use the exactly same routines to deliver png images that are used in
  mathml mode.
* Change the output to use mathoids png image rather than the mathml
  and svg output.
* Locally tested on Firefox and Chrome: Depending on the mode either
  the SVG or the PNG path is used.

Bug: T74240
Change-Id: I4b1cac92eb9a02190f316faab6621940951603d5
2018-05-21 13:47:49 +02:00
Željko Filipin befe4af465 Selenium tests for Math
* Implement a basic tests that renders $2+3$

Bug: T162455
Change-Id: Ic605bd0d934d0f138390145fa5f5bddaa8f8e578
2018-05-19 17:04:22 +00:00
jenkins-bot 22d63b1973 Merge "Throw InvalidArgumentException when validating/formatting null" 2018-05-18 19:00:32 +00:00
Thiemo Kreuz b12b4f740f Throw InvalidArgumentException when validating/formatting null
Change-Id: Ia46f76a89b26c830aab70ebf5fcc222711c325d1
2018-05-18 20:02:43 +02:00
Thiemo Kreuz 670f0bb8f9 Don't expect objects by reference in hook handlers
The motivation for this patch is to make the code less complex, better
readable, and less brittle.

Example:

public function onExampleHook( Parser &$parser, array &$result ) {
    /* This is the hook handler */
}

In this example the $result array is meant to be manipulated by the
hook handler. Changes should become visible to the caller. Since PHP
passes arrays by value, the & is needed to make this possible.

But the & is misplaced in pretty much all cases where the parameter is
an object. The only reason we still see these & in many hook handlers
is historical: PHP 4 passed objects by value, which potentially caused
expensive cloning. This was prevented with the &.

Since PHP 5 objects are passed by reference. However, this did not
made the & entirely meaningless. Keeping the & means callees are
allowed to replace passed objects with new ones. The & makes it look
like a function might intentionally replace a passed object, which is
unintended and actually scary in cases like the Parser. Luckily all
Hooks::run I have seen so far ignore unintended out-values. So even if
a hook handler tries to do something bad like replacing the Parser
with a different one, this would not have an effect.

Removing the & does not remove the possibility to manipulate the
object. Changes done to public properties are still visible to the
caller.

Unfortunately these & cannot be removed from the callers as long as
there is a single callee expecting a reference. This patch reduces the
number of such problematic callees.

Change-Id: I21d53c989ea487607dc69e6b3365c023ef6729f5
2018-05-15 17:50:08 +02:00
Translation updater bot 7eed63d895 Localisation updates from https://translatewiki.net.
Change-Id: I60978aab1d3f51556aa5ccc855d5a93c9806973b
2018-05-14 22:44:23 +02:00
Translation updater bot 9ef67abab3 Localisation updates from https://translatewiki.net.
Change-Id: I45006aa155b9a9c6a5ee170c97468da00f90e73d
2018-05-06 22:22:31 +02:00
Kunal Mehta 7a53bd905c Disable PHPCS more narrowly
Change-Id: I20d8b519d5827e865ccd3adf7c2c6ba069f37afb
2018-05-03 19:00:55 -07:00
jenkins-bot dcf8f0926d Merge "MathChemSymbolsDataModule: Remove origin restriction" 2018-04-30 20:42:06 +00:00
jenkins-bot 332682543c Merge "MathMathSymbolsDataModule: Remove origin restriction" 2018-04-30 20:42:04 +00:00
Bartosz Dziewoński 7270d702f1 MathMathSymbolsDataModule: Remove origin restriction
Without this change it would no longer load in safe mode (T185303)
because the module would be missing.

I think this has been copy-pasted from VisualEditor, see commit
I6d097ccbf1dc2462843219adcf96bf8313e30289 there for explanation.

Bug: T185303
Change-Id: I6644a361d1450c394a7f82dc3dad97515982846d
2018-04-30 22:26:28 +02:00
Bartosz Dziewoński 4ccb9abe8a MathChemSymbolsDataModule: Remove origin restriction
Without this change it would no longer load in safe mode (T185303)
because the module would be missing.

I think this has been copy-pasted from VisualEditor, see commit
I6d097ccbf1dc2462843219adcf96bf8313e30289 there for explanation.

Bug: T185303
Change-Id: Ieed46488c94c5809e9f17f667c6926a21ffe838b
2018-04-30 22:25:52 +02:00
Translation updater bot a3aab83b87 Localisation updates from https://translatewiki.net.
Change-Id: I3c4afa25a02d2b17063c6b596b865592e81eff89
2018-04-30 22:22:23 +02:00
jenkins-bot 7349010b55 Merge "Autocomplete LaTeX commands with backslash" 2018-04-29 14:24:20 +00:00
Translation updater bot 4f4c277715 Localisation updates from https://translatewiki.net.
Change-Id: I43dcd58dba27e69c65f7001ac9e48bdd10c31912
2018-04-28 22:32:53 +02:00
Translation updater bot c8d8787040 Localisation updates from https://translatewiki.net.
Change-Id: I69006a89e9b7d6ecb72471ea4f5450a98f9318af
2018-04-27 22:26:02 +02:00