mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 19:33:18 +00:00
28124, a=bobj, r=erik, matt Adding UI labels for language groups in font prefs
This commit is contained in:
parent
9a5ae1bd52
commit
35de39d6d2
@ -4,24 +4,6 @@ enumerator = enumerator.QueryInterface(Components.interfaces.nsIFontEnumerator);
|
||||
fontCount = {value: 0 }
|
||||
fonts = enumerator.EnumerateAllFonts(fontCount);
|
||||
|
||||
|
||||
langs = [
|
||||
"x-western",
|
||||
"x-central-euro",
|
||||
"ja",
|
||||
"zh-TW",
|
||||
"zh-CN",
|
||||
"ko",
|
||||
"x-cyrillic",
|
||||
"x-baltic",
|
||||
"el",
|
||||
"tr",
|
||||
"x-unicode",
|
||||
"x-user-def",
|
||||
"th",
|
||||
"he",
|
||||
"ar"
|
||||
];
|
||||
generics = [
|
||||
"serif",
|
||||
// "sans-serif",
|
||||
@ -32,15 +14,7 @@ generics = [
|
||||
|
||||
function startUp()
|
||||
{
|
||||
|
||||
selectLangs = document.getElementById("selectLangs");
|
||||
for (i = 0; i < langs.length; i++) {
|
||||
option = document.createElement("html:option");
|
||||
text = document.createTextNode(langs[i]);
|
||||
option.appendChild(text);
|
||||
selectLangs.appendChild(option);
|
||||
option.setAttribute('value' , langs[i]);
|
||||
}
|
||||
selectLangs = document.getElementById("selectLangs");
|
||||
selectLangs.value = "x-western";
|
||||
selectLang();
|
||||
}
|
||||
@ -112,6 +86,7 @@ function selectLang()
|
||||
|
||||
//Getting variables needed
|
||||
lang = document.getElementById("selectLangs").value;
|
||||
dump("LangGroup selected: " +lang +" \n");
|
||||
//set prefstring of size
|
||||
var fontVarPref = 'font.size.variable.' + lang;
|
||||
var fontfixPref = 'font.size.fixed.' + lang;
|
||||
|
@ -48,7 +48,22 @@
|
||||
<html:td>&fontsFor.select;</html:td>
|
||||
<html:td>
|
||||
<html:select class="Font" id="selectLangs" onchange = "selectLang();" width = "10">
|
||||
</html:select>
|
||||
<html:option value="x-western">&font.langGroup.latin1;</html:option>
|
||||
<html:option value="x-central-euro">&font.langGroup.latin2;</html:option>
|
||||
<html:option value="ja">&font.langGroup.japanese;</html:option>
|
||||
<html:option value="zh-TW">&font.langGroup.trad-chinese;</html:option>
|
||||
<html:option value="zh-CN">&font.langGroup.simpl-chinese;</html:option>
|
||||
<html:option value="ko">&font.langGroup.korean;</html:option>
|
||||
<html:option value="x-cyrillic">&font.langGroup.cyrillic;</html:option>
|
||||
<html:option value="x-baltic">&font.langGroup.baltic;</html:option>
|
||||
<html:option value="el">&font.langGroup.el;</html:option>
|
||||
<html:option value="tr">&font.langGroup.turkish;</html:option>
|
||||
<html:option value="x-unicode">&font.langGroup.unicode;</html:option>
|
||||
<html:option value="x-user-def">&font.langGroup.user-def;</html:option>
|
||||
<html:option value="th">&font.langGroup.thai;</html:option>
|
||||
<html:option value="he">&font.langGroup.hebrew;</html:option>
|
||||
<html:option value="ar">&font.langGroup.arabic;</html:option>
|
||||
</html:select>
|
||||
</html:td>
|
||||
<html:td>&varFont.select;</html:td>
|
||||
<html:td>
|
||||
|
@ -15,6 +15,21 @@
|
||||
<!-- LOCALIZATION NOTE (fantasy.select): 'Fantasy' means 'Ornate' -->
|
||||
<!ENTITY fantasy.select "Fantasy:">
|
||||
<!ENTITY cursive.select "Cursive:">
|
||||
<!ENTITY font.langGroup.latin1 "Western">
|
||||
<!ENTITY font.langGroup.latin2 "Central European">
|
||||
<!ENTITY font.langGroup.japanese "Japanese">
|
||||
<!ENTITY font.langGroup.trad-chinese "Traditional Chinese">
|
||||
<!ENTITY font.langGroup.simpl-chinese "Simplified Chinese">
|
||||
<!ENTITY font.langGroup.korean "Korean">
|
||||
<!ENTITY font.langGroup.cyrillic "Cyrillic">
|
||||
<!ENTITY font.langGroup.baltic "Baltic">
|
||||
<!ENTITY font.langGroup.el "Greek">
|
||||
<!ENTITY font.langGroup.turkish "Turkish">
|
||||
<!ENTITY font.langGroup.unicode "Unicode">
|
||||
<!ENTITY font.langGroup.user-def "User Defined">
|
||||
<!ENTITY font.langGroup.thai "Thai">
|
||||
<!ENTITY font.langGroup.hebrew "Hebrew">
|
||||
<!ENTITY font.langGroup.arabic "Arabic">
|
||||
<!-- LOCALIZATION NOTE (size1.option): DONT_TRANSLATE -->
|
||||
<!ENTITY size1.option "10">
|
||||
<!ENTITY varFont.select "Variable Width Font:">
|
||||
|
Loading…
Reference in New Issue
Block a user