You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
structure fails, because findField cannot resolve the lexical editorConfig.
I don't really feel comfortable suggesting a fix, as I don't completely understand what's going on. I am also not sure the dotNotation always works as expected. I have the following field in my doc:
In my case this results in blocks.65c822753102c86d651d3512.Accordion.items.65c8227d3102c86d651d3513.content. Now this does not contain the full hierarchy - I might have fields content1 and content2, that contain similar richText. findField would then not be able to differentiate between them, as the toplevel field name is not included in the notation and we do not check the ids in the document.
Then, getLocalizedFields does not contain the nested richText field, (and it does not contain information about hierarchy, that would have to match hierarchy information from the dotNotation). In my case, getLocalizedFields returns the toplevel content field (and also the toplevel title field that I have additionally...) and not the required nested fields.
The text was updated successfully, but these errors were encountered:
It was one of the trickier aspects of the plugin functionality. In case it's of interest, changes such as #161, #194 and #215 make a change where Lexical block fields are treated as a separate 'document' that looks like:
{
blocks: [
// blocks filtered from the Lexical field
]
}
A subfolder is created on Crowdin to contain translation files for blocks extracted from a Lexical field. To keep track of these translations, a new document is created in CrowdinArticleDirectories with a parent of CrowdinArticleDirectories document to keep track of its position in the hierarchy.
By using the above approach, a lot of plugin logic is reused.
The code is getting messy for sure but the tests are proving robust. Hopefully will have time to refactor and get the code back to making sense!
Currently, a
structure fails, because findField cannot resolve the lexical
editorConfig
.I don't really feel comfortable suggesting a fix, as I don't completely understand what's going on. I am also not sure the dotNotation always works as expected. I have the following field in my doc:
In my case this results in
blocks.65c822753102c86d651d3512.Accordion.items.65c8227d3102c86d651d3513.content
. Now this does not contain the full hierarchy - I might have fieldscontent1
andcontent2
, that contain similar richText.findField
would then not be able to differentiate between them, as the toplevel field name is not included in the notation and we do not check the ids in the document.Then,
getLocalizedFields
does not contain the nested richText field, (and it does not contain information about hierarchy, that would have to match hierarchy information from the dotNotation). In my case,getLocalizedFields
returns the toplevelcontent
field (and also the topleveltitle
field that I have additionally...) and not the required nested fields.The text was updated successfully, but these errors were encountered: