This commit is contained in:
lingdocs 2022-08-23 16:11:32 +04:00
parent 51f5920e2c
commit 3a0aeea6e4
4 changed files with 9 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@lingdocs/pashto-inflector",
"version": "3.7.3",
"version": "3.7.4",
"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",

View File

@ -57,6 +57,7 @@ export function renderNounSelection(n: T.NounSelection, inflected: boolean, role
return [
...plural,
...getInf(infs, "arabicPlural", n.gender, true, inflected),
// TODO: if it's an INANIMATE NOUN and it inflects allow the inflected form too?
...!plural.length ? getInf(infs, "inflections", n.gender, true, inflected) : [],
];
})();

View File

@ -30,6 +30,7 @@ import Hider from "./components/Hider";
import EntrySelect from "./components/EntrySelect";
import VerbInfo, { RootsAndStems } from "./components/verb-info/VerbInfo";
import VPExplorer from "./components/vp-explorer/VPExplorer";
import { makeVPSelectionState } from "./components/vp-explorer/verb-selection";
import { vpsReducer } from "./components/vp-explorer/vps-reducer";
import type { VpsReducerAction as VpsA } from "./components/vp-explorer/vps-reducer";
import useStickyState from "./lib/useStickyState";
@ -243,6 +244,7 @@ export {
getEnglishVerb,
roleIcon,
vpsReducer,
makeVPSelectionState,
// protobuf helpers
readDictionary,
writeDictionary,

View File

@ -28,7 +28,9 @@ export type Dictionary = {
entries: DictionaryEntry[];
}
// TODO: BETTER TYPING OF THIS WITH RECORD TO MAKE SURE THAT THE FIELDS LINE UP
// TODO: MAKE THIS A RECORD TYPE
// Record<RequiredNumberFields, number> && Record<RequiredStringFields, string> &&
// Partial<Record<StringFields, string>> && Partial<Record<NumberFields, number>>
export type DictionaryEntry = {
// BASE REQUIRED INFO
/** timestamp - used for word id */
@ -123,6 +125,8 @@ export type DictionaryEntryBooleanField = "noInf" | "shortIntrans" | "noOo" | "s
export type DictionaryEntryNumberField = "ts" | "i" | "l" | "separationAtP" | "separationAtF";
export type DictionaryEntryField = DictionaryEntryTextField | DictionaryEntryBooleanField | DictionaryEntryNumberField;
// TODO: make
export type DictionaryEntryError = {
errors: string[],
p: string,