better handling of english apostrophe
This commit is contained in:
parent
edad43e490
commit
e22116aa19
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "pashto-inflector",
|
||||
"version": "5.8.1",
|
||||
"version": "5.8.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "pashto-inflector",
|
||||
"version": "5.8.1",
|
||||
"version": "5.8.2",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "pashto-inflector",
|
||||
"version": "5.8.1",
|
||||
"version": "5.8.2",
|
||||
"author": "lingdocs.com",
|
||||
"description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations",
|
||||
"homepage": "https://verbs.lingdocs.com",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lingdocs/ps-react",
|
||||
"version": "5.8.1",
|
||||
"version": "5.8.2",
|
||||
"description": "Pashto inflector library module with React components",
|
||||
"main": "dist/components/library.js",
|
||||
"module": "dist/components/library.js",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lingdocs/inflect",
|
||||
"version": "5.8.1",
|
||||
"version": "5.8.2",
|
||||
"description": "Pashto inflector library",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/lib/library.d.ts",
|
||||
|
|
|
@ -173,9 +173,10 @@ function addPossesors(possesor: T.Rendered<T.NPSelection> | undefined, base: str
|
|||
}
|
||||
const possesorE = getEnglishFromRendered(possesor);
|
||||
if (!possesorE) return undefined;
|
||||
const withApostrophe = `${possesorE}'${possesorE.endsWith("s") ? "" : "s"}`;
|
||||
return type === "noun"
|
||||
? `${possesorE}'s ${removeArticles(base)}`
|
||||
: `(${possesorE}'s) ${removeArticles(base)} (${possesorE})`;
|
||||
? `${withApostrophe} ${removeArticles(base)}`
|
||||
: `(${withApostrophe}) ${removeArticles(base)} (${possesorE})`;
|
||||
}
|
||||
|
||||
function pronounPossEng(p: T.Person): string {
|
||||
|
|
Loading…
Reference in New Issue