Page MenuHomePhabricator

Link adaptation does not happen when the language code involved has a different domain name
Closed, ResolvedPublic1 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 added a subscriber: santhosh.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 21 2015, 11:15 AM
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.

I believe https://gerrit.wikimedia.org/r/#/c/212250/ fixed this. We can verify this and close

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

santhosh edited a custom field.Jun 10 2015, 6:27 AM

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

santhosh moved this task from Backlog to In Review on the LE-Sprint-88 board.Jun 10 2015, 11:22 AM

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

santhosh moved this task from In Review to Done on the LE-Sprint-88 board.Jun 23 2015, 5:51 AM
Amire80 closed this task as Resolved.Jun 23 2015, 8:14 AM
Amire80 removed a project: Patch-For-Review.
Amire80 moved this task from Needs Triage to CX5 on the ContentTranslation board.