Skip to content

Commit 001d471

Browse files
authored
Merge pull request #2672 from tequdev/ja-blog
[JA] translate blog top page
2 parents eb1d439 + 46e9239 commit 001d471

File tree

3 files changed

+38
-17
lines changed

3 files changed

+38
-17
lines changed

@i18n/ja/translations.yaml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ sidebar.resources.xrpl-learning-portal: XRPL学習ポータル
3737
sidebar.resources.xrpl-brand-kit: XRPLブランドキット
3838
sidebar.resources.ledger-explorer: エクスプローラ
3939
sidebar.resources.contribute-documentation.contributor-code-of-conduct: 行動規範
40+
sidebar.blog: ブログ
4041

4142
topnav.about.xrp-ledger: XRP Ledger
4243
topnav.about.xrpl-overview: XRPLの概要
@@ -770,6 +771,24 @@ Trust for: トラストラインの設定
770771
"Testnet XRP Available:": 利用可能なTestnet XRP
771772
Transaction History: トランザクション履歴
772773

774+
# blob/index.page.tsx
775+
XRPL Blog: XRPLブログ
776+
blog.banner.date.part1: YYYY
777+
blog.banner.date.part2: /
778+
blog.banner.date.part3: MM/DD
779+
blog.card.date: YYYY/MM/DD
780+
"Filter by Category:": カテゴリで絞り込む
781+
"Filter by:": 絞り込む
782+
Category: カテゴリ
783+
General: 一般
784+
Release Notes: リリースノート
785+
Advisories: お知らせ
786+
Amendments: Amendment
787+
Development: 開発
788+
Developer Reflections: 開発者の声
789+
Features: 機能
790+
# Security: セキュリティ
791+
773792
Open Source.: オープンソース
774793
Jump to top of page: ページの先頭へ
775794
Edit page: ページを編集
@@ -817,7 +836,6 @@ Everything You Need to Know: 全てはここに
817836
XRP Ledger address, transaction ID, or ledger index: XRP Ledgerアドレス、トランザクションID、またはレジャーインデックス
818837
Status: ステータス
819838
(loading): (ローディング中)
820-
Release Notes: リリースノート
821839
Carbon Markets/Sustainability: 持続可能性
822840
Ledger City is a crypto real estate game powered by the XRP Ledger.: Ledger Cityは、XRP Ledgerを利用した暗号不動産ゲームです。
823841
Ripple's CBDC Platform: Ripple社のCBDC Platform\

blog/index.page.tsx

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as React from "react";
22
import { useState, useRef, useEffect } from "react";
33
import { useThemeHooks } from "@redocly/theme/core/hooks";
4+
import { Link } from "@redocly/theme/components/Link/Link";
45
import moment from "moment";
56

67
export const frontmatter = {
@@ -89,9 +90,10 @@ export default function Index() {
8990
<div className="text-bg">
9091
<h4 className="mb-3 eyebrow text-uppercase font-weight-light">
9192
<span className="post-date pb-2">
92-
{translate(`${moment(heroPost.date).format("MMM")}`)}
93+
{moment(heroPost.date).format(translate("blog.banner.date.part1","MMM"))}
9394
</span>
94-
{translate(` ${moment(heroPost.date).format("DD YYYY")}`)}
95+
{translate("blog.banner.date.part2", " ")}
96+
{moment(heroPost.date).format(translate("blog.banner.date.part3","DD YYYY"))}
9597
</h4>
9698
<div className="pb-8">
9799
<div
@@ -101,18 +103,18 @@ export default function Index() {
101103
</div>
102104
</div>
103105
<h4 className="mb-8 h2-sm font-weight-bold">
104-
<a href={`/blog/${heroPost.link}`}>
106+
<Link to={`/blog/${heroPost.link}`}>
105107
{translate(`${heroPost.title}`)}
106-
</a>
108+
</Link>
107109
</h4>
108110
<p className="mb-4">{translate(`${heroPost.description}`)}</p>
109111
<div className="d-lg-block">
110-
<a
112+
<Link
111113
className="btn btn-primary btn-arrow"
112-
href={`/blog/${heroPost.link}`}
114+
to={`/blog/${heroPost.link}`}
113115
>
114116
{translate("Read More")}
115-
</a>
117+
</Link>
116118
</div>
117119
</div>
118120
</div>
@@ -125,7 +127,7 @@ export default function Index() {
125127
<div className="col-lg-4 m-0 p-0 mt-2">
126128
{/* Filters Desktop*/}
127129
<div className="p-3 category_sidebar d-none d-lg-block">
128-
<p className="mb-2 category-header">Filter by Category:</p>
130+
<p className="mb-2 category-header">{translate("Filter by Category:")}</p>
129131
<div className="d-flex flex-column p-3">
130132
{Object.keys(categories).map((item) => (
131133
<div key={item} className="category-checkbox pb-2">
@@ -151,13 +153,13 @@ export default function Index() {
151153
{/* End Desktop Filters */}
152154
{/* Filters Mobile */}
153155
<div className="col d-flex flex-column p-0 d-lg-none mb-4">
154-
<p className="mb-2 category-header">Filter by:</p>
156+
<p className="mb-2 category-header">{translate("Filter by:")}</p>
155157
<div className="dropdown">
156158
<button
157159
className="dropdown-btn"
158160
onClick={() => setOpen((open) => !open)}
159161
>
160-
Category
162+
{translate("Category")}
161163
<img alt="dropdown arrow" />
162164
</button>
163165
{open && (
@@ -212,25 +214,25 @@ export default function Index() {
212214
</div>
213215
<div>
214216
<p id="card-date" className="mb-0">
215-
{moment(translate(card.date)).format("MMM DD, YYYY")}
217+
{moment(card.date).format(translate("blog.card.date","MMM DD, YYYY"))}
216218
{ card.author ? ` by ${card.author}` : ""}
217219
</p>
218220
<h5 className="mb-2-sm h3-sm">
219-
<a href={`/blog/${card.link}`}>
221+
<Link to={`/blog/${card.link}`}>
220222
{translate(card.title)}
221-
</a>
223+
</Link>
222224
</h5>
223225
</div>
224226
<div className="d-lg-block">
225227
<p className="line-clamp">{translate(card.description)}</p>
226228
</div>
227229
<div className="d-lg-block">
228-
<a
230+
<Link
229231
className="btn btn-primary btn-arrow"
230-
href={`/blog/${card.link}`}
232+
to={`/blog/${card.link}`}
231233
>
232234
{translate("Read More")}
233-
</a>
235+
</Link>
234236
</div>
235237
</div>
236238
))}

blog/sidebars.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
- group: Blog
2+
groupTranslationKey: sidebar.blog
23
page: blog/index.page.tsx
34
expanded: true
45
items:

0 commit comments

Comments
 (0)