Commit graph

709 commits

Author SHA1 Message Date
Timo Tijhof dc12796ced Merge changes from master to debug
combine commits to avoid potential problems
with gerrit and jenkins

This is a combination of 30 commits.
ve.ce.MWMathNode: Remove reference to defunct ve.bind

Bug: 73627
Change-Id: I3dd6b520a24e5cecb272de8f9a4aa0ba231bee58

Localisation updates from https://translatewiki.net.

Change-Id: I6074394864ee7c61b416ae146c94c75d48f509af

Localisation updates from https://translatewiki.net.

Change-Id: I2fa13da30e606e1dfb1e13ae64fb125bf4bfadf6

Fix Mathoid integration test

A recent change in mathoid, i.e.
I8d3cec0ee8a8c9368b7dca89e1d5e0c5683f946c
removed the margins. This causes breaking unit tests.

Change-Id: I312d6226c6f24c84254b99ee6292564a421133c3

Localisation updates from https://translatewiki.net.

Change-Id: I053b90b6a583c411270c950ab6bc0d4e94db583f

Localisation updates from https://translatewiki.net.

Change-Id: Icc6d5d961ad97e19de3c4fbdb86e5aa9315998bb

Localisation updates from https://translatewiki.net.

Change-Id: I7b8faf72ba814154896cf5039e14d23f07509440

Localisation updates from https://translatewiki.net.

Change-Id: I83ca4e6eb8eef02e98ddc6f556d113942fa436df

Localisation updates from https://translatewiki.net.

Change-Id: Icb25e8b51409754130ce22c47474f644c087124e

Localisation updates from https://translatewiki.net.

Change-Id: I6dae3f8fc6723265bf47b721148d261b11828f33

Fix for fatal caused by static call to MathRenderer::getError

MathRenderer::getError() uses $this, so it should not be called statically.
MathInputCheckTexvc should instead call its convertTexvcError method, which
constructs a MathRenderer object so it can call its getError method.

This code is pretty awful. But this way it won't throw fatal errors all the time.

Change-Id: Ic438b307a3b464651363b4cc16698c7d4320b253

Add support for display and ID attributes to VisualEditor

Change-Id: Ie65ff26c9e214f74b0217238a3def2242505d4c2

Localisation updates from https://translatewiki.net.

Change-Id: I5f978989a57affa823632061300f5de7028b2ec0

Localisation updates from https://translatewiki.net.

Change-Id: I366383149cb56c90800e06f94aaa6c8895d2381c

Localisation updates from https://translatewiki.net.

Change-Id: I204cb407cfb417961da361b4eaa84af432e2bd29

Localisation updates from https://translatewiki.net.

Change-Id: Ib3f357a76752ce2cba8642a02ec4f5373ddabe52

Localisation updates from https://translatewiki.net.

Change-Id: Iec289070ab64e2014b4c7f371926c03466258e3c

Localisation updates from https://translatewiki.net.

Change-Id: Id297a13ca02524d9db16990b6cdd282b0b52fd73

Localisation updates from https://translatewiki.net.

Change-Id: I1b86d72690b5907ef438d69cf067da6dcc1891b2

Localisation updates from https://translatewiki.net.

Change-Id: Ib4eb016b1602d94a73c5e355f0ae4a744083b0c3

Localisation updates from https://translatewiki.net.

Change-Id: I6b0398be5ec8ba5bfc71c987f80973bf2bb8afe3

Localisation updates from https://translatewiki.net.

Change-Id: Ie485a03f09f1534071d18abf64bbfa446cdee754

Localisation updates from https://translatewiki.net.

Change-Id: I2445b8fbf1b35f437d6dba99d9fe081833ab5089

Localisation updates from https://translatewiki.net.

Change-Id: If1f94c16fd20feef3403e326d58526eeb17c6a86

Localisation updates from https://translatewiki.net.

Change-Id: I74dcb97bbb16bfc6e0700ed90fcf9705f7bdecf8

Localisation updates from https://translatewiki.net.

Change-Id: I0ac3c68f796cde959629d63079d212473ad5a729

Localisation updates from https://translatewiki.net.

Change-Id: I35f1687b4f4e7030a91bdc8aba3c04bbf71f55a4

Localisation updates from https://translatewiki.net.

Change-Id: I64dfcdedea5ed345f730fe7080c8b511fe21dc49

Localisation updates from https://translatewiki.net.

Change-Id: Ib5c89c89ba2091f7784cc1c1237150ec55741fd7

MWException -> Exception

Change-Id: I18da1baeb70387b96e30811a049185a264dec26d

Update MathParser tests

In the most recent version of ubuntu14 the outputhash of the
png images for some math objects has changed.
However, the rendered images seem to look ok.

Bug: T86309
Change-Id: I52dbdefdcfa19c10f1d9d1a43369aabe8bfd92bf

Correct wrong variable name

Change-Id: Iecfa0bfa5861e077d98f7bf06af0e98cda56220b

Remove unused global

Change-Id: I8f5f77015de266f5a5b751fd7cfe424784eb3864

Update LaTeXML test

* The LaTeXML server was updated. In the new version unneccary id's
  have been removed.

Change-Id: I25927912f1500ebfe6d61505c0e06ae2c24d6f6a

Update license headers

Change-Id: Ia38926b253e53a2cef5dfab623353e1dd79ad613

Make main code input area monospaced

A monospaced font is more suitable for writing LaTeX.

Change-Id: I1a6c7bbbe3618f43808be15eab1579de8b2ad59f

Whitespace fixes

Change-Id: Id22a4bfdc1b8c4074f6d7e6f21e8dbc2824d856e

Localisation updates from https://translatewiki.net.

Change-Id: I01c4bbe241c0842027b030ee912b8e481c90f625

Localisation updates from https://translatewiki.net.

Change-Id: Ie012febb53ee642520e71f18285d5b9e4133e224

Improve Math test generation

* Use the wikitext parser and not regexp to extract math
  tags from the page.
* Extract the attributes from the math tags as well

In a follow up a pseudo attribute in the math tag could
be introduced to provide a bug description.

Change-Id: I0dec18d4e3f87e7b58b097b2a08c4897ceaf29ac

Remove unused XML namespace

Bug: T87142
Change-Id: I1c900584aeafbeb5848a3300904710ee312d6223

Add type hinting for newFromMd5 constructor

Bug: T87142
Change-Id: I2989ff42e48e802c1eed1877f0f2ac9316b5fd21

Remove duplicate entry from .gitignore

Change-Id: I78c7e9b630c6e96a2f125f20461ff9e720754ec4

MathRenderer, SpecialMathShowImage: Correct phpdoc

Change-Id: Ibce076dfb6bd3676e288cf2d762ebcb55606246d

MathMathML, MathTexvc: Improve PhpDoc

Change-Id: I84af65e15bdae81f69f0444afdd9ffa5fe9fc326

Minor clean up, optimisations and documentation corrections

* Handle-error-first approach for consistent function body
  termination at the root with the main intend, and less indention.

* __DIR__ instead of dirname( __FILE__ )

* Single quotes.

* Correct pickHost documentation: wgMathMathMLUrl is not an array,
  and is not used in this method, that's at a different level
  of abstraction (via the constructor).

* White spacing.

* require_once is not a function.

Change-Id: Id4bec8415893245e2569a39ab5406a0820238ae4

Add dependency on mediawiki.toolbar

Follows-up Ibcda91bbb164b0.

ext.math.editbutton.enabler uses mw.toolbar. The toolbar interface
used to be part of mediawiki.action.edit but is now in its own module.

Bug: T86235
Change-Id: I37a0b8e84a9bd6a0de0386d5b9924bbbbbd7249c

Localisation updates from https://translatewiki.net.

Change-Id: I14cfdb2153121a9cbcd40345398dc84d3b17518f

Fix rendering issues in MathML mode

Force display:none on a hidden MathML rendering to avoid generating
focusable node highlights.
Move adding of class to setup to ensure it persists after render.

Bug: T87007
Change-Id: I5fc21afa61ccc07e9d2126846cf29ee898182a7c

Localisation updates from https://translatewiki.net.

Change-Id: I2cfa5bae2a6864548816934483cd2276e1071865

Localisation updates from https://translatewiki.net.

Change-Id: I7eb73bd36e5cd4461647bf05166fd2fd2fcbee07

Localisation updates from https://translatewiki.net.

Change-Id: I174400c5a3dad8f6bf8d03b7c738d5068682ceb3
2015-02-08 19:45:07 +01:00
physikerwelt (Moritz Schubotz) 70f6acd13e Adjust gitreview file of debug branch
Change-Id: Id5ee5684d216095b40be0f2a105e271b91830268
2015-02-08 18:20:31 +00:00
physikerwelt (Moritz Schubotz) 1ecf95a3d4 Exports the MathCache table
This is required for testing of texvcjs.

Change-Id: Ib602aba8f73fc18e30ebf0efc609c8fbb2d122ef
2014-11-20 17:24:19 +00:00
physikerwelt (Moritz Schubotz) 3ffa1dbc11 LaTeXML: prevent automatic rerendering of SVG
MathMathML::renderingRequired called the getSvg
function in MathLaTeXML that caused an automatic
rerendering of the SVG image if it was not cached.
That this rendering is triggered from the function
renderingRequired is contra intutive and should be
avoided.

Change-Id: Ifa14f50193a05b3058624a18974c56897fcec09e
2014-11-19 05:34:50 +00:00
physikerwelt (Moritz Schubotz) a66845ab07 Add debuging functionality
Write debug log to database if $wgMathDebug is enabled.

Change-Id: I7ddd297b3ab0e3ec8b46faf55a466fc2ae6f5a9a
2014-11-18 17:54:55 +00:00
physikerwelt (Moritz Schubotz) 54ad7facb0 Add logging table
* Adds a database table to store log entries in the database
* Creates the mathlog table if the mathdebug mode is enabled
* Replaces dirname( __FILE__ ) -> __DIR__

Change-Id: I7935f33e04a1c9d7d4f1dbbc600e840f07c19dad
2014-11-18 17:48:37 +00:00
physikerwelt (Moritz Schubotz) d9522b6049 Increase size of the math_mathml in the mathlatexml table
The type text allows text with maximum length of 64k only. Since the
MathML generated by LaTeXML is quite verbose this is too small for
some equations used at Wikipedia.

Bug: 73090
Change-Id: Id09ec6201f68efe63a439f6e85a53876d5c1e521
2014-11-18 12:42:27 +01:00
Translation updater bot d3a43b5227 Localisation updates from https://translatewiki.net.
Change-Id: Ib88edd172c107a7e4f1f6b9402987e119bb52942
2014-11-17 22:28:02 +01:00
Ed Sanders f26cf2cbbd Sort i18n messages, and fix grammar
Use singular in "VisualEditor formula editing".

Change-Id: I88e03d757c5b18615fdcc2978bb5447a01f11b61
2014-11-17 10:50:54 +00:00
Translation updater bot 6764c5ac78 Localisation updates from https://translatewiki.net.
Change-Id: Iea9e70f22f62abeb70b71b160271a5719caaf51d
2014-11-15 23:14:58 +01:00
Translation updater bot 7cf4779be3 Localisation updates from https://translatewiki.net.
Change-Id: I29a980cc5df4bc889c28f5ab797e3e8c1daf4326
2014-11-14 22:24:34 +01:00
Translation updater bot eff23768a5 Localisation updates from https://translatewiki.net.
Change-Id: Idb2c83bd7654c28065b59312508baa5e4ac848bc
2014-11-13 23:09:32 +01:00
Cmcmahon df94d04ba3 QA: update Ruby gems
Change-Id: Iea3356aef3ea4267a513031a2e6218b7cd3eddff
2014-11-07 08:53:58 -07:00
Translation updater bot 746c858285 Localisation updates from https://translatewiki.net.
Change-Id: I610c788369758be559369d26727a3841f818dd63
2014-11-05 21:44:44 +01:00
Translation updater bot ba386a7307 Merge "Localisation updates from https://translatewiki.net." 2014-11-04 22:44:06 +00:00
Translation updater bot 9d51333328 Localisation updates from https://translatewiki.net.
Change-Id: I8e706c424e8d2839d391b8258c487dfc55a086b2
2014-11-04 23:29:17 +01:00
Ed Sanders 575e8407e6 VisualEditor: Add selection restriction to command
Depends on I88f3d04 in VE.

Change-Id: I33006574d86daa6ed2568b631a62e063c9f98542
2014-11-04 22:12:59 +00:00
physikerwelt (Moritz Schubotz) 9141a9e5ed Remove Undesired spaces after math expressions
The linebreak after the math fallback image caused
the additional space.

Bug: 72806
Change-Id: Id7117f84ddb4cbe2eb4d6b8abeecf38b4f7e3c6d
2014-11-03 01:10:43 +01:00
Translation updater bot 27ff45433d Localisation updates from https://translatewiki.net.
Change-Id: Ic3895aea46587d7f4f073564e15bd15ddc843cf3
2014-11-01 22:38:51 +01:00
Translation updater bot aa818c2fc8 Localisation updates from https://translatewiki.net.
Change-Id: Id754011542ebcf35f7d5de223fa3ed60dedd96ca
2014-10-31 21:45:59 +01:00
Translation updater bot 82363ffde9 Localisation updates from https://translatewiki.net.
Change-Id: Ia4e1cf85839804d6a054f8ba145659fb70bb82d8
2014-10-30 23:30:03 +01:00
Translation updater bot 5e216605bc Localisation updates from https://translatewiki.net.
Change-Id: Ief310ef37f8389acf8ab81edaffb33a77007c9a6
2014-10-29 22:06:17 +01:00
Translation updater bot 8c7d9c9fea Localisation updates from https://translatewiki.net.
Change-Id: Iaccf7bbdd70124cbcb5067ab1ea50d7546e656fe
2014-10-28 15:17:11 +01:00
Translation updater bot 19207b7182 Localisation updates from https://translatewiki.net.
Change-Id: Ia7037485336ce1d897cc9d7a58ebfe7ba8ce05f0
2014-10-27 20:14:08 +01:00
Translation updater bot 3ec998de53 Localisation updates from https://translatewiki.net.
Change-Id: I574acf58977197ea6249f1843798cbfefda78125
2014-10-26 21:09:50 +01:00
Amir E. Aharoni 51e1d2b7b9 Improve wording of preferences
Change-Id: Ieaea40b3337db885d7dc4245467f4879a8650441
2014-10-25 17:43:09 +03:00
Translation updater bot bc0db79039 Localisation updates from https://translatewiki.net.
Change-Id: Ibe19f66c953e47974935a353a3a188e61d508919
2014-10-23 23:25:07 +02:00
jenkins-bot c1207937f5 Merge "Make MathML mode work on mobile devices" 2014-10-22 17:55:53 +00:00
Translation updater bot 586befcd20 Localisation updates from https://translatewiki.net.
Change-Id: I64fdcd4b610d58bfb9451246fc5835e9746c6f14
2014-10-21 23:01:08 +02:00
Željko Filipin ce58cbc738 Prepare repository for running RuboCop after every push to Gerrit
For now ignoring all problems.

Bug: 69245
Change-Id: Id1164187eddc6dcb006ca771d62ca867677213f9
2014-10-21 15:04:22 +02:00
Frédéric Wang e26d641b85 Make MathML mode work on mobile devices
- load ext.math.css on mobile devices
- move the @font-face rules for the Latin Modern WOFF fonts into a separate
  Desktop-only stylesheet.

Change-Id: Ifca3679185a4675bc31dff99a086fef740b9dab5
2014-10-20 22:40:53 +02:00
Translation updater bot 12450117ae Localisation updates from https://translatewiki.net.
Change-Id: Id9aca0e554e88d12047f608c117615b4f872ba2f
2014-10-20 22:26:08 +02:00
Translation updater bot 22ab9302a8 Localisation updates from https://translatewiki.net.
Change-Id: Iae95112256911401de6c3d5b5c2823e35514732f
2014-10-19 22:07:51 +02:00
Translation updater bot 2ebf1bd8f7 Localisation updates from https://translatewiki.net.
Change-Id: I3069bb1c16d852620fe8e824d96835a9fbedb751
2014-10-17 21:16:04 +02:00
Translation updater bot 014c11d1bb Localisation updates from https://translatewiki.net.
Change-Id: I4f11e42c14711cf05a99ef10edc5641ec963fc86
2014-10-16 23:05:02 +02:00
James D. Forrester c190beaf33 VisualEditor: Update icon to use consistent blackness with other icons
Change-Id: I51abe923c82204be0f4e098b92e9e4d35c33dd60
2014-10-16 10:49:04 -07:00
physikerwelt (Moritz Schubotz) ae930172fd Adjust caching times for svg images
In the first period we set the caching time for server-side
caching to 1 week and the value for client-side caching
to 1 hour.

Change-Id: Ieab63dfe9a00f31d64945180d7b0d98b9fe62b39
2014-10-16 16:22:40 +02:00
Gabriel Wicke f5fbffb8ca Merge "Use more consistent background image scaling" 2014-10-15 22:02:41 +00:00
Translation updater bot d1a69594c2 Localisation updates from https://translatewiki.net.
Change-Id: I2ee4fea9163cfcdbe9491db402e08abb7b75fbae
2014-10-15 22:06:58 +02:00
Gabriel Wicke d7954691c1 Use more consistent background image scaling
Chrome in particular would end up with fairly small and inconsistent
background sizes when using background-size: contain;. This makes sense
according to the docs at
https://developer.mozilla.org/en-US/docs/Web/CSS/background-size, which
doesn't specify that the background actually has to fill the entire element.

background-size: 100% 100%; does force full-size scaling, which is what we
want. Verified to work as expected in Chrome 38 on Linux.

Change-Id: I508e08dac1480491efcd1d27cfac16187bfbd4fe
2014-10-15 17:05:53 +00:00
Gabriel Wicke 97d6f8ff89 Work around tidy by using a meta element instead of an empty span
HTML tidy will strip empty spans, so don't use one for the fallback image. We
use a meta element instead, as that does not normally render at all & doesn't
have any default styling coming with it.

Change-Id: I5bcbbc9468433e3c8722c09ce813a6f5ac741333
2014-10-15 13:13:41 +00:00
Reedy 672df7dcc8 Fix file permissions
Bug: 71941
Change-Id: I7b0eddc0ca679cf233ef29dcdfeca024ecc71d38
2014-10-15 12:16:20 +00:00
Translation updater bot d3e21a1044 Localisation updates from https://translatewiki.net.
Change-Id: Idfb438a17ff33fb6255b77e4144610ca95221d0e
2014-10-14 23:01:41 +02:00
Translation updater bot be90a7f4dc Localisation updates from https://translatewiki.net.
Change-Id: I0450d88fd0c79263821297f16763c116d1bdb623
2014-10-13 21:53:44 +02:00
jenkins-bot 67fbac7d67 Merge "Use radio buttons only for math mode selection" 2014-10-13 07:59:21 +00:00
Gabriel Wicke c61b8becac Use radio buttons only for math mode selection
While the combination of all redering modes, might
be useful for some power users it will confuse the
average user and makes bug reporting harder.

Therefore, source rendering on the server side is
used when MathJax is enabled on the client side.

Change-Id: I05a20d7c2298115dbf0429db6c107e8132cc15ff
2014-10-13 09:42:37 +02:00
Frédéric Wang d4e928a486 SVG images should not be loaded when MathML is used
- Use span with a background-image instead of <img> for the fallback SVG so
  that they don't load in Gecko.
- Make the image fallback a span inline-block so that it can have a dimension.

Bug: 71929
Change-Id: I7f820cd5766db1fece452ebfc72915a55e42c82e
2014-10-12 23:00:55 +00:00
C. Scott Ananian 209f3218ad Regularize spacing in texvc and texvccheck
Tweak the position of spaces between function invocations and arguments
so that the expansion of mediawiki-specific functions (`\Rho`, etc) is
consistent with how spacing is added to normal function invocations.

This helps ensure that `texvc`/`texvccheck` is idempotent -- that is,
that it can parse what it emits, and render it without change.

Change-Id: I05fc8fa0201debf611ed4900d3cc953a6a8188ac
2014-10-12 22:04:41 +02:00
C. Scott Ananian e38a70ef9e Some commands should require arguments in texvc and texvccheck
The \overbrace, \overleftarrow, \overleftrightarrow, \overline,
\overrightarrow, \underbrace, \underline, \widehat, and \widetilde
commands take a single mandatory argument.  Move \overbrace and
\underbrace to the fun_ar1nb list, since they handle trailing
subscripts and superscripts specially.  Move the other functions to
the fun_ar1 list.

Change-Id: I449c8611eeb2eaa7ccb30d3b325975868a160f95
2014-10-12 21:31:36 +02:00
C. Scott Ananian 9d0ed80bf9 Remove unused empty production for litsq_zq in texvc
It is impossible to take the empty alternative for this production,
since any input which matches `litsq_aq` would instead match `lit_aq`
if the empty alternative is used.  In addition, there is no action
clause for the empty alternative, so it wouldn't typecheck if the
empty alternative was possible.

This has no effect on the generated parser, but clarifies the grammar.
This commit matches a25078ff9d to
texvccheck.

Change-Id: I52eddd7321bd8450b47a5d57f2d704f0dd669f16
2014-10-12 19:28:03 +00:00