fixed translation on blocks
This commit is contained in:
parent
d4d8da58ce
commit
2719005a0f
|
@ -4,6 +4,7 @@ import {
|
||||||
renderAPSelection,
|
renderAPSelection,
|
||||||
NPBlock,
|
NPBlock,
|
||||||
APBlock,
|
APBlock,
|
||||||
|
getEnglishFromRendered,
|
||||||
} from "@lingdocs/pashto-inflector";
|
} from "@lingdocs/pashto-inflector";
|
||||||
|
|
||||||
function BlockDiagram({ opts, children }: {
|
function BlockDiagram({ opts, children }: {
|
||||||
|
@ -14,11 +15,12 @@ function BlockDiagram({ opts, children }: {
|
||||||
const rendered = children.type === "AP"
|
const rendered = children.type === "AP"
|
||||||
? renderAPSelection(children)
|
? renderAPSelection(children)
|
||||||
: renderNPSelection(children, false, false, "subject", "none");
|
: renderNPSelection(children, false, false, "subject", "none");
|
||||||
|
const english = getEnglishFromRendered(rendered);
|
||||||
return <div className="mb-3">
|
return <div className="mb-3">
|
||||||
<div className="d-flex flex-row justify-content-center text-center" style={{ maxWidth: "100%" }}>
|
<div className="d-flex flex-row justify-content-center text-center" style={{ maxWidth: "100%" }}>
|
||||||
{rendered.type === "NP"
|
{rendered.type === "NP"
|
||||||
? <NPBlock script="f" opts={opts} english={rendered.selection.e}>{rendered}</NPBlock>
|
? <NPBlock script="f" opts={opts} english={english}>{rendered}</NPBlock>
|
||||||
: <APBlock script="f" opts={opts} english={rendered.selection.e}>{rendered}</APBlock>}
|
: <APBlock script="f" opts={opts} english={english}>{rendered}</APBlock>}
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>;
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
|
Loading…
Reference in New Issue