HomePhabricator

Source Selector: Set default languages

Authored by Jsahleen.

Description

Source Selector: Set default languages

  • Adds method to set default languages when rendering source selector
    • Uses localStorage target language if it exists
    • Defaults target language to wiki content language
    • Uses localStorage source language if exists and valid for target language
    • Defaults source language to first valid source language for target language
  • Adds convenience methods for setting source and target languages
  • Adds method for retrieving valid source and target languages
  • Adds method for validating source language against target language
  • Modifies method for validating target language against source langauge
  • Updates change handlers for source language and target language

This patch also solves the issue in T76700.

Bug: T76832
Change-Id: I9c57c9d6a8dfc7bfa8f36336ef513af3a9254254

Details

Committed
Amire80Dec 14 2014, 3:35 PM
Parents
rECTXdc7a3c57f6d4: Localisation updates from https://translatewiki.net.
Branches
Unknown
Tags
Unknown
ChangeId
I9c57c9d6a8dfc7bfa8f36336ef513af3a9254254