From b61cec71a1d721b11217ee218c2c57c5e1058959 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Wed, 15 Dec 2010 09:42:19 +0000 Subject: [PATCH] Make it possible to exclude Console.js and Lang/en.js for really small builds. r=bartvde (closes #2882) git-svn-id: http://svn.openlayers.org/trunk/openlayers@10967 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Ajax.js | 1 + lib/OpenLayers/BaseTypes.js | 2 +- lib/OpenLayers/BaseTypes/Bounds.js | 1 + lib/OpenLayers/BaseTypes/LonLat.js | 1 + lib/OpenLayers/BaseTypes/Pixel.js | 1 + lib/OpenLayers/Control/Graticule.js | 1 + lib/OpenLayers/Control/LayerSwitcher.js | 1 + lib/OpenLayers/Control/Permalink.js | 1 + lib/OpenLayers/Control/Scale.js | 1 + lib/OpenLayers/Filter/Spatial.js | 1 + lib/OpenLayers/Format.js | 1 + lib/OpenLayers/Format/GML.js | 1 + lib/OpenLayers/Format/KML.js | 1 + lib/OpenLayers/Format/WFS.js | 1 + lib/OpenLayers/Lang.js | 2 +- lib/OpenLayers/Layer/GML.js | 1 + lib/OpenLayers/Layer/Google.js | 1 + lib/OpenLayers/Layer/MultiMap.js | 1 + lib/OpenLayers/Layer/Vector.js | 1 + lib/OpenLayers/Layer/VirtualEarth.js | 1 + lib/OpenLayers/Layer/WFS.js | 1 + lib/OpenLayers/Layer/Yahoo.js | 1 + lib/OpenLayers/Map.js | 1 + lib/OpenLayers/Protocol/HTTP.js | 1 + lib/OpenLayers/Tile.js | 1 + lib/OpenLayers/Util.js | 1 + 26 files changed, 26 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Ajax.js b/lib/OpenLayers/Ajax.js index 479dfd2abd..933a0a07ee 100644 --- a/lib/OpenLayers/Ajax.js +++ b/lib/OpenLayers/Ajax.js @@ -6,6 +6,7 @@ /** * @requires OpenLayers/Request/XMLHttpRequest.js * @requires OpenLayers/Console.js + * @requires OpenLayers/Lang.js */ OpenLayers.ProxyHost = ""; diff --git a/lib/OpenLayers/BaseTypes.js b/lib/OpenLayers/BaseTypes.js index 9119f7da28..9caf71411a 100644 --- a/lib/OpenLayers/BaseTypes.js +++ b/lib/OpenLayers/BaseTypes.js @@ -10,7 +10,7 @@ * @requires OpenLayers/BaseTypes/Pixel.js * @requires OpenLayers/BaseTypes/Bounds.js * @requires OpenLayers/BaseTypes/Element.js - * @requires OpenLayers/Lang/en.js + * @requires OpenLayers/Lang.js * @requires OpenLayers/Console.js */ diff --git a/lib/OpenLayers/BaseTypes/Bounds.js b/lib/OpenLayers/BaseTypes/Bounds.js index 9412807773..7a73a74b02 100644 --- a/lib/OpenLayers/BaseTypes/Bounds.js +++ b/lib/OpenLayers/BaseTypes/Bounds.js @@ -5,6 +5,7 @@ /** * @requires OpenLayers/Console.js + * @requires OpenLayers/Lang.js */ /** diff --git a/lib/OpenLayers/BaseTypes/LonLat.js b/lib/OpenLayers/BaseTypes/LonLat.js index 622f636c82..fe5943d3a1 100644 --- a/lib/OpenLayers/BaseTypes/LonLat.js +++ b/lib/OpenLayers/BaseTypes/LonLat.js @@ -5,6 +5,7 @@ /** * @requires OpenLayers/Console.js + * @requires OpenLayers/Lang.js */ /** diff --git a/lib/OpenLayers/BaseTypes/Pixel.js b/lib/OpenLayers/BaseTypes/Pixel.js index f3bf538ef9..d72742ff25 100644 --- a/lib/OpenLayers/BaseTypes/Pixel.js +++ b/lib/OpenLayers/BaseTypes/Pixel.js @@ -5,6 +5,7 @@ /** * @requires OpenLayers/Console.js + * @requires OpenLayers/Lang.js */ /** diff --git a/lib/OpenLayers/Control/Graticule.js b/lib/OpenLayers/Control/Graticule.js index 3e6537a70a..78e986a543 100644 --- a/lib/OpenLayers/Control/Graticule.js +++ b/lib/OpenLayers/Control/Graticule.js @@ -5,6 +5,7 @@ /** * @requires OpenLayers/Control.js + * @requires OpenLayers/Lang.js */ /** diff --git a/lib/OpenLayers/Control/LayerSwitcher.js b/lib/OpenLayers/Control/LayerSwitcher.js index 3f1b84e8b4..eaf76da42a 100644 --- a/lib/OpenLayers/Control/LayerSwitcher.js +++ b/lib/OpenLayers/Control/LayerSwitcher.js @@ -5,6 +5,7 @@ /** * @requires OpenLayers/Control.js + * @requires OpenLayers/Lang.js */ /** diff --git a/lib/OpenLayers/Control/Permalink.js b/lib/OpenLayers/Control/Permalink.js index fc32e4817c..30bbe0e0f3 100644 --- a/lib/OpenLayers/Control/Permalink.js +++ b/lib/OpenLayers/Control/Permalink.js @@ -7,6 +7,7 @@ /** * @requires OpenLayers/Control.js * @requires OpenLayers/Control/ArgParser.js + * @requires OpenLayers/Lang.js */ /** diff --git a/lib/OpenLayers/Control/Scale.js b/lib/OpenLayers/Control/Scale.js index 9a2f89a9e0..adde4b5e32 100644 --- a/lib/OpenLayers/Control/Scale.js +++ b/lib/OpenLayers/Control/Scale.js @@ -6,6 +6,7 @@ /** * @requires OpenLayers/Control.js + * @requires OpenLayers/Lang.js */ /** diff --git a/lib/OpenLayers/Filter/Spatial.js b/lib/OpenLayers/Filter/Spatial.js index 11f86d7851..47d74795b5 100644 --- a/lib/OpenLayers/Filter/Spatial.js +++ b/lib/OpenLayers/Filter/Spatial.js @@ -6,6 +6,7 @@ /** * @requires OpenLayers/Filter.js * @requires OpenLayers/Console.js + * @requires OpenLayers/Lang.js */ /** diff --git a/lib/OpenLayers/Format.js b/lib/OpenLayers/Format.js index 751584fbcf..b6728c7252 100644 --- a/lib/OpenLayers/Format.js +++ b/lib/OpenLayers/Format.js @@ -6,6 +6,7 @@ /** * @requires OpenLayers/Util.js * @requires OpenLayers/Console.js + * @requires OpenLayers/Lang.js */ /** diff --git a/lib/OpenLayers/Format/GML.js b/lib/OpenLayers/Format/GML.js index d34ce52215..a01de60c92 100644 --- a/lib/OpenLayers/Format/GML.js +++ b/lib/OpenLayers/Format/GML.js @@ -13,6 +13,7 @@ * @requires OpenLayers/Geometry/Polygon.js * @requires OpenLayers/Geometry/MultiPolygon.js * @requires OpenLayers/Console.js + * @requires OpenLayers/Lang.js */ /** diff --git a/lib/OpenLayers/Format/KML.js b/lib/OpenLayers/Format/KML.js index 76e2b65c2f..af3d78fe5c 100644 --- a/lib/OpenLayers/Format/KML.js +++ b/lib/OpenLayers/Format/KML.js @@ -12,6 +12,7 @@ * @requires OpenLayers/Geometry/Collection.js * @requires OpenLayers/Request/XMLHttpRequest.js * @requires OpenLayers/Console.js + * @requires OpenLayers/Lang.js * @requires OpenLayers/Projection.js */ diff --git a/lib/OpenLayers/Format/WFS.js b/lib/OpenLayers/Format/WFS.js index ca82270084..bf0ef1d50b 100644 --- a/lib/OpenLayers/Format/WFS.js +++ b/lib/OpenLayers/Format/WFS.js @@ -6,6 +6,7 @@ /** * @requires OpenLayers/Format/GML.js * @requires OpenLayers/Console.js + * @requires OpenLayers/Lang.js */ /** diff --git a/lib/OpenLayers/Lang.js b/lib/OpenLayers/Lang.js index f27a2a508d..eb667c2f3f 100644 --- a/lib/OpenLayers/Lang.js +++ b/lib/OpenLayers/Lang.js @@ -101,7 +101,7 @@ OpenLayers.Lang = { */ translate: function(key, context) { var dictionary = OpenLayers.Lang[OpenLayers.Lang.getCode()]; - var message = dictionary[key]; + var message = dictionary && dictionary[key]; if(!message) { // Message not found, fall back to message key message = key; diff --git a/lib/OpenLayers/Layer/GML.js b/lib/OpenLayers/Layer/GML.js index 6631cd6cb1..b9d9665fe0 100644 --- a/lib/OpenLayers/Layer/GML.js +++ b/lib/OpenLayers/Layer/GML.js @@ -7,6 +7,7 @@ * @requires OpenLayers/Layer/Vector.js * @requires OpenLayers/Request/XMLHttpRequest.js * @requires OpenLayers/Console.js + * @requires OpenLayers/Lang.js */ /** diff --git a/lib/OpenLayers/Layer/Google.js b/lib/OpenLayers/Layer/Google.js index 6437ee373b..471e8968ad 100644 --- a/lib/OpenLayers/Layer/Google.js +++ b/lib/OpenLayers/Layer/Google.js @@ -8,6 +8,7 @@ * @requires OpenLayers/Layer/SphericalMercator.js * @requires OpenLayers/Layer/EventPane.js * @requires OpenLayers/Layer/FixedZoomLevels.js + * @requires OpenLayers/Lang.js */ /** diff --git a/lib/OpenLayers/Layer/MultiMap.js b/lib/OpenLayers/Layer/MultiMap.js index e390e78d06..eff7e0a57f 100644 --- a/lib/OpenLayers/Layer/MultiMap.js +++ b/lib/OpenLayers/Layer/MultiMap.js @@ -6,6 +6,7 @@ /** * @requires OpenLayers/Layer/EventPane.js * @requires OpenLayers/Layer/FixedZoomLevels.js + * @requires OpenLayers/Lang.js */ /** diff --git a/lib/OpenLayers/Layer/Vector.js b/lib/OpenLayers/Layer/Vector.js index dfd2aa2d50..ef60517f38 100644 --- a/lib/OpenLayers/Layer/Vector.js +++ b/lib/OpenLayers/Layer/Vector.js @@ -9,6 +9,7 @@ * @requires OpenLayers/StyleMap.js * @requires OpenLayers/Feature/Vector.js * @requires OpenLayers/Console.js + * @requires OpenLayers/Lang.js */ /** diff --git a/lib/OpenLayers/Layer/VirtualEarth.js b/lib/OpenLayers/Layer/VirtualEarth.js index 4fba250f35..9c924f0e45 100644 --- a/lib/OpenLayers/Layer/VirtualEarth.js +++ b/lib/OpenLayers/Layer/VirtualEarth.js @@ -8,6 +8,7 @@ * @requires OpenLayers/Layer/SphericalMercator.js * @requires OpenLayers/Layer/EventPane.js * @requires OpenLayers/Layer/FixedZoomLevels.js + * @requires OpenLayers/Lang.js */ /** diff --git a/lib/OpenLayers/Layer/WFS.js b/lib/OpenLayers/Layer/WFS.js index 61c4c3f845..7b573d10fb 100644 --- a/lib/OpenLayers/Layer/WFS.js +++ b/lib/OpenLayers/Layer/WFS.js @@ -9,6 +9,7 @@ * @requires OpenLayers/Layer/Vector.js * @requires OpenLayers/Layer/Markers.js * @requires OpenLayers/Console.js + * @requires OpenLayers/Lang.js */ /** diff --git a/lib/OpenLayers/Layer/Yahoo.js b/lib/OpenLayers/Layer/Yahoo.js index 1f0b3750f3..1fb9045c7b 100644 --- a/lib/OpenLayers/Layer/Yahoo.js +++ b/lib/OpenLayers/Layer/Yahoo.js @@ -8,6 +8,7 @@ * @requires OpenLayers/Layer/SphericalMercator.js * @requires OpenLayers/Layer/EventPane.js * @requires OpenLayers/Layer/FixedZoomLevels.js + * @requires OpenLayers/Lang.js */ /** diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 57cc69640b..fd4e404963 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -8,6 +8,7 @@ * @requires OpenLayers/Events.js * @requires OpenLayers/Tween.js * @requires OpenLayers/Console.js + * @requires OpenLayers/Lang.js */ /** diff --git a/lib/OpenLayers/Protocol/HTTP.js b/lib/OpenLayers/Protocol/HTTP.js index 3b231cd7fb..fdf75b0026 100644 --- a/lib/OpenLayers/Protocol/HTTP.js +++ b/lib/OpenLayers/Protocol/HTTP.js @@ -4,6 +4,7 @@ * full text of the license. */ /** + * @requires OpenLayers/Console.js * @requires OpenLayers/Protocol.js * @requires OpenLayers/Feature/Vector.js * @requires OpenLayers/Filter/Spatial.js diff --git a/lib/OpenLayers/Tile.js b/lib/OpenLayers/Tile.js index 9ca020e71e..1c7d73d5fc 100644 --- a/lib/OpenLayers/Tile.js +++ b/lib/OpenLayers/Tile.js @@ -7,6 +7,7 @@ /* * @requires OpenLayers/Util.js * @requires OpenLayers/Console.js + * @requires OpenLayers/Lang.js */ /* diff --git a/lib/OpenLayers/Util.js b/lib/OpenLayers/Util.js index 348a497947..63418b1122 100644 --- a/lib/OpenLayers/Util.js +++ b/lib/OpenLayers/Util.js @@ -5,6 +5,7 @@ /** * @requires OpenLayers/Console.js + * @requires OpenLayers/Lang.js */ /**