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