Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser recognising parts of a word #220

Open
instruccionesaldorso opened this issue Jul 2, 2024 · 1 comment
Open

Parser recognising parts of a word #220

instruccionesaldorso opened this issue Jul 2, 2024 · 1 comment

Comments

@instruccionesaldorso
Copy link

First of all, thank you for the great extension! :)
We upgraded one project to TYPO3 11.5 and replaced a custom glossary extension we had and started using your extension (latest version 5.3.0) as a replacement.
We just wanna use your extension just to show tooltips whenever a term appears in a page.
Instead of using the "tooltiptext" field for each term, we decided to use the "descriptions" inline field for the replacement, as "descriptions.text" is a RTE field and we wanted that flexibility ("tooltiptext" is just an input field).

We got the next problem our previous extension did: showing tooltips for "parts of a term, not the full term".

Example: we got the term "Profildichtung" defined in a term record in the backend and text in a frontend page is "die Lösung zur Fixierung von Profildichtungen ..." (notice german plural).

We would like the part of "Profildichtungen" word that contains a term ("Profildichtung") would show a tooltip.

Is this possible with your extension or we would need to define "Profildichtungen" as another term?

I couldn't find any TypoScript constant in the Reference guide that would allow that.

@featdd
Copy link
Owner

featdd commented Jul 7, 2024

Hi @instruccionesaldorso,

you can use the description, but you have to set parserRepositoryClass to Featdd\DpnGlossary\Domain\Repository\TermRepository.
Then you can use the descriptions in TypoScript like title="{field:descriptions.0.meaning}".

The other problem is a bit tricky, because normally you don't want to match a term inside a word (word boundary), because especially in german the word can have a different meaning due to the language ability of combining words, and the parser is not so intelligent to recognise the simple plural.
A workaround could be to use the synonyms, but I see it would be annoying to edits every terms plural for this case.

I think we need an option for this, per term and globally to ignore the word boundary at own risk.
If you give me some time to test and implement this I can probably make this.

I hope I could at least support you with the first problem for now.

Greetings
Daniel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants