andrewhancox / moodle-filter_translations

7 stars 8 forks source link

"Missing on this page" count is incorrect #185

Open rjnl opened 4 months ago

rjnl commented 4 months ago

When you turn on inline translation, a count of missing translations on this page is shown. But this count also includes content that are not really displayed on the screen. Some content such names of courses or activities from the frontpage are also included in this count. This count is confusing for users, as they cannot find or translate all these missing translations.

For example, in the screenshot below, the "missing on this page" count is 10. But the user can only add or edit translations for 4 pieces of content only.

image

andrewhancox commented 4 months ago

Any content that's get generated to render the page gets counted, even if it's hidden by CSS, rendered but not output etc. The other approach would be to count on the front end by counting elements with the translation tags but that is likely to be less accurate. There's no good option here... I felt I choose the least bad for most use cases...

rjnl commented 4 months ago

Since this count is not accurate, is it worth showing the count then?

andrewhancox commented 4 months ago

I would say it is accurate... it's just quite complicated/ambiguous.