Last modified: 2014-02-12 23:45:39 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T40101, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38101 - Support switching content language variants
Support switching content language variants
Status: RESOLVED FIXED
Product: MobileFrontend
Classification: Unclassified
Feature requests (Other open bugs)
unspecified
All All
: Unprioritized enhancement
: ---
Assigned To: Juliusz Gonera
:
: 41875 (view as bug list)
Depends on:
Blocks: 32906
  Show dependency treegraph
 
Reported: 2012-07-01 13:44 UTC by Derk-Jan Hartman
Modified: 2014-02-12 23:45 UTC (History)
11 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
screenshot (26.41 KB, image/png)
2012-10-14 14:42 UTC, Derk-Jan Hartman
Details

Description Derk-Jan Hartman 2012-07-01 13:44:49 UTC
MobileFrontend needs to support variants of the content in a way to support the mobile web and app interfaces to switch content variants.

(Nice feature for the new Content menu perhaps ?)
Comment 1 Derk-Jan Hartman 2012-07-01 13:49:20 UTC
See also brion's comments: https://bugzilla.wikimedia.org/show_bug.cgi?id=32906#c10
Comment 2 Brion Vibber 2012-10-10 21:03:09 UTC
Duping to bug 21806.

*** This bug has been marked as a duplicate of bug 21806 ***
Comment 3 Derk-Jan Hartman 2012-10-11 07:45:41 UTC
@Brion, this ticket was about content language variants, bug 21806 is about interface language variants.
Comment 4 Jon 2012-10-11 14:16:45 UTC
You can switch the language of the content... am I misunderstanding?
Comment 5 Jon 2012-10-11 23:40:20 UTC
In non-beta you click the W
In beta go to the blue ribbon poking from the right and expand it to choose a language
Comment 6 Daniel Friesen 2012-10-12 03:09:30 UTC
(In reply to comment #4)
> You can switch the language of the content... am I misunderstanding?

That's language_urls a list of interlanguage links to other wikis.

Some languages such as zh have variants. These are kind of like sub-languages on the same wiki. Usually the same text in another script or something. This works by running a language converter over the page content.

You can see the variant menu by going to https://zh.wikipedia.org/ and looking at the menu beside the two namespace tabs.

This is missing from the mobile site. So it's not fixed.
Comment 7 Derk-Jan Hartman 2012-10-14 14:42:20 UTC
Created attachment 11193 [details]
screenshot

Since it seems rather common that people forget what variants are, I'll add a screenshot, will save some discussion hopefully.
Comment 8 Juliusz Gonera 2012-12-05 19:30:53 UTC
*** Bug 41875 has been marked as a duplicate of this bug. ***
Comment 9 Derk-Jan Hartman 2013-04-20 17:21:33 UTC
Confirmed fixed, though I note that it doesn't skip over some of the aliases/disabled versions of variants:

See also SkinTemplate.php which is responsible for this in skins.


                                        // Loops over each variant
                                        foreach( $variants as $code ) {
                                                // Gets variant name from language code
                                                $varname = $pageLang->getVariantname( $code );
                                                // Checks if the variant is marked as disabled
                                                if( $varname == 'disable' ) {
                                                        // Skips this variant
                                                        continue;
                                                }
                                                // Appends variant link
                                                $content_navigation['variants'][] = array(
                                                        'class' => ( $code == $preferred ) ? 'selected' : false,
                                                        'text' => $varname,
                                                        'href' => $title->getLocalURL( array( 'variant' => $code ) + $params ),
                                                        'lang' => $code,
                                                        'hreflang' => $code
                                                );
                                        }

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links