Page MenuHomePhabricator

[Bug] The feed/featured endpoint does not handle language variant correctly in zhwiki
Closed, ResolvedPublicBUG REPORT

Description

Steps to Reproduce:
Set Accept-Languages: zh-hant for the /feed/featured
https://zh.wikipedia.org/api/rest_v1/feed/featured/2020/09/27

Actual Results:
The titles, displaytitle, description, extract and extract_html are showing the original zh content, which have the mixed language variants content.

This happens in tfa and mostread

Expected Results:
The titles, displaytitle, description, extract and extract_html should show the contents in the correct language variant.

For example,
https://zh.wikipedia.org/api/rest_v1/page/summary/第55屆金鐘獎

zh-hant:

  • displaytitle: 第55屆金鐘獎
  • extract: 第55屆金鐘獎 是2020年臺灣傳媒業界的年度盛事之一,以表揚2020年度傑出的臺灣廣播與電視從業人員,延續過往模式分為廣播、電視金鐘獎,並均於臺北市國父紀念館舉行。廣播金鐘獎頒獎典禮於2020年(民國109年)9月19日舉行,由吳瑪麗、陳子見擔任典禮主持人;電視金鐘獎頒獎典禮於2020年(民國109年)9月26日舉行,由白家綺、Gino、曾莞婷、陳冠霖/黃路梓茵、盧廣仲/曾國城、炎亞綸三個組合分段擔任典禮主持人,黃豪平、李霈瑜擔任星光大道主持人。,

zh-hans:

  • displaytitle: 第55届金钟奖
  • extract: 第55届金钟奖 是2020年台湾传媒业界的年度盛事之一,以表扬2020年度杰出的台湾广播与电视从业人员,延续过往模式分为广播、电视金钟奖,并均于台北市国父纪念馆举行。广播金钟奖颁奖典礼于2020年(民国109年)9月19日举行,由吴玛丽、陈子见担任典礼主持人;电视金钟奖颁奖典礼于2020年(民国109年)9月26日举行,由白家绮、Gino、曾莞婷、陈冠霖/黄路梓茵、卢广仲/曾国城、炎亚纶三个组合分段担任典礼主持人,黄豪平、李霈瑜担任星光大道主持人。

Event Timeline

cooltey triaged this task as High priority.Sep 28 2020, 7:02 PM
cooltey updated the task description. (Show Details)

@Pchelolo This is probably a regression following from T263133: Move feed assembly from RESTBase to Wikifeeds. It looks like the Wikifeeds service itself is handling Accept-Language headers as expected; I see different results for http://localhost:8889/zh.wikipedia.org/v1/page/featured/2020/09/27 when sending Accept-Language: zh-hant vs. zh-hans (compare (1,807,796英畝) vs. (1,807,796英亩) in the extract, for example.)

Perhaps RESTBase isn't passing through the header?

Hell yes it's not! My bad. I will update https://github.com/wikimedia/restbase/pull/1279 to make sure this is also covered.

Mentioned in SAL (#wikimedia-operations) [2020-10-05T14:36:07Z] <ppchelko@deploy1001> Finished deploy [restbase/deploy@366a543]: T263133 T264035 (duration: 22m 23s)