|
|
|
|
@ -7,23 +7,30 @@
|
|
|
|
|
* here. English and every other target-locale translation are maintained by
|
|
|
|
|
* administrators and must never be committed to this source manifest.
|
|
|
|
|
*/
|
|
|
|
|
$common = static function (
|
|
|
|
|
$entry = require __DIR__ . '/entry.php';
|
|
|
|
|
$manifestCommon = static function (
|
|
|
|
|
string $key,
|
|
|
|
|
string $source,
|
|
|
|
|
string $kind = 'label'
|
|
|
|
|
): array {
|
|
|
|
|
return [
|
|
|
|
|
'key' => $key,
|
|
|
|
|
'scope' => 'common',
|
|
|
|
|
'page' => 'cloud.instances',
|
|
|
|
|
'kind' => $kind,
|
|
|
|
|
'source' => $source,
|
|
|
|
|
'format' => 'plain_text',
|
|
|
|
|
'parameters' => [],
|
|
|
|
|
'criticality' => 'required',
|
|
|
|
|
'allow_hide' => false,
|
|
|
|
|
'toast_tone' => null,
|
|
|
|
|
];
|
|
|
|
|
string $kind = 'label',
|
|
|
|
|
array $parameters = [],
|
|
|
|
|
string $criticality = 'required',
|
|
|
|
|
?string $toastTone = null,
|
|
|
|
|
?string $editorSurface = null,
|
|
|
|
|
?string $editorGroup = null
|
|
|
|
|
) use ($entry): array {
|
|
|
|
|
return $entry(
|
|
|
|
|
$key,
|
|
|
|
|
'common',
|
|
|
|
|
'cloud.instances',
|
|
|
|
|
$source,
|
|
|
|
|
$kind,
|
|
|
|
|
$parameters,
|
|
|
|
|
$criticality,
|
|
|
|
|
false,
|
|
|
|
|
$toastTone,
|
|
|
|
|
$editorSurface,
|
|
|
|
|
$editorGroup
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$pageEntries = [];
|
|
|
|
|
@ -41,6 +48,11 @@ if (is_array($pageEntryFiles)) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Entry fragments share this file scope and may use a local $common helper.
|
|
|
|
|
// Restore the manifest helper after loading them so the shared shell entries
|
|
|
|
|
// below always use the same editor metadata policy as every other fragment.
|
|
|
|
|
$common = $manifestCommon;
|
|
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
'version' => 1,
|
|
|
|
|
'pages' => [
|
|
|
|
|
@ -130,94 +142,25 @@ return [
|
|
|
|
|
'服务返回了无效数据,请稍后重试。', 'warning'),
|
|
|
|
|
$common('common.error.login_expired', '登录已过期,请重新登录。', 'warning'),
|
|
|
|
|
$common('common.error.invalid_input', '输入内容无效,请检查后重试。', 'warning'),
|
|
|
|
|
[
|
|
|
|
|
'key' => 'common.error.request',
|
|
|
|
|
'scope' => 'common',
|
|
|
|
|
'page' => 'cloud.instances',
|
|
|
|
|
'kind' => 'warning',
|
|
|
|
|
'source' => '请求失败(状态码 {status}),请稍后重试。',
|
|
|
|
|
'format' => 'icu',
|
|
|
|
|
'parameters' => ['status' => 'integer'],
|
|
|
|
|
'criticality' => 'required',
|
|
|
|
|
'allow_hide' => false,
|
|
|
|
|
'toast_tone' => null,
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'key' => 'common.error.unexpected_status',
|
|
|
|
|
'scope' => 'common',
|
|
|
|
|
'page' => 'cloud.instances',
|
|
|
|
|
'kind' => 'warning',
|
|
|
|
|
'source' => '请求已送达,但服务返回了意外状态({status})。请勿重复提交,并联系管理员核查。',
|
|
|
|
|
'format' => 'icu',
|
|
|
|
|
'parameters' => ['status' => 'integer'],
|
|
|
|
|
'criticality' => 'critical',
|
|
|
|
|
'allow_hide' => false,
|
|
|
|
|
'toast_tone' => null,
|
|
|
|
|
],
|
|
|
|
|
$common('common.error.request',
|
|
|
|
|
'请求失败(状态码 {status}),请稍后重试。',
|
|
|
|
|
'warning', ['status' => 'integer']),
|
|
|
|
|
$common('common.error.unexpected_status',
|
|
|
|
|
'请求已送达,但服务返回了意外状态({status})。请勿重复提交,并联系管理员核查。',
|
|
|
|
|
'warning', ['status' => 'integer'], 'critical'),
|
|
|
|
|
$common('common.error.task_receipt_invalid',
|
|
|
|
|
'请求已送达,但任务回执协议无效。请勿重复提交,并联系管理员核查。',
|
|
|
|
|
'warning'),
|
|
|
|
|
$common('common.copy.empty', '没有可复制的内容', 'notice'),
|
|
|
|
|
$common('common.copy.failed', '复制失败,请手动复制', 'warning'),
|
|
|
|
|
[
|
|
|
|
|
'key' => 'common.toast.close.aria',
|
|
|
|
|
'scope' => 'common',
|
|
|
|
|
'page' => 'cloud.instances',
|
|
|
|
|
'kind' => 'aria_label',
|
|
|
|
|
'source' => '关闭提示',
|
|
|
|
|
'format' => 'plain_text',
|
|
|
|
|
'parameters' => [],
|
|
|
|
|
'criticality' => 'required',
|
|
|
|
|
'allow_hide' => false,
|
|
|
|
|
'toast_tone' => null,
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'key' => 'common.toast.error.title',
|
|
|
|
|
'scope' => 'common',
|
|
|
|
|
'page' => 'cloud.instances',
|
|
|
|
|
'kind' => 'toast_title',
|
|
|
|
|
'source' => '操作失败',
|
|
|
|
|
'format' => 'plain_text',
|
|
|
|
|
'parameters' => [],
|
|
|
|
|
'criticality' => 'required',
|
|
|
|
|
'allow_hide' => false,
|
|
|
|
|
'toast_tone' => 'error',
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'key' => 'common.toast.success.body',
|
|
|
|
|
'scope' => 'common',
|
|
|
|
|
'page' => 'cloud.instances',
|
|
|
|
|
'kind' => 'toast_body',
|
|
|
|
|
'source' => '操作已完成。',
|
|
|
|
|
'format' => 'plain_text',
|
|
|
|
|
'parameters' => [],
|
|
|
|
|
'criticality' => 'required',
|
|
|
|
|
'allow_hide' => false,
|
|
|
|
|
'toast_tone' => 'success',
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'key' => 'common.toast.success.title',
|
|
|
|
|
'scope' => 'common',
|
|
|
|
|
'page' => 'cloud.instances',
|
|
|
|
|
'kind' => 'toast_title',
|
|
|
|
|
'source' => '操作完成',
|
|
|
|
|
'format' => 'plain_text',
|
|
|
|
|
'parameters' => [],
|
|
|
|
|
'criticality' => 'required',
|
|
|
|
|
'allow_hide' => false,
|
|
|
|
|
'toast_tone' => 'success',
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'key' => 'common.toast.warning.title',
|
|
|
|
|
'scope' => 'common',
|
|
|
|
|
'page' => 'cloud.instances',
|
|
|
|
|
'kind' => 'toast_title',
|
|
|
|
|
'source' => '请注意',
|
|
|
|
|
'format' => 'plain_text',
|
|
|
|
|
'parameters' => [],
|
|
|
|
|
'criticality' => 'required',
|
|
|
|
|
'allow_hide' => false,
|
|
|
|
|
'toast_tone' => 'warning',
|
|
|
|
|
],
|
|
|
|
|
$common('common.toast.close.aria', '关闭提示', 'aria_label'),
|
|
|
|
|
$common('common.toast.error.title', '操作失败', 'toast_title', [],
|
|
|
|
|
'required', 'error'),
|
|
|
|
|
$common('common.toast.success.body', '操作已完成。', 'toast_body', [],
|
|
|
|
|
'required', 'success'),
|
|
|
|
|
$common('common.toast.success.title', '操作完成', 'toast_title', [],
|
|
|
|
|
'required', 'success'),
|
|
|
|
|
$common('common.toast.warning.title', '请注意', 'toast_title', [],
|
|
|
|
|
'required', 'warning'),
|
|
|
|
|
], $pageEntries),
|
|
|
|
|
];
|
|
|
|
|
|