|
33 | 33 | $Final = ''; |
34 | 34 | $Data = $loadL10N($_GET['language']); |
35 | 35 | $Data->PreferredVariant = $_GET['language']; |
| 36 | + $Data->autoAssignRules($_GET['language']); |
36 | 37 | $First = "```\n" . $Data->getString('link.Configuration') . " (v3)\n│\n"; |
37 | 38 | $Cats = count($CIDRAM->CIDRAM['Config Defaults']); |
38 | 39 | $Current = 1; |
39 | 40 | foreach ($CIDRAM->CIDRAM['Config Defaults'] as $Category => $Directives) { |
40 | 41 | $First .= ($Current === $Cats ? '└───' : '├───') . $Category . "\n"; |
41 | | - $Out = str_replace( |
42 | | - ['<code>', '<code dir="ltr">', '<code dir="rtl">', '</code>', '<strong>', '</strong>', '<em>', '</em>'], |
43 | | - ['`', '`', '`', '`', '__', '__', '*', '*'], |
44 | | - html_entity_decode($Data->getString('config.' . $Category)) |
45 | | - ); |
46 | | - $Final .= sprintf($Data->getString('category'), $Category, $Out) . "\n\n"; |
47 | | - foreach ($Directives as $Directive => $Info) { |
| 42 | + $Out = $Data->getString('config.' . $Category); |
| 43 | + if ($Data->Directionality !== 'rtl') { |
48 | 44 | $Out = str_replace( |
49 | | - ['<code>', '<code dir="ltr">', '<code dir="rtl">', '</code>', '<strong>', '</strong>', '<em>', '</em>'], |
50 | | - ['`', '`', '`', '`', '__', '__', '*', '*'], |
51 | | - html_entity_decode($Data->getString('config.' . $Category . '_' . $Directive)) |
| 45 | + ['<code>', '<code class="s">', '<code dir="ltr">', '<code dir="rtl">', '</code>', '<strong>', '</strong>', '<em>', '</em>'], |
| 46 | + ['`', '`', '`', '`', '`', '__', '__', '*', '*'], |
| 47 | + html_entity_decode($Out) |
52 | 48 | ); |
| 49 | + } |
| 50 | + $Final .= sprintf($Data->getString('category'), $Category, $Out) . "\n\n"; |
| 51 | + foreach ($Directives as $Directive => $Info) { |
| 52 | + $Out = $Data->getString('config.' . $Category . '_' . $Directive); |
| 53 | + if ($Data->Directionality !== 'rtl') { |
| 54 | + $Out = str_replace( |
| 55 | + ['<code>', '<code class="s">', '<code dir="ltr">', '<code dir="rtl">', '</code>', '<strong>', '</strong>', '<em>', '</em>'], |
| 56 | + ['`', '`', '`', '`', '`', '__', '__', '*', '*'], |
| 57 | + html_entity_decode($Out) |
| 58 | + ); |
| 59 | + } |
53 | 60 | $Default = $Info['default'] ?? ''; |
54 | 61 | if (in_array($Info['type'], ['duration', 'string', 'timezone', 'checkbox', 'url', 'email', 'kb'], true)) { |
55 | 62 | $Type = 'string'; |
|
101 | 108 | } |
102 | 109 | if (!empty($Info['hints'])) { |
103 | 110 | foreach ($Data->arrayFromL10nToArray($Info['hints']) as $HintKey => $HintValue) { |
104 | | - $HintValue = str_replace( |
105 | | - ['<code>', '<code dir="ltr">', '<code dir="rtl">', '</code>', '<strong>', '</strong>', '<em>', '</em>'], |
106 | | - ['`', '`', '`', '`', '__', '__', '*', '*'], |
107 | | - html_entity_decode($HintValue) |
108 | | - ); |
| 111 | + if ($Data->Directionality !== 'rtl') { |
| 112 | + $HintValue = str_replace( |
| 113 | + ['<code>', '<code class="s">', '<code dir="ltr">', '<code dir="rtl">', '</code>', '<strong>', '</strong>', '<em>', '</em>'], |
| 114 | + ['`', '`', '`', '`', '`', '__', '__', '*', '*'], |
| 115 | + html_entity_decode($HintValue) |
| 116 | + ); |
| 117 | + } |
109 | 118 | if (!is_string($HintKey)) { |
110 | 119 | $Final .= $HintValue . "\n\n"; |
111 | 120 | continue; |
|
0 commit comments