You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
841 B
PHP
33 lines
841 B
PHP
<?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,
|
|
];
|
|
};
|