Skip to content

Commit

Permalink
#3001 Fixed french translation:
Browse files Browse the repository at this point in the history
- used spring:message instead of fmt:message;
- set defaultHtmlEscape in web.xml;
- created classes: SnippetServletResponse, SnippetContentGenerator, replacing class ContentGenerator from seroUtils;
  • Loading branch information
Limraj committed Sep 3, 2024
1 parent d6481b7 commit ca0acaf
Show file tree
Hide file tree
Showing 148 changed files with 3,056 additions and 2,714 deletions.
104 changes: 52 additions & 52 deletions WebContent/WEB-INF/jsp/_reports.jsp

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions WebContent/WEB-INF/jsp/_watchList.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
function addPoint(point, parent) {
var pointNode = dojo.widget.createWidget("TreeNode", {
title: "<img src='images/icon_comp.png'/> <span id='ph"+ point.key +"Name'>"+ point.value +"</span> "+
"<img src='images/bullet_go.png' id='ph"+ point.key +"Image' title='<fmt:message key="watchlist.addToWatchlist"/>'/>",
"<img src='images/bullet_go.png' id='ph"+ point.key +"Image' title='<spring:message code="watchlist.addToWatchlist"/>'/>",
object: point
});
parent.addChild(pointNode);
Expand Down Expand Up @@ -432,7 +432,7 @@
<div dojoType="SplitContainer" orientation="horizontal" sizerWidth="3" activeSizing="true" class="borderDiv"
widgetId="splitContainer" style="width: 100%; height: 500px;">
<div dojoType="ContentPane" sizeMin="20" sizeShare="20" style="overflow:auto;padding:2px;">
<span class="smallTitle"><fmt:message key="watchlist.points"/></span> <tag:help id="watchListPoints"/>
<span class="smallTitle"><spring:message code="watchlist.points"/></span> <tag:help id="watchListPoints"/>
<tag:img id="addAllImg" png="icon_ds_go"
onclick="addAllPoints()" title="common.addAll" style="float:right;"/>
<br/>
Expand All @@ -442,7 +442,7 @@
<div dojoType="ContentPane" sizeMin="50" sizeShare="50" style="overflow:auto; padding:2px 10px 2px 2px;">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="smallTitle"><fmt:message key="watchlist.watchlist"/> <tag:help id="watchList"/></td>
<td class="smallTitle"><spring:message code="watchlist.watchlist"/> <tag:help id="watchList"/></td>
<td align="right">
<sst:select id="watchListSelect" value="${selectedWatchList}" onchange="watchListChanged()"
onmouseover="closeLayers();">
Expand All @@ -455,10 +455,10 @@
<tag:img id="wlEditImg" png="pencil" title="watchlist.editListName"/>
<div id="wlEdit" style="visibility:hidden;left:0px;top:15px;" class="labelDiv"
onmouseout="hideLayer(this)">
<fmt:message key="watchlist.newListName"/><br/>
<spring:message code="watchlist.newListName"/><br/>
<input type="text" id="newWatchListName"
onkeypress="if (event.keyCode==13) $('saveWatchListNameLink').onclick();"/>
<a class="ptr" id="saveWatchListNameLink" onclick="saveWatchListName()"><fmt:message key="common.save"/></a>
<a class="ptr" id="saveWatchListNameLink" onclick="saveWatchListName()"><spring:message code="common.save"/></a>
</div>
</div>

Expand Down Expand Up @@ -519,7 +519,7 @@
</table>
<table id="watchListTable" width="100%"></table>
<div id="emptyListMessage" style="color:#888888;padding:10px;text-align:center;">
<fmt:message key="watchlist.emptyList"/>
<spring:message code="watchlist.emptyList"/>
</div>
</div>
</div>
Expand All @@ -530,7 +530,7 @@
<div class="borderDiv" style="width: 100%;">
<table width="100%">
<tr>
<td class="smallTitle"><fmt:message key="watchlist.chart"/> <tag:help id="watchListCharts"/></td>
<td class="smallTitle"><spring:message code="watchlist.chart"/> <tag:help id="watchListCharts"/></td>
<td align="right"><tag:dateRange/></td>
<td><tag:img id="imageChartImg" png="control_play_blue" title="watchlist.imageChartButton"
onclick="getImageChart()"/></td>
Expand Down
1 change: 0 additions & 1 deletion WebContent/WEB-INF/jsp/app.jsp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<!DOCTYPE html>
<!DOCTYPE html>
<html lang=en>
<head>
<meta charset=utf-8>
Expand Down
34 changes: 17 additions & 17 deletions WebContent/WEB-INF/jsp/compoundEvents.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@
editingCompoundEvent.id = response.data.cedId;
appendCompoundEvent(editingCompoundEvent.id);
startImageFader($("ced"+ editingCompoundEvent.id +"Img"));
setUserMessage("<fmt:message key="compoundDetectors.cedAdded"/>");
setUserMessage("<spring:message code="compoundDetectors.cedAdded"/>");
show($("deleteCompoundEventImg"));
}
else
setUserMessage("<fmt:message key="compoundDetectors.cedSaved"/>");
setUserMessage("<spring:message code="compoundDetectors.cedSaved"/>");
if (response.data.warning)
setUserMessage(response.data.warning);
Expand Down Expand Up @@ -184,7 +184,7 @@
setSelectionRange($("condition"), response.data.from, response.data.to);
}
else
setUserMessage("<fmt:message key="compoundDetectors.cedValidated"/>");
setUserMessage("<spring:message code="compoundDetectors.cedValidated"/>");
});
}
Expand All @@ -200,7 +200,7 @@
<table width="100%">
<tr>
<td>
<span class="smallTitle"><fmt:message key="compoundDetectors.compoundEventDetectors"/></span>
<span class="smallTitle"><spring:message code="compoundDetectors.compoundEventDetectors"/></span>
<tag:help id="compoundEventDetectors"/>
</td>
<td align="right"><tag:img png="multi_bell_add" title="common.add" id="ced${NEW_ID}Img"
Expand All @@ -222,7 +222,7 @@
<div class="borderDiv">
<table width="100%">
<tr>
<td><span class="smallTitle"><fmt:message key="compoundDetectors.details"/></span></td>
<td><span class="smallTitle"><spring:message code="compoundDetectors.details"/></span></td>
<td align="right">
<tag:img png="save" onclick="saveCompoundEvent();" title="common.save"/>
<tag:img id="deleteCompoundEventImg" png="delete" onclick="deleteCompoundEvent();" title="common.delete"/>
Expand All @@ -232,17 +232,17 @@

<table>
<tr>
<td class="formLabelRequired"><fmt:message key="common.xid"/></td>
<td class="formLabelRequired"><spring:message code="common.xid"/></td>
<td class="formField"><input type="text" id="xid"/></td>
</tr>

<tr>
<td class="formLabelRequired"><fmt:message key="compoundDetectors.name"/></td>
<td class="formLabelRequired"><spring:message code="compoundDetectors.name"/></td>
<td class="formField"><input type="text" id="name"/></td>
</tr>

<tr>
<td class="formLabelRequired"><fmt:message key="common.alarmLevel"/></td>
<td class="formLabelRequired"><spring:message code="common.alarmLevel"/></td>
<td class="formField">
<select id="alarmLevel" onchange="updateAlarmLevelImage(this.value)">
<tag:alarmLevelOptions/>
Expand All @@ -252,24 +252,24 @@
</tr>

<tr>
<td class="formLabelRequired"><fmt:message key="common.rtn"/></td>
<td class="formLabelRequired"><spring:message code="common.rtn"/></td>
<td class="formField"><input type="checkbox" id="rtn"/></td>
</tr>

<tr>
<td class="formLabelRequired">
<fmt:message key="compoundDetectors.condition"/>
<spring:message code="compoundDetectors.condition"/>
<tag:img png="accept" onclick="validate();" title="compoundDetectors.validate"/><br/>
<br/>
<a href="#" onclick="insertText(' && '); return false;"><fmt:message key="compoundDetectors.and"/></a><br/>
<a href="#" onclick="insertText(' || '); return false;"><fmt:message key="compoundDetectors.or"/></a><br/>
<a href="#" onclick="insertText('!'); return false;"><fmt:message key="compoundDetectors.not"/></a><br/>
<a href="#" onclick="insertText(' && '); return false;"><spring:message code="compoundDetectors.and"/></a><br/>
<a href="#" onclick="insertText(' || '); return false;"><spring:message code="compoundDetectors.or"/></a><br/>
<a href="#" onclick="insertText('!'); return false;"><spring:message code="compoundDetectors.not"/></a><br/>
</td>
<td class="formField"><textarea rows="10" cols="60" id="condition"></textarea></td>
</tr>

<tr>
<td class="formLabelRequired"><fmt:message key="common.disabled"/></td>
<td class="formLabelRequired"><spring:message code="common.disabled"/></td>
<td class="formField"><input type="checkbox" id="disabled"/></td>
</tr>
</table>
Expand All @@ -286,12 +286,12 @@
<tr>
<td valign="top" style="display:none;" id="eventTypes">
<div class="borderDivPadded">
<span class="smallTitle"><fmt:message key="compoundDetectors.eventTypes"/></span>
<span class="smallTitle"><spring:message code="compoundDetectors.eventTypes"/></span>
<div dojoType="TreeBasicController" widgetId="controller"></div>
<div id="tree">
<div dojoType="Tree" widgetId="eventTypeTree" listeners="controller" toggle="wipe">
<div dojoType="TreeNode" title="<fmt:message key="compoundDetectors.pointEventDetector"/>" widgetId="rootPoint"></div>
<div dojoType="TreeNode" title="<fmt:message key="scheduledEvents.ses"/>" widgetId="rootScheduled"></div>
<div dojoType="TreeNode" title="<spring:message code="compoundDetectors.pointEventDetector"/>" widgetId="rootPoint"></div>
<div dojoType="TreeNode" title="<spring:message code="scheduledEvents.ses"/>" widgetId="rootScheduled"></div>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit ca0acaf

Please sign in to comment.