Added Punjabi script column headers, but these need to be checked!

This commit is contained in:
Simon Brooke 2022-09-19 09:26:11 +01:00
parent 0aeb1ab878
commit 9479750dfc
No known key found for this signature in database
GPG key ID: A7A4F18D1D4DF987
2 changed files with 50 additions and 17 deletions

View file

@ -49,6 +49,22 @@ src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"
<h2>Long forms</h2>
<table class="character-table"
summary="Table of Punjabi characters from which to select sound recordings">
<tr>
<th></th>
<th>ਮੁਕਤਾ</th>
<th>ਕੰਨਾ</th>
<th>ਸਿਹਾਰੀ</th>
<th>ਬਿਹਾਰੀ</th>
<th>ਔਂਕੜ</th>
<th>ਦੁਲੈਂਕੜ</th>
<th>ਲਾਂਵਾਂ</th>
<th>ਦੁਲਾਂਵਾਂ</th>
<th>ਦੁਲਾਂਵਾਂ</th>
<th>ਕਨੌੜਾ</th>
<th>ਟਿੱਪੀ</th>
<th>ਬਿੰਦੀ</th>
<th></th>
</tr>
<tr>
<th></th>
<th>Muktā</th>
@ -3271,6 +3287,22 @@ src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"
<h2>Short forms</h2>
<table class="character-table"
summary="Table of Punjabi characters from which to select sound recordings">
<tr>
<th></th>
<th>ਮੁਕਤਾ</th>
<th>ਕੰਨਾ</th>
<th>ਸਿਹਾਰੀ</th>
<th>ਬਿਹਾਰੀ</th>
<th>ਔਂਕੜ</th>
<th>ਦੁਲੈਂਕੜ</th>
<th>ਲਾਂਵਾਂ</th>
<th>ਦੁਲਾਂਵਾਂ</th>
<th>ਦੁਲਾਂਵਾਂ</th>
<th>ਕਨੌੜਾ</th>
<th>ਟਿੱਪੀ</th>
<th>ਬਿੰਦੀ</th>
<th></th>
</tr>
<tr>
<th></th>
<th>Muktā</th>

View file

@ -58,18 +58,18 @@
(def columns
"This is essentially just Lucy's own encoding of the sound file names,
I think, and has no further significance."
[{:name "Muktā", :lower-latin "b", :upper-latin "B"}
{:name "Kannā", :lower-latin "c", :upper-latin "C"}
{:name "Sihārī", :lower-latin "d", :upper-latin "D"}
{:name "Bihārī", :lower-latin "e", :upper-latin "E"}
{:name "Auṅkaṛ", :lower-latin "f", :upper-latin "F"}
{:name "Dulaiṅkaṛ", :lower-latin "g", :upper-latin "G"}
{:name "Lāvā", :lower-latin "h", :upper-latin "H"}
{:name "Dulāvā", :lower-latin "i", :upper-latin "I"}
{:name "Hōṛā", :lower-latin "j", :upper-latin "J"}
{:name "Kanauṛā", :lower-latin "k", :upper-latin "K"}
{:name "Ṭippī", :lower-latin "l", :upper-latin "L"}
{:name "Bindī", :lower-latin "m", :upper-latin "M"}])
[{:name "Muktā", :punjabi "ਮੁਕਤਾ", :lower-latin "b", :upper-latin "B"}
{:name "Kannā", :punjabi "ਕੰਨਾ", :lower-latin "c", :upper-latin "C"}
{:name "Sihārī", :punjabi "ਸਿਹਾਰੀ", :lower-latin "d", :upper-latin "D"}
{:name "Bihārī", :punjabi "ਬਿਹਾਰੀ", :lower-latin "e", :upper-latin "E"}
{:name "Auṅkaṛ", :punjabi "ਔਂਕੜ", :lower-latin "f", :upper-latin "F"}
{:name "Dulaiṅkaṛ", :punjabi "ਦੁਲੈਂਕੜ", :lower-latin "g", :upper-latin "G"}
{:name "Lāvā", :punjabi "ਲਾਂਵਾਂ", :lower-latin "h", :upper-latin "H"}
{:name "Dulāvā", :punjabi "ਦੁਲਾਂਵਾਂ", :lower-latin "i", :upper-latin "I"}
{:name "Hōṛā", :punjabi "ਦੁਲਾਂਵਾਂ", :lower-latin "j", :upper-latin "J"}
{:name "Kanauṛā", :punjabi "ਕਨੌੜਾ", :lower-latin "k", :upper-latin "K"}
{:name "Ṭippī", :punjabi "ਟਿੱਪੀ", :lower-latin "l", :upper-latin "L"}
{:name "Bindī", :punjabi "ਬਿੰਦੀ", :lower-latin "m", :upper-latin "M"}])
;; (defn audio
;; [^Integer col ^Integer row ^Boolean long?]
@ -124,15 +124,15 @@
(defn col-header-cell
"Return a header cell for the indicated `column`."
[^Integer column]
[^Integer column ^Boolean punjabi?]
(vector :th
(:name (columns column))))
((if punjabi? :punjabi :name) (columns column))))
(defn col-headers-row
[]
[^Boolean punjabi?]
(apply vector (concat [:tr]
[[:th]]
(map col-header-cell (range (count columns)))
(map #(col-header-cell % punjabi?) (range (count columns)))
[[:th]])))
;; (col-headers-row)
@ -167,7 +167,8 @@
vector
(concat [:table {:class "character-table"
:summary "Table of Punjabi characters from which to select sound recordings"}]
[(col-headers-row)
[(col-headers-row true)
(col-headers-row false)
(play-column-row true long?)]
(map #(entries-row % long?)
(range