Index: trunk/extensions/Maps/Maps.i18n.php |
— | — | @@ -67,6 +67,27 @@ |
68 | 68 | This will maps allow to override the default value of the service parameter by the one that's optimal for the mapping service. |
69 | 69 | (Example: In case of Google Maps, the Google geocoder will be used.)", |
70 | 70 | |
| 71 | + // Geocode parser hook |
| 72 | + 'maps-geocode-par-location' => 'The address you want to geocode.', |
| 73 | + 'maps-geocode-par-mappingservice' => 'The geocoding service you want to use. See the available geocoding services.', |
| 74 | + 'maps-geocode-par-geoservice' => 'This parameter allows you to indicate you are using this geocoding request in combination with a specific mapping service. |
| 75 | +Each mapping service can have overrides over the default value for the geocoding service. |
| 76 | +This is for legal considerations, since you can not use the Google Geocoding service except together with Google Maps. Settings this parameter and not the service one will ensure you are not using an invalid combination.', |
| 77 | + 'maps-geocode-par-allowcoordinates' => 'Allows disabling the support for coordinates in this function. Must be either yes or no. |
| 78 | +When no, every value will be geocoded, even valid coordinates. ', |
| 79 | + 'maps-geocode-par-format' => 'The format for the resulting coordinates.', |
| 80 | + 'maps-geocode-par-directional' => 'Indicates if the coordinates should be outputted directional or not.', |
| 81 | + |
| 82 | + // Geodistance parser hook |
| 83 | + 'maps-geodistance-par-location1' => 'The first point in the set to calculate the distance between.', |
| 84 | + 'maps-geodistance-par-location2' => 'The second point in the set to calculate the distance between.', |
| 85 | + 'maps-geodistance-par-unit' => 'The unit the output the distance in.', |
| 86 | + 'maps-geodistance-par-decimals' => 'The maximum amount of fractional digits to use in the resulting value.', |
| 87 | + 'maps-geodistance-par-mappingservice' => 'The geocoding service to use to geocode any addresses.', |
| 88 | + 'maps-geodistance-par-geoservice' => 'The mapping service this is used together with. |
| 89 | +This can affect the default geocoding service value.', |
| 90 | + |
| 91 | + |
71 | 92 | // Validation |
72 | 93 | 'validation-error-invalid-location' => 'Parameter $1 must be a valid location.', |
73 | 94 | 'validation-error-invalid-locations' => 'Parameter $1 must be one or more valid locations.', |
Index: trunk/extensions/Maps/includes/parserHooks/Maps_Geocode.php |
— | — | @@ -63,6 +63,7 @@ |
64 | 64 | $params['location'] = new Parameter( 'location' ); |
65 | 65 | $params['location']->addDependencies( 'mappingservice', 'geoservice' ); |
66 | 66 | $params['location']->addCriteria( new CriterionIsLocation() ); |
| 67 | + $params['location']->setDescription( wfMsg( 'maps-geocode-par-location' ) ); |
67 | 68 | |
68 | 69 | $params['mappingservice'] = new Parameter( |
69 | 70 | 'mappingservice', |
— | — | @@ -74,6 +75,7 @@ |
75 | 76 | ) |
76 | 77 | ); |
77 | 78 | $params['mappingservice']->addManipulations( new ParamManipulationFunctions( 'strtolower' ) ); |
| 79 | + $params['mappingservice']->setDescription( wfMsg( 'maps-geocode-par-mappingservice' ) ); |
78 | 80 | |
79 | 81 | $params['geoservice'] = new Parameter( |
80 | 82 | 'geoservice', |
— | — | @@ -85,12 +87,14 @@ |
86 | 88 | ) |
87 | 89 | ); |
88 | 90 | $params['geoservice']->addManipulations( new ParamManipulationFunctions( 'strtolower' ) ); |
| 91 | + $params['geoservice']->setDescription( wfMsg( 'maps-geocode-par-geoservice' ) ); |
89 | 92 | |
90 | 93 | $params['allowcoordinates'] = new Parameter( |
91 | 94 | 'allowcoordinates', |
92 | 95 | Parameter::TYPE_BOOLEAN, |
93 | 96 | $egMapsAllowCoordsGeocoding |
94 | 97 | ); |
| 98 | + $params['allowcoordinates']->setDescription( wfMsg( 'maps-geocode-par-allowcoordinates' ) ); |
95 | 99 | |
96 | 100 | $params['format'] = new Parameter( |
97 | 101 | 'format', |
— | — | @@ -102,12 +106,14 @@ |
103 | 107 | ) |
104 | 108 | ); |
105 | 109 | $params['format']->addManipulations( new ParamManipulationFunctions( 'strtolower' ) ); |
| 110 | + $params['format']->setDescription( wfMsg( 'maps-geocode-par-format' ) ); |
106 | 111 | |
107 | 112 | $params['directional'] = new Parameter( |
108 | 113 | 'directional', |
109 | 114 | Parameter::TYPE_BOOLEAN, |
110 | 115 | $egMapsCoordinateDirectional |
111 | 116 | ); |
| 117 | + $params['directional']->setDescription( wfMsg( 'maps-geocode-par-directional' ) ); |
112 | 118 | |
113 | 119 | return $params; |
114 | 120 | } |
Index: trunk/extensions/Maps/includes/parserHooks/Maps_Geodistance.php |
— | — | @@ -68,6 +68,7 @@ |
69 | 69 | ) |
70 | 70 | ); |
71 | 71 | $params['location1']->addDependencies( 'mappingservice', 'geoservice' ); |
| 72 | + $params['location1']->setDescription( wfMsg( 'maps-geodistance-par-location1' ) ); |
72 | 73 | |
73 | 74 | $params['location2'] = new Parameter( |
74 | 75 | 'location2', |
— | — | @@ -79,6 +80,7 @@ |
80 | 81 | ) |
81 | 82 | ); |
82 | 83 | $params['location2']->addDependencies( 'mappingservice', 'geoservice' ); |
| 84 | + $params['location2']->setDescription( wfMsg( 'maps-geodistance-par-location2' ) ); |
83 | 85 | |
84 | 86 | $params['unit'] = new Parameter( |
85 | 87 | 'unit', |
— | — | @@ -90,12 +92,14 @@ |
91 | 93 | ) |
92 | 94 | ); |
93 | 95 | $params['unit']->addManipulations( new ParamManipulationFunctions( 'strtolower' ) ); |
94 | | - |
| 96 | + $params['unit']->setDescription( wfMsg( 'maps-geodistance-par-unit' ) ); |
| 97 | + |
95 | 98 | $params['decimals'] = new Parameter( |
96 | 99 | 'decimals', |
97 | 100 | Parameter::TYPE_INTEGER, |
98 | 101 | $egMapsDistanceDecimals |
99 | 102 | ); |
| 103 | + $params['decimals']->setDescription( wfMsg( 'maps-geodistance-par-decimals' ) ); |
100 | 104 | |
101 | 105 | $params['mappingservice'] = new Parameter( |
102 | 106 | 'mappingservice', |
— | — | @@ -107,6 +111,7 @@ |
108 | 112 | ) |
109 | 113 | ); |
110 | 114 | $params['mappingservice']->addManipulations( new ParamManipulationFunctions( 'strtolower' ) ); |
| 115 | + $params['mappingservice']->setDescription( wfMsg( 'maps-geodistance-par-mappingservice' ) ); |
111 | 116 | |
112 | 117 | $params['geoservice'] = new Parameter( |
113 | 118 | 'geoservice', |
— | — | @@ -118,6 +123,7 @@ |
119 | 124 | ) |
120 | 125 | ); |
121 | 126 | $params['geoservice']->addManipulations( new ParamManipulationFunctions( 'strtolower' ) ); |
| 127 | + $params['geoservice']->setDescription( wfMsg( 'maps-geodistance-par-geoservice' ) ); |
122 | 128 | |
123 | 129 | return $params; |
124 | 130 | } |