// LatteUI.jsx - John Peterson
// (c) 2005-2007 Adobe Systems Inc. All Rights Reserved
//
// This file has tools to translate Eve dialog descriptions generated by
// the Latte application into ScriptUI resources.
//
/*
@@@BUILDINFO@@@ LatteUI.jsx 1.0.0.1
*/
// Debug string class optionally displays results as they're added.
function DbgString()
{
this.data = "";
this.debug = true;
}
DbgString.prototype.toString = function () { return this.data; }
DbgString.prototype.add = function ( str )
{
if (this.debug)
$.write(str);
this.data += str.replace(/\n/g, " ");
}
function tabs(num)
{
s = "";
for (i = 0; i < num; ++i)
s += "\t";
return s;
}
// Given an Eve dialog description in the string "src", return
// a ScriptUI resource description string.
function translateLatte(src, srcFilePath, debug_mode)
{
// Build translation tables xxx['Latte'] = "ScriptUI";
var nouns = new Array();
nouns['dialog'] = "dialog";
nouns['palette'] = "palette";
nouns['group'] = "Group";
nouns['frame'] = "Panel";
nouns['cluster'] = "Panel";