splitbrain / dokuwiki-plugin-translation

Easily setup a multi-language DokuWiki
http://www.dokuwiki.org/plugin:translation
23 stars 24 forks source link

[Feature request] Hide translation links without translations #70

Closed raspopov closed 1 year ago

raspopov commented 9 years ago

Please add a new option to hide a translations links of languages which are absent.

i.e. change in function showTranslations (helper.php):

        // insert items
        foreach($this->translations as $t) {
                $out .= $this->getTransItem($t, $idpart);
        }

to something like:

        // insert items
        foreach($this->translations as $t) {
            list($link, $name) = $this->buildTransID($t, $idpart);
            if(page_exists($link)) {
                $out .= $this->getTransItem($t, $idpart);
            }
        }
splitbrain commented 9 years ago

What's the rationale behind that? Why would you want this?

raspopov commented 9 years ago

To eliminate broken links to 404-pages when translation is not available. My private dokuwiki uses this.

vaniwiki commented 8 years ago

+1 as an option. Some reasons:

CvH commented 7 years ago

I ran into the same problem, usability wise it is ugly that you can't see in some way if the current page is available in different languages or not. If you have a 100% translation this isn't a problem because you can expect that there is a translated page. If you have only 20% translated it is not useful to use the translate plugin at all - besides direct links to that translation it didn't have much advantage and creates a lot frustration at user side. Its basically the same as if wikipedia would show every language they support regardless if there is a page - pure mess.

What looks like an solution to me is to show only the available languages at the language chooser or to gray the missing one out. If you don't show the missing languages you need to provide a link to add the missing languages (maybe bottom of the list?) - if you gray them out you can retain them clickable.

splitbrain commented 1 year ago

Dropdowns have been redesigned with 6605eed0b71c3a4cad3020b84ec65e9c5f03578a it should be clearer which translations exist in any browser now.