refactor(i18n): split copy manifest by page
parent
337e1d3ea4
commit
64f03baa34
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Factory shared by source-language copy fragments.
|
||||
*
|
||||
* Fragments contain only stable keys, Chinese baselines and rendering
|
||||
* contracts. Administrator-owned target translations never belong here.
|
||||
*/
|
||||
return static function (
|
||||
string $key,
|
||||
string $scope,
|
||||
string $page,
|
||||
string $source,
|
||||
string $kind = 'label',
|
||||
array $parameters = [],
|
||||
string $criticality = 'required',
|
||||
bool $allowHide = false,
|
||||
?string $toastTone = null
|
||||
): array {
|
||||
return [
|
||||
'key' => $key,
|
||||
'scope' => $scope,
|
||||
'page' => $page,
|
||||
'kind' => $kind,
|
||||
'source' => $source,
|
||||
'format' => $parameters === [] ? 'plain_text' : 'icu',
|
||||
'parameters' => $parameters,
|
||||
'criticality' => $criticality,
|
||||
'allow_hide' => $allowHide,
|
||||
'toast_tone' => $toastTone,
|
||||
];
|
||||
};
|
||||
Loading…
Reference in New Issue