Commit graph

2872 commits

Author SHA1 Message Date
Moritz Schubotz (physikerwelt) d878212655 style: Return early in evaluateRestbaseCheckResponse
* Put the status code into the logging context of unexpected errors

Change-Id: I9739eb4acc12a5dc23416a6db4d4df951cd9042a
2023-10-28 17:21:29 +00:00
Moritz Schubotz (physikerwelt) ca7205be3b
Identify errorous restBASE responses
In some cases restBASE seems to provide errorous responses
despite a 200 response code.
Check if all required fields exists and treat the response
as failed otherwise.

Bug: T349347
Change-Id: I3506401f8dd2962daf7fd5d30019c507f9de5def
2023-10-28 14:53:48 +02:00
jenkins-bot d916647b2f Merge "Fix error value in columnspacing attribute in mtable" 2023-10-27 16:11:30 +00:00
Stegmujo 184fcf44cb
Fix error value in columnspacing attribute in mtable
Bug: T349906
Change-Id: I4f5e472b37219ebab165dfbf6f364fd4d41146b9
2023-10-27 16:17:00 +02:00
jenkins-bot 9ba97826f4 Merge "Fix incorrect child count of some element" 2023-10-27 14:00:30 +00:00
Stegmujo 9e9ba0241a Fix incorrect child count of some element
- munder: if only one child munder is not added as wrapping mml tag
- msup: renders an empty mi if there is no content for the superscript

This prevents some warnings in firefox browser dev-console.

Bug: T349825
Change-Id: Ia5efc1f33e3368e71527153d56160eee4ba3a46d
2023-10-27 13:17:55 +00:00
jenkins-bot 413b21d3be Merge "Remove too many rows in smallmatrix" 2023-10-27 10:53:49 +00:00
Stegmujo a53a5d58c8
Remove too many rows in smallmatrix
* From Feedback: The {smallmatrix} example has its fences wrapped in too many mrows I think, so it renders without stretching them in both Firefox and Chrome. Ideally you should be able to emit the <mo>(</mo> followed directly by an <mtable>, and trailed by <mo>)</mo>, and only wrap those 3 into a parent <mrow>.
* removes mrows and adds OPEN / CLOSE attributes
* tests MMLFullcoverage 194 to ~196 which cover the bigXYZ macros look
  ok

Bug: T348971
Change-Id: Ie444e5bb3e3f87fac915d2692b69e976d721582e
2023-10-27 11:19:06 +02:00
Stegmujo 8112c65a5d
Remove mstyle around spacing elements
* From Feedback: There is a curious use of <mstyle> around spacing elements, as in <mstyle scriptlevel="0"><mspace width="-0.167em"></mspace></mstyle>. I am not sure that wrapper element is needed? The mspace ought to be successful standalone.
* this is in the 'bmod' case

Bug: T349822
Change-Id: I9229ad73891d5000679761d3d4b2028d4a51ddf1
2023-10-27 10:35:59 +02:00
Moritz Schubotz (physikerwelt) 06038f8bae
Log non json restbase responses
Bug: T343648
Change-Id: Idfa85c1be866af3c938353b31ba9a884ee5ab143
2023-10-25 14:14:17 +02:00
Translation updater bot 3a8687a0cd Localisation updates from https://translatewiki.net.
Change-Id: I61ce50b7b4b871f20685c518e038caedbb8fd494
2023-10-25 09:02:32 +02:00
Translation updater bot 500640cc4a Localisation updates from https://translatewiki.net.
Change-Id: I5d433f1a939e60f551a37fab81623f35d0348572
2023-10-24 09:38:00 +02:00
jenkins-bot 7eac3f09bb Merge "Remove utf8 encode / decode" 2023-10-23 20:15:33 +00:00
jenkins-bot f8d44c1caf Merge "Don't write native rendering to database" 2023-10-23 18:20:44 +00:00
jenkins-bot f8584b8694 Merge "native: Add onMathRenderingResultRetrieved hook" 2023-10-23 17:40:16 +00:00
Translation updater bot aebbfa59d7 Localisation updates from https://translatewiki.net.
Change-Id: I9f8c69f96f836f94715b2ec334a1a870e21e5fc2
2023-10-23 09:50:57 +02:00
Moritz Schubotz (physikerwelt) dd221cb1a2 Don't write native rendering to database
* Native uses WANObject cache and thus the db is
  not needed.

Change-Id: I2aec0c4bceb7db80dc24a716cabd7f2647709516
2023-10-22 15:29:50 +00:00
jenkins-bot 30c156a0a8 Merge "Make dataProvider in EnWikiFormulaeTest static" 2023-10-22 13:24:30 +00:00
Moritz Schubotz (physikerwelt) 493a7ac9f0
native: Add onMathRenderingResultRetrieved hook
Allow in depth analysis of rendering results in
native mode with the same mechanism that is also
used for other rendering modes.

Change-Id: I4927f9bc683445f83ef7c29dc2a9298aa85ff4d0
2023-10-22 13:43:47 +02:00
Moritz Schubotz (physikerwelt) 804c026a61
Remove utf8 encode / decode
For old mysql versions utf8 encode decode was required to avoid
that math characters get messed up. This problem does not occur
with MariaDB 10.2. As now data is stored and retrieved as binary
by default, the data is returned in the same way as it is written.

Bug: T324173
Change-Id: Id29c9a8614156ff8170bc3148f2498b32c70fd8a
2023-10-22 07:41:56 +02:00
jenkins-bot 9706ed33ba Merge "Make dataProvider in PopupTest static" 2023-10-22 05:02:42 +00:00
Moritz Schubotz (physikerwelt) de2913d960
Make dataProvider in EnWikiFormulaeTest static
Bug: T337160
Change-Id: I71205d564a3063e834a3cd0fc0075a3a6b7a19d2
2023-10-22 06:59:38 +02:00
Moritz Schubotz (physikerwelt) 7965a91ae5 Make dataProvider in PopupTest static
Bug: T337160
Change-Id: I1c5384d319d9e34397ed4d94b4d9888d46722b91
2023-10-21 21:06:06 +00:00
Moritz Schubotz (physikerwelt) 70ea8e0c88 Make dataProvider in MathWikibaseConnectorTest static
Bug: T337160
Change-Id: Idf24afec194b3bdf01dfcde0b9cac48faae2bb4d
2023-10-21 21:05:42 +00:00
Moritz Schubotz (physikerwelt) e2ccab9687 Don't set purge in native mode
* Currently the native mode does always set render to true
  there is no reason to do, as this was initially introduced
  for testing.

Change-Id: I632ca5ea726d055f377439e439a39baca3bed385
2023-10-19 17:39:45 +00:00
Stegmujo 4750c45e06 Add a possibility for creating a test wikipage for chemical formulas
Bug: T329620
Change-Id: I5ca17dceb53bbf8ff148922088b2ba235d69e09a
2023-10-19 17:28:13 +00:00
jenkins-bot beeeed4cb8 Merge "Add a cache purging action for URL for Math rendering" 2023-10-19 17:28:00 +00:00
Stegmujo aa5bba5bf9
Add a cache purging action for URL for Math rendering
* MathRenderer passes purge state, the purge state has to be rechecked
  since implicitly it is true in the MathRenderer
* for rechecking a new flag is introduced to isPurge function

Bug: T348976

Change-Id: Ifdcea4b2c17ac963a50ee48e2d6437c0feafc602
2023-10-19 18:43:23 +02:00
Translation updater bot cc7b7d7ca6 Localisation updates from https://translatewiki.net.
Change-Id: I945c9716cb99d4773b530abe44821eaf008b44b0
2023-10-19 08:42:37 +02:00
jenkins-bot d54a562d8f Merge "Fix: Handle null errors" 2023-10-17 18:52:48 +00:00
Stegmujo 24bcd11e5b Fix ce statements and displaystyle for chem rendering on wikipages
* rollback some previous changes for ce env in Parserhookhandler
* some minor fixes for feedback in previous commit
* set tex mode for mhchem preprocessor, since MediaWiki Hooks add
  explicit ce tags: i.e. frormula coming to TexVC look like
  "{\displaystyle \ce{ C6H5-CHO }}"

Bug: T348975
Change-Id: Id06852b030f9ea77f016289d4f9e2258d5a9f0d4
2023-10-17 14:37:25 +00:00
Stegmujo 5cce2b4512 Activate mhchemParser in PHP also in native rendering
* before an explicit fallback was used to standard MathML mode
* now, in addition native MathML mode can also be used
* added interface code activating texvc for chemical formulas correctly
* ParserHooksHandler removes implicit ce environment for native chem
  rendering

Bug: T348975

Change-Id: If2bbc7223d253d78e837eec2e007dd8171aa6349
2023-10-16 21:51:17 +00:00
Moritz Schubotz (physikerwelt) 9a4d6c50fe
Fix: Handle null errors
BaseChecker::getError may be null, thus handle the
case when the error is null and output
unknown_error in that case.

Bug: T348973
Change-Id: I072ebf200139436b4f27a90dfe940cb310886b28
2023-10-16 21:54:33 +02:00
Translation updater bot bf028a142f Localisation updates from https://translatewiki.net.
Change-Id: Ib8d776abbab3dbce6f2c34c332f1503e6ce701ff
2023-10-16 09:16:05 +02:00
Umherirrender f9f9f5dcd6 Use the expression assignment operator to simplify code
Suggested by phan, available since php7.4

Change-Id: I77c189ed451d08125fd6a6a008c55472cf3d046c
2023-10-14 00:53:38 +02:00
Stegmujo 9360ca94c4
Fix table alignment to left
* currently, \begin{align} generates <mtable columnalign="right" but it should be <mtable columnalign="left"

Bug: T348791
Change-Id: Ic0df45aba4fdb6ffbdc790b5e4bc56e7daeca802
2023-10-13 15:08:34 +02:00
Stegmujo 1aae7cde53
Deactivate stretchy attribute in left and right
Bug: T348793
Change-Id: I5c7c1fd02c4fb42eb8478b744fea3dd06463401e
2023-10-13 13:58:57 +02:00
Stegmujo 00f47e8866 Fix issues in MMLmhchemTest with braces and macro longrightleftharpoons
* updating the braces since mkern, mskip etc are Fun1 functions in TexVC
* updating TexVC support flag in test
* added macro longrightleftharpoons to rendered cases
* nearly all tests render correct in HTML now

Bug: T329620
Change-Id: I78da466c88d41f794e81f7222c9a67c3f4d482d2
2023-10-12 15:55:43 +00:00
Stegmujo b26a8805c1
Add rendering to MathmL visual results to MathMLTest
* fix maintenance script in parametrization for generating correct
  reference MathML
* update MathML references for MMLmhchemTest
* and update the reference formulas, which not display MathML correctly
* tests which have math enviroment switch (which is currently not defined) are currently skipped

Bug: T329620
Change-Id: I09f2c393880daa8fef3e2763821df59048c3c98c
2023-10-12 14:36:57 +02:00
Stegmujo 846edd1611 Add intbar and intBar to MathML rendering
* added some tests
* removing intbar from skipped tests in MMLGenTexUtilTest

Bug: T348318
Bug: T137787
Change-Id: If0dd9beb36d52bc5305fdb66438f1ad2ca092aaf
2023-10-10 10:19:45 +00:00
Translation updater bot 6e438c7d5e Localisation updates from https://translatewiki.net.
Change-Id: I5a099b41c54c9a9fdf565f1613d5a9c2e3115348
2023-10-10 08:52:33 +02:00
Moritz Schubotz (physikerwelt) 272f39ca2d
Fix integral command namings
* Remove \strokeint which was probably a typo and should be \strokedint
* Add \intBar command

Not done:
* Implement rendering of \intBar and \intbar, it would make sense to wait for
the mathoid reference rending here, which is just around the corner

Bug: T137787
Bug: T348373
Change-Id: I19d24fc23f59dda87c7c39a265f17efddb9fee8f
2023-10-09 15:02:46 +02:00
Stegmujo f4c91856bc
Refine skipped indices in MMLGenerationTexUtilTest
* adapts skipped indices to represent all supported cmds and macros

Bug: T340024
Change-Id: Ib01f02c3b73dac80ee9878c22549740d728bdf57
2023-10-06 14:02:43 +02:00
Translation updater bot a6158aa61b Localisation updates from https://translatewiki.net.
Change-Id: Ibff907632e59304526791c3f62b90549e6b428ff
2023-10-06 09:20:23 +02:00
jenkins-bot d5c48b8260 Merge "Render MathML for atop and choose" 2023-10-05 16:20:25 +00:00
jenkins-bot 383428b478 Merge "Render MathML for some letters used in mhchem" 2023-10-05 15:14:13 +00:00
jenkins-bot 8976f0b62b Merge "Use white-space:break-spaces where appropriate" 2023-10-05 14:47:51 +00:00
Stegmujo bbe6c3df8b Render MathML for atop and choose
Bug: T340024
Change-Id: I19f471645b569db49a64e5dd4c82cfdbac7dbe77
2023-10-05 14:39:04 +00:00
Stegmujo d3c636883a
Render MathML for some letters used in mhchem
* \Alpha  \Beta  \Chi  \Epsilon  \Eta  \Iota  \Kappa  \Mu  \Nu  \Omicron  \Rho  \Tau  \Zeta
* \ca

Bug: T340024
Change-Id: I0d9d8314644927ccae0794ae8459a3f3893fc24a
2023-10-05 16:08:13 +02:00
Stegmujo 7dfb557b92
Render MathML for harpoons and arrows for mhchem
* macros: longRightleftharpoons, longLeftrightharpoons,
  longleftrightarrows
* added tests for these

Bug: T340024
Change-Id: Ib8487f242766cef63f7cf8564f2033d9f332e0a8
2023-10-04 18:47:14 +02:00