wiki icon indicating copy to clipboard operation
wiki copied to clipboard

Fix sidebar root title by not overiding it when translation isn't yet available

Open peteruithoven opened this issue 2 years ago • 5 comments

Fixes: https://github.com/requarks/wiki/discussions/4888

Before: Screenshot before@2x After: Screenshot after@2x

I'm not sure why but the root parent's title is being overriden with a translatable title. But this happens in the mount handler when the translation isn't yet available, causing it to fallback to the text "sidebar.root".

peteruithoven avatar May 25 '22 12:05 peteruithoven

Your PR completely removes translation support. You should instead add a fallback value:

this.$t('common:sidebar.root', '/ (root)')

NGPixel avatar May 26 '22 03:05 NGPixel

I'll have another look at making the title adapt to translation updates, but I don't think what you're suggesting will much.
In the data the currentParent already gets that '/ (root)' as a default. It might add a fallback for when fetchBrowseItems is called before mounted, but I've seen that during the mount event the translation isn't retrieved yet.

peteruithoven avatar May 26 '22 08:05 peteruithoven

What do you think about this approach?

peteruithoven avatar May 26 '22 09:05 peteruithoven

Could you have another look?

peteruithoven avatar Aug 18 '22 08:08 peteruithoven

Looking for this as well :)

kimegede avatar Jul 13 '23 08:07 kimegede