From 6bc8e391c2e9d94f00f616c9e2b3e984d5c85968 Mon Sep 17 00:00:00 2001
From: lingdocs <71590811+lingdocs@users.noreply.github.com>
Date: Mon, 18 Apr 2022 19:12:54 +0500
Subject: [PATCH] =?UTF-8?q?Update=20spelling=20converter=20to=20deal=20wit?=
=?UTF-8?q?h=20the=20ambiguity=20of=20the=20ooy=20-=20wey=20issue.=20In=20?=
=?UTF-8?q?Peshawer=20published=20books=20they=20are=20writing=20=DA=81?=
=?UTF-8?q?=D8=A7=DB=92=20etc?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/vp-explorer/vp-structure.svg | 18 ++++++++---------
src/lib/convert-spelling.test.ts | 22 +++++++++++++++++----
src/lib/convert-spelling.ts | 4 ++--
3 files changed, 28 insertions(+), 16 deletions(-)
diff --git a/src/components/vp-explorer/vp-structure.svg b/src/components/vp-explorer/vp-structure.svg
index 1e0855f..ace56ed 100644
--- a/src/components/vp-explorer/vp-structure.svg
+++ b/src/components/vp-explorer/vp-structure.svg
@@ -8,7 +8,7 @@
version="1.1"
id="svg5"
inkscape:version="1.1.1 (c3084ef, 2021-09-22)"
- sodipodi:docname="sentence-structure.svg"
+ sodipodi:docname="vp-structure.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
@@ -30,9 +30,9 @@
fit-margin-bottom="10"
units="px"
width="708.26672px"
- inkscape:zoom="0.51029737"
- inkscape:cx="455.6167"
- inkscape:cy="436.02028"
+ inkscape:zoom="0.35279519"
+ inkscape:cx="633.51204"
+ inkscape:cy="-296.20585"
inkscape:window-width="1440"
inkscape:window-height="847"
inkscape:window-x="0"
@@ -199,8 +199,8 @@
x="16.162476"
y="11.622981" />
@@ -765,8 +764,7 @@ pronoun"
id="path79296" />
diff --git a/src/lib/convert-spelling.test.ts b/src/lib/convert-spelling.test.ts
index 3669d34..cb8717e 100644
--- a/src/lib/convert-spelling.test.ts
+++ b/src/lib/convert-spelling.test.ts
@@ -15,8 +15,15 @@ const pairsWPakistaniUndotted = [
["سړی", "سړے"],
["موسیٰ", "موسیٰ"],
["فرمايي", "فرمائی"],
- ["چای", "چائ"],
- ["زوی", "زوئ"],
+ ["چای", "چاے"],
+ [
+ "وی",
+ "وے",
+ ],
+ [
+ "زوی",
+ "زوے",
+ ],
["ښويېدل", "ښوئېدل"],
["ويي", "وئی"],
["دوستي", "دوستی"],
@@ -31,8 +38,15 @@ const pairsWPakistaniDotted = [
["سړی", "سړے"],
["موسیٰ", "موسیٰ"],
["فرمايي", "فرمائي"],
- ["چای", "چائ"],
- ["زوی", "زوئ"],
+ ["چای", "چاے"],
+ [
+ "وی",
+ "وے",
+ ],
+ [
+ "زوی",
+ "زوے",
+ ],
["ښويېدل", "ښوئېدل"],
["ويي", "وئي"],
["دوستي", "دوستي"],
diff --git a/src/lib/convert-spelling.ts b/src/lib/convert-spelling.ts
index 36130e9..1689ec6 100644
--- a/src/lib/convert-spelling.ts
+++ b/src/lib/convert-spelling.ts
@@ -19,8 +19,8 @@ export function convertSpelling(input: string, spelling: T.Spelling): string {
if (spelling === "Afghan") {
return input;
}
- return input.replace(/ای(?![\u0621-\u065f\u0670-\u06d3\u06d5])/g, "ائ")
- .replace(/وی(?![\u0621-\u065f\u0670-\u06d3\u06d5])/g, "وئ")
+ return input.replace(/ای(?![\u0621-\u065f\u0670-\u06d3\u06d5])/g, "اے")
+ .replace(/وی(?![\u0621-\u065f\u0670-\u06d3\u06d5])/g, "وے")
.replace(/ی(?![\u0621-\u065f\u0670-\u06d3\u06d5])/g, "ے")
.replace(/ي(?![\u0621-\u065f\u0670-\u06d3\u06d5])/g, (spelling === "Pakistani ی")
? "ی"