Commit graph

1244 commits

Author SHA1 Message Date
Translation updater bot ffbbd9fb83 Localisation updates from https://translatewiki.net.
Change-Id: Ie0d11638c30963b44057813d46b4223c6c0d7559
2015-07-18 22:02:11 +02:00
John Vandenberg 3fdb883739 Map 'gettext' to 'pot'
Bug: T105889
Change-Id: I41a7441987bae95bfb7e138f06d9c27feef070b9
2015-07-18 17:09:08 +10:00
Translation updater bot b66424d794 Localisation updates from https://translatewiki.net.
Change-Id: I0de7ce6cebc329cb02c56b218c732241af5e6c21
2015-07-17 22:25:21 +02:00
Translation updater bot 2237b348b8 Localisation updates from https://translatewiki.net.
Change-Id: I33b2286315c98315ac5ecfd75266c711b4fc6187
2015-07-16 21:14:20 +02:00
John Vandenberg 99b0cd96bd Render "dcl" as "sql"
"dcl" (Data Control Language) in GeSHi was SQL with
additional keyword support, and a fallback to pygments
'sql' renders correctly, albeit without all keywords
highlighted, however most of the keywords are part of 'sql'.

Change-Id: I121ce6d6ab20328dd1788f537127e16fa3049503
2015-07-16 08:48:21 +10:00
Translation updater bot 5f476089c3 Localisation updates from https://translatewiki.net.
Change-Id: I960aa705c3a3661cf0b9993da0ea35e6649589e7
2015-07-15 21:42:58 +02:00
Bartosz Dziewoński 05bae5a932 Use $parser->mUniqPrefix instead of $parser::MARKER_PREFIX for MW 1.25 compatibility
Parser::MARKER_PREFIX is a new constant introduced in MW 1.26,
previously the value was dynamic and available as
$parser->mUniqPrefix. That continues to be supported in MW 1.26+.

Follow-up to 043969f84e.

Bug: T105796
Change-Id: I9dfc9e1a424e28fc4f870dd513306e5144d1ec7c
2015-07-15 12:44:17 +00:00
Translation updater bot 77d86eb735 Localisation updates from https://translatewiki.net.
Change-Id: I8690af823bdda611fe44fd3895ae67d4b51842fc
2015-07-14 22:02:31 +02:00
jenkins-bot d47de3b3b2 Merge "Restore 'direction: ltr;' for .mw-highlight" 2015-07-14 15:09:10 +00:00
Translation updater bot 558396de81 Localisation updates from https://translatewiki.net.
Change-Id: I13921d8d2d133c79a92f7ee86151ed661317da85
2015-07-13 21:36:04 +02:00
John Vandenberg 653292c2f2 Map other assembler language to 'asm' or 'nasm'
Add mappings for 6502acme, 6502tasm, 6502kickass,
68000devpac, dcpu16, m68k, mmix, mpasm, pic16, and z80.

Change-Id: If593f4ccbd158517824b6ceed43b7d6cf3b08080
2015-07-13 13:12:12 +10:00
Translation updater bot 0270324da7 Localisation updates from https://translatewiki.net.
Change-Id: I9153a163eb0e5cf62e1b92d08aa258b9f0cac7a1
2015-07-12 21:51:38 +02:00
John Vandenberg 124434abc8 Render "arm" as "asm"
"arm" in GeSHi was assembly with additional keyword support,
and a fallback to pygments 'asm' renders correctly.

Change-Id: I3eb354cda2a1f324dd539eb20e9801c8350e21d1
2015-07-12 19:20:06 +00:00
John Vandenberg aacd82820b Use 'ebnf' to render 'bnf'
bnf syntax renders correctly using the ebnf handler.

Change-Id: I4f6f96d1b1c034c1f653797d0d03436307ddc819
2015-07-12 21:36:30 +10:00
John Vandenberg 53ea68e8b3 Render "bibtex" as "latex"
bibtex was supported by GeSHi, and is LaTeX syntax.

Change-Id: Id29f61529c5afbc5c9ecf51f81b5cdae7f3b3737
2015-07-12 15:53:04 +10:00
Translation updater bot 97b1833f91 Localisation updates from https://translatewiki.net.
Change-Id: Ia05157b9600af3177fb56c063962582b46918a2f
2015-07-11 22:07:32 +02:00
Bartosz Dziewoński 6b1a4a6d8c Restore 'direction: ltr;' for .mw-highlight
Follow-up to 043969f84e.

It is not needed for current HTML generated by the extension tag,
but is required for compatibility with cached renders generated
between 6484894497 and
043969f84e.

Bug: T105499
Change-Id: Ie15d9c7fb673528b2ab5e40e6beddc580fb6d368
2015-07-11 13:50:41 +02:00
Translation updater bot c1e886c6d3 Localisation updates from https://translatewiki.net.
Change-Id: Ib606d0eab1e3f1bf7828f5be8ca069ab332b2125
2015-07-10 21:15:56 +02:00
Translation updater bot 4393d1bf3e Localisation updates from https://translatewiki.net.
Change-Id: I0ed8271d0817630f2c11d658c965de36d7194e68
2015-07-09 22:04:31 +02:00
Translation updater bot da21e6f39c Localisation updates from https://translatewiki.net.
Change-Id: I6441ae229bb0143dbf3ecb86c14a2e541cf625bb
2015-07-08 21:57:16 +02:00
jenkins-bot 0a9315860c Merge "Add VisualEditor support for 'line' attribute" 2015-07-08 18:41:16 +00:00
Timo Tijhof 206f0fd585 Fix "MWException: Unexpected output from Pygments" in highlight fallback
Follows-up 043969f84e.

This caused a fatal MWException when saving/reading pages that contain a
<source> that couldn't be highlighted (e.g. no lang attribute, unknown
lang, or too large).

Specifically when wgWellFormedXml=false, in which case $out isn't
just from Pygments, but actually from our own Html::element.

Change-Id: Ib299a274d28021b2c7bba52d763dd1e17c1f09ec
2015-07-07 22:12:53 +01:00
Translation updater bot 509a23af6b Localisation updates from https://translatewiki.net.
Change-Id: I58468794ad416324a72294756ad5040525392a55
2015-07-07 22:11:05 +02:00
Ed Sanders d38d9c1994 Add VisualEditor support for 'line' attribute
The line attribute sets line='1', as both Parsoid and VE
expect proper XML attributes.

Change-Id: I10b5717fcc4b8e84a3030425a4a6a9a865272830
2015-07-06 22:09:23 +01:00
Translation updater bot 04f2b607fa Localisation updates from https://translatewiki.net.
Change-Id: I741f2f976cbe328d61c35b89584829cb00589e04
2015-07-06 21:48:04 +02:00
Bartosz Dziewoński 48bf989cad Highlight background of whole lines, not just text in them
Bug: T103964
Change-Id: Ia1036f00e05634fe6b7e3b65af2a34fc91a540e5
2015-07-05 23:39:38 +00:00
Bartosz Dziewoński 043969f84e Refactor final output formatting
* Use 'nowiki' strip marker to prevent list processing (also known as
  doBlockLevels()). This resolves various issues related to using
  <syntaxhighlight/> blocks in lists and lists suddenly appearing
  inside <syntaxhighlight/> blocks. Fixes T17333, T25674, T104067.

* To prevent <p/>-wrapping resulting from the above, add our own
  wrapper <div/> around the output.

* Since we already have our own wrapper, remove Pygments' one and
  extend it with custom attributes. This resolves some regressions
  from the GeSHi migration. Fixes most of T103964.

Bug: T17333
Bug: T25674
Bug: T103964
Bug: T104067
Change-Id: I3afd1224a18549c62cd4a95fd046affa6d1d3b3f
2015-07-05 22:03:24 +00:00
Translation updater bot 1b3f2c4dd1 Localisation updates from https://translatewiki.net.
Change-Id: I40b6725bafcb9fe210d9e4d09c4ca1e55ab6b86e
2015-07-05 22:01:39 +02:00
jenkins-bot df8416e973 Merge "Add a tracking category on pages that contain invalid <syntaxhighlight> attributes" 2015-07-05 17:03:31 +00:00
Translation updater bot ead316781c Localisation updates from https://translatewiki.net.
Change-Id: Ic92c154eb2146ad65470d911a492e724f1024428
2015-07-04 20:38:55 +02:00
Translation updater bot 770c037576 Localisation updates from https://translatewiki.net.
Change-Id: I8e47cda14752c7b1dad8b892a8de767bf3b7a27e
2015-07-03 20:43:06 +02:00
Ori Livneh f41f26a85c Add a tracking category on pages that contain invalid <syntaxhighlight> attributes
Do this by having SyntaxHighlight_GeSHi::highlight() return a Status object
rather than a plain string, and by making it the highlight method's job to look
up a lexer for a language.  The actual warning text is not outputted anywhere
yet; deferring that for a follow-up patch.

Bug: T103586
Change-Id: Id839f925a56ab09a8423958327b9aefd7207ef37
2015-07-02 23:14:34 -07:00
Translation updater bot 059866eaa9 Localisation updates from https://translatewiki.net.
Change-Id: I2083152007dd2c2058855b42fdcf43ef463ebd58
2015-07-02 21:29:17 +02:00
Translation updater bot 9c0af782b7 Localisation updates from https://translatewiki.net.
Change-Id: I66334561ea8edc4bec8d13172688487aaa54f01c
2015-06-30 21:25:14 +02:00
Translation updater bot 3c9918d599 Localisation updates from https://translatewiki.net.
Change-Id: I636e7fa2b038f25d0117d245ab96313a41ad771f
2015-06-29 20:52:43 +02:00
Translation updater bot edd57c8773 Localisation updates from https://translatewiki.net.
Change-Id: Ifa35c9fbcb3b36bed6d8e4bfe803bf9d5372bab6
2015-06-28 22:17:38 +02:00
Translation updater bot c002db819f Localisation updates from https://translatewiki.net.
Change-Id: I7403992f2054fdf1973f9ccd33b08c37cdf2d494
2015-06-26 21:58:13 +02:00
Ori Livneh 927f40e98a Hide the red border around syntax errors
MZMcBride noticed the red border around '國' in
https://en.wikipedia.org/wiki/Swift_(programming_language)#Example_code

That particular case happens to be a Pygments bug, because multibyte characters
are valid variable names in Swift. But even in cases of legitimate syntax
errors, I don't think we want to show the red border. This behavior may be
useful in code editors, but it is not useful in a wiki environment, especially
given the longstanding habit of using an existing, mostly-compatible lexer to
highlight a language for which no specific lexer exists.

To fix this, override the style in pygments.wrapper.css, and swap the order in
which the two CSS files are concatenated, so that in general we have the
ability to override Pygments-generated CSS.

Change-Id: I304fdaf3a462445d316e0f7fecc983fa87afc629
2015-06-25 17:24:15 -07:00
jenkins-bot b572c46d8f Merge "Avoid displaying double borders for inline code snippets" 2015-06-25 23:40:06 +00:00
Timo Tijhof f8b63304eb Support local composer setup
This makes installation easier for local development.
Per https://www.mediawiki.org/wiki/Manual:External_libraries

I was supicious about whether 'use KzykHys\Pygments\Pygments;'
works in a file if the namespace/class itself is only loaded
later, but it works fine.

Ref T103890.

Change-Id: Ia1a577f555cd8ab09969dec219316bc1e76769f4
2015-06-25 22:49:53 +00:00
Translation updater bot abeb4dd3ca Localisation updates from https://translatewiki.net.
Change-Id: I30c6bf310e0bce91f142678f50fb3a53df5b555c
2015-06-25 20:47:57 +02:00
Bartosz Dziewoński 892b52a30d Avoid displaying double borders for inline code snippets
Before we started using the 'code' tag for inline code snippets,
<code><syntaxhighlight enclose=none ...>...</syntaxhighlight></code>
was a common pattern. Continue supporting it in existing content.

Follow-up to 04293baad9. My IRC comments
about this were seemingly forgotten, and the code I added in
5b7522a5fc to handle this problem
unceremoniously removed.

Bug: T85794
Change-Id: I8e52089fed41e78fb60ddd5b7c12075056265dd9
2015-06-25 13:38:37 +02:00
Bartosz Dziewoński ca778d0a99 Revert "Remove obsolete mw-highlighter styles"
The 'direction' rules must not be applied to regular preformatted
text in MediaWiki core, only to syntax-highlighted programming
language code.

(Not reverting the part that removes 'monospace' rule, *that* is
superfluous.)

This reverts commit f834b719b9.

Bug: T103780
Change-Id: Ie7e9123ab3456aa6fff0485431fe81cd5eb31fa2
2015-06-25 13:05:19 +02:00
Ricordisamoa b8bad5b86f Follow-up for Idb7e03aee: update i18n message for Pygments switch
Change-Id: I6babe03f7de57cfa14dfbc976c73cc68b0204705
2015-06-25 11:27:47 +02:00
Timo Tijhof e033d2db9e Add parser tests for block and inline behaviour
Change-Id: I0af26e8b86f2f9060bd88db6d36449d983978f09
2015-06-25 05:46:42 +01:00
Timo Tijhof f834b719b9 Remove obsolete mw-highlighter styles
The styles in MediaWiki core for <pre> already cover this. And
for skins that want different styles, SyntaxHighlight should not
have been overriding it.

Bug: T103780
Change-Id: Ib863288a9a4530b183cf5fdb692489363d82a50f
2015-06-25 05:43:24 +01:00
Timo Tijhof 6b050bac51 Document the 'enclose' and 'inline' parser tag attributes
It previously supported more values, but since the switch to Pygments
these additional values are no longer supported. It now always
outputs <pre> or <code>, not e.g. <div>.

Change-Id: I406eee0eeeb3b9aaec3fa464ffdf6e200c868b84
2015-06-25 05:43:04 +01:00
Legoktm f1c6b66bac Revert "Add Pyglet, a web micro-service for highlighting using Pygments"
Doesn't work, shouldn't have been self-merged either.

This reverts commit 7e4efbe114.

Change-Id: I52b200d3fb0fea101317740e4ce63a7b71015303
2015-06-25 01:11:54 +00:00
Ori Livneh 7e4efbe114 Add Pyglet, a web micro-service for highlighting using Pygments
Pyglet is an internal web service that listens on port 31337 by default and
which accepts syntax highlighting request via POST. If $wgPygletURL is set to a
URL of a Pyglet instance, the extension will attempt to query the web service
instead of shelling out.

Change-Id: Ic49f4cd77585dbffc5392e80904754ff889b8a63
2015-06-24 17:57:50 -07:00
Timo Tijhof 1a90245838 ext.geshi.visualEditor: Store languages in the module instead of mw.config
Also fixed typo language -> langauge.

Change-Id: Ic4bfeb275c479df17e5dd41d5173d9807f6bc1a0
2015-06-25 00:35:20 +00:00