mdn / yari

The platform code behind MDN Web Docs
Mozilla Public License 2.0
1.18k stars 501 forks source link

The BCD section id is not localized in Baseline Indicator #9848

Open yin1999 opened 11 months ago

yin1999 commented 11 months ago

Summary

The BCD section id should be localized when this is in a l10n document.

Maybe we should also consider localizing all the content of Baseline Indicator.

URL

https://developer.mozilla.org/zh-CN/docs/Web/CSS/grid

Reproduction steps

  1. open the above document
  2. check the "See full compatibility" link

Expected behavior

The link to BCD section should be localized.

Actual behavior

The link to BCD section is not localized.

Device

Desktop

Browser

Chrome

Browser version

Stable

Operating system

Android

Screenshot

image

Anything else?

No response

Validations

yin1999 commented 11 months ago

Collected localized section ids (not really sure about the ru locale):

const localizedBcdSectionId = {
  "en-US": "browser_compatibility",
  es: "compatibilidad_con_navegadores",
  fr: "compatibilité_des_navigateurs",
  ja: "ブラウザーの互換性",
  ko: "브라우저_호환성",
  "pt-BR": "compatibilidade_de_navegadores",
  ru: "cовместимость_с_браузерами",
  "zh-CN": "浏览器兼容性",
  "zh-TW": "瀏覽器相容性",
};
LeoMcA commented 9 months ago

Partially fixed with https://github.com/mdn/yari/commit/0761a86627c713c15fea4b3df19f2ca61c2c46e4 (should deploy to prod tonight) Unfortunately BCD section IDs aren't consistent within locales - so either that will need to be fixed, or an alternative approach taken for a total fix here.

yin1999 commented 9 months ago

Thanks @LeoMcA.

/cc @mdn/yari-content-pt-br Is there anyone who could check this. The description here shows that the translation of "Browser compatibility" is inconsistent.

We have both "Compatibilidade com navegadores" and "Compatibilidade de navegadores" in translated content.

yin1999 commented 5 months ago

Hey @LeoMcA. Not sure if we should transfer this issue to mdn/translated-content. I think the rest of the work only needs to be done there :)