Add missing and new languages

Out geshi language list had not been updated after the last update and
we were missing a few language names containing - and _ like php-brief

Bug: T94292
Change-Id: I83bf1aeb95e1ed7c2cd2eba865987a772e3f08eb
This commit is contained in:
Derk-Jan Hartman 2015-03-28 13:25:23 +01:00
parent ffc64ed2b0
commit dbf443c025
2 changed files with 32 additions and 3 deletions

View file

@ -1,5 +1,5 @@
<?php
// Generated by updateLanguageList.php on Wed, 19 Nov 2014 00:27:50 +0000
// Generated by updateLanguageList.php on Sat, 28 Mar 2015 12:14:38 +0000
$wgGeSHiSupportedLanguages = array(
"4cs",
"6502acme",
@ -10,9 +10,11 @@ $wgGeSHiSupportedLanguages = array(
"actionscript",
"actionscript3",
"ada",
"aimms",
"algol68",
"apache",
"applescript",
"apt_sources",
"arm",
"asm",
"asp",
@ -31,21 +33,28 @@ $wgGeSHiSupportedLanguages = array(
"bnf",
"boo",
"c",
"c_loadrunner",
"c_mac",
"c_winapi",
"caddcl",
"cadlisp",
"cfdg",
"cfm",
"chaiscript",
"chapel",
"cil",
"clojure",
"cmake",
"cobol",
"coffeescript",
"cpp",
"cpp-qt",
"cpp-winapi",
"csharp",
"css",
"cuesheet",
"d",
"dart",
"dcl",
"dcpu16",
"dcs",
@ -61,6 +70,7 @@ $wgGeSHiSupportedLanguages = array(
"epc",
"erlang",
"euphoria",
"ezt",
"f1",
"falcon",
"fo",
@ -91,10 +101,12 @@ $wgGeSHiSupportedLanguages = array(
"inno",
"intercal",
"io",
"ispfpanel",
"j",
"java",
"java5",
"javascript",
"jcl",
"jquery",
"kixtart",
"klonec",
@ -127,11 +139,14 @@ $wgGeSHiSupportedLanguages = array(
"nagios",
"netrexx",
"newlisp",
"nginx",
"nimrod",
"nsis",
"oberon2",
"objc",
"objeck",
"ocaml",
"ocaml-brief",
"octave",
"oobas",
"oorexx",
@ -148,12 +163,14 @@ $wgGeSHiSupportedLanguages = array(
"perl6",
"pf",
"php",
"php-brief",
"pic16",
"pike",
"pixelbender",
"pli",
"plsql",
"postgresql",
"postscript",
"povray",
"powerbuilder",
"powershell",
@ -168,7 +185,10 @@ $wgGeSHiSupportedLanguages = array(
"python",
"q",
"qbasic",
"qml",
"racket",
"rails",
"rbs",
"rebol",
"reg",
"rexx",
@ -176,16 +196,19 @@ $wgGeSHiSupportedLanguages = array(
"rpmspec",
"rsplus",
"ruby",
"rust",
"sas",
"scala",
"scheme",
"scilab",
"scl",
"sdlbasic",
"smalltalk",
"smarty",
"spark",
"sparql",
"sql",
"standardml",
"stonescript",
"systemverilog",
"tcl",
@ -201,6 +224,7 @@ $wgGeSHiSupportedLanguages = array(
"vala",
"vb",
"vbnet",
"vbscript",
"vedit",
"verilog",
"vhdl",
@ -212,6 +236,7 @@ $wgGeSHiSupportedLanguages = array(
"winbatch",
"xbasic",
"xml",
"xorg_conf",
"xpp",
"yaml",
"z80",

View file

@ -36,9 +36,13 @@ class UpdateLanguageList extends Maintenance {
public function execute() {
global $IP;
function lang_filter( $val ) {
return preg_match('/^[a-zA-Z0-9\-_]+$/', $val);
}
$geshi = new GeSHi;
$header = '// Generated by ' . basename( __FILE__ ) . ' on ' . date( DATE_RFC2822 ) . "\n";
$langs = array_values( array_filter( $geshi->get_supported_languages( false ), 'ctype_alnum' ) );
$langs = array_values( array_filter( $geshi->get_supported_languages( false ), 'lang_filter' ) );
sort( $langs );
$replace = array( '[' => "array(\n\t", ']' => "\n);\n", '",' => "\",\n\t" );
$code = "<?php\n" . $header . '$wgGeSHiSupportedLanguages = ' . strtr( json_encode( $langs ), $replace );
@ -48,4 +52,4 @@ class UpdateLanguageList extends Maintenance {
}
$maintClass = "UpdateLanguageList";
require_once( RUN_MAINTENANCE_IF_MAIN );
require_once ( RUN_MAINTENANCE_IF_MAIN );