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", "name": "@lingdocs/pashto-inflector",
"version": "3.7.3", "version": "3.7.4",
"author": "lingdocs.com", "author": "lingdocs.com",
"description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations", "description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations",
"homepage": "https://verbs.lingdocs.com", "homepage": "https://verbs.lingdocs.com",

View File

@ -57,6 +57,7 @@ export function renderNounSelection(n: T.NounSelection, inflected: boolean, role
return [ return [
...plural, ...plural,
...getInf(infs, "arabicPlural", n.gender, true, inflected), ...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) : [], ...!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 EntrySelect from "./components/EntrySelect";
import VerbInfo, { RootsAndStems } from "./components/verb-info/VerbInfo"; import VerbInfo, { RootsAndStems } from "./components/verb-info/VerbInfo";
import VPExplorer from "./components/vp-explorer/VPExplorer"; import VPExplorer from "./components/vp-explorer/VPExplorer";
import { makeVPSelectionState } from "./components/vp-explorer/verb-selection";
import { vpsReducer } from "./components/vp-explorer/vps-reducer"; import { vpsReducer } from "./components/vp-explorer/vps-reducer";
import type { VpsReducerAction as VpsA } from "./components/vp-explorer/vps-reducer"; import type { VpsReducerAction as VpsA } from "./components/vp-explorer/vps-reducer";
import useStickyState from "./lib/useStickyState"; import useStickyState from "./lib/useStickyState";
@ -243,6 +244,7 @@ export {
getEnglishVerb, getEnglishVerb,
roleIcon, roleIcon,
vpsReducer, vpsReducer,
makeVPSelectionState,
// protobuf helpers // protobuf helpers
readDictionary, readDictionary,
writeDictionary, writeDictionary,

View File

@ -28,7 +28,9 @@ export type Dictionary = {
entries: DictionaryEntry[]; 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 = { export type DictionaryEntry = {
// BASE REQUIRED INFO // BASE REQUIRED INFO
/** timestamp - used for word id */ /** 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 DictionaryEntryNumberField = "ts" | "i" | "l" | "separationAtP" | "separationAtF";
export type DictionaryEntryField = DictionaryEntryTextField | DictionaryEntryBooleanField | DictionaryEntryNumberField; export type DictionaryEntryField = DictionaryEntryTextField | DictionaryEntryBooleanField | DictionaryEntryNumberField;
// TODO: make
export type DictionaryEntryError = { export type DictionaryEntryError = {
errors: string[], errors: string[],
p: string, p: string,