Skip to content

Commit ba066fc

Browse files
committed
+mlym, replaces malayalam
1 parent 7c3f35d commit ba066fc

27 files changed

+1560
-0
lines changed

mlym/defaults.js

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
var defaults = {}
2+
var factoryDefaults = {}
3+
factoryDefaults.font = 'Noto Sans Malayalam WF' // text area font name (a single font, no quotes)
4+
factoryDefaults.size = "28"; // text area font size, number of pixels (just the number)
5+
factoryDefaults.rows = "150"; // number representing number of times 100px for height of text area
6+
factoryDefaults.lineheight = "1.5"; // number representing line height of text area in pixels/100
7+
factoryDefaults.language = 'ml' // language to use for examples
8+
factoryDefaults.uifont = 'Noto Sans Malayalam WF'; // font name for selection area (a single font, no quotes)
9+
factoryDefaults.uisize = "24"; // selection area font size, number of pixels (just the number)
10+
factoryDefaults.ccbase = "\u25CC"; // default base for combining characters
11+
factoryDefaults.uidir = "ltr" // indicates the base direction for the selection area
12+
factoryDefaults.contrast = "low" // contrast for UI text colours
13+
factoryDefaults.hints = "none" // type of hint to show alongside characters in the grids
14+
15+
16+
var thisPicker = 'malayalamPicker'
17+
18+
if (localStorage.pickersStore && localStorage[thisPicker]) defaults = JSON.parse(localStorage[thisPicker])
19+
else defaults = factoryDefaults
20+
21+
var webFonts = [ "Noto Sans Malayalam WF" ]
22+
23+
24+
var template = {}
25+
template.title = 'Malayalam character app'
26+
template.sample = "2. തന്റെ സ്വന്തം രാജ്യവും മറ്റേതൊരു രാജ്യവും വിടുന്നതിന്നും തന്റെ രാജ്യത്തേയ്ക്കു മടങ്ങിവരുന്നതിനുമുള്ള അധികാരം ഏതൊരാള്‍ക്കുമുള്ളതാണ്‌."
27+
template.blocklocation= '/scripts/malayalam/block' // blocklocation to use for examples
28+
template.direction = "ltr" // indicates whether this is a picker for a RTL script
29+
template.github = 'malayalam'
30+
template.scriptcode = 'Mlym'
31+
template.fontLocale = 'mlym'
32+
template.hints = true
33+
34+
35+
36+
37+
var controls = [
38+
{"title":"Trans-<br/>literate", "alt":"Convert Malayalam text to a Latin transliteration.", "code":"doTranscription('transliterate')"},
39+
40+
{"title":"Make<br/>vocab", "alt":"Expand text to create a line for a vocab file.", "code":`_output=document.getElementById('output');
41+
input=getHighlightedText(_output).split('|');
42+
if (! hasHighlight(_output)) _output.value='';
43+
44+
ipa = maptoipa(input[0]);
45+
notes = input[2]? input[2] : '';
46+
47+
add(getVocab(input[0], input[1], notes, ipa));
48+
vocab2Example(getHighlightedText(document.getElementById('output')));
49+
_output.focus();`},
50+
]
51+
52+
53+
54+
var pulldown = [
55+
{"title":"Reverse<br/>transliterate", "alt":"Convert a Latin transliteration to Javanese text.", "code":"doTranscription('revTransliterate')"},
56+
57+
{"title":"Malayalam<br/>to ISO", "alt":"Convert Malayalam text to an ISO Latin transcription.", "code":"doTranscription('toISO')"},
58+
59+
{"title":"ISO to<br/>Malayalam", "alt":"Convert ISO latin text to Malayalam transcription.", "code":"doTranscription('toMalayalam')"},
60+
61+
{"title":"Malayalam<br/>to IPA", "alt":"Convert Malayalam text to an *approximation* to the IPA transcription.", "code":"doTranscription('toIPA')"},
62+
63+
{"title":"Vocab to<br>Example", "alt":"Convert a vocab sequence to example markup.", "code":"vocab2Example(getHighlightedText(document.getElementById('output')))"},
64+
]
65+
66+
67+
68+
var inputAids = [
69+
{"title":"Shape-based lookup", "dataVar":"showShapeLookup", "dataLocn":"shapelist", "dataShortTitle":"S", "type":"shape", "desc":"Click on a panel of shapes to find similar characters."},
70+
71+
{"title":"Hint at similar shapes", "dataVar":"showShapeHints", "dataLocn":"", "dataShortTitle":"H", "type":"hint", "desc":"Show similar shapes as you mouse over a character."},
72+
73+
{"title":"Type assist", "dataVar":"typeAssist", "dataLocn":"transcriptionPalette", "dataShortTitle":"T", "type":"palette", "initialCode":"setUpTypeAssist(false, '', typeAssistMap)", "desc":"Use ASCII characters to type Malayalam from the keyboard."},
74+
75+
{"title":"Latin type-assist", "dataVar":"showLatinTrans", "dataLocn":"transcriptionPalette", "dataShortTitle":"L", "type":"palette", "initialCode":"setUpTypeAssist(true, latinTypeAssistMap, latinTypeAssistMap)", "desc":"Show characters needed for IPA or other transcriptions and transliterations."},
76+
77+
{"title":"ISO to Malayalam", "dataVar":"showISOCharMap", "dataLocn":"transcriptionPalette", "dataShortTitle":"I", "type":"palette", "initialCode":"setUpTypeAssist(false, isoCharacterMap, isoCharacterMap)", "desc":"Create Malayalam text from characters in the ISO transcription."},
78+
79+
{"title":"Reverse transliteration", "dataVar":"showTranslit", "dataLocn":"transcriptionPalette", "dataShortTitle":"R", "type":"palette", "initialCode":"setUpTypeAssist(false, typeAssistMap, typeAssistMap)", "desc":"Use ASCII characters to type Malayalam from the keyboard via reverse transliteration."},
80+
81+
]
82+

mlym/help/index.html

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
<!DOCTYPE html>
2+
<html lang="en-gb">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>Help for Malayalam character app 25</title>
6+
<link rel="stylesheet" href="../../../shared/style/docs.css" type="text/css" />
7+
<link rel="stylesheet" type="text/css" href="../../shared25/style.css" />
8+
<link rel="stylesheet" type="text/css" href="../localstyle.css" />
9+
<script src="/shared/code/boilerplate.js" type="text/javascript"></script>
10+
<script type="text/javascript" src="/shared/code/toc_2016.js"></script>
11+
<script type="text/javascript" src="../../shared25/helptemplate.js"></script>
12+
<script>var direction = 'ltr'</script>
13+
</head>
14+
15+
<body class="app notes">
16+
<header>
17+
<div id="header-boilerplate"></div>
18+
<script>document.getElementById('header-boilerplate').innerHTML = bp_appHeader('/shared/images/world.gif','Malayalam character app','');</script>
19+
</header>
20+
21+
22+
<h1>Malayalam character app notes/help</h1>
23+
24+
25+
<aside class="sidebar">
26+
<h2 class="notoc flush"><a id="tochead">Contents</a></h2>
27+
<div id="toc"><!-- placeholder --></div>
28+
<div class="noprint">
29+
<h2 class="notoc"><a id="links" tabindex="5">Related links</a></h2>
30+
<p><a href="../index.html">Malayalam character app</a></p>
31+
<p><a href="/scripts/links?script=malayalam">Malayalam script links</a></p>
32+
<p><a href="/pickers/">List of character apps </a></p>
33+
</div>
34+
</aside>
35+
36+
<p id="status">Updated <!-- #BeginDate format:En2 -->30-Nov-2019<!-- #EndDate --> • tags <a href="https://r12a.github.io/blog/?tag=apps" title="Show all blog posts tagged with 'apps'">apps</a>, <a href="https://r12a.github.io/blog/?tag=pickers" title="Show all blog posts tagged with 'pickers'">pickers</a>, <a href="https://r12a.github.io/blog/?tag=malayalam" title="Show all blog posts tagged with 'malayalam'">malayalam</a></p>
37+
38+
<p>This Unicode character app allows you to produce or analyse runs of Malayalam text. character apps are especially useful for people who don't know a script well, as characters are displayed in ways that aid identification.</p>
39+
<p>If something is broken or missing <a target="_blank" style="font-size:110%;" href="https://github.com/r12a/pickers/issues/new?title=[malayalam%20picker]%20%20ADD%20TITLE%20HERE">raise an issue</a>. For version information see <a target="_blank" style="font-size:110%;" href="https://github.com/r12a/pickers/commits/gh-pages/malayalam">the Github commit list</a>. The pictures of the UI used in this page are taken from a variety of character apps.</p>
40+
41+
42+
<section id="basics">
43+
</section>
44+
<script>
45+
document.getElementById('basics').innerHTML = addBasicUse(direction)
46+
</script>
47+
48+
49+
<section id="about">
50+
<h2 href="#about">About the selection area</h2>
51+
<p>Includes all the characters in the Unicode <a href="/uniview/?block=malayalam" target="_blank">Malayalam</a> block.</p>
52+
<div id="aboutBP">
53+
</div>
54+
<script>document.getElementById('aboutBP').innerHTML = addAboutBP()
55+
</script>
56+
57+
</section>
58+
59+
60+
61+
<section id="top_controls">
62+
<h2 href="#top_controls">Controls above the text area</h2>
63+
<div id="controlsAbove1"></div>
64+
<script>document.getElementById('controlsAbove1').innerHTML = addControlsAbove1()</script>
65+
66+
<p><b class="leadin">Transliterate.</b> Converts the contents of the text area to a Latin transliteration that provides a one-to-one correspondence between Malayalam and Latin symbols.</p>
67+
<p>The transliteration scheme was developed for this character app, and, where possible, uses symbols that represent sounds typically associated with their Malayalam equivalents, rather than the sometimes fairly arbitrary selection of diacritics found in other systems. Of course, the complexities of mapping graphemes to sounds means that this is far from a real phonetic transcription, and it doesn't show inherent vowels, but the process is reversible (unlike most transcriptions).</p>
68+
<p>Transliterations produced this way are particularly useful for understanding the composition of text in scripts, where the individual parts are not well separated in the text.</p>
69+
70+
71+
<div id="controlsAbove2"></div>
72+
<script>document.getElementById('controlsAbove2').innerHTML = addControlsAbove2()</script>
73+
74+
75+
<p><b class="leadin">Malayalam to ISO.</b> Converts the contents of the text area to an ISO 15919 Latin transcription, except that doubled RA is transcribed as ṯṯ, and ^ is used after consonants to indicate chillu forms. </p>
76+
<p>This transcription adds 'a' to indicate possible locations for the inherent vowel, however, this is not entirely predictable in Malayalam.</p>
77+
<p><b class="leadin">ISO to Malayalam.</b> Converts the contents of the text area from an ISO 15919 Latin transcription to Malayalam, except that doubled RA is transcribed as ṯṯ, and ^ is used after consonants to indicate chillu forms.</p>
78+
<p><b class="leadin"> Malayalam to IPA.</b> Converts the contents of the text area to a Latin transcription that is intended to <strong>approximately</strong> reflect actual pronunciation.</p>
79+
80+
</section>
81+
82+
<section id="secondaryText">
83+
</section>
84+
<script>document.getElementById('secondaryText').innerHTML = addSecondaryText()</script>
85+
86+
87+
88+
<section id="input_aids">
89+
<h2 href="#input_aids">Input aids</h2>
90+
91+
<div id="inputAids1"></div>
92+
<script>document.getElementById('inputAids1').innerHTML = addInputAids('intro, shape, hinting, typeAssist, latin')</script>
93+
94+
95+
<p><b class="leadin">ISO to Malayalam.</b> Allows you to generate Malayalam text from an ISO 15919 transcription. It works as described in the section just above about <samp>Reverse transliteration</samp>, but uses a different panel to set up the <strong>transcription type-in mode</strong>.</p>
96+
97+
98+
<div id="inputAids2"></div>
99+
<script>document.getElementById('inputAids2').innerHTML = addInputAids('translit, keys, close')</script>
100+
101+
</section>
102+
103+
104+
105+
<section id="yellow_controls">
106+
</section>
107+
<script>document.getElementById('yellow_controls').innerHTML = addYellowControls()</script>
108+
109+
110+
111+
<section id="more_controls">
112+
</section>
113+
<script>document.getElementById('more_controls').innerHTML = addMoreControls(direction)</script>
114+
115+
<div class="smallprint">Copyright <a href="mailto:[email protected]">[email protected]</a>. Licence <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">CC-By</a>.</div>
116+
</body>
117+
<script type="text/javascript">
118+
createtoc(3);
119+
</script>
120+
</html>

mlym/images/shape1.png

248 Bytes
Loading

mlym/images/shape10.png

223 Bytes
Loading

mlym/images/shape11.png

267 Bytes
Loading

mlym/images/shape12.png

261 Bytes
Loading

mlym/images/shape14.png

277 Bytes
Loading

mlym/images/shape15.png

263 Bytes
Loading

mlym/images/shape16.png

296 Bytes
Loading

mlym/images/shape17.png

195 Bytes
Loading

0 commit comments

Comments
 (0)