Added use of locale in Vertices Degree algorithm

This commit is contained in:
serd2011
2021-09-19 18:43:19 +03:00
parent c145c53ec8
commit 164a2818f0
12 changed files with 37 additions and 1 deletions

View File

@@ -27,7 +27,7 @@ VerticesDegree.prototype.getId = function()
// @return message for user.
VerticesDegree.prototype.getMessage = function(local)
{
return (local == "ru" ? "Максимальная степень вершин графа равна " : "The maximum degree of a graph is ") + this.maxDegree;
return g_maximumDegreeOfGraph + " " + this.maxDegree;
}
VerticesDegree.prototype.result = function(resultCallback)

View File

@@ -156,6 +156,9 @@ var g_graphDiameter = "Graph diameter";
var g_vertexCentral = "Central";
var g_vertexPeripheral = "Peripheral";
// VerticesDegree.js
var g_maximumDegreeOfGraph = "The maximum degree of a graph is";
var g_action = "Action";
var g_commonEdgeStyle = "Common Edge Style";
var g_selectedEdgeStyle = "Selected Edge Style";
@@ -326,6 +329,9 @@ function loadTexts()
g_vertexCentral = document.getElementById("VertexCentral").innerHTML;
g_vertexPeripheral = document.getElementById("VertexPeripheral").innerHTML;
// VerticesDegree.js
g_maximumDegreeOfGraph = document.getElementById("MaximumDegreeOfGraph").innerHTML;
g_action = document.getElementById("ActionText").innerHTML;
g_commonEdgeStyle = document.getElementById("CommonEdgeStyleText").innerHTML;
g_selectedEdgeStyle = document.getElementById("SelectedEdgeStyleText").innerHTML;