Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit da9e83d

Browse files
DocGen patch.
1 parent 863a2f2 commit da9e83d

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

‎scripts/DocGen.php‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,28 @@
2929
}
3030
$Out = [];
3131
foreach ($References as $Reference) {
32+
$Try = '';
3233
if (isset($L10N->Data[$Reference])) {
33-
$Reference = $L10N->Data[$Reference];
34+
$Try = $L10N->Data[$Reference];
35+
} elseif (is_array($L10N->Fallback)) {
36+
if (isset($L10N->Fallback[$Reference])) {
37+
$Try = $L10N->Fallback[$Reference];
38+
}
39+
} elseif ($L10N->Fallback instanceof \Maikuolan\Common\L10N) {
40+
if (isset($L10N->Fallback->Data[$Reference])) {
41+
$Try = $L10N->Fallback->Data[$Reference];
42+
} elseif (is_array($L10N->Fallback->Fallback) && isset($L10N->Fallback->Fallback[$Reference])) {
43+
$Try = $L10N->Fallback->Fallback[$Reference];
44+
}
45+
}
46+
if ($Try === '') {
47+
if (($SPos = strpos($Reference, '')) !== '') {
48+
$Try = (($TryFrom = $L10N->getString(substr($Reference, 0, $SPos))) !== '' && strpos($TryFrom, '%s') !== '') ? sprintf($TryFrom, substr($Reference, $SPos + 1)) : $Reference;
49+
} else {
50+
$Try = $Reference;
51+
}
3452
}
53+
$Reference = $Try;
3554
if (!is_array($Reference)) {
3655
$Reference = [$Reference];
3756
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /