Skip to content

Commit 22256a6

Browse files
committed
[RZA-250029]: added correct an vowel and comments
1 parent 23655a2 commit 22256a6

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

src/pages/barahkhadi/index.astro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
22
import BaseLayout from "@/layouts/Base";
33
import "@/assets/styles/barahkhadi/index.css";
4-
5-
import { hindiConsonants } from "@/utils/common";
6-
import { matras } from "@/utils/common";
4+
import { hindiConsonants, matras } from "@/utils/common";
75
import Help from "@/components/Help.astro";
86
97
const consonants = [
@@ -13,7 +11,8 @@ const consonants = [
1311
hindiConsonants.slice(15, 20), // त, थ, द, ध, न
1412
hindiConsonants.slice(20, 25), // प, फ, ब, भ, म
1513
hindiConsonants.slice(25, 29), // य, र, ल, व
16-
hindiConsonants.slice(29, 33) // श, ष, स, ह
14+
hindiConsonants.slice(29, 33), // श, ष, स, ह
15+
hindiConsonants.slice(33, 36) // क्ष , त्र , ज्ञ
1716
];
1817
---
1918

@@ -47,6 +46,7 @@ const consonants = [
4746
}
4847
</div>
4948
</BaseLayout>
49+
<!--<Debug data={hindiConsonants} />-->
5050

5151
<script>
5252
document.querySelectorAll(".quick-view-btn").forEach((button) => {

src/utils/common.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ export const hindiVowels = Array.from({ length: 16 }, (_, i) => ({
55
key: 2309 + i,
66
value: String.fromCodePoint(2309 + i)
77
}));
8-
const extraHindiVowelKey = [2317, 2321];
8+
const extraHindiVowelKey = [2317, 2321]; // 'ऍ' , 'ऑ'
9+
10+
// String.fromCodePoint(2384); // 'ॐ'
911
export const hindiVowelList = hindiVowels.filter((v) => !extraHindiVowelKey.includes(v.key));
1012

1113
// Consonants
@@ -34,7 +36,9 @@ export const hindiConsonants = [
3436
2351, 2352, 2354, 2357,
3537
// श-row
3638
2358, 2359, 2360, 2361
37-
].map(code => String.fromCharCode(code)).concat(additionalConsonants);
39+
]
40+
.map((code) => String.fromCharCode(code))
41+
.concat(additionalConsonants);
3842

3943
export const matras = {
4044
aa: String.fromCharCode(2366),
@@ -46,16 +50,15 @@ export const matras = {
4650
aie: String.fromCharCode(2376),
4751
au: String.fromCharCode(2379),
4852
aau: String.fromCharCode(2380),
49-
an: String.fromCharCode(2385),
53+
an: String.fromCharCode(2306),
5054
ah: String.fromCharCode(2307),
51-
ru: String.fromCharCode(2371),
55+
ru: String.fromCharCode(2371)
5256
};
5357

5458
export const barahkhadi = (code: number) => {
5559
console.log({ code });
5660
const sanyukat = Object.values(matras);
5761
const list = [String.fromCharCode(code)];
58-
console.log(list.concat(sanyukat));
5962
return list.concat(sanyukat);
6063
};
6164

0 commit comments

Comments
 (0)