Index: trunk/extensions/Maps/Maps.i18n.php |
— | — | @@ -55,6 +55,18 @@ |
56 | 56 | 'maps-distance-par-decimals' => 'The maximum amount of fractional digits to use in the resulting value.', |
57 | 57 | 'maps-distance-par-unit' => 'The unit the output the distance in.', |
58 | 58 | |
| 59 | + // Finddestination paser hook |
| 60 | + 'maps-finddestination-par-location' => 'The initial location.', |
| 61 | + 'maps-finddestination-par-bearing' => 'The initial bearing.', |
| 62 | + 'maps-finddestination-par-distance' => 'The distance to travel.', |
| 63 | + 'maps-finddestination-par-format' => 'The format in which to output the destination.', |
| 64 | + 'maps-finddestination-par-directional' => 'Indicates if the format of the destination should be directional or not.', |
| 65 | + 'maps-finddestination-par-allowcoordinates' => 'Indicates if coordinates should be allowed. If set to no, only addresses will be accepted.', |
| 66 | + 'maps-finddestination-par-geoservice' => "The geocoding service to use to geocode the value in case it's an address.", |
| 67 | + 'maps-finddestination-par-mappingservice' => "Parameter you can use to indicate the mapping service you are using this function with. |
| 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 | +(Example: In case of Google Maps, the Google geocoder will be used.)", |
| 70 | + |
59 | 71 | // Validation |
60 | 72 | 'validation-error-invalid-location' => 'Parameter $1 must be a valid location.', |
61 | 73 | 'validation-error-invalid-locations' => 'Parameter $1 must be one or more valid locations.', |
Index: trunk/extensions/Maps/includes/parserHooks/Maps_Finddestination.php |
— | — | @@ -62,14 +62,17 @@ |
63 | 63 | $params['location'] = new Parameter( 'location' ); |
64 | 64 | $params['location']->addCriteria( new CriterionIsLocation() ); |
65 | 65 | $params['location']->addDependencies( 'mappingservice', 'geoservice' ); |
| 66 | + $params['location']->setDescription( wfMsg( 'maps-finddestination-par-location' ) ); |
66 | 67 | |
67 | 68 | $params['bearing'] = new Parameter( |
68 | 69 | 'bearing', |
69 | 70 | Parameter::TYPE_FLOAT |
70 | 71 | ); |
| 72 | + $params['bearing']->setDescription( wfMsg( 'maps-finddestination-par-bearing' ) ); |
71 | 73 | |
72 | 74 | $params['distance'] = new Parameter( 'distance' ); |
73 | 75 | $params['distance']->addCriteria( new CriterionIsDistance() ); |
| 76 | + $params['distance']->setDescription( wfMsg( 'maps-finddestination-par-distance' ) ); |
74 | 77 | // TODO: manipulate to distance object |
75 | 78 | |
76 | 79 | $params['mappingservice'] = new Parameter( |
— | — | @@ -82,6 +85,7 @@ |
83 | 86 | ) |
84 | 87 | ); |
85 | 88 | $params['mappingservice']->addManipulations( new ParamManipulationFunctions( 'strtolower' ) ); |
| 89 | + $params['mappingservice']->setDescription( wfMsg( 'maps-finddestination-par-mappingservice' ) ); |
86 | 90 | |
87 | 91 | $params['geoservice'] = new Parameter( |
88 | 92 | 'geoservice', |
— | — | @@ -93,12 +97,14 @@ |
94 | 98 | ) |
95 | 99 | ); |
96 | 100 | $params['geoservice']->addManipulations( new ParamManipulationFunctions( 'strtolower' ) ); |
97 | | - |
| 101 | + $params['geoservice']->setDescription( wfMsg( 'maps-finddestination-par-geoservice' ) ); |
| 102 | + |
98 | 103 | $params['allowcoordinates'] = new Parameter( |
99 | 104 | 'allowcoordinates', |
100 | 105 | Parameter::TYPE_BOOLEAN, |
101 | 106 | $egMapsAllowCoordsGeocoding |
102 | 107 | ); |
| 108 | + $params['allowcoordinates']->setDescription( wfMsg( 'maps-finddestination-par-allowcoordinates' ) ); |
103 | 109 | |
104 | 110 | $params['format'] = new Parameter( |
105 | 111 | 'format', |
— | — | @@ -110,12 +116,14 @@ |
111 | 117 | ) |
112 | 118 | ); |
113 | 119 | $params['format']->addManipulations( new ParamManipulationFunctions( 'strtolower' ) ); |
| 120 | + $params['format']->setDescription( wfMsg( 'maps-finddestination-par-format' ) ); |
114 | 121 | |
115 | 122 | $params['directional'] = new Parameter( |
116 | 123 | 'directional', |
117 | 124 | Parameter::TYPE_BOOLEAN, |
118 | 125 | $egMapsCoordinateDirectional |
119 | 126 | ); |
| 127 | + $params['directional']->setDescription( wfMsg( 'maps-finddestination-par-directional' ) ); |
120 | 128 | |
121 | 129 | return $params; |
122 | 130 | } |