Index: trunk/extensions/SemanticMaps/Services/OpenLayers/SM_OpenLayersFunctions.js |
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | /** |
12 | 12 | * This function holds specific functionality for the Open Layers form input of Semantic Maps |
13 | 13 | */ |
14 | | -function makeFormInputOpenLayer(mapName, locationFieldName, lat, lon, zoom, marker_lat, marker_lon, layers, controls, height) { |
| 14 | +function makeFormInputOpenLayer( mapName, locationFieldName, lat, lon, zoom, marker_lat, marker_lon, layers, controls, height, langCode ) { |
15 | 15 | var markers = Array(); |
16 | 16 | |
17 | 17 | // Show a starting marker only if marker coordinates are provided |
— | — | @@ -57,9 +57,9 @@ |
58 | 58 | }); |
59 | 59 | |
60 | 60 | var clickHanler = new OpenLayers.Control.Click(); |
61 | | - controls.push(clickHanler); |
| 61 | + controls.push(clickHanler); |
62 | 62 | |
63 | | - var map = initOpenLayer(mapName, lon, lat, zoom, layers, controls, markers, height); |
| 63 | + var map = initOpenLayer( mapName, lon, lat, zoom, layers, controls, markers, height, langCode ); |
64 | 64 | |
65 | 65 | // Make the map variable available for other functions |
66 | 66 | if (!window.OLMaps) window.OLMaps = new Object; |
— | — | @@ -95,4 +95,4 @@ |
96 | 96 | for (var i = 0; i < markerCollection.length; i++) { |
97 | 97 | markerLayer.removeMarker(markerCollection[i]); |
98 | 98 | } |
99 | | -} |
| 99 | +} |
\ No newline at end of file |
Index: trunk/extensions/SemanticMaps/Services/OpenLayers/SM_OpenLayersQP.php |
— | — | @@ -44,6 +44,8 @@ |
45 | 45 | * @see SMMapPrinter::addSpecificMapHTML() |
46 | 46 | */ |
47 | 47 | protected function addSpecificMapHTML() { |
| 48 | + global $wgLang; |
| 49 | + |
48 | 50 | // TODO: refactor up like done in maps with display point |
49 | 51 | $markerItems = array(); |
50 | 52 | |
— | — | @@ -67,6 +69,8 @@ |
68 | 70 | |
69 | 71 | $layerItems = $this->mService->createLayersStringAndLoadDependencies( $this->layers ); |
70 | 72 | |
| 73 | + $langCode = $wgLang->getCode(); |
| 74 | + |
71 | 75 | $this->mService->addDependency( Html::inlineScript( <<<EOT |
72 | 76 | addOnloadHook( |
73 | 77 | function() { |
— | — | @@ -77,7 +81,8 @@ |
78 | 82 | $this->zoom, |
79 | 83 | [$layerItems], |
80 | 84 | [$this->controls], |
81 | | - [$markersString] |
| 85 | + [$markersString], |
| 86 | + '$langCode' |
82 | 87 | ); |
83 | 88 | } |
84 | 89 | ); |
Index: trunk/extensions/SemanticMaps/Services/OpenLayers/SM_OpenLayersFormInput.php |
— | — | @@ -65,7 +65,7 @@ |
66 | 66 | * @see MapsMapFeature::addSpecificMapHTML() |
67 | 67 | */ |
68 | 68 | protected function addSpecificMapHTML() { |
69 | | - global $wgOut; |
| 69 | + global $wgOut, $wgLang; |
70 | 70 | |
71 | 71 | $this->output .= Html::element( |
72 | 72 | 'div', |
— | — | @@ -78,6 +78,8 @@ |
79 | 79 | |
80 | 80 | $layerItems = $this->mService->createLayersStringAndLoadDependencies( $this->layers ); |
81 | 81 | |
| 82 | + $langCode = $wgLang->getCode(); |
| 83 | + |
82 | 84 | $wgOut->addInlineScript( <<<EOT |
83 | 85 | addOnloadHook( |
84 | 86 | function() { |
— | — | @@ -90,7 +92,8 @@ |
91 | 93 | {$this->markerCoords['lat']}, |
92 | 94 | {$this->markerCoords['lon']}, |
93 | 95 | [$layerItems], |
94 | | - [$this->controls] |
| 96 | + [$this->controls], |
| 97 | + '$langCode' |
95 | 98 | ); |
96 | 99 | } |
97 | 100 | ); |
Index: trunk/extensions/SemanticMaps/SemanticMaps.php |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | |
37 | 37 | // Only initialize the extension when all dependencies are present. |
38 | 38 | if ( defined( 'Maps_VERSION' ) && defined( 'SMW_VERSION' ) ) { |
39 | | - define( 'SM_VERSION', '0.6.4 a6' ); |
| 39 | + define( 'SM_VERSION', '0.6.4 a8' ); |
40 | 40 | |
41 | 41 | $useExtensionPath = version_compare( $wgVersion, '1.16', '>=' ) && isset( $wgExtensionAssetsPath ) && $wgExtensionAssetsPath; |
42 | 42 | $smgScriptPath = ( $useExtensionPath ? $wgExtensionAssetsPath : $wgScriptPath . '/extensions' ) . '/SemanticMaps'; |