Added use of locale inColoring algorithm

This commit is contained in:
serd2011 2021-09-19 19:05:44 +03:00
parent 56ab95df40
commit 0a294c1720
12 changed files with 37 additions and 1 deletions

View File

@ -192,6 +192,9 @@
// VerticesDegree.js // VerticesDegree.js
$g_lang['maximum_degree_of_graph'] = "The maximum degree of a graph is"; $g_lang['maximum_degree_of_graph'] = "The maximum degree of a graph is";
// Coloring.js
$g_lang['color_number'] = "Color number is";
$g_lang['done'] = "Done"; $g_lang['done'] = "Done";
$g_lang['action'] = "Actions"; $g_lang['action'] = "Actions";

View File

@ -230,6 +230,9 @@
// VerticesDegree.js // VerticesDegree.js
$g_lang['maximum_degree_of_graph'] = "The maximum degree of a graph is"; $g_lang['maximum_degree_of_graph'] = "The maximum degree of a graph is";
// Coloring.js
$g_lang['color_number'] = "Color number is";
$g_lang['done'] = "Done"; $g_lang['done'] = "Done";
$g_lang['action'] = "Actions"; $g_lang['action'] = "Actions";

View File

@ -229,6 +229,9 @@ We have added Dutch translation 🇳🇱. Thank you Willie de Wit</a>";
// VerticesDegree.js // VerticesDegree.js
$g_lang['maximum_degree_of_graph'] = "The maximum degree of a graph is"; $g_lang['maximum_degree_of_graph'] = "The maximum degree of a graph is";
// Coloring.js
$g_lang['color_number'] = "Color number is";
$g_lang['done'] = "Done"; $g_lang['done'] = "Done";
$g_lang['action'] = "Actions"; $g_lang['action'] = "Actions";

View File

@ -229,6 +229,9 @@ Tenemos traducciones en griego 🇬🇷.</a> <a href=\"https://github.com/UnickS
// VerticesDegree.js // VerticesDegree.js
$g_lang['maximum_degree_of_graph'] = "The maximum degree of a graph is"; $g_lang['maximum_degree_of_graph'] = "The maximum degree of a graph is";
// Coloring.js
$g_lang['color_number'] = "Color number is";
$g_lang['done'] = "Done"; $g_lang['done'] = "Done";
$g_lang['action'] = "Actions"; $g_lang['action'] = "Actions";

View File

@ -197,6 +197,9 @@
// VerticesDegree.js // VerticesDegree.js
$g_lang['maximum_degree_of_graph'] = "The maximum degree of a graph is"; $g_lang['maximum_degree_of_graph'] = "The maximum degree of a graph is";
// Coloring.js
$g_lang['color_number'] = "Color number is";
$g_lang['done'] = "Done"; $g_lang['done'] = "Done";
$g_lang['action'] = "Actions"; $g_lang['action'] = "Actions";

View File

@ -194,6 +194,9 @@
// VerticesDegree.js // VerticesDegree.js
$g_lang['maximum_degree_of_graph'] = "The maximum degree of a graph is"; $g_lang['maximum_degree_of_graph'] = "The maximum degree of a graph is";
// Coloring.js
$g_lang['color_number'] = "Color number is";
$g_lang['done'] = "Done"; $g_lang['done'] = "Done";
$g_lang['action'] = "Actions"; $g_lang['action'] = "Actions";

View File

@ -195,6 +195,9 @@
// VerticesDegree.js // VerticesDegree.js
$g_lang['maximum_degree_of_graph'] = "The maximum degree of a graph is"; $g_lang['maximum_degree_of_graph'] = "The maximum degree of a graph is";
// Coloring.js
$g_lang['color_number'] = "Color number is";
$g_lang['done'] = "Done"; $g_lang['done'] = "Done";
$g_lang['action'] = "Actions"; $g_lang['action'] = "Actions";

View File

@ -230,6 +230,9 @@
// VerticesDegree.js // VerticesDegree.js
$g_lang['maximum_degree_of_graph'] = "Максимальная степень вершин графа равна"; $g_lang['maximum_degree_of_graph'] = "Максимальная степень вершин графа равна";
// Coloring.js
$g_lang['color_number'] = "Найденное количество цветов";
$g_lang['done'] = "Готово"; $g_lang['done'] = "Готово";
$g_lang['action'] = "Действия"; $g_lang['action'] = "Действия";

View File

@ -191,6 +191,9 @@
// VerticesDegree.js // VerticesDegree.js
$g_lang['maximum_degree_of_graph'] = "The maximum degree of a graph is"; $g_lang['maximum_degree_of_graph'] = "The maximum degree of a graph is";
// Coloring.js
$g_lang['color_number'] = "Color number is";
$g_lang['done'] = "Done"; $g_lang['done'] = "Done";
$g_lang['action'] = "Actions"; $g_lang['action'] = "Actions";

View File

@ -30,7 +30,7 @@ Coloring.prototype.getId = function()
// @return message for user. // @return message for user.
Coloring.prototype.getMessage = function(local) Coloring.prototype.getMessage = function(local)
{ {
return (local == "ru" ? "Найденное количество цветов " : "Color number is ") + this.connectedComponentNumber; return g_colorNumber + " " + this.connectedComponentNumber;
} }
Coloring.prototype.result = function(resultCallback) Coloring.prototype.result = function(resultCallback)

View File

@ -159,6 +159,9 @@ var g_vertexPeripheral = "Peripheral";
// VerticesDegree.js // VerticesDegree.js
var g_maximumDegreeOfGraph = "The maximum degree of a graph is"; var g_maximumDegreeOfGraph = "The maximum degree of a graph is";
// Coloring.js
var g_colorNumber = "Color number is";
var g_done = "Done"; var g_done = "Done";
var g_action = "Action"; var g_action = "Action";
@ -334,6 +337,9 @@ function loadTexts()
// VerticesDegree.js // VerticesDegree.js
g_maximumDegreeOfGraph = document.getElementById("MaximumDegreeOfGraph").innerHTML; g_maximumDegreeOfGraph = document.getElementById("MaximumDegreeOfGraph").innerHTML;
// Coloring.js
g_colorNumber = document.getElementById("ColorNumber").innerHTML;
g_done = document.getElementById("Done").innerHTML; g_done = document.getElementById("Done").innerHTML;
g_action = document.getElementById("ActionText").innerHTML; g_action = document.getElementById("ActionText").innerHTML;

View File

@ -761,6 +761,9 @@
<!-- VerticesDegree.js --> <!-- VerticesDegree.js -->
<p id="MaximumDegreeOfGraph" class="translation"><?= L('maximum_degree_of_graph')?></p> <p id="MaximumDegreeOfGraph" class="translation"><?= L('maximum_degree_of_graph')?></p>
<!-- Coloring.js -->
<p id="ColorNumber" class="translation"><?= L('color_number')?></p>
<p id="Done" class="translation"><?= L('done')?></p> <p id="Done" class="translation"><?= L('done')?></p>
<p id="ActionText" class="translation"><?= L('action')?></p> <p id="ActionText" class="translation"><?= L('action')?></p>