[fusion-commits] r2011 - in trunk: text widgets/FeatureInfo
widgets/Query widgets/Redline widgets/Theme
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Wed Dec 9 21:34:04 EST 2009
Author: christinebao
Date: 2009-12-09 21:34:03 -0500 (Wed, 09 Dec 2009)
New Revision: 2011
Modified:
trunk/text/en
trunk/widgets/FeatureInfo/featureinfomain.php
trunk/widgets/Query/querymain.php
trunk/widgets/Redline/Redline.php
trunk/widgets/Theme/thememain.php
Log:
Fix ticket http://trac.osgeo.org/fusion/ticket/347
GLOB: 4 new widgets EN strings are not localized yet
Modified: trunk/text/en
===================================================================
--- trunk/text/en 2009-12-08 10:10:42 UTC (rev 2010)
+++ trunk/text/en 2009-12-10 02:34:03 UTC (rev 2011)
@@ -135,6 +135,84 @@
MEASURETOTAL = total
MEASURELAYER = Measure
+# Feature Info UI
+FEATUREINFOTITLE = Feature Information
+FEATUREINFOSUBTITLE = Select a Layer
+FEATUREINFOLAYER = Layer:
+FEATUREINFOSELECTFEATURE= Select Features:
+FEATUREINFODIGITIZE = Digitize:
+FEATUREINFOPOINT = Point
+FEATUREINFORECTANGLE = Rectangle
+FEATUREINFOPOLYGON = Polygon
+FEATUREINFOTOTAL = Total:
+FEATUREINFONOSELECTED = no features selected.
+FEATUREINFOERROR = Error
+FEATUREINFOFETCHINFO = fetching feature info ...
+FEATUREINFOFEATURESEL = features selected
+FEATUREINFOAREA = Area:
+FEATUREINFOAREAUNDEFINE = areaIdx undefined
+FEATUREINFONOINFO = no layer info
+FEATUREINFONOFEATUREIN = no features in selected layer.
+
+# Query UI
+QUERYTITLE = Query Features
+QUERYSELECTLAYER = Select a Layer
+QUERYLAYER = Layer:
+QUERYPROPERTYFILTER = Property Filter
+QUERYPROPERTY = Property:
+QUERYOPERATOR = Operator:
+QUERYVALUE = Value:
+QUERYSPATIALFILTER = Spatial Filter
+QUERYDIGITIZE = Digitize:
+QUERYRECTANGLE = Rectangle
+QUERYPOLYGON = Polygon
+QUERYCLEAR = Clear
+QUERYOUTPUT = Output
+QUERYOUTPUTPROPERTY = Output property:
+QUERYEXECUTE = Execute
+QUERYMAXRESULT = Max results:
+QUERYRESULTS = Results
+QUERYSCALE = Scale:
+QUERYZOOM = Zoom
+QUERYSELECT = Select
+QUERYERROR = Error
+
+# Theme UI
+THEMETITLE = Theme Layer
+THEMESELECTLAYER = Select a Layer
+THEMELAYER = Layer:
+THEMENAME = Theme Name:
+THEMECONDITIONS = Define Conditions
+THEMEPROPERTY = Property:
+THEMEMIN = Min:
+THEMEMAX = Max:
+THEMEDISTRIBUTION = Distribution:
+THEMERULE = # of Rules:
+THEMESCALERANGE = Scale Range
+THEMESTYLERAMP = Style Ramp
+THEMEFILLTRANS = Fill Transparency:
+THEMEFILLCOLOR = Fill Color:
+THEMEFROM = From:
+THEMETO = To:
+THEMEBORDERCOLOR = Border Color:
+THEMEAPPLY = Apply
+THEMEERROR = Error
+
+# Redline UI
+REDLINEOPTIONS = Digitizing Options
+REDLINESELECTLAYER = Select Layer:
+REDLINENEW = New
+REDLINERENAME = Rename
+REDLINEREMOVE = Remove
+REDLINEDRAW = Draw:
+REDLINEPOINT = Point
+REDLINELINE = Line
+REDLINERECTANGLE = Rectangle
+REDLINEPOLYGON = Polygon
+REDLINESAVE = Save
+REDLINEUPLOAD = Upload
+REDLINEFEATURES = Features
+
# HtmlViewerAbout
HTMLABOUTTITLE = About %s
HTMLABOUTTITLEBAR = MapGuide Viewer
Modified: trunk/widgets/FeatureInfo/featureinfomain.php
===================================================================
--- trunk/widgets/FeatureInfo/featureinfomain.php 2009-12-08 10:10:42 UTC (rev 2010)
+++ trunk/widgets/FeatureInfo/featureinfomain.php 2009-12-10 02:34:03 UTC (rev 2011)
@@ -24,6 +24,12 @@
DisplayInitializationErrorHTML();
exit;
}
+ SetLocalizedFilesPath(GetLocalizationPath());
+ if(isset($_REQUEST['locale'])) {
+ $locale = $_REQUEST['locale'];
+ } else {
+ $locale = GetDefaultLocale();
+ }
require_once $fusionMGpath . 'Utilities.php';
require_once $fusionMGpath . '/JSON.php';
require_once 'classes/featureinfo.php';
@@ -32,6 +38,24 @@
$errorMsg = null;
$errorDetail = null;
+
+ $titleLocal = GetLocalizedString('FEATUREINFOTITLE', $locale );
+ $subtitleLocal = GetLocalizedString('FEATUREINFOSUBTITLE', $locale );
+ $layerLocal = GetLocalizedString('FEATUREINFOLAYER', $locale );
+ $selectFeatureLocal = GetLocalizedString('FEATUREINFOSELECTFEATURE', $locale );
+ $digitizeLocal = GetLocalizedString('FEATUREINFODIGITIZE', $locale );
+ $pointLocal = GetLocalizedString('FEATUREINFOPOINT', $locale );
+ $rectangleLocal = GetLocalizedString('FEATUREINFORECTANGLE', $locale );
+ $polygonLocal = GetLocalizedString('FEATUREINFOPOLYGON', $locale );
+ $totalLocal = GetLocalizedString('FEATUREINFOTOTAL', $locale );
+ $noSelectedLocal = GetLocalizedString('FEATUREINFONOSELECTED', $locale );
+ $errorLocal = GetLocalizedString('FEATUREINFOERROR', $locale );
+ $fetchInfoLocal = GetLocalizedString('FEATUREINFOFETCHINFO', $locale );
+ $featureSelLocal = GetLocalizedString('FEATUREINFOFEATURESEL', $locale );
+ $areaLocal = GetLocalizedString('FEATUREINFOAREA', $locale );
+ $areaUndefinedLocal = GetLocalizedString('FEATUREINFOAREAUNDEFINE', $locale );
+ $noLayerInfoLocal = GetLocalizedString('FEATUREINFONOINFO', $locale );
+ $noFeatureInLocal = GetLocalizedString('FEATUREINFONOFEATUREIN', $locale );
try
{
@@ -51,7 +75,7 @@
?>
<html>
<head>
- <title>Feature Information</title>
+ <title><?php echo $titleLocal ?></title>
<link rel="stylesheet" href="../../common/mgsamples.css" type="text/css">
<script language="javascript" src="../../common/browserdetect.js"></script>
<script language="javascript" src="../../common/json.js"></script>
@@ -159,7 +183,7 @@
reqHandler.open("POST", "featureinfocontroller.php", true);
reqHandler.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
- document.getElementById('totalFeatures').innerHTML = 'fetching feature info ...';
+ document.getElementById('totalFeatures').innerHTML = '<?php echo $fetchInfoLocal ?>';
document.getElementById('totalArea').innerHTML = ''
document.getElementById("layerSelect").disabled = true;
document.getElementById("pointButton").disabled = true;
@@ -196,16 +220,16 @@
var metadata = layerInfo.metadata[i];
totalArea += metadata[areaIdx];
}
- document.getElementById('totalFeatures').innerHTML = n + ' features selected';
- document.getElementById('totalArea').innerHTML = 'Area: ' + totalArea + ' m<sup>2</sup>';
+ document.getElementById('totalFeatures').innerHTML = n + '<?php echo $featureSelLocal ?>';
+ document.getElementById('totalArea').innerHTML = '<?php echo $areaLocal ?>' + totalArea + ' m<sup>2</sup>';
} else {
- document.getElementById('totalArea').innerHTML = 'areaIdx undefined';
+ document.getElementById('totalArea').innerHTML = '<?php echo $areaUndefinedLocal ?>';
}
} else {
- document.getElementById('totalArea').innerHTML = 'no layer info';
+ document.getElementById('totalArea').innerHTML = '<?php echo $noLayerInfoLocal ?>';
}
} else {
- document.getElementById('totalFeatures').innerHTML = 'no features in selected layer.';
+ document.getElementById('totalFeatures').innerHTML = '<?php echo $noFeatureInLocal ?>';
}
@@ -218,7 +242,7 @@
}
}
function SelectionOff() {
- document.getElementById('totalFeatures').innerHTML = 'no features selected.';
+ document.getElementById('totalFeatures').innerHTML = '<?php echo $noSelectedLocal ?>';
document.getElementById('totalArea').innerHTML = '';
}
@@ -250,9 +274,9 @@
<?php if ($errorMsg == null) { ?>
<table class="RegText" border="0" cellspacing="0" width="100%">
- <tr><td class="Title"><img id="busyImg" src="../../common/images/loader_inactive.gif" style="vertical-align:bottom"> Feature Information<hr></td></tr>
- <tr><td class="SubTitle">Select a Layer</td></tr>
- <tr><td>Layer:</td></tr>
+ <tr><td class="Title"><img id="busyImg" src="../../common/images/loader_inactive.gif" style="vertical-align:bottom"> <?php echo $titleLocal ?><hr></td></tr>
+ <tr><td class="SubTitle"><?php echo $subtitleLocal ?></td></tr>
+ <tr><td><?php echo $layerLocal ?></td></tr>
<tr>
<td class="RegText">
<select size="1" class="Ctrl" id="layerSelect" onChange="OnLayerChange()" style="width: 100%">
@@ -270,32 +294,32 @@
</tr>
<tr><td class="Spacer"></td></tr>
- <tr><td class="SubTitle">Select Features:</td></tr>
- <tr><td>Digitize:</td></tr>
+ <tr><td class="SubTitle"><?php echo $selectFeatureLocal ?></td></tr>
+ <tr><td><?php echo $digitizeLocal ?></td></tr>
<tr>
<td align="center">
- <input type="button" name="" value="Point" class="Ctrl" id="pointButton" onClick="OnDigitizePoint()" style="width: 30%">
- <input type="button" name="" value="Rectangle" class="Ctrl" id="rectButton" onClick="OnDigitizeRectangle()" style="width: 30%">
- <input type="button" name="" value="Polygon" class="Ctrl" id="polyButtton" onClick="OnDigitizePolygon()" style="width: 30%">
+ <input type="button" name="" value="<?php echo $pointLocal ?>" class="Ctrl" id="pointButton" onClick="OnDigitizePoint()" style="width: 30%">
+ <input type="button" name="" value="<?php echo $rectangleLocal ?>" class="Ctrl" id="rectButton" onClick="OnDigitizeRectangle()" style="width: 30%">
+ <input type="button" name="" value="<?php echo $polygonLocal ?>" class="Ctrl" id="polyButtton" onClick="OnDigitizePolygon()" style="width: 30%">
</td>
</tr>
<tr><td class="Spacer"></td></tr>
- <tr><td class="SubTitle">Total:</td></tr>
- <tr><td id="totalFeatures">no features selected.</td></tr>
+ <tr><td class="SubTitle"><?php echo $totalLocal ?></td></tr>
+ <tr><td id="totalFeatures"><?php echo $noSelectedLocal ?></td></tr>
<tr><td id="totalArea"></td></tr>
</table>
<?php } else if ($errorDetail == null || (strlen($errorDetail) - strlen($errorMsg) < 5)) { ?>
<table class="RegText" border="0" cellspacing="0" width="100%%">
- <tr><td class="Title">Error<hr></td></tr>
+ <tr><td class="Title"><?php echo $errorLocal ?><hr></td></tr>
<tr><td><?= $errorMsg ?></td></tr>
</table>
<?php } else { ?>
<table class="RegText" border="0" cellspacing="0" width="100%%">
- <tr><td class="Title">Error<hr></td></tr>
+ <tr><td class="Title"><?php echo $errorLocal ?><hr></td></tr>
<tr><td><?= $errorMsg ?></td></tr>
<tr><td><?= $errorDetail ?></td></tr>
</table>
Modified: trunk/widgets/Query/querymain.php
===================================================================
--- trunk/widgets/Query/querymain.php 2009-12-08 10:10:42 UTC (rev 2010)
+++ trunk/widgets/Query/querymain.php 2009-12-10 02:34:03 UTC (rev 2011)
@@ -23,15 +23,44 @@
{
DisplayInitializationErrorHTML();
exit;
- }
+ }
require_once $fusionMGpath . 'Utilities.php';
require_once $fusionMGpath . '/JSON.php';
require_once 'classes/query.php';
+
+ SetLocalizedFilesPath(GetLocalizationPath());
+ if(isset($_REQUEST['locale'])) {
+ $locale = $_REQUEST['locale'];
+ } else {
+ $locale = GetDefaultLocale();
+ }
$args = ($_SERVER['REQUEST_METHOD'] == "POST") ? $_POST : $_GET;
$errorMsg = null;
$errorDetail = null;
+
+ $titleLocal = GetLocalizedString('QUERYTITLE', $locale );
+ $selectLayerLocal = GetLocalizedString('QUERYSELECTLAYER', $locale );
+ $layerLocal = GetLocalizedString('QUERYLAYER', $locale );
+ $propertyFilterLocal = GetLocalizedString('QUERYPROPERTYFILTER', $locale );
+ $propertyLocal = GetLocalizedString('QUERYPROPERTY', $locale );
+ $operatorLocal = GetLocalizedString('QUERYOPERATOR', $locale );
+ $valueLocal = GetLocalizedString('QUERYVALUE', $locale );
+ $spatialFilterLocal = GetLocalizedString('QUERYSPATIALFILTER', $locale );
+ $digitizeLocal = GetLocalizedString('QUERYDIGITIZE', $locale );
+ $rectangleLocal = GetLocalizedString('QUERYRECTANGLE', $locale );
+ $polygonLocal = GetLocalizedString('QUERYPOLYGON', $locale );
+ $clearLocal = GetLocalizedString('QUERYCLEAR', $locale );
+ $outputLocal = GetLocalizedString('QUERYOUTPUT', $locale );
+ $outputPropertyLocal = GetLocalizedString('QUERYOUTPUTPROPERTY', $locale );
+ $executeLocal = GetLocalizedString('QUERYEXECUTE', $locale );
+ $maxResultLocal = GetLocalizedString('QUERYMAXRESULT', $locale );
+ $resultsLocal = GetLocalizedString('QUERYRESULTS', $locale );
+ $scaleLocal = GetLocalizedString('QUERYSCALE', $locale );
+ $zoomLocal = GetLocalizedString('QUERYZOOM', $locale );
+ $selectLocal = GetLocalizedString('QUERYSELECT', $locale );
+ $errorLocal = GetLocalizedString('QUERYERROR', $locale );
try
{
@@ -53,7 +82,7 @@
?>
<html>
<head>
- <title>Query Features</title>
+ <title><?php echo $titleLocal ?></title>
<link rel="stylesheet" href="../../common/mgsamples.css" type="text/css">
<script language="javascript" src="../../common/browserdetect.js"></script>
<script language="javascript" src="../../common/json.js"></script>
@@ -384,9 +413,9 @@
<?php if ($errorMsg == null) { ?>
<table class="RegText" border="0" cellspacing="0" width="100%">
- <tr><td class="Title"><img id="busyImg" src="../../common/images/loader_inactive.gif" style="vertical-align:bottom"> Query Features<hr></td></tr>
- <tr><td class="SubTitle">Select a Layer</td></tr>
- <tr><td>Layer:</td></tr>
+ <tr><td class="Title"><img id="busyImg" src="../../common/images/loader_inactive.gif" style="vertical-align:bottom"> <?php echo $titleLocal ?><hr></td></tr>
+ <tr><td class="SubTitle"><?php echo $selectLayerLocal ?></td></tr>
+ <tr><td><?php echo $layerLocal ?></td></tr>
<tr>
<td class="RegText">
<select size="1" class="Ctrl" id="layerSelect" onChange="OnLayerChange()" style="width: 100%">
@@ -403,40 +432,40 @@
</td>
</tr>
<tr><td class="Spacer"></td></tr>
- <tr><td class="SubTitle"><input class="Ctrl" type="checkbox" id="propertyFilter" checked> Property Filter</td></tr>
- <tr><td>Property:</td></tr>
+ <tr><td class="SubTitle"><input class="Ctrl" type="checkbox" id="propertyFilter" checked> <?php echo $propertyFilterLocal ?></td></tr>
+ <tr><td><?php echo $propertyLocal ?></td></tr>
<tr>
<td class="RegText">
<select size="1" class="Ctrl" id="propertySelect" onChange="OnPropertyChange()" style="width: 100%">
</select>
</td>
</tr>
- <tr><td>Operator:</td></tr>
+ <tr><td><?php echo $operatorLocal ?></td></tr>
<tr>
<td class="RegText">
<select size="1" class="Ctrl" id="operatorSelect" style="width: 100%">
</select>
</td>
</tr>
- <tr><td>Value:</td></tr>
+ <tr><td><?php echo $valueLocal ?></td></tr>
<tr>
<td class="RegText">
<input maxlength="100" class="Ctrl" id="valueInput" style="width: 100%">
</td>
</tr>
<tr><td class="Spacer"></td></tr>
- <tr><td class="SubTitle"><input class="Ctrl" type="checkbox" onclick="OnToggleSpatialFilter()" id="spatialFilter"> Spatial Filter</td></tr>
- <tr><td>Digitize:</td></tr>
+ <tr><td class="SubTitle"><input class="Ctrl" type="checkbox" onclick ="OnToggleSpatialFilter()" id="spatialFilter"> <?php echo $spatialFilterLocal ?></td></tr>
+ <tr><td><?php echo $digitizeLocal ?></td></tr>
<tr>
<td align="center">
- <input type="button" name="" value="Rectangle" class="Ctrl" id="rectButton" onClick="OnDigitizeRectangle()" style="width: 30%">
- <input type="button" name="" value="Polygon" class="Ctrl" id="polyButtton" onClick="OnDigitizePolygon()" style="width: 30%">
- <input type="button" name="" value="Clear" class="Ctrl" id="clearButton" onClick="OnClearSpatialFilter()" style="width: 30%">
+ <input type="button" name="" value="<?php echo $rectangleLocal ?>" class="Ctrl" id="rectButton" onClick="OnDigitizeRectangle()" style="width: 30%">
+ <input type="button" name="" value="<?php echo $polygonLocal ?>" class="Ctrl" id="polyButtton" onClick="OnDigitizePolygon()" style="width: 30%">
+ <input type="button" name="" value="<?php echo $clearLocal ?>" class="Ctrl" id="clearButton" onClick="OnClearSpatialFilter()" style="width: 30%">
</td>
</tr>
<tr><td class="Spacer"></td></tr>
- <tr><td class="SubTitle">Output</td></tr>
- <tr><td>Output property:</td></tr>
+ <tr><td class="SubTitle"><?php echo $outputLocal ?></td></tr>
+ <tr><td><?php echo $outputPropertyLocal ?></td></tr>
<tr>
<td class="RegText">
<select size="1" class="Ctrl" id="outputSelect" style="width: 100%">
@@ -447,13 +476,13 @@
<tr><td><hr></td></tr>
<tr>
<td>
- <input id="executeBtn" class="Ctrl" name="" type="button" onClick="ExecuteQuery()" value="Execute" style="width:60px">
- Max results:
+ <input id="executeBtn" class="Ctrl" name="" type="button" onClick="ExecuteQuery()" value="<?php echo $executeLocal ?>" style="width:60px">
+ <?php echo $maxResultLocal ?>
<input name="" id="queryMax" class="Ctrl" type="text" value="100" size="5">
</td>
</tr>
<tr><td class="Spacer"></td></tr>
- <tr><td class="SubTitle">Results</td></tr>
+ <tr><td class="SubTitle"><?php echo $resultsLocal ?></td></tr>
<tr>
<td>
<select class="Ctrl" id="resultSelect" size="15" onChange="OnResultChange()" style="width: 100%"></select>
@@ -461,9 +490,9 @@
</tr>
<tr>
<td>
- Scale: <input class="Ctrl" id="scaleInput" type="text" size="6" value="10000">
- <input class="Ctrl" id="zoomBtn" type="button" onClick="ZoomToFeature()" value="Zoom" style="width:60px">
- <input class="Ctrl" id="selectBtn" type="button" onClick="SelectFeature()" value="Select" style="width:60px">
+ <?php echo $scaleLocal ?> <input class="Ctrl" id="scaleInput" type="text" size="6" value="10000">
+ <input class="Ctrl" id="zoomBtn" type="button" onClick="ZoomToFeature()" value="<?php echo $zoomLocal ?>" style="width:60px">
+ <input class="Ctrl" id="selectBtn" type="button" onClick="SelectFeature()" value="<?php echo $selectLocal ?>" style="width:60px">
</td>
</tr>
@@ -472,14 +501,14 @@
<?php } else if ($errorDetail == null || (strlen($errorDetail) - strlen($errorMsg) < 5)) { ?>
<table class="RegText" border="0" cellspacing="0" width="100%%">
- <tr><td class="Title">Error<hr></td></tr>
+ <tr><td class="Title"><?php echo $errorLocal ?><hr></td></tr>
<tr><td><?= $errorMsg ?></td></tr>
</table>
<?php } else { ?>
<table class="RegText" border="0" cellspacing="0" width="100%%">
- <tr><td class="Title">Error<hr></td></tr>
+ <tr><td class="Title"><?php echo $errorLocal ?><hr></td></tr>
<tr><td><?= $errorMsg ?></td></tr>
<tr><td><?= $errorDetail ?></td></tr>
</table>
Modified: trunk/widgets/Redline/Redline.php
===================================================================
--- trunk/widgets/Redline/Redline.php 2009-12-08 10:10:42 UTC (rev 2010)
+++ trunk/widgets/Redline/Redline.php 2009-12-10 02:34:03 UTC (rev 2011)
@@ -29,6 +29,30 @@
* The max file size should be setted in the php5.ini.
*****************************************************************************/
+$fusionMGpath = '../../layers/MapGuide/php/';
+include $fusionMGpath . 'Common.php';
+
+SetLocalizedFilesPath(GetLocalizationPath());
+if(isset($_REQUEST['locale'])) {
+ $locale = $_REQUEST['locale'];
+} else {
+ $locale = GetDefaultLocale();
+}
+
+$optionLocal = GetLocalizedString('REDLINEOPTIONS', $locale );
+$selectLayerLocal = GetLocalizedString('REDLINESELECTLAYER', $locale );
+$newLocal = GetLocalizedString('REDLINENEW', $locale );
+$renameLocal = GetLocalizedString('REDLINERENAME', $locale );
+$removeLocal = GetLocalizedString('REDLINEREMOVE', $locale );
+$drawLocal = GetLocalizedString('REDLINEDRAW', $locale );
+$pointLocal = GetLocalizedString('REDLINEPOINT', $locale );
+$lineLocal = GetLocalizedString('REDLINELINE', $locale );
+$rectangleLocal = GetLocalizedString('REDLINERECTANGLE', $locale );
+$polygonLocal = GetLocalizedString('REDLINEPOLYGON', $locale );
+$saveLocal = GetLocalizedString('REDLINESAVE', $locale );
+$uploadLocal = GetLocalizedString('REDLINEUPLOAD', $locale );
+$featuresLocal = GetLocalizedString('REDLINEFEATURES', $locale );
+
$fileUpload = false;
$action = $_POST['action'];
@@ -81,11 +105,11 @@
}
</script>
- <h1>Digitizing Options</h1>
+ <h1><?php echo $optionLocal ?></h1>
<table id="RedlineWidgetOptions" borders="1">
<tr>
- <th>Select Layer: </th>
+ <th><?php echo $selectLayerLocal ?></th>
<td>
<select id="RedlineWidgetLayerList"></select>
</td>
@@ -93,28 +117,28 @@
<tr>
<td><!-- dummy col --></td>
<td>
- <button id="RedlineWidgetNewLayerButton">New</button>
- <button id="RedlineWidgetRenameLayerButton">Rename</button>
- <button id="RedlineWidgetRemoveLayerButton">Remove</button>
+ <button id="RedlineWidgetNewLayerButton"><?php echo $newLocal ?></button>
+ <button id="RedlineWidgetRenameLayerButton"><?php echo $renameLocal ?></button>
+ <button id="RedlineWidgetRemoveLayerButton"><?php echo $removeLocal ?></button>
</td>
</tr>
<tr>
- <th>Draw:</th>
+ <th><?php echo $drawLocal ?></th>
<td>
<input id="RedlineWidgetPointRadio" type="radio" name="RedlineWidgetDrawRadio"/>
- <label for="RedlineWidgetPointeRadio">Point</label><br/>
+ <label for="RedlineWidgetPointeRadio"><?php echo $pointLocal ?></label><br/>
<input id="RedlineWidgetLineRadio" type="radio" name="RedlineWidgetDrawRadio"/>
- <label for="RedlineWidgetLineRadio">Line</label><br/>
+ <label for="RedlineWidgetLineRadio"><?php echo $lineLocal ?></label><br/>
<input id="RedlineWidgetRectangleRadio" type="radio" name="RedlineWidgetDrawRadio"/>
- <label for="RedlineWidgetRectangleRadio">Rectangle</label><br/>
+ <label for="RedlineWidgetRectangleRadio"><?php echo $rectangleLocal ?></label><br/>
<input id="RedlineWidgetPolygonRadio" type="radio" name="RedlineWidgetDrawRadio"/>
- <label for="RedlineWidgetPolygonRadio">Polygon</label>
+ <label for="RedlineWidgetPolygonRadio"><?php echo $polygonLocal ?></label>
</td>
</tr>
<tr>
<td colspan="2">
<hr/>
- <button id="RedlineWidgetSaveButton">Save</button>
+ <button id="RedlineWidgetSaveButton"><?php echo $saveLocal ?></button>
</td>
</tr>
<tr>
@@ -123,14 +147,14 @@
<input type="file" name="uploadedfile"/>
<input type="hidden" name="action" value="upload"/>
<br/>
- <input id="RedlineWidgetUploadButton" type="submit" name="submit_element" value="Upload" />
+ <input id="RedlineWidgetUploadButton" type="submit" name="submit_element" value="<?php echo $uploadLocal ?>" />
</form>
</td>
</tr>
<tr><td><!-- dummy col --></td></tr>
<tr>
<th colspan="2">
- Features
+ <?php echo $featuresLocal ?>
<hr/>
</th>
</tr>
@@ -142,10 +166,10 @@
</tr>
<tr>
<td>
- <button id="RedlineWidgetRenameFeatureButton">Rename</button>
+ <button id="RedlineWidgetRenameFeatureButton"><?php echo $renameLocal ?></button>
</td>
<td>
- <button id="RedlineWidgetRemoveFeatureButton">Remove</button>
+ <button id="RedlineWidgetRemoveFeatureButton"><?php echo $removeLocal ?></button>
</td>
</tr>
</table>
Modified: trunk/widgets/Theme/thememain.php
===================================================================
--- trunk/widgets/Theme/thememain.php 2009-12-08 10:10:42 UTC (rev 2010)
+++ trunk/widgets/Theme/thememain.php 2009-12-10 02:34:03 UTC (rev 2011)
@@ -26,11 +26,38 @@
require_once $fusionMGpath . 'Utilities.php';
require_once $fusionMGpath . 'JSON.php';
require_once 'classes/theme.php';
+
+ SetLocalizedFilesPath(GetLocalizationPath());
+ if(isset($_REQUEST['locale'])) {
+ $locale = $_REQUEST['locale'];
+ } else {
+ $locale = GetDefaultLocale();
+ }
$args = ($_SERVER['REQUEST_METHOD'] == "POST") ? $_POST : $_GET;
$errorMsg = null;
$errorDetail = null;
+
+ $titleLocal = GetLocalizedString('THEMETITLE', $locale );
+ $selectLayerLocal = GetLocalizedString('THEMESELECTLAYER', $locale );
+ $layerLocal = GetLocalizedString('THEMELAYER', $locale );
+ $nameLocal = GetLocalizedString('THEMENAME', $locale );
+ $conditionLocal = GetLocalizedString('THEMECONDITIONS', $locale );
+ $propertyLocal = GetLocalizedString('THEMEPROPERTY', $locale );
+ $minLocal = GetLocalizedString('THEMEMIN', $locale );
+ $maxLocal = GetLocalizedString('THEMEMAX', $locale );
+ $distributionLocal = GetLocalizedString('THEMEDISTRIBUTION', $locale );
+ $ruleLocal = GetLocalizedString('THEMERULE', $locale );
+ $scaleRangeLocal = GetLocalizedString('THEMESCALERANGE', $locale );
+ $styleRampLocal = GetLocalizedString('THEMESTYLERAMP', $locale );
+ $fillTransparencyLocal = GetLocalizedString('THEMEFILLTRANS', $locale );
+ $fillColorLocal = GetLocalizedString('THEMEFILLCOLOR', $locale );
+ $fromLocal = GetLocalizedString('THEMEFROM', $locale );
+ $toLocal = GetLocalizedString('THEMETO', $locale );
+ $borderColorLocal = GetLocalizedString('THEMEBORDERCOLOR', $locale );
+ $applyLocal = GetLocalizedString('THEMEAPPLY', $locale );
+ $errorLocal = GetLocalizedString('THEMEERROR', $locale );
try
{
@@ -52,7 +79,7 @@
?>
<html>
<head>
- <title>Theme Layer</title>
+ <title><?php echo $titleLocal ?></title>
<link rel="stylesheet" href="../../common/mgsamples.css" type="text/css">
<script language="javascript" src="../../common/browserdetect.js"></script>
<script language="javascript" src="../../common/json.js"></script>
@@ -341,9 +368,9 @@
<?php if ($errorMsg == null) { ?>
<table class="RegText" border="0" cellspacing="0" width="100%">
- <tr><td colspan="2" class="Title"><img id="busyImg" src="../../common/images/loader_pulse.gif" style="vertical-align:bottom"> Theme Layer<hr></td></tr>
- <tr><td colspan="2" class="SubTitle">Select a Layer</td></tr>
- <tr><td colspan="2">Layer:</td></tr>
+ <tr><td colspan="2" class="Title"><img id="busyImg" src="../../common/images/loader_pulse.gif" style="vertical-align:bottom"> <?php echo $titleLocal ?><hr></td></tr>
+ <tr><td colspan="2" class="SubTitle"><?php echo $selectLayerLocal ?></td></tr>
+ <tr><td colspan="2"><?php echo $layerLocal ?></td></tr>
<tr>
<td colspan="2" class="RegText">
<select size="1" class="Ctrl" id="layerSelect" onChange="OnLayerChange()" style="width: 100%">
@@ -359,48 +386,48 @@
</select>
</td>
</tr>
- <tr><td colspan="2">Theme Name:</td></tr>
+ <tr><td colspan="2"><?php echo $nameLocal ?></td></tr>
<tr>
<td colspan="2" class="RegText">
<input maxlength="100" class="Ctrl" id="themeName" style="width: 100%">
</td>
</tr>
<tr><td colspan="2" class="Spacer"></td></tr>
- <tr><td colspan="2" class="SubTitle">Define Conditions</td></tr>
- <tr><td colspan="2">Property:</td></tr>
+ <tr><td colspan="2" class="SubTitle"><?php echo $conditionLocal ?></td></tr>
+ <tr><td colspan="2"><?php echo $propertyLocal ?></td></tr>
<tr>
<td colspan="2" class="RegText">
<select size="1" class="Ctrl" id="propertySelect" onChange="OnPropertyChange()" style="width: 100%">
</select>
</td>
</tr>
- <tr><td colspan="2">Min:</td></tr>
+ <tr><td colspan="2"><?php echo $minLocal ?></td></tr>
<tr>
<td colspan="2" class="RegText">
<input maxlength="100" class="Ctrl" id="minValue" style="width: 100%">
</td>
</tr>
- <tr><td colspan="2">Max:</td></tr>
+ <tr><td colspan="2"><?php echo $maxLocal ?></td></tr>
<tr>
<td colspan="2" class="RegText">
<input maxlength="100" class="Ctrl" id="maxValue" style="width: 100%">
</td>
</tr>
- <tr><td colspan="2">Distribution:</td></tr>
+ <tr><td colspan="2"><?php echo $distributionLocal ?></td></tr>
<tr>
<td colspan="2" class="RegText">
<select size="1" class="Ctrl" id="distroSelect" onChange="OnDistroChange()" style="width: 100%">
</select>
</td>
</tr>
- <tr><td colspan="2"># of Rules:</td></tr>
+ <tr><td colspan="2"><?php echo $ruleLocal ?></td></tr>
<tr>
<td colspan="2" class="RegText">
<input maxlength="10" class="Ctrl" id="numRules" value="8" style="width: 100%">
</td>
</tr>
<tr><td colspan="2" class="Spacer"></td></tr>
- <tr><td colspan="2" class="SubTitle">Scale Range</td></tr>
+ <tr><td colspan="2" class="SubTitle"><?php echo $scaleRangeLocal ?></td></tr>
<tr>
<td colspan="2" class="RegText">
<select size="1" class="Ctrl" id="scaleSelect" style="width: 100%">
@@ -408,57 +435,57 @@
</td>
</tr>
<tr><td colspan="2" class="Spacer"></td></tr>
- <tr><td colspan="2" class="SubTitle">Style Ramp</td></tr>
- <tr><td>Fill Transparency:</td></tr>
+ <tr><td colspan="2" class="SubTitle"><?php echo $styleRampLocal ?></td></tr>
+ <tr><td><?php echo $fillTransparencyLocal ?></td></tr>
<tr>
<td colspan="2" class="RegText">
<input class="Ctrl" id="fillTrans" type="text" maxlength="3" value="0" style="width:90%"> %
</td>
</tr>
<tr><td colspan="2" class="Spacer"></td></tr>
- <tr><td>Fill Color:</td></tr>
+ <tr><td><?php echo $fillColorLocal ?></td></tr>
<tr>
<td valign="top">
- From:<br>
+ <?php echo $fromLocal ?><br>
<span class="Swatch" id="fillFromSwatch" style="color: #FF0000; background-color: #FF0000"> transparent </span>
<input class="Ctrl" type="button" value="..." style="width: 22px;" onClick="PickColor(SET_FILL_FROM_COLOR,false,false)">
</td>
<td valign="top">
- To:<br>
+ <?php echo $toLocal ?><br>
<span class="Swatch" id="fillToSwatch" style="color: #0000FF; background-color: #0000FF"> transparent </span>
<input class="Ctrl" type="button" value="..." style="width: 22px;" onClick="PickColor(SET_FILL_TO_COLOR,false,false)">
</td>
</tr>
<tr><td colspan="2" class="Spacer"></td></tr>
- <tr><td>Border Color:</td></tr>
+ <tr><td><?php echo $borderColorLocal ?></td></tr>
<tr>
<td valign="top">
- From:<br>
+ <?php echo $fromLocal ?><br>
<span class="Swatch" id="lineFromSwatch" style="color: #000000; background-color: #000000"> transparent </span>
<input class="Ctrl" type="button" value="..." style="width: 22px;" onClick="PickColor(SET_LINE_FROM_COLOR,false,false)">
</td>
<td valign="top">
- To:<br>
+ <?php echo $toLocal ?><br>
<span class="Swatch" id="lineToSwatch" style="color: #000000; background-color: #000000"> transparent </span>
<input class="Ctrl" type="button" value="..." style="width: 22px;" onClick="PickColor(SET_LINE_TO_COLOR,false,false)">
</td>
</tr>
<tr><td colspan="2" class="Spacer"></td></tr>
<tr><td colspan="2" ><hr></td></tr>
- <tr><td colspan="2" align="right"><input class="Ctrl" type="button" value="Apply" style="width: 60px;" onClick="ApplyTheme()"></td></tr>
+ <tr><td colspan="2" align="right"><input class="Ctrl" type="button" value="<?php echo $applyLocal ?>" style="width: 60px;" onClick="ApplyTheme()"></td></tr>
</table>
<?php } else if ($errorDetail == null || (strlen($errorDetail) - strlen($errorMsg) < 5)) { ?>
<table class="RegText" border="0" cellspacing="0" width="100%%">
- <tr><td class="Title">Error<hr></td></tr>
+ <tr><td class="Title"><?php echo $errorLocal ?><hr></td></tr>
<tr><td><?= $errorMsg ?></td></tr>
</table>
<?php } else { ?>
<table class="RegText" border="0" cellspacing="0" width="100%%">
- <tr><td class="Title">Error<hr></td></tr>
+ <tr><td class="Title"><?php echo $errorLocal ?><hr></td></tr>
<tr><td><?= $errorMsg ?></td></tr>
<tr><td><?= $errorDetail ?></td></tr>
</table>
More information about the fusion-commits
mailing list