${context.l10n`Blog it better`}
++ ${context.l10n("blog-index-blog-it-better")`Blog it better`} +
${context.l10n`Want to be part of the journey?`}
++ ${context.l10n( + "contributor-spotlight-want-to-be-part-of-the-journey", + )`Want to be part of the journey?`} +
- ${context.l10n`Our constant quest for innovation starts here, with you. Every part of MDN (docs, demos and the site itself) springs from our incredible open community of developers. Please join us!`} + ${context.l10n( + "contributor-spotlight-our-constant-quest-for-innovatio", + )`Our constant quest for innovation starts here, with you. Every part of MDN (docs, demos and the site itself) springs from our incredible open community of developers. Please join us!`}
${Button.render(context, { - label: context.l10n`Get involved`, + label: context.l10n( + "contributor-spotlight-get-involved", + )`Get involved`, href: `/${context.locale}/community/`, icon: arrowRightIcon, iconPosition: "after", @@ -51,7 +59,11 @@ export class ContributorSpotlight extends ServerComponent { `; const header = html` -${context.l10n`Contributor profile`}
++ ${context.l10n( + "contributor-spotlight-contributor-profile", + )`Contributor profile`} +
`; const baseUrl = context.url; diff --git a/components/copy-button/element.js b/components/copy-button/element.js index d70b36d66..9eee5a9cc 100644 --- a/components/copy-button/element.js +++ b/components/copy-button/element.js @@ -39,8 +39,8 @@ export class MDNCopyButton extends L10nMixin(LitElement) { } this._message = this._copiedSuccessfully - ? this.l10n`Copied` - : this.l10n`Copy failed!`; + ? this.l10n("copy-button-copied")`Copied` + : this.l10n("copy-button-copy-failed")`Copy failed!`; setTimeout( () => { @@ -57,7 +57,7 @@ export class MDNCopyButton extends L10nMixin(LitElement) { @click=${this._copy} .icon=${this._copiedSuccessfully ? check : undefined} variant=${this.variant} - >${this._message ?? this.l10n`Copy`}${this._message ?? this.l10n("copy-button-copy")`Copy`}`; } } diff --git a/components/footer/server.js b/components/footer/server.js index b88fb866a..99abdc279 100644 --- a/components/footer/server.js +++ b/components/footer/server.js @@ -13,27 +13,27 @@ const socials = (context) => [ { icon: "github", href: "https://github.com/mdn/", - ariaLabel: context.l10n`MDN on GitHub`, + ariaLabel: context.l10n("footer-mdn-on-github")`MDN on GitHub`, }, { icon: "bluesky", href: "https://bsky.app/profile/developer.mozilla.org", - ariaLabel: context.l10n`MDN on Bluesky`, + ariaLabel: context.l10n("footer-mdn-on-bluesky")`MDN on Bluesky`, }, { icon: "x", href: "https://x.com/mozdevnet", - ariaLabel: context.l10n`MDN on X`, + ariaLabel: context.l10n("footer-mdn-on-x")`MDN on X`, }, { icon: "mastodon", href: "https://mastodon.social/@mdn", - ariaLabel: context.l10n`MDN on Mastodon`, + ariaLabel: context.l10n("footer-mdn-on-mastodon")`MDN on Mastodon`, }, { icon: "rss", href: "/en-US/blog/rss.xml", - ariaLabel: context.l10n`MDN blog RSS feed`, + ariaLabel: context.l10n("footer-mdn-blog-rss-feed")`MDN blog RSS feed`, }, ]; @@ -43,75 +43,81 @@ const socials = (context) => [ */ const links = (context) => [ { - title: context.l10n`MDN`, + title: context.l10n("footer-mdn")`MDN`, links: [ - { text: context.l10n`About`, href: "/en-US/about" }, - { text: context.l10n`Blog`, href: "/en-US/blog/" }, + { text: context.l10n("footer-about")`About`, href: "/en-US/about" }, + { text: context.l10n("footer-blog")`Blog`, href: "/en-US/blog/" }, { - text: context.l10n`Mozilla careers`, + text: context.l10n("footer-mozilla-careers")`Mozilla careers`, href: "https://www.mozilla.org/en-US/careers/listings/", external: true, }, { - text: context.l10n`Advertise with us`, + text: context.l10n("footer-advertise-with-us")`Advertise with us`, href: "/en-US/advertising", }, - { text: context.l10n`MDN Plus`, href: "/en-US/plus" }, + { text: context.l10n("footer-mdn-plus")`MDN Plus`, href: "/en-US/plus" }, { - text: context.l10n`Product help`, + text: context.l10n("footer-product-help")`Product help`, href: "https://support.mozilla.org/products/mdn-plus", external: true, }, ], }, { - title: context.l10n`Contribute`, + title: context.l10n("footer-contribute")`Contribute`, links: [ { - text: context.l10n`MDN Community`, + text: context.l10n("footer-mdn-community")`MDN Community`, href: "/en-US/community", }, { - text: context.l10n`Community resources`, + text: context.l10n("footer-community-resources")`Community resources`, href: "/en-US/docs/MDN/Community", }, { - text: context.l10n`Writing guidelines`, + text: context.l10n("footer-writing-guidelines")`Writing guidelines`, href: "/en-US/docs/MDN/Writing_guidelines", }, - { text: context.l10n`MDN Discord`, href: "/discord", external: true }, { - text: context.l10n`MDN on GitHub`, + text: context.l10n("footer-mdn-discord")`MDN Discord`, + href: "/discord", + external: true, + }, + { + text: context.l10n("footer-mdn-on-github")`MDN on GitHub`, href: "https://github.com/mdn", external: true, }, ], }, { - title: context.l10n`Developers`, + title: context.l10n("footer-developers")`Developers`, links: [ { - text: context.l10n`Web technologies`, + text: context.l10n("footer-web-technologies")`Web technologies`, href: "/en-US/docs/Web", }, { - text: context.l10n`Learn web development`, + text: context.l10n( + "footer-learn-web-development", + )`Learn web development`, href: "/en-US/docs/Learn_web_development", }, { - text: context.l10n`Guides`, + text: context.l10n("footer-guides")`Guides`, href: "/en-US/docs/MDN/Guides", }, { - text: context.l10n`Tutorials`, + text: context.l10n("footer-tutorials")`Tutorials`, href: "/en-US/docs/MDN/Tutorials", }, { - text: context.l10n`Glossary`, + text: context.l10n("footer-glossary")`Glossary`, href: "/en-US/docs/Glossary", }, { - text: context.l10n`Hacks blog`, + text: context.l10n("footer-hacks-blog")`Hacks blog`, href: "https://hacks.mozilla.org/", external: true, }, @@ -124,22 +130,24 @@ const links = (context) => [ */ const mozillaLinks = (context) => [ { - text: context.l10n`Website Privacy Notice`, + text: context.l10n("footer-website-privacy-notice")`Website Privacy Notice`, href: "https://www.mozilla.org/privacy/websites/", external: true, }, { - text: context.l10n`Telemetry Settings`, + text: context.l10n("footer-telemetry-settings")`Telemetry Settings`, href: "https://www.mozilla.org/en-US/privacy/websites/data-preferences/", external: true, }, { - text: context.l10n`Legal`, + text: context.l10n("footer-legal")`Legal`, href: "https://www.mozilla.org/about/legal/terms/mozilla", external: true, }, { - text: context.l10n`Community Participation Guidelines`, + text: context.l10n( + "footer-community-participation-guidelin", + )`Community Participation Guidelines`, href: "https://www.mozilla.org/about/governance/policies/participation/", external: true, }, @@ -158,7 +166,7 @@ export class Footer extends ServerComponent { ${mdnLogo}@@ -215,7 +223,7 @@ export class Footer extends ServerComponent { ${mozillaLogo}
-
diff --git a/components/homepage-body/server.js b/components/homepage-body/server.js
index dd6b2899b..07c52951c 100644
--- a/components/homepage-body/server.js
+++ b/components/homepage-body/server.js
@@ -18,15 +18,21 @@ export class HomepageBody extends ServerComponent {
? html`
${context.l10n`Featured articles`}
++ ${context.l10n("homepage-body-featured-articles")`Featured articles`} +
${FeaturedArticles.render(context.hyData.featuredArticles)}${context.l10n`Latest news`}
+${context.l10n("homepage-body-latest-news")`Latest news`}
${LatestNews.render(context.hyData.latestNews.items, context.locale)}${context.l10n`Recent contributions`}
++ ${context.l10n( + "homepage-body-recent-contributions", + )`Recent contributions`} +
${RecentContributions.render( context.hyData.recentContributions.items, context.locale, diff --git a/components/homepage-contributor-spotlight/server.js b/components/homepage-contributor-spotlight/server.js index 05f9c117c..36f5aac3d 100644 --- a/components/homepage-contributor-spotlight/server.js +++ b/components/homepage-contributor-spotlight/server.js @@ -20,7 +20,11 @@ export class HomepageContributorSpotlight extends ServerComponent { return html`${context.l10n`Contributor Spotlight`}
++ ${context.l10n( + "homepage-contributor-spotlight-contributor-spotlight", + )`Contributor Spotlight`} +
${contributor.contributorName} @@ -29,7 +33,9 @@ export class HomepageContributorSpotlight extends ServerComponent { ${Button({ - label: context.l10n`Get involved`, + label: context.l10n( + "homepage-contributor-spotlight-get-involved", + )`Get involved`, href: `/${context.locale}/community`, icon: arrowRightIcon, iconPosition: "after", diff --git a/components/homepage-search/element.js b/components/homepage-search/element.js index e64e16df8..0c313725a 100644 --- a/components/homepage-search/element.js +++ b/components/homepage-search/element.js @@ -20,11 +20,11 @@ export class MDNHomepageSearch extends L10nMixin(LitElement) { render() { return html``; } } diff --git a/components/interactive-example/with-choices.js b/components/interactive-example/with-choices.js index 50bc6d472..51ff10b56 100644 --- a/components/interactive-example/with-choices.js +++ b/components/interactive-example/with-choices.js @@ -122,7 +122,7 @@ export const InteractiveExampleWithChoices = (Base) => @click=${this._reset} variant="secondary" .disabled=${!this.__choiceUpdated} - >${this.l10n`Reset`}${this.l10n("interactive-example-reset")`Reset`}-
@click=${this.#choiceFocus}
@focus=${this.#choiceSelect}
@update=${this.#choiceUpdate}
- aria-label=${this.l10n`Value select`}
+ aria-label=${this.l10n(
+ "interactive-example-value-select",
+ )`Value select`}
>
${this._choices?.map(
(code, index) => html`
@@ -149,8 +151,9 @@ export const InteractiveExampleWithChoices = (Base) =>
.value=${code?.trim()}
aria-label=${ifDefined(
this.__choiceUnsupported[index]
- ? this
- .l10n`The current value is not supported by your browser.`
+ ? this.l10n(
+ "interactive-example-the-current-value-is-not-support",
+ )`The current value is not supported by your browser.`
: undefined,
)}
>
diff --git a/components/interactive-example/with-console.js b/components/interactive-example/with-console.js
index c22a7d032..9e658fa4e 100644
--- a/components/interactive-example/with-console.js
+++ b/components/interactive-example/with-console.js
@@ -54,20 +54,26 @@ export const InteractiveExampleWithConsole = (Base) =>
id="execute"
@click=${this._run}
variant="secondary"
- title=${this.l10n`Run example, and show console output`}
- >${this.l10n`Run`}${this.l10n("interactive-example-run")`Run`}
${decode(this.name)}
${this.l10n`Output`}
+${this.l10n("interactive-example-output")`Output`}
-
diff --git a/components/login-button/element.js b/components/login-button/element.js
index c292d5fcf..7641c9c49 100644
--- a/components/login-button/element.js
+++ b/components/login-button/element.js
@@ -17,7 +17,7 @@ export class MDNLoginButton extends L10nMixin(LitElement) {
render() {
return html`