andrewhancox / moodle-filter_translations

7 stars 8 forks source link

Filter tabs doesn't work with all languages #162

Closed davefoord closed 1 year ago

davefoord commented 1 year ago

The filter tabs plugin https://moodle.org/plugins/filter_tabs works by converting code within text into a tabbed display, e.g. to create a tab that it titled 'Bacteria' you would enter:

{%:Bacteria}

If I display the above in Spanish this works fine - it translated the word Bacteria into Spanish and creates a tab with the correct text. However if I change to French, this doesn't work - as it for some reason adds a nonbreaking space between the % and the : which stops the filter from working.

Any idea why French (and some of the other languages) would add this non desired space into the translation, and Spanish doesn't? And could this be fixed?

andrewhancox commented 1 year ago

A couple of things worth checking: Is the translation filter the final one to get applied Does this always happen, or just when translation editing is enabled

davefoord commented 1 year ago

Ah - well deduced - the order of the filters is significant. By moving the Tabs filter above the language filter it has worked as expected, and quite beautifully to be honest.

Thanks

andrewhancox commented 1 year ago

Fantastic! Glad you like the plugin.