-
Notifications
You must be signed in to change notification settings - Fork 509
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)" indicator #10996
Conversation
Links in other locales that point to the English locale often have a suffix "(en-US)", but this is rather technical and not ideal from a user experience point of view. This PR replaces the suffix by a localized suffix, added via CSS.
@cw118 @mfuji09 @t7yang @lex111 @wisedog @josielrocha @Jalkhov Can you please review the localized suffix in your language (by approving or suggesting a change), and let me know what you think about this change (by giving the PR a 👍 or 👎)? Thank you. 🙌 PS: On a related note, are you all in our Discord in the #localization channel? 👀 |
OK for |
@leon-win Is this because you're used to the |
I think because of my subjective habit. |
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.
This looks great, thanks very much @caugner! (Pinging @mdn/yari-content-fr for more opinions)
} | ||
|
||
html[lang="es"] a.only-in-en-us:after { | ||
content: "(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.
@Graywolf9 what do you think on this one? I'd like to say the following:
content: "(inglés)"; | |
content: "(Inglés)"; |
Do you agree? or do you think it is better without the uppercase?
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.
I already checked it, according this resource it shouldn't use uppercase for the first letter. so this is good!
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.
According to Chinese grammar (both zh-CN
and zh-TW
), we will use full-width brackets instead of half-width brackets (we have placed this as a note in zh-tw translation guide and zh-cn translation guide).
Another point I noticed is that the current font size of the Chinese note text does not seem to have enough contrast with the main content text's.
I've opened a discuession in discord, and @Josh-Cena pointed this problem. So I tried comparing three different CSS styles (aligned with baseline
, using <percentage>
font-size: 80%
, and with the current CSS style). The result is shown below:
It seems that the one with font-size: 80%
would be better than the default one (rightmost). @jasonren0403 has the same opinion as me.
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.
LGTM.
@mdn/yari-content-ko Please any suggestions if you have an idea.
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.
For the ES team looks good! @Graywolf9
Co-authored-by: A1lo <[email protected]>
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.
Very elegant code, love the use of the attribute selector. Approved from an engineering perspective 👍
@mfuji09 (cc @mdn/yari-content-ja) @josielrocha (cc @mdn/yari-content-pt-br) Can you please take a look if these changes look good to you in |
Co-authored-by: A1lo <[email protected]>
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.
Approving this from l10n-zh
team. Thank you @caugner
Heads-up @mdn/yari-content-ja and @mdn/yari-content-pt-br that this change will land tomorrow, so if you can review the changes before, that would be great. |
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.
The indicator for ja
looks good!
Sorry too late!
Summary
(MP-1091)
Problem
Solution
/en-US/
to catch all (?) occurrences.(Note: I will add the
hreflang
attribute in a subsequent PR.)Screenshots
How did you test this change?
Ran
yarn dev
locally and looked at http://localhost:3000/en-US/docs/Web/API in different locales.## Approvals