Page MenuHomePhabricator

Link adaptation does not happen when the language code involved has a different domain name
Closed, ResolvedPublic1 Estimated Story Points

Description

Example:

http://en.wikipedia.org/w/api.php?action=query&format=json&titles=Nepali_language&prop=langlinks&lllang=bh&redirects=true

Returns the corresponding link for the given title. But the following does not

http://en.wikipedia.org/w/api.php?action=query&format=json&titles=Nepali_language&prop=langlinks&lllang=bho&redirects=true

bh is the domain of wiki with content language bho

Same is true for following language names to domain name mappings

bho: 'bh', Bhojpuri. bho.wikipedia.org does not exist. bh.wikipeda.org exists.
'crh-latn': 'crh',
crh-latn.wikipedia.org does not exist. crh.wikipeda.org exists.
gsw: 'als',
sgs: 'bat-smg',
'be-tarask': 'be-x-old',
vro: 'fiu-vro',
rup: 'roa-rup',
lzh: 'zh-classical',
nan: 'zh-min-nan',
yue: 'zh-yue'

Event Timeline

santhosh raised the priority of this task from to High.
santhosh updated the task description. (Show Details)
santhosh subscribed.
santhosh renamed this task from Link adapation does not happen when the language code involved has a differen name to Link adapation does not happen when the language code involved has a differen domain name.May 21 2015, 11:16 AM
santhosh set Security to None.

A quick test showed me that this is not fixed. API parameter llang need to be specially constructed in these cases.

Change 217251 had a related patch set uploaded (by Santhosh):
Fix: Link adapation does not happen when language code and domain differs

https://gerrit.wikimedia.org/r/217251

Perhaps the proper fix is to fix sitematrix (T99059) and ask it for domains, or something like that. Hardcoding current domains in more places adds technical debt and will make T21986 harder to fix.

Amire80 renamed this task from Link adapation does not happen when the language code involved has a differen domain name to Link adaptation does not happen when the language code involved has a different domain name.Jun 17 2015, 3:55 PM

Change 217251 merged by jenkins-bot:
Fixes when language code and domain differ

https://gerrit.wikimedia.org/r/217251

Amire80 removed a project: Patch-For-Review.
Amire80 moved this task from Needs Triage to CX5 on the ContentTranslation board.