mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-02-16 02:30:51 +00:00
Added translation for algorithm names.
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -25,7 +25,7 @@ FloidAlgorithm.prototype.infinity = 1E8;
|
||||
|
||||
FloidAlgorithm.prototype.getName = function(local)
|
||||
{
|
||||
return local == "ru" ? "Алгоритм Флойда — Уоршелла" : "Floyd–Warshall algorithm";
|
||||
return g_FloidName; //local == "ru" ? "Алгоритм Флойда — Уоршелла" : "Floyd–Warshall algorithm";
|
||||
}
|
||||
|
||||
FloidAlgorithm.prototype.getId = function()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -112,6 +112,23 @@ var g_selectGroupText = "Select using ctrl";
|
||||
var g_copyGroupeButton = "Dublicate";
|
||||
var g_removeGroupeButton = "Remove objects";
|
||||
|
||||
var g_BFSName = "Breadth-first search";
|
||||
var g_ColoringName = "Graph coloring";
|
||||
var g_findConnectedComponent = "Find connected components";
|
||||
var g_DFSName = "Depth-first search";
|
||||
var g_EulerinLoopName = "Find Eulerian cycle";
|
||||
var g_EulerinPath = "Find Eulerian path";
|
||||
var g_FloidName = "Floyd–Warshall algorithm";
|
||||
var g_GraphReorder = "Arrange the graph";
|
||||
var g_HamiltoianCycleName = "Find Hamiltonian cycle";
|
||||
var g_HamiltonianPath = "Find Hamiltonian path";
|
||||
var g_MaxFlowName = "Find Maximum flow";
|
||||
var g_minimumSpanningTree = "Search of minimum spanning tree";
|
||||
var g_modernGraphStyleName = "Visualisation based on weight";
|
||||
var g_RadiusAndDiameter = "Search graph radius and diameter";
|
||||
var g_findShortPathName = "Find shortest path using Dijkstra's algorithm";
|
||||
var g_VerticesDegreeName = "Calculate vertexes degree";
|
||||
|
||||
function loadTexts()
|
||||
{
|
||||
g_textsSelectAndMove = document.getElementById("SelectAndMoveObject").innerHTML;
|
||||
@@ -230,4 +247,21 @@ function loadTexts()
|
||||
g_dragGroupText = document.getElementById("dragSelectedGroup").innerHTML;
|
||||
g_copyGroupeButton = document.getElementById("copySelectedGroup").innerHTML;
|
||||
g_removeGroupeButton = document.getElementById("removeSelectedGroup").innerHTML;
|
||||
|
||||
g_BFSName = document.getElementById("BFSName").innerHTML;
|
||||
g_ColoringName = document.getElementById("ColoringName").innerHTML;
|
||||
g_findConnectedComponent = document.getElementById("findConnectedComponent").innerHTML;
|
||||
g_DFSName = document.getElementById("DFSName").innerHTML;
|
||||
g_EulerinLoopName = document.getElementById("EulerinLoopName").innerHTML;
|
||||
g_EulerinPath = document.getElementById("EulerinPath").innerHTML;
|
||||
g_FloidName = document.getElementById("FloidName").innerHTML;
|
||||
g_GraphReorder = document.getElementById("GraphReorder").innerHTML;
|
||||
g_HamiltoianCycleName = document.getElementById("HamiltoianCycleName").innerHTML;
|
||||
g_HamiltonianPath = document.getElementById("HamiltonianPath").innerHTML;
|
||||
g_MaxFlowName = document.getElementById("MaxFlowName").innerHTML;
|
||||
g_minimumSpanningTree = document.getElementById("minimumSpanningTree").innerHTML;
|
||||
g_modernGraphStyleName = document.getElementById("modernGraphStyleName").innerHTML;
|
||||
g_RadiusAndDiameter = document.getElementById("RadiusAndDiameter").innerHTML;
|
||||
g_findShortPathName = document.getElementById("findShortPathName").innerHTML;
|
||||
g_VerticesDegreeName = document.getElementById("VerticesDegreeName").innerHTML;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user