Skip to content

Commit 69321ce

Browse files
committed
fix(core): introduced ja theme translations
1 parent 7dff921 commit 69321ce

File tree

7 files changed

+45
-36
lines changed

7 files changed

+45
-36
lines changed

.changeset/tender-jokes-admire.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'typedoc-plugin-markdown': patch
3+
---
4+
5+
- Introduced ja theme translations as per TypeDoc 0.27.7.

packages/typedoc-plugin-markdown/src/internationalization/locales/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
*/
1010

1111
import en from './en.js';
12+
import ja from './ja.js';
1213
import jp from './jp.js';
1314
import ko from './ko.js';
1415
import zh from './zh.js';
1516

16-
export { en, jp, ko, zh };
17+
export { en, ja, jp, ko, zh };
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { TranslatableStrings } from '@plugin/types/index.js';
2+
3+
/**
4+
* Translations for 'ja' locale.
5+
*
6+
* @category Locales
7+
*/
8+
export const translatable: Partial<TranslatableStrings> = {
9+
theme_default_value: 'デフォルト値',
10+
theme_default_type: 'デフォルトタイプ',
11+
theme_description: '説明',
12+
theme_event: 'イベント',
13+
theme_re_exports: '再エクスポート',
14+
theme_renames_and_re_exports: 'リネームと再エクスポート',
15+
theme_extends: '拡張',
16+
theme_extended_by: 'によって拡張された',
17+
theme_globals: 'グローバル変数',
18+
theme_member: 'メンバー',
19+
theme_member_plural: 'メンバー',
20+
theme_modifier: '修飾子',
21+
theme_name: '名前',
22+
theme_package: 'パッケージ',
23+
theme_packages: 'パッケージ',
24+
theme_type: 'タイプ',
25+
theme_value: '値',
26+
theme_version: 'バージョン',
27+
};
28+
29+
export default translatable;
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,2 @@
1-
import { TranslatableStrings } from '@plugin/types/index.js';
2-
3-
/**
4-
* Translations for 'jp' locale.
5-
*
6-
* @category Locales
7-
*/
8-
export const translatable: Partial<TranslatableStrings> = {
9-
theme_default_value: 'デフォルト値',
10-
theme_default_type: 'デフォルトタイプ',
11-
theme_description: '説明',
12-
theme_event: 'イベント',
13-
theme_re_exports: '再エクスポート',
14-
theme_renames_and_re_exports: 'リネームと再エクスポート',
15-
theme_extends: '拡張',
16-
theme_extended_by: 'によって拡張された',
17-
theme_globals: 'グローバル変数',
18-
theme_member: 'メンバー',
19-
theme_member_plural: 'メンバー',
20-
theme_modifier: '修飾子',
21-
theme_name: '名前',
22-
theme_package: 'パッケージ',
23-
theme_packages: 'パッケージ',
24-
theme_type: 'タイプ',
25-
theme_value: '値',
26-
theme_version: 'バージョン',
27-
};
28-
29-
export default translatable;
1+
import ja from './ja.js';
2+
export default ja;

packages/typedoc-plugin-markdown/src/internationalization/setup.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { en, jp, ko, zh } from '@plugin/internationalization/index.js';
1+
import { en, ja, jp, ko, zh } from '@plugin/internationalization/index.js';
22
import { Application, Converter } from 'typedoc';
33

44
/**
@@ -24,6 +24,7 @@ export function setupInternationalization(app: Application): void {
2424
function getTranslatable(app: Application) {
2525
const LOCALES = {
2626
en,
27+
ja,
2728
jp,
2829
ko,
2930
zh,

packages/typedoc-plugin-markdown/test/fixtures/typedoc.text-1.cjs

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ module.exports = {
1212
'title.indexPage': ':tada: Custom Index Title',
1313
'title.memberPage': '{name}',
1414
},
15-
lang: 'jp',
15+
lang: 'ja',
1616
locales: {
17-
jp: {
18-
theme_type: 'Type (jp)',
17+
ja: {
18+
theme_type: 'Type (ja)',
1919
},
2020
},
2121
};

packages/typedoc-plugin-markdown/test/specs/__snapshots__/text.spec.ts.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ exports[`Text should get translations for member page: (Output File Strategy "me
4545
4646
## プロパティ
4747
48-
| プロパティ | Type (jp) | 説明 |
48+
| プロパティ | Type (ja) | 説明 |
4949
| :------ | :------ | :------ |
5050
| <a id="someprop"></a> \`someProp?\` | \`boolean\` | Description for prop someProp |
5151
5252
## Events
5353
54-
| イベント | Type (jp) |
54+
| イベント | Type (ja) |
5555
| :------ | :------ |
5656
| <a id="someevent"></a> \`someEvent\` | \`MouseEvent\` |
5757

0 commit comments

Comments
 (0)