15,7 → 15,7 |
U: "¶", |
H: "ξ", |
G: "^", |
Ch: ")", |
CH: ")", |
I: "ƒ", |
N: "(", |
Z: "ε", |
30,15 → 30,13 |
ZH: "ω", |
TS: "θ", |
DZH: "C", |
J: "C", |
KS: "φ", |
X: "φ", |
LL: "μ", |
M: "&", |
NG: "ρ", |
NN: "þ", |
SS: "β", |
TCH: "M" |
// LL: "μ", |
// M: "&", |
// NG: "ρ", |
// NN: "þ", |
// SS: "β", |
// TCH: "M" |
}; |
|
var rxVulcan = jsx.object.getKeys(media_map); |
48,24 → 46,16 |
+ "|[" + rxVulcan.filter(function (e) { return e.length === 1; }). join("") + "]", |
"ig"); |
|
//jsx.object.flip = function (obj) { |
// var flipped = jsx.object.inheritFrom(obj); |
// var keys = jsx.object.getKeys(obj); |
// |
// for (var i = 0, len = keys.length; i < len; ++i) |
// { |
// var key = keys[i]; |
// var value = obj[key]; |
// if (typeof value != "function") |
// { |
// flipped[value] = key; |
// } |
// } |
// |
// return flipped; |
//}; |
function mediaTranscribe (s) |
{ |
return s.toUpperCase().replace( |
rxVulcan, |
function (s) { |
return jsx.object.getProperty(media_map, s.replace(/\s+/g, " "), s); |
}); |
} |
|
var media_script_used = false; |
var LANG_VULCAN_MEDIA = "vuh-Media-Gol-modern"; |
|
function mediaScript (button) |
{ |
79,6 → 69,13 |
return; |
} |
|
if (document.documentElement.lang == LANG_VULCAN) |
{ |
var title = document.getElementsByTagName("title")[0]; |
title.setAttribute("data-text", document.title); |
document.title = mediaTranscribe(document.title); |
} |
|
for (var i = 0, len = vulcan_texts.length; i < len; ++i) |
{ |
var text = vulcan_texts[i]; |
92,6 → 89,11 |
{ |
text.title = text.textContent; |
} |
else |
{ |
text.setAttribute("data-title", text.title); |
text.title = mediaTranscribe(text.title); |
} |
} |
|
var text_nodes = jsx.dom.xpath.evaluate( |
102,40 → 104,66 |
{ |
var text_node = text_nodes[j]; |
|
text_node.nodeValue = text_node.nodeValue.replace( |
rxVulcan, |
function (s) { |
return jsx.object.getProperty(media_map, s.replace(/\s+/g, " ").toUpperCase(), s); |
}); |
text_node.nodeValue = mediaTranscribe(text_node.nodeValue); |
} |
|
text.parentNode.lang = "vuh-Media-Gol-modern"; |
if (text.lang == LANG_VULCAN) |
{ |
text.lang = LANG_VULCAN_MEDIA; |
} |
else if (text.parentNode.lang == LANG_VULCAN) |
{ |
text.parentNode.lang = LANG_VULCAN_MEDIA; |
} |
} |
|
if (button && lcars.language == LANG_VULCAN) |
if (button) |
{ |
button.setAttribute("data-caption", button.firstChild.textContent); |
button.firstChild.textContent = "Latin-Zukitan"; |
button.firstChild.lang = LANG_VULCAN; |
} |
|
media_script_used = true; |
var html = document.documentElement; |
if (html.lang == LANG_VULCAN) |
{ |
html.lang = LANG_VULCAN_MEDIA; |
} |
} |
|
function latinScript (button) |
{ |
var title = document.getElementsByTagName("title")[0]; |
if (document.documentElement.lang == LANG_VULCAN_MEDIA) |
{ |
document.title = title.getAttribute("data-text"); |
title.removeAttribute("data-text") |
} |
|
for (var i = 0, len = vulcan_texts.length; i < len; ++i) |
{ |
var text = vulcan_texts[i]; |
|
text.style.textTransform = ""; |
text.innerHTML = text.getAttribute('data-html'); |
text.parentNode.lang = "vuh-Latn-Gol-modern"; |
text.innerHTML = text.getAttribute('data-html') || ""; |
text.title = text.getAttribute("data-title") || ""; |
|
if (text.lang == LANG_VULCAN_MEDIA) |
{ |
text.lang = LANG_VULCAN; |
} |
else if (text.parentNode.lang == LANG_VULCAN_MEDIA) |
{ |
text.parentNode.lang = LANG_VULCAN; |
} |
} |
|
if (lcars.language == LANG_VULCAN) |
if (button) |
{ |
button.firstChild.textContent = button.getAttribute("data-caption"); |
button.firstChild.lang = LANG_VULCAN_MEDIA; |
} |
|
media_script_used = false; |
var html = document.documentElement; |
if (html.lang == LANG_VULCAN_MEDIA) |
{ |
html.lang = LANG_VULCAN; |
} |
} |