@mpgd/i18n 0.3.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/paraglide/messages/_index.d.ts +3 -0
- package/dist/paraglide/messages/_index.js +4 -1
- package/dist/paraglide/messages/viewport.d.ts +20 -0
- package/dist/paraglide/messages/viewport.js +29 -0
- package/dist/paraglide/messages/viewport_orientation_mismatch.d.ts +19 -0
- package/dist/paraglide/messages/viewport_orientation_mismatch.js +29 -0
- package/dist/paraglide/messages/viewport_orientation_policy.d.ts +18 -0
- package/dist/paraglide/messages/viewport_orientation_policy.js +29 -0
- package/dist/paraglideAdapter.d.ts +10 -0
- package/messages/en.json +4 -1
- package/messages/ko.json +4 -1
- package/package.json +1 -1
|
@@ -23,6 +23,8 @@ export * from "./leaderboard_unavailable.js";
|
|
|
23
23
|
export * from "./loading_player.js";
|
|
24
24
|
export * from "./mock_only.js";
|
|
25
25
|
export * from "./opening_purchase.js";
|
|
26
|
+
export * from "./viewport_orientation_policy.js";
|
|
27
|
+
export * from "./viewport_orientation_mismatch.js";
|
|
26
28
|
export * from "./player.js";
|
|
27
29
|
export * from "./play_again.js";
|
|
28
30
|
export * from "./preparing_demo.js";
|
|
@@ -52,4 +54,5 @@ export * from "./target_feature_interstitial_ads.js";
|
|
|
52
54
|
export * from "./target_feature_leaderboard.js";
|
|
53
55
|
export * from "./target_feature_localization.js";
|
|
54
56
|
export * from "./target_feature_rewarded_ads.js";
|
|
57
|
+
export * from "./viewport.js";
|
|
55
58
|
export type LocalizedString = import("../runtime.js").LocalizedString;
|
|
@@ -25,6 +25,8 @@ export * from './leaderboard_unavailable.js'
|
|
|
25
25
|
export * from './loading_player.js'
|
|
26
26
|
export * from './mock_only.js'
|
|
27
27
|
export * from './opening_purchase.js'
|
|
28
|
+
export * from './viewport_orientation_policy.js'
|
|
29
|
+
export * from './viewport_orientation_mismatch.js'
|
|
28
30
|
export * from './player.js'
|
|
29
31
|
export * from './play_again.js'
|
|
30
32
|
export * from './preparing_demo.js'
|
|
@@ -53,4 +55,5 @@ export * from './target_feature_iap.js'
|
|
|
53
55
|
export * from './target_feature_interstitial_ads.js'
|
|
54
56
|
export * from './target_feature_leaderboard.js'
|
|
55
57
|
export * from './target_feature_localization.js'
|
|
56
|
-
export * from './target_feature_rewarded_ads.js'
|
|
58
|
+
export * from './target_feature_rewarded_ads.js'
|
|
59
|
+
export * from './viewport.js'
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* | output |
|
|
3
|
+
* | --- |
|
|
4
|
+
* | "Viewport: {sizeClass} {orientation} - controls {controls}" |
|
|
5
|
+
*
|
|
6
|
+
* @param {ViewportInputs} inputs
|
|
7
|
+
* @param {{ locale?: "en" | "ko" }} options
|
|
8
|
+
* @returns {LocalizedString}
|
|
9
|
+
*/
|
|
10
|
+
export const viewport: ((inputs: ViewportInputs, options?: {
|
|
11
|
+
locale?: "en" | "ko";
|
|
12
|
+
}) => LocalizedString) & import("../runtime.js").MessageMetadata<ViewportInputs, {
|
|
13
|
+
locale?: "en" | "ko";
|
|
14
|
+
}, {}>;
|
|
15
|
+
export type LocalizedString = import("../runtime.js").LocalizedString;
|
|
16
|
+
export type ViewportInputs = {
|
|
17
|
+
sizeClass: NonNullable<unknown>;
|
|
18
|
+
orientation: NonNullable<unknown>;
|
|
19
|
+
controls: NonNullable<unknown>;
|
|
20
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
|
3
|
+
|
|
4
|
+
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
5
|
+
|
|
6
|
+
/** @typedef {{ sizeClass: NonNullable<unknown>, orientation: NonNullable<unknown>, controls: NonNullable<unknown> }} ViewportInputs */
|
|
7
|
+
|
|
8
|
+
const en_viewport = /** @type {(inputs: ViewportInputs) => LocalizedString} */ (i) => {
|
|
9
|
+
return /** @type {LocalizedString} */ (`Viewport: ${i?.sizeClass} ${i?.orientation} - controls ${i?.controls}`)
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const ko_viewport = /** @type {(inputs: ViewportInputs) => LocalizedString} */ (i) => {
|
|
13
|
+
return /** @type {LocalizedString} */ (`뷰포트: ${i?.sizeClass} ${i?.orientation} - 컨트롤 ${i?.controls}`)
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* | output |
|
|
18
|
+
* | --- |
|
|
19
|
+
* | "Viewport: {sizeClass} {orientation} - controls {controls}" |
|
|
20
|
+
*
|
|
21
|
+
* @param {ViewportInputs} inputs
|
|
22
|
+
* @param {{ locale?: "en" | "ko" }} options
|
|
23
|
+
* @returns {LocalizedString}
|
|
24
|
+
*/
|
|
25
|
+
export const viewport = /** @type {((inputs: ViewportInputs, options?: { locale?: "en" | "ko" }) => LocalizedString) & import('../runtime.js').MessageMetadata<ViewportInputs, { locale?: "en" | "ko" }, {}>} */ ((inputs, options = {}) => {
|
|
26
|
+
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
|
27
|
+
if (locale === "en") return en_viewport(inputs)
|
|
28
|
+
return ko_viewport(inputs)
|
|
29
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* | output |
|
|
3
|
+
* | --- |
|
|
4
|
+
* | "Rotate to {orientation} for {mode}" |
|
|
5
|
+
*
|
|
6
|
+
* @param {Viewport_Orientation_MismatchInputs} inputs
|
|
7
|
+
* @param {{ locale?: "en" | "ko" }} options
|
|
8
|
+
* @returns {LocalizedString}
|
|
9
|
+
*/
|
|
10
|
+
export const viewport_orientation_mismatch: ((inputs: Viewport_Orientation_MismatchInputs, options?: {
|
|
11
|
+
locale?: "en" | "ko";
|
|
12
|
+
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Viewport_Orientation_MismatchInputs, {
|
|
13
|
+
locale?: "en" | "ko";
|
|
14
|
+
}, {}>;
|
|
15
|
+
export type LocalizedString = import("../runtime.js").LocalizedString;
|
|
16
|
+
export type Viewport_Orientation_MismatchInputs = {
|
|
17
|
+
orientation: NonNullable<unknown>;
|
|
18
|
+
mode: NonNullable<unknown>;
|
|
19
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
|
3
|
+
|
|
4
|
+
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
5
|
+
|
|
6
|
+
/** @typedef {{ orientation: NonNullable<unknown>, mode: NonNullable<unknown> }} Viewport_Orientation_MismatchInputs */
|
|
7
|
+
|
|
8
|
+
const en_viewport_orientation_mismatch = /** @type {(inputs: Viewport_Orientation_MismatchInputs) => LocalizedString} */ (i) => {
|
|
9
|
+
return /** @type {LocalizedString} */ (`Rotate to ${i?.orientation} for ${i?.mode}`)
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const ko_viewport_orientation_mismatch = /** @type {(inputs: Viewport_Orientation_MismatchInputs) => LocalizedString} */ (i) => {
|
|
13
|
+
return /** @type {LocalizedString} */ (`${i?.mode}: ${i?.orientation} 방향으로 회전`)
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* | output |
|
|
18
|
+
* | --- |
|
|
19
|
+
* | "Rotate to {orientation} for {mode}" |
|
|
20
|
+
*
|
|
21
|
+
* @param {Viewport_Orientation_MismatchInputs} inputs
|
|
22
|
+
* @param {{ locale?: "en" | "ko" }} options
|
|
23
|
+
* @returns {LocalizedString}
|
|
24
|
+
*/
|
|
25
|
+
export const viewport_orientation_mismatch = /** @type {((inputs: Viewport_Orientation_MismatchInputs, options?: { locale?: "en" | "ko" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Viewport_Orientation_MismatchInputs, { locale?: "en" | "ko" }, {}>} */ ((inputs, options = {}) => {
|
|
26
|
+
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
|
27
|
+
if (locale === "en") return en_viewport_orientation_mismatch(inputs)
|
|
28
|
+
return ko_viewport_orientation_mismatch(inputs)
|
|
29
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* | output |
|
|
3
|
+
* | --- |
|
|
4
|
+
* | "Orientation policy: {mode}" |
|
|
5
|
+
*
|
|
6
|
+
* @param {Viewport_Orientation_PolicyInputs} inputs
|
|
7
|
+
* @param {{ locale?: "en" | "ko" }} options
|
|
8
|
+
* @returns {LocalizedString}
|
|
9
|
+
*/
|
|
10
|
+
export const viewport_orientation_policy: ((inputs: Viewport_Orientation_PolicyInputs, options?: {
|
|
11
|
+
locale?: "en" | "ko";
|
|
12
|
+
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Viewport_Orientation_PolicyInputs, {
|
|
13
|
+
locale?: "en" | "ko";
|
|
14
|
+
}, {}>;
|
|
15
|
+
export type LocalizedString = import("../runtime.js").LocalizedString;
|
|
16
|
+
export type Viewport_Orientation_PolicyInputs = {
|
|
17
|
+
mode: NonNullable<unknown>;
|
|
18
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
|
3
|
+
|
|
4
|
+
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
5
|
+
|
|
6
|
+
/** @typedef {{ mode: NonNullable<unknown> }} Viewport_Orientation_PolicyInputs */
|
|
7
|
+
|
|
8
|
+
const en_viewport_orientation_policy = /** @type {(inputs: Viewport_Orientation_PolicyInputs) => LocalizedString} */ (i) => {
|
|
9
|
+
return /** @type {LocalizedString} */ (`Orientation policy: ${i?.mode}`)
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const ko_viewport_orientation_policy = /** @type {(inputs: Viewport_Orientation_PolicyInputs) => LocalizedString} */ (i) => {
|
|
13
|
+
return /** @type {LocalizedString} */ (`방향 정책: ${i?.mode}`)
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* | output |
|
|
18
|
+
* | --- |
|
|
19
|
+
* | "Orientation policy: {mode}" |
|
|
20
|
+
*
|
|
21
|
+
* @param {Viewport_Orientation_PolicyInputs} inputs
|
|
22
|
+
* @param {{ locale?: "en" | "ko" }} options
|
|
23
|
+
* @returns {LocalizedString}
|
|
24
|
+
*/
|
|
25
|
+
export const viewport_orientation_policy = /** @type {((inputs: Viewport_Orientation_PolicyInputs, options?: { locale?: "en" | "ko" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Viewport_Orientation_PolicyInputs, { locale?: "en" | "ko" }, {}>} */ ((inputs, options = {}) => {
|
|
26
|
+
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
|
27
|
+
if (locale === "en") return en_viewport_orientation_policy(inputs)
|
|
28
|
+
return ko_viewport_orientation_policy(inputs)
|
|
29
|
+
});
|
|
@@ -79,6 +79,16 @@ export interface MpgdMessages {
|
|
|
79
79
|
readonly target_feature_leaderboard: EmptyMessage;
|
|
80
80
|
readonly target_feature_localization: EmptyMessage;
|
|
81
81
|
readonly target_feature_rewarded_ads: EmptyMessage;
|
|
82
|
+
readonly viewport: MessageFunction<{
|
|
83
|
+
readonly controls: string;
|
|
84
|
+
readonly orientation: string;
|
|
85
|
+
readonly sizeClass: string;
|
|
86
|
+
}>;
|
|
87
|
+
readonly viewport_orientation_mismatch: MessageFunction<{
|
|
88
|
+
readonly mode: string;
|
|
89
|
+
readonly orientation: string;
|
|
90
|
+
}>;
|
|
91
|
+
readonly viewport_orientation_policy: MessageFunction<{ readonly mode: string }>;
|
|
82
92
|
}
|
|
83
93
|
|
|
84
94
|
export const m: MpgdMessages;
|
package/messages/en.json
CHANGED
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
"loading_player": "Loading player...",
|
|
26
26
|
"mock_only": "mock only",
|
|
27
27
|
"opening_purchase": "Opening mock purchase...",
|
|
28
|
+
"viewport_orientation_policy": "Orientation policy: {mode}",
|
|
29
|
+
"viewport_orientation_mismatch": "Rotate to {orientation} for {mode}",
|
|
28
30
|
"player": "Player: {name}",
|
|
29
31
|
"play_again": "Play again",
|
|
30
32
|
"preparing_demo": "Preparing SDK demo...",
|
|
@@ -53,5 +55,6 @@
|
|
|
53
55
|
"target_feature_interstitial_ads": "Inter",
|
|
54
56
|
"target_feature_leaderboard": "Board",
|
|
55
57
|
"target_feature_localization": "Localization",
|
|
56
|
-
"target_feature_rewarded_ads": "Reward"
|
|
58
|
+
"target_feature_rewarded_ads": "Reward",
|
|
59
|
+
"viewport": "Viewport: {sizeClass} {orientation} - controls {controls}"
|
|
57
60
|
}
|
package/messages/ko.json
CHANGED
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
"loading_player": "플레이어 불러오는 중...",
|
|
26
26
|
"mock_only": "목업 전용",
|
|
27
27
|
"opening_purchase": "목업 구매 여는 중...",
|
|
28
|
+
"viewport_orientation_policy": "방향 정책: {mode}",
|
|
29
|
+
"viewport_orientation_mismatch": "{mode}: {orientation} 방향으로 회전",
|
|
28
30
|
"player": "플레이어: {name}",
|
|
29
31
|
"play_again": "다시 플레이",
|
|
30
32
|
"preparing_demo": "SDK 데모 준비 중...",
|
|
@@ -53,5 +55,6 @@
|
|
|
53
55
|
"target_feature_interstitial_ads": "전면광고",
|
|
54
56
|
"target_feature_leaderboard": "랭킹",
|
|
55
57
|
"target_feature_localization": "다국어",
|
|
56
|
-
"target_feature_rewarded_ads": "보상광고"
|
|
58
|
+
"target_feature_rewarded_ads": "보상광고",
|
|
59
|
+
"viewport": "뷰포트: {sizeClass} {orientation} - 컨트롤 {controls}"
|
|
57
60
|
}
|