-
Notifications
You must be signed in to change notification settings - Fork 522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enhance(l10n): localize en-US link title #11011
Conversation
libs/l10n/l10n.ts
Outdated
|
||
export const ONLY_AVAILABLE_IN_ENGLISH = localString({ | ||
"en-US": "This page is currently only available in English.", | ||
es: "Esta página está disponible solo en inglés.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdn/yari-content-es Can you please check this translation? 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me 👍 cc @Graywolf9
libs/l10n/l10n.ts
Outdated
export const ONLY_AVAILABLE_IN_ENGLISH = localString({ | ||
"en-US": "This page is currently only available in English.", | ||
es: "Esta página está disponible solo en inglés.", | ||
fr: "Cette page est actuellement disponible uniquement en anglais.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdn/yari-content-fr Can you please check this translation? 🙏
"en-US": "This page is currently only available in English.", | ||
es: "Esta página está disponible solo en inglés.", | ||
fr: "Cette page est actuellement disponible uniquement en anglais.", | ||
ja: "このページは現在、英語のみで利用可能です。", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdn/yari-content-ja Can you please check this translation? 🙏
libs/l10n/l10n.ts
Outdated
fr: "Cette page est actuellement disponible uniquement en anglais.", | ||
ja: "このページは現在、英語のみで利用可能です。", | ||
ko: "이 페이지는 현재 영어로만 제공됩니다.", | ||
"pt-BR": "Esta página está disponível apenas em inglês no momento.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdn/yari-content-pt-br Can you please check this translation? 🙏
Co-authored-by: Leonid Vinogradov <win.leon@protonmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As for ES team this looks good! thanks for updating it 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly typescript changes, one query about escaping characters:
libs/l10n/l10n.ts
Outdated
type Locale = | ||
| "en-US" | ||
| "es" | ||
| "fr" | ||
| "ja" | ||
| "ko" | ||
| "pt-BR" | ||
| "ru" | ||
| "zh-CN" | ||
| "zh-TW"; | ||
type TranslatedLocale = Exclude<Locale, "en-US">; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I imagine these will be useful to use elsewhere, perhaps we export them already to save the code change later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 8f33cc6.
kumascript/src/api/web.ts
Outdated
@@ -5,10 +5,13 @@ import * as util from "./util.js"; | |||
|
|||
import { CONTENT_ROOT } from "../../../libs/env/index.js"; | |||
import { KumaThis } from "../environment.js"; | |||
import { DEFAULT_LOCALE } from "../../../libs/constants/index.js"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { DEFAULT_LOCALE } from "../../../libs/constants/index.js"; |
This pull request has merge conflicts that must be resolved before it can be merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Self-approval to land the change (Leo's review comments have been addressed).
Summary
Problem
Links in other locales that point to the English locale have a title saying "Currently only available in English (US)", but this is not translated in the locales, and so it cannot be understood by users who don't understand English.
Solution
Translate the title in all locales.
Screenshots
Before
After
How did you test this change?
Ran
yarn dev
and checked http://localhost:3000/es/docs/Web/API#a locally.Approvals