Added translation for algorithm names.

This commit is contained in:
Unick Soft
2020-06-21 10:59:46 +02:00
parent 41229208f5
commit abb41c3852
24 changed files with 170 additions and 17 deletions

View File

@@ -15,7 +15,7 @@ BFSAlgorithm.prototype.timerInterval = 500;
BFSAlgorithm.prototype.getName = function(local)
{
return local == "ru" ? "Поиск в ширину" : "Breadth-first search";
return g_BFSName;// local == "ru" ? "Поиск в ширину" : "Breadth-first search";
}
BFSAlgorithm.prototype.getId = function()

View File

@@ -19,7 +19,7 @@ Coloring.prototype = Object.create(BaseAlgorithm.prototype);
Coloring.prototype.getName = function(local)
{
return local == "ru" ? "Раскраска графа" : "Graph coloring";
return g_ColoringName; //local == "ru" ? "Раскраска графа" : "Graph coloring";
}
Coloring.prototype.getId = function()

View File

@@ -18,7 +18,7 @@ FindConnectedComponentNew.prototype = Object.create(BaseAlgorithm.prototype);
FindConnectedComponentNew.prototype.getName = function(local)
{
return local == "ru" ? "Найти компоненты связности" : "Find connected components";
return g_findConnectedComponent; //local == "ru" ? "Найти компоненты связности" : "Find connected components";
}
FindConnectedComponentNew.prototype.getId = function()

View File

@@ -15,7 +15,7 @@ DFSAlgorithm.prototype.timerInterval = 500;
DFSAlgorithm.prototype.getName = function(local)
{
return local == "ru" ? "Поиск в глубину" : "Depth-first search";
return g_DFSName;// local == "ru" ? "Поиск в глубину" : "Depth-first search";
}
DFSAlgorithm.prototype.getId = function()

View File

@@ -16,7 +16,7 @@ FindEulerianLoop.prototype = Object.create(BaseAlgorithmEx.prototype);
FindEulerianLoop.prototype.getName = function(local)
{
return local == "ru" ? "Найти Эйлеров цикл" : "Find Eulerian cycle";
return g_EulerinLoopName;//local == "ru" ? "Найти Эйлеров цикл" : "Find Eulerian cycle";
}
FindEulerianLoop.prototype.getId = function()

View File

@@ -16,7 +16,7 @@ FindEulerianPath.prototype = Object.create(BaseAlgorithmEx.prototype);
FindEulerianPath.prototype.getName = function(local)
{
return local == "ru" ? "Найти Эйлерову цепь" : "Find Eulerian path";
return g_EulerinPath;//local == "ru" ? "Найти Эйлерову цепь" : "Find Eulerian path";
}
FindEulerianPath.prototype.getId = function()

View File

@@ -25,7 +25,7 @@ FloidAlgorithm.prototype.infinity = 1E8;
FloidAlgorithm.prototype.getName = function(local)
{
return local == "ru" ? "Алгоритм Флойда — Уоршелла" : "FloydWarshall algorithm";
return g_FloidName; //local == "ru" ? "Алгоритм Флойда — Уоршелла" : "FloydWarshall algorithm";
}
FloidAlgorithm.prototype.getId = function()

View File

@@ -19,7 +19,7 @@ GraphReorder.prototype = Object.create(BaseAlgorithm.prototype);
GraphReorder.prototype.getName = function(local)
{
return local == "ru" ? "Упорядочить граф" : "Arrange the graph";
return g_GraphReorder; //local == "ru" ? "Упорядочить граф" : "Arrange the graph";
}
GraphReorder.prototype.getId = function()

View File

@@ -16,7 +16,7 @@ FindHamiltonianLoop.prototype = Object.create(BaseAlgorithmEx.prototype);
FindHamiltonianLoop.prototype.getName = function(local)
{
return local == "ru" ? "Найти Гамильтонов цикл" : "Find Hamiltonian cycle";
return g_HamiltoianCycleName; //local == "ru" ? "Найти Гамильтонов цикл" : "Find Hamiltonian cycle";
}
FindHamiltonianLoop.prototype.getId = function()

View File

@@ -16,7 +16,7 @@ FindHamiltonianPath.prototype = Object.create(BaseAlgorithmEx.prototype);
FindHamiltonianPath.prototype.getName = function(local)
{
return local == "ru" ? "Найти Гамильтонову цепь" : "Find Hamiltonian path";
return g_HamiltonianPath;//local == "ru" ? "Найти Гамильтонову цепь" : "Find Hamiltonian path";
}
FindHamiltonianPath.prototype.getId = function()

View File

@@ -27,7 +27,7 @@ FindMaxFlow.prototype.selectedEdges = null;
FindMaxFlow.prototype.getName = function(local)
{
return local == "ru" ? "Поиск максимального потока" : "Find Maximum flow";
return g_MaxFlowName; //local == "ru" ? "Поиск максимального потока" : "Find Maximum flow";
}
FindMaxFlow.prototype.getId = function()

View File

@@ -14,7 +14,7 @@ MinimumSpanningTree.prototype = Object.create(BaseAlgorithm.prototype);
MinimumSpanningTree.prototype.getName = function(local)
{
return local == "ru" ? "Поиск минимального остовного дерева" : "Search of minimum spanning tree";
return g_minimumSpanningTree; //local == "ru" ? "Поиск минимального остовного дерева" : "Search of minimum spanning tree";
}
MinimumSpanningTree.prototype.getId = function()

View File

@@ -19,7 +19,7 @@ ModernGraphStyle.prototype = Object.create(BaseAlgorithm.prototype);
ModernGraphStyle.prototype.getName = function(local)
{
return local == "ru" ? "Визуализация на основе весов" : "Visualisation based on weight";
return g_modernGraphStyleName;// local == "ru" ? "Визуализация на основе весов" : "Visualisation based on weight";
}
ModernGraphStyle.prototype.getId = function()

View File

@@ -22,7 +22,7 @@ RadiusAndDiameter.prototype = Object.create(BaseAlgorithm.prototype);
RadiusAndDiameter.prototype.getName = function(local)
{
return local == "ru" ? "Поиск радиуса и диаметра графа": "Search graph radius and diameter";
return g_RadiusAndDiameter; //local == "ru" ? "Поиск радиуса и диаметра графа": "Search graph radius and diameter";
}
RadiusAndDiameter.prototype.getId = function()

View File

@@ -23,7 +23,7 @@ FindShortPathNew.prototype.infinityValue = 1E9 - 1;
FindShortPathNew.prototype.getName = function(local)
{
return local == "ru" ? "Поиск кратчайший путь алгоритмом Дейкстры" : "Find shortest path using Dijkstra's algorithm";
return g_findShortPathName; //local == "ru" ? "Поиск кратчайший путь алгоритмом Дейкстры" : "Find shortest path using Dijkstra's algorithm";
}
FindShortPathNew.prototype.getId = function()

View File

@@ -16,7 +16,7 @@ VerticesDegree.prototype = Object.create(BaseAlgorithm.prototype);
VerticesDegree.prototype.getName = function(local)
{
return local == "ru" ? "Рассчитать степень вершин" : "Calculate vertexes degree";
return g_VerticesDegreeName; //local == "ru" ? "Рассчитать степень вершин" : "Calculate vertexes degree";
}
VerticesDegree.prototype.getId = function()