fix but with AP english not getting rendered
This commit is contained in:
parent
490776e75a
commit
acd7b7b504
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@lingdocs/pashto-inflector",
|
"name": "@lingdocs/pashto-inflector",
|
||||||
"version": "3.0.4",
|
"version": "3.0.5",
|
||||||
"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",
|
||||||
|
|
|
@ -8,6 +8,7 @@ import ModeSelect, { Mode, ScriptSelect } from "../DisplayModeSelect";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import CompiledPTextDisplay from "../CompiledPTextDisplay";
|
import CompiledPTextDisplay from "../CompiledPTextDisplay";
|
||||||
import RenderedBlocksDisplay from "../RenderedBlocksDisplay";
|
import RenderedBlocksDisplay from "../RenderedBlocksDisplay";
|
||||||
|
import useStickyState from "../../lib/useStickyState";
|
||||||
|
|
||||||
function VPDisplay({ VPS, opts, setForm, justify, onlyOne }: {
|
function VPDisplay({ VPS, opts, setForm, justify, onlyOne }: {
|
||||||
VPS: T.VPSelectionState,
|
VPS: T.VPSelectionState,
|
||||||
|
@ -17,7 +18,7 @@ function VPDisplay({ VPS, opts, setForm, justify, onlyOne }: {
|
||||||
onlyOne?: boolean,
|
onlyOne?: boolean,
|
||||||
}) {
|
}) {
|
||||||
const [mode, setMode] = useState<Mode>("text");
|
const [mode, setMode] = useState<Mode>("text");
|
||||||
const [script, setScript] = useState<"p" | "f">("f");
|
const [script, setScript] = useStickyState<"p" | "f">("f", "blockScriptChoice");
|
||||||
const VP = completeVPSelection(VPS);
|
const VP = completeVPSelection(VPS);
|
||||||
if (!VP) {
|
if (!VP) {
|
||||||
return <div className="lead text-muted text-center mt-4">
|
return <div className="lead text-muted text-center mt-4">
|
||||||
|
|
|
@ -8,15 +8,18 @@ export function renderSandwich(s: T.SandwichSelection<T.Sandwich>): T.Rendered<T
|
||||||
: (s.inside.selection.type === "noun" && isPattern5Entry(s.inside.selection.entry) && isAnimNounEntry(s.inside.selection.entry))
|
: (s.inside.selection.type === "noun" && isPattern5Entry(s.inside.selection.entry) && isAnimNounEntry(s.inside.selection.entry))
|
||||||
? false
|
? false
|
||||||
: true;
|
: true;
|
||||||
return {
|
const inside = renderNPSelection(
|
||||||
...s,
|
|
||||||
inside: renderNPSelection(
|
|
||||||
s.inside,
|
s.inside,
|
||||||
true,
|
true,
|
||||||
inflectInside,
|
inflectInside,
|
||||||
"subject",
|
"subject",
|
||||||
"none",
|
"none",
|
||||||
),
|
);
|
||||||
|
const e = `${s.e} ${inside.selection.e}`;
|
||||||
|
return {
|
||||||
|
...s,
|
||||||
|
e,
|
||||||
|
inside,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue