Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions WebContent/WEB-INF/jsp/dataSourceList.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,12 @@
setDataPointStatusImg(enabled, imgNode);
}

function deleteDataSource(dataSourceId) {
if (confirm("<spring:message code="dsList.dsDeleteConfirm"/>")) {
function deleteDataSource(el, dataSourceId) {
var name = el.getAttribute("data-name") || "";
var xid = el.getAttribute("data-xid") || "";
var template = "<spring:message code='dsList.dsDeleteConfirmNamed'/>";
var msg = template.replace("{0}", name).replace("{1}", xid);
if (confirm(msg)) {
startImageFader("deleteDataSourceImg"+ dataSourceId);
DataSourceListDwr.deleteDataSource(dataSourceId, function(dataSourceId) {
stopImageFader("deleteDataSourceImg"+ dataSourceId);
Expand Down Expand Up @@ -152,8 +156,12 @@
<a href="data_source_edit.shtm?dsid=${listParent.parent.id}"><tag:img png="icon_ds_edit"
title="common.edit"/></a>
<tag:img png="arrow_out" title="dsList.show" onclick="togglePanelVisibility2(this, 'points${listParent.parent.id}', '${hideText}', '${showText}');"/>
<tag:img png="icon_ds_delete" title="common.delete" id="deleteDataSourceImg${listParent.parent.id}"
onclick="deleteDataSource(${listParent.parent.id})"/>
<tag:img png="icon_ds_delete"
title="common.delete"
id="deleteDataSourceImg${listParent.parent.id}"
dataName="${listParent.parent.name}"
dataXid="${listParent.parent.xid}"
onclick="deleteDataSource(this, ${listParent.parent.id})"/>
<tag:img png="icon_ds_add" title="common.copy" id="copyDataSourceImg${listParent.parent.id}"
onclick="copyDataSource(${listParent.parent.id})"/>
</td>
Expand Down
4 changes: 4 additions & 0 deletions WebContent/WEB-INF/tags/img.tag
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
--%><%@attribute name="onmouseover"%><%--
--%><%@attribute name="onmouseout"%><%--
--%><%@attribute name="style"%><%--
--%><%@attribute name="dataName" rtexprvalue="true"%><%--
--%><%@attribute name="dataXid" rtexprvalue="true"%><%--
--%><img class="ptr" <c:if test="${!empty id}"> id="${id}"</c:if><%--
--%><c:if test="${!empty src}"> src="${src}"</c:if><%--
--%><c:if test="${!empty png && empty src}"> src="images/${png}.png"</c:if><%--
Expand All @@ -33,4 +35,6 @@
--%><c:if test="${!empty onmouseover}"> onmouseover="${onmouseover}"</c:if><%--
--%><c:if test="${!empty onmouseout}"> onmouseout="${onmouseout}"</c:if><%--
--%><c:if test="${!empty style}"> style="${style}"</c:if><%--
--%><c:if test="${!empty dataName}"> data-name="<c:out value='${dataName}'/>"</c:if><%--
--%><c:if test="${!empty dataXid}"> data-xid="<c:out value='${dataXid}'/>"</c:if><%--
--%> border="0"/>
3 changes: 2 additions & 1 deletion webapp-resources/messages_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3454,4 +3454,5 @@ systemSettings.amChart.limitFactor=Limit factor
systemSettings.amChartsSaved=AmCharts settings have been saved
systemSettings.scadaConfTitle=Scada-LTS environment settings
systemSettings.scadaConfCheck=Check configuration
validate.unsupportedDataType=Data type {0} is not supported
validate.unsupportedDataType=Data type {0} is not supported
dsList.dsDeleteConfirmNamed=Sind Sie sicher, dass Sie die Datenquelle {0} (XID: {1}) löschen möchten?
3 changes: 2 additions & 1 deletion webapp-resources/messages_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3457,4 +3457,5 @@ systemSettings.amChart.limitFactor=Limit factor
systemSettings.amChartsSaved=AmCharts settings have been saved
systemSettings.scadaConfTitle=Scada-LTS environment settings
systemSettings.scadaConfCheck=Check configuration
validate.unsupportedDataType=Data type {0} is not supported
validate.unsupportedDataType=Data type {0} is not supported
dsList.dsDeleteConfirmNamed=Are you sure you wish to delete data source {0} (XID: {1})?
3 changes: 2 additions & 1 deletion webapp-resources/messages_es.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3497,4 +3497,5 @@ systemSettings.amChart.limitFactor=Limit factor
systemSettings.amChartsSaved=AmCharts settings have been saved
systemSettings.scadaConfTitle=Scada-LTS environment settings
systemSettings.scadaConfCheck=Check configuration
validate.unsupportedDataType=Data type {0} is not supported
validate.unsupportedDataType=Data type {0} is not supported
dsList.dsDeleteConfirmNamed=¿Está seguro de que desea eliminar la fuente de datos {0} (XID: {1})?
3 changes: 2 additions & 1 deletion webapp-resources/messages_fi.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3582,4 +3582,5 @@ systemSettings.amChart.limitFactor=Limit factor
systemSettings.amChartsSaved=AmCharts settings have been saved
systemSettings.scadaConfTitle=Scada-LTS environment settings
systemSettings.scadaConfCheck=Check configuration
validate.unsupportedDataType=Data type {0} is not supported
validate.unsupportedDataType=Data type {0} is not supported
dsList.dsDeleteConfirmNamed=Haluatko varmasti poistaa tietolähteen {0} (XID: {1})?
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Character encoding issue in Finnish translation.

The text tietol�hteen appears to have a corrupted character. This should likely be tietolähteen (with the proper Finnish 'ä' character encoded as \u00e4):

dsList.dsDeleteConfirmNamed=Haluatko varmasti poistaa tietol\u00e4hteen {0} (XID: {1})?

Based on learnings, Finnish is not actively maintained (only Polish and English are), so this is non-blocking.

🤖 Prompt for AI Agents
In @webapp-resources/messages_fi.properties at line 3586, The resource value for
key dsList.dsDeleteConfirmNamed contains a corrupted character ("tietol�hteen");
update the properties entry for dsList.dsDeleteConfirmNamed to use the correct
Finnish character encoding by replacing the corrupted sequence with the proper
escaped Unicode or character (e.g., "tietol\u00e4hteen" or "tietolähteen") so
the string becomes Haluatko varmasti poistaa tietol\u00e4hteen {0} (XID: {1})?.

3 changes: 2 additions & 1 deletion webapp-resources/messages_fr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3451,4 +3451,5 @@ systemSettings.amChart.limitFactor=Limit factor
systemSettings.amChartsSaved=AmCharts settings have been saved
systemSettings.scadaConfTitle=Scada-LTS environment settings
systemSettings.scadaConfCheck=Check configuration
validate.unsupportedDataType=Data type {0} is not supported
validate.unsupportedDataType=Data type {0} is not supported
dsList.dsDeleteConfirmNamed=Êtes-vous sûr de vouloir supprimer la source de données {0} (XID : {1}) ?
3 changes: 2 additions & 1 deletion webapp-resources/messages_lu.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3470,4 +3470,5 @@ systemSettings.amChart.limitFactor=Limit factor
systemSettings.amChartsSaved=AmCharts settings have been saved
systemSettings.scadaConfTitle=Scada-LTS environment settings
systemSettings.scadaConfCheck=Check configuration
validate.unsupportedDataType=Data type {0} is not supported
validate.unsupportedDataType=Data type {0} is not supported
dsList.dsDeleteConfirmNamed=Sidd Dir sécher datt Dir déi Datequell {0} (XID: {1}) läschen wëllt?
3 changes: 2 additions & 1 deletion webapp-resources/messages_nl.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3572,4 +3572,5 @@ systemSettings.amChart.limitFactor=Limit factor
systemSettings.amChartsSaved=AmCharts settings have been saved
systemSettings.scadaConfTitle=Scada-LTS environment settings
systemSettings.scadaConfCheck=Check configuration
validate.unsupportedDataType=Data type {0} is not supported
validate.unsupportedDataType=Data type {0} is not supported
dsList.dsDeleteConfirmNamed=Weet u zeker dat u de gegevensbron {0} (XID: {1}) wilt verwijderen?
3 changes: 2 additions & 1 deletion webapp-resources/messages_pl.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3594,4 +3594,5 @@ systemSettings.amChart.limitFactor=Limit factor
systemSettings.amChartsSaved=AmCharts settings have been saved
systemSettings.scadaConfTitle=Scada-LTS environment settings
systemSettings.scadaConfCheck=Check configuration
validate.unsupportedDataType=Data type {0} is not supported
validate.unsupportedDataType=Data type {0} is not supported
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

English text in Polish translation file.

This message is in English but placed in the Polish translation file. It should be translated to Polish for consistency.

Suggested Polish translation
-validate.unsupportedDataType=Data type {0} is not supported
+validate.unsupportedDataType=Typ danych {0} nie jest obs\u0142ugiwany
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
validate.unsupportedDataType=Data type {0} is not supported
validate.unsupportedDataType=Typ danych {0} nie jest obs\u0142ugiwany
🤖 Prompt for AI Agents
In @webapp-resources/messages_pl.properties at line 3597, The property
validate.unsupportedDataType currently contains English text; replace "Data type
{0} is not supported" with an accurate Polish translation (keeping the
placeholder {0} intact) so the validate.unsupportedDataType entry in
messages_pl.properties is in Polish.

dsList.dsDeleteConfirmNamed=Czy na pewno chcesz usun?? ?ród?o danych {0} (XID: {1})?
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Character encoding corruption in Polish text.

The Polish characters are corrupted: usun?? should be usunąć and ?r�d?o should be źródło. Use proper Unicode escapes as seen elsewhere in this file (e.g., line 359 uses \u0179r\u00f3d\u0142o for "źródło").

Suggested fix with proper Unicode escapes
-dsList.dsDeleteConfirmNamed=Czy na pewno chcesz usun?? ?r�d?o danych {0} (XID: {1})?
+dsList.dsDeleteConfirmNamed=Czy na pewno chcesz usun\u0105\u0107 \u017ar\u00f3d\u0142o danych {0} (XID: {1})?
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
dsList.dsDeleteConfirmNamed=Czy na pewno chcesz usun?? ?r�d?o danych {0} (XID: {1})?
dsList.dsDeleteConfirmNamed=Czy na pewno chcesz usun\u0105\u0107 \u017ar\u00f3d\u0142o danych {0} (XID: {1})?
🤖 Prompt for AI Agents
In @webapp-resources/messages_pl.properties at line 3598, The property value for
dsList.dsDeleteConfirmNamed contains corrupted Polish characters; replace the
garbled text with proper Unicode escapes so the value reads "Czy na pewno chcesz
usunąć źródło danych {0} (XID: {1})?" — specifically use \u0105 for 'ą', \u0107
for 'ć', \u017A for 'ź', \u00F3 for 'ó' and \u0142 for 'ł' when updating the
dsList.dsDeleteConfirmNamed entry.

1 change: 1 addition & 0 deletions webapp-resources/messages_pt.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3610,3 +3610,4 @@ systemSettings.amChartsSaved=AmCharts settings have been saved
systemSettings.scadaConfTitle=Scada-LTS environment settings
systemSettings.scadaConfCheck=Check configuration
validate.unsupportedDataType=Data type {0} is not supported
dsList.dsDeleteConfirmNamed=Tem certeza de que deseja excluir a fonte de dados {0} (XID: {1})?
3 changes: 2 additions & 1 deletion webapp-resources/messages_ru.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3605,4 +3605,5 @@ systemSettings.amChart.limitFactor=Limit factor
systemSettings.amChartsSaved=AmCharts settings have been saved
systemSettings.scadaConfTitle=Scada-LTS environment settings
systemSettings.scadaConfCheck=Check configuration
validate.unsupportedDataType=Data type {0} is not supported
validate.unsupportedDataType=Data type {0} is not supported
dsList.dsDeleteConfirmNamed=Are you sure you wish to delete data source {0} (XID: {1})?
3 changes: 2 additions & 1 deletion webapp-resources/messages_zh.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3557,4 +3557,5 @@ systemSettings.amChart.limitFactor=Limit factor
systemSettings.amChartsSaved=AmCharts settings have been saved
systemSettings.scadaConfTitle=Scada-LTS environment settings
systemSettings.scadaConfCheck=Check configuration
validate.unsupportedDataType=Data type {0} is not supported
validate.unsupportedDataType=Data type {0} is not supported
dsList.dsDeleteConfirmNamed=Are you sure you wish to delete data source {0} (XID: {1})?
Loading