Skip to content

Commit

Permalink
Translate blog feed and sponsor banner
Browse files Browse the repository at this point in the history
  • Loading branch information
sukso96100 committed Nov 28, 2024
1 parent 5d8b905 commit bb65ca7
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
7 changes: 6 additions & 1 deletion messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
"travelBanner_listitem4": "Venue & Safety information",
"travelBanner_listitem5": "Exploring the city",
"travelBanner_button1": "Plan trip with other attendees",
"travelBanner_button2": "Contact travel support team for help"
"travelBanner_button2": "Contact travel support team for help",
"blogBanner_title": "Latest from our blog",
"blogBanner_learnMore": "Learn more",
"our_sponsors": "Our Sponsors",
"sponsor_about": "About the sponsor",
"visit_website": "Visit website"

}
7 changes: 6 additions & 1 deletion messages/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
"travelBanner_listitem4": "Venue & Safety information",
"travelBanner_listitem5": "Exploring the city",
"travelBanner_button1": "Plan trip with other attendees",
"travelBanner_button2": "Contact travel support team for help"
"travelBanner_button2": "Contact travel support team for help",
"blogBanner_title": "Latest from our blog",
"blogBanner_learnMore": "Learn more",
"our_sponsors": "Our Sponsors",
"sponsor_about": "About the sponsor",
"visit_website": "Visit website"

}
5 changes: 3 additions & 2 deletions src/components/BlogFeed.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
import { WebsiteConfig } from "../config";
import * as m from "../paraglide/messages.js";
import jsdom from "jsdom";
const { JSDOM } = jsdom;
const window = new JSDOM().window;
Expand All @@ -25,7 +26,7 @@ blogItemsXml.forEach((el: Element) => {
<div class="col">
<a href={WebsiteConfig.blog.viewMoreUrl}>
<p class="p-muted-heading">
Latest from our blog
{m.blogBanner_title()}
</p>
</a>
</div>
Expand All @@ -50,7 +51,7 @@ blogItemsXml.forEach((el: Element) => {

<a href={item.link}>
<p>
Learn more
{m.blogBanner_learnMore()}
</p>
</a>
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/components/SponsorLogoAndModal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import { useState } from "react";

import * as m from "../paraglide/messages.js";
type SponsorLogoAndModalProps = {
name: string,
level: string,
Expand All @@ -22,7 +22,7 @@ export default function SponsorLogoAndModal(props: SponsorLogoAndModalProps) {
<div className="p-modal" id="modal" style={{display: modalOpen && props.showPopup ? "flex" : "none"}}>
<section className="p-modal__dialog" role="dialog" aria-modal="true" aria-labelledby="modal-title" aria-describedby="modal-description">
<header className="p-modal__header">
<h2 className="p-modal__title" id="modal-title">About the sponsor</h2>
<h2 className="p-modal__title" id="modal-title">{m.sponsor_about()}</h2>
<button className="p-modal__close" aria-label="Close active modal" aria-controls="modal" onClick={closeHandler}>Close</button>
</header>
<img src={props.logoImageSrc} alt={props.name} />
Expand All @@ -32,7 +32,7 @@ export default function SponsorLogoAndModal(props: SponsorLogoAndModalProps) {
{props.description}
</p>
<footer className="p-modal__footer">
<a href={props.url}><button className="p-button--positive u-no-margin--bottom">Visit website</button></a>
<a href={props.url}><button className="p-button--positive u-no-margin--bottom">{m.visit_website()}</button></a>
</footer>
</section>
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/components/Sponsors.astro
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
import { sponsors } from "@data/sponsors";
import * as m from "../paraglide/messages.js";
import SponsorLogoAndModal from "@components/SponsorLogoAndModal.tsx";
---

<div class="p-section">
<div class="row"><h2>Our Sponsors</h2></div>
<div class="row"><h2>{m.our_sponsors()}</h2></div>
{
sponsors.map((level) => (
<div class="p-section">
Expand Down

0 comments on commit bb65ca7

Please sign in to comment.