Commit e673ec15 authored by Ilya Kirillov's avatar Ilya Kirillov

Added translations for common words in the header/footer, also added...

Added translations for common words in the header/footer, also added translations for the new field PAGEREF.
parent 999a8361
......@@ -1506,20 +1506,20 @@ CGraphics.prototype =
}
this.ds();
var _header_text = "Header"
var _header_text = AscCommon.translateManager.getValue("Header");
if (-1 != sectionNum)
_header_text += (" -Section " + (sectionNum + 1) + "-");
_header_text += (AscCommon.translateManager.getValue(" -Section ") + (sectionNum + 1) + "-");
if (type)
{
if (type.bFirst)
_header_text = "First Page " + _header_text;
_header_text = AscCommon.translateManager.getValue("First Page ") + _header_text;
else if (EvenAndOddHeaders)
{
if (type.bEven)
_header_text = "Even Page " + _header_text;
_header_text = AscCommon.translateManager.getValue("Even Page ") + _header_text;
else
_header_text = "Odd Page " + _header_text;
_header_text = AscCommon.translateManager.getValue("Odd Page ") + _header_text;
}
}
......@@ -1527,7 +1527,7 @@ CGraphics.prototype =
this.DrawStringASCII("Courier New", _fontSize, false, false, _header_text, 2, yPos, true);
if (bIsRepeat)
this.DrawStringASCII2("Courier New", _fontSize, false, false, "Same as Previous", 2, yPos, true);
this.DrawStringASCII2("Courier New", _fontSize, false, false, AscCommon.translateManager.getValue("Same as Previous"), 2, yPos, true);
if (false == bIsNoIntGrid)
this.SetIntegerGrid(false);
......@@ -1609,20 +1609,20 @@ CGraphics.prototype =
}
this.ds();
var _header_text = "Footer"
var _header_text = AscCommon.translateManager.getValue("Footer");
if (-1 != sectionNum)
_header_text += (" -Section " + (sectionNum + 1) + "-");
_header_text += (AscCommon.translateManager.getValue(" -Section ") + (sectionNum + 1) + "-");
if (type)
{
if (type.bFirst)
_header_text = "First Page " + _header_text;
_header_text = AscCommon.translateManager.getValue("First Page ") + _header_text;
else if (EvenAndOddHeaders)
{
if (type.bEven)
_header_text = "Even Page " + _header_text;
_header_text = AscCommon.translateManager.getValue("Even Page ") + _header_text;
else
_header_text = "Odd Page " + _header_text;
_header_text = AscCommon.translateManager.getValue("Odd Page ") + _header_text;
}
}
......@@ -1630,7 +1630,7 @@ CGraphics.prototype =
this.DrawStringASCII("Courier New", _fontSize, false, false, _header_text, 2, yPos, false);
if (bIsRepeat)
this.DrawStringASCII2("Courier New", _fontSize, false, false, "Same as Previous", 2, yPos, false);
this.DrawStringASCII2("Courier New", _fontSize, false, false, AscCommon.translateManager.getValue("Same as Previous"), 2, yPos, false);
if (false == bIsNoIntGrid)
this.SetIntegerGrid(false);
......
......@@ -296,7 +296,7 @@ CComplexField.prototype.Update = function()
var oBookmarksManager = this.LogicDocument.GetBookmarksManager();
var oBookmark = oBookmarksManager.GetBookmarkByName(this.Instruction.GetBookmarkName());
var sValue = "Error! Bookmark not defined.";
var sValue = AscCommon.translateManager.getValue("Error! Bookmark not defined.");
if (oBookmark)
{
var oStartBookmark = oBookmark[0];
......@@ -309,15 +309,15 @@ CComplexField.prototype.Update = function()
var oFieldXY = this.SeparateChar.GetXY();
if (Math.abs(oBookmarkXY.Y - oFieldXY.Y) < 0.001)
sValue = oBookmarkXY.X < oFieldXY.X ? "above" : "below";
sValue = oBookmarkXY.X < oFieldXY.X ? AscCommon.translateManager.getValue("above") : AscCommon.translateManager.getValue("below");
else if (oBookmarkXY.Y < oFieldXY.Y)
sValue = "above";
sValue = AscCommon.translateManager.getValue("above");
else
sValue = "below";
sValue = AscCommon.translateManager.getValue("below");
}
else
{
sValue = "on page " + nBookmarkPage;
sValue = AscCommon.translateManager.getValue("on page ") + nBookmarkPage;
}
}
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment