Skip to content

Commit eccf9f9

Browse files
committed
Fix broken documentation links on PHP 8.1 Georgian translation
1 parent e6ef5af commit eccf9f9

File tree

2 files changed

+40
-27
lines changed

2 files changed

+40
-27
lines changed

releases/8.1/ka.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
22

33
$lang = 'ka';
4+
$documentation = 'en';
45

56
include_once __DIR__ . '/release.inc';

releases/8.1/release.inc

Lines changed: 39 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ use function releases\php81\message;
77
if (!isset($lang)) {
88
$lang = 'en';
99
}
10+
if (!isset($documentation)) {
11+
$documentation = $lang;
12+
}
1013

1114
$_SERVER['BASE_PAGE'] = 'releases/8.1/' . $lang . '.php';
1215

@@ -37,7 +40,8 @@ common_header(message('common_header', $lang));
3740
<div class="php8-compare">
3841
<h2 class="php8-h2" id="enumerations">
3942
<?= message('enumerations_title', $lang) ?>
40-
<a class="php8-rfc" href="https://wiki.php.net/rfc/enumerations">RFC</a> <a class="php8-rfc" href="/manual/<?= $lang ?>/language.enumerations.php"><?= message('documentation', $lang) ?></a>
43+
<a class="php8-rfc" href="https://wiki.php.net/rfc/enumerations">RFC</a>
44+
<a class="php8-rfc" href="/manual/<?= $documentation ?>/language.enumerations.php"><?= message('documentation', $lang) ?></a>
4145
</h2>
4246
<div class="php8-compare__main">
4347
<div class="php8-compare__block example-contents">
@@ -84,7 +88,8 @@ PHP
8488
<div class="php8-compare">
8589
<h2 class="php8-h2" id="readonly_properties">
8690
<?= message('readonly_properties_title', $lang) ?>
87-
<a class="php8-rfc" href="https://wiki.php.net/rfc/readonly_properties_v2">RFC</a> <a class="php8-rfc" href="/manual/<?= $lang ?>/language.oop5.properties.php#language.oop5.properties.readonly-properties"><?= message('documentation', $lang) ?></a>
91+
<a class="php8-rfc" href="https://wiki.php.net/rfc/readonly_properties_v2">RFC</a>
92+
<a class="php8-rfc" href="/manual/<?= $documentation ?>/language.oop5.properties.php#language.oop5.properties.readonly-properties"><?= message('documentation', $lang) ?></a>
8893
</h2>
8994
<div class="php8-compare__main">
9095
<div class="php8-compare__block example-contents">
@@ -95,15 +100,15 @@ PHP
95100
class BlogData
96101
{
97102
private Status $status;
98-
99-
public function __construct(Status $status)
103+
104+
public function __construct(Status $status)
100105
{
101106
$this->status = $status;
102107
}
103-
104-
public function getStatus(): Status
108+
109+
public function getStatus(): Status
105110
{
106-
return $this->status;
111+
return $this->status;
107112
}
108113
}
109114
PHP
@@ -120,8 +125,8 @@ PHP
120125
class BlogData
121126
{
122127
public readonly Status $status;
123-
124-
public function __construct(Status $status)
128+
129+
public function __construct(Status $status)
125130
{
126131
$this->status = $status;
127132
}
@@ -139,7 +144,8 @@ PHP
139144
<div class="php8-compare">
140145
<h2 class="php8-h2" id="first_class_callable_syntax">
141146
<?= message('first_class_callable_syntax_title', $lang) ?>
142-
<a class="php8-rfc" href="https://wiki.php.net/rfc/first_class_callable_syntax">RFC</a> <a class="php8-rfc" href="/manual/<?= $lang ?>/functions.first_class_callable_syntax.php"><?= message('documentation', $lang) ?></a>
147+
<a class="php8-rfc" href="https://wiki.php.net/rfc/first_class_callable_syntax">RFC</a>
148+
<a class="php8-rfc" href="/manual/<?= $documentation ?>/functions.first_class_callable_syntax.php"><?= message('documentation', $lang) ?></a>
143149
</h2>
144150
<div class="php8-compare__main">
145151
<div class="php8-compare__block example-contents">
@@ -184,10 +190,10 @@ PHP
184190
<div class="php8-code phpcode">
185191
<?php highlight_php_trimmed(
186192
<<<'PHP'
187-
class Service
193+
class Service
188194
{
189195
private Logger $logger;
190-
196+
191197
public function __construct(
192198
?Logger $logger = null,
193199
) {
@@ -204,10 +210,10 @@ PHP
204210
<div class="php8-code phpcode">
205211
<?php highlight_php_trimmed(
206212
<<<'PHP'
207-
class Service
213+
class Service
208214
{
209215
private Logger $logger;
210-
216+
211217
public function __construct(
212218
Logger $logger = new NullLogger(),
213219
) {
@@ -229,7 +235,7 @@ PHP
229235
<div class="php8-code phpcode">
230236
<?php highlight_php_trimmed(
231237
<<<'PHP'
232-
class User
238+
class User
233239
{
234240
/**
235241
* @Assert\All({
@@ -249,7 +255,7 @@ PHP
249255
<div class="php8-code phpcode">
250256
<?php highlight_php_trimmed(
251257
<<<'PHP'
252-
class User
258+
class User
253259
{
254260
#[\Assert\All(
255261
new \Assert\NotNull,
@@ -267,7 +273,8 @@ PHP
267273
<div class="php8-compare">
268274
<h2 class="php8-h2" id="pure_intersection_types">
269275
<?= message('pure_intersection_types_title', $lang) ?>
270-
<a class="php8-rfc" href="https://wiki.php.net/rfc/pure-intersection-types">RFC</a> <a class="php8-rfc" href="/manual/<?= $lang ?>/language.types.declarations.php#language.types.declarations.composite.intersection"><?= message('documentation', $lang) ?></a>
276+
<a class="php8-rfc" href="https://wiki.php.net/rfc/pure-intersection-types">RFC</a>
277+
<a class="php8-rfc" href="/manual/<?= $documentation ?>/language.types.declarations.php#language.types.declarations.composite.intersection"><?= message('documentation', $lang) ?></a>
271278
</h2>
272279
<div class="php8-compare__main">
273280
<div class="php8-compare__block example-contents">
@@ -317,7 +324,8 @@ PHP
317324
<div class="php8-compare">
318325
<h2 class="php8-h2" id="never_return_type">
319326
<?= message('never_return_type_title', $lang) ?>
320-
<a class="php8-rfc" href="https://wiki.php.net/rfc/noreturn_type">RFC</a> <a class="php8-rfc" href="/manual/<?= $lang ?>/language.types.declarations.php#language.types.declarations.never"><?= message('documentation', $lang) ?></a>
327+
<a class="php8-rfc" href="https://wiki.php.net/rfc/noreturn_type">RFC</a>
328+
<a class="php8-rfc" href="/manual/<?= $documentation ?>/language.types.declarations.php#language.types.declarations.never"><?= message('documentation', $lang) ?></a>
321329
</h2>
322330
<div class="php8-compare__main">
323331
<div class="php8-compare__block example-contents">
@@ -329,7 +337,7 @@ function redirect(string $uri) {
329337
header('Location: ' . $uri);
330338
exit();
331339
}
332-
340+
333341
function redirectToLoginPage() {
334342
redirect('/login');
335343
echo 'Hello'; // <- dead code
@@ -349,10 +357,10 @@ function redirect(string $uri): never {
349357
header('Location: ' . $uri);
350358
exit();
351359
}
352-
360+
353361
function redirectToLoginPage(): never {
354362
redirect('/login');
355-
echo 'Hello'; // <- dead code detected by static analysis
363+
echo 'Hello'; // <- dead code detected by static analysis
356364
}
357365
PHP
358366

@@ -368,7 +376,8 @@ PHP
368376
<div class="php8-compare">
369377
<h2 class="php8-h2" id="final_class_constants">
370378
<?= message('final_class_constants_title', $lang) ?>
371-
<a class="php8-rfc" href="https://wiki.php.net/rfc/final_class_const">RFC</a> <a class="php8-rfc" href="/manual/<?= $lang ?>/language.oop5.final.php#language.oop5.final.example.php81"><?= message('documentation', $lang) ?></a>
379+
<a class="php8-rfc" href="https://wiki.php.net/rfc/final_class_const">RFC</a>
380+
<a class="php8-rfc" href="/manual/<?= $documentation ?>/language.oop5.final.php#language.oop5.final.example.php81"><?= message('documentation', $lang) ?></a>
372381
</h2>
373382
<div class="php8-compare__main">
374383
<div class="php8-compare__block example-contents">
@@ -419,7 +428,8 @@ PHP
419428
<div class="php8-compare">
420429
<h2 class="php8-h2" id="explicit_octal_numeral_notation">
421430
<?= message('octal_numeral_notation_title', $lang) ?>
422-
<a class="php8-rfc" href="https://wiki.php.net/rfc/explicit_octal_notation">RFC</a> <a class="php8-rfc" href="/manual/<?= $lang ?>/migration81.new-features.php#migration81.new-features.core.octal-literal-prefix"><?= message('documentation', $lang) ?></a>
431+
<a class="php8-rfc" href="https://wiki.php.net/rfc/explicit_octal_notation">RFC</a>
432+
<a class="php8-rfc" href="/manual/<?= $documentation ?>/migration81.new-features.php#migration81.new-features.core.octal-literal-prefix"><?= message('documentation', $lang) ?></a>
423433
</h2>
424434
<div class="php8-compare__main">
425435
<div class="php8-compare__block example-contents">
@@ -428,7 +438,7 @@ PHP
428438
<?php highlight_php_trimmed(
429439
<<<'PHP'
430440
016 === 16; // false because `016` is octal for `14` and it's confusing
431-
016 === 14; // true
441+
016 === 14; // true
432442
PHP
433443

434444
);?>
@@ -441,7 +451,7 @@ PHP
441451
<?php highlight_php_trimmed(
442452
<<<'PHP'
443453
0o16 === 16; // false — not confusing with explicit notation
444-
0o16 === 14; // true
454+
0o16 === 14; // true
445455
PHP
446456
);?>
447457
</div>
@@ -455,7 +465,8 @@ PHP
455465
<div class="php8-compare">
456466
<h2 class="php8-h2" id="fibers">
457467
<?= message('fibers_title', $lang) ?>
458-
<a class="php8-rfc" href="https://wiki.php.net/rfc/fibers">RFC</a> <a class="php8-rfc" href="/manual/<?= $lang ?>/language.fibers.php"><?= message('documentation', $lang) ?></a>
468+
<a class="php8-rfc" href="https://wiki.php.net/rfc/fibers">RFC</a>
469+
<a class="php8-rfc" href="/manual/<?= $documentation ?>/language.fibers.php"><?= message('documentation', $lang) ?></a>
459470
</h2>
460471
<div class="php8-compare__main">
461472
<div class="php8-compare__block example-contents">
@@ -496,7 +507,8 @@ PHP
496507
<div class="php8-compare">
497508
<h2 class="php8-h2" id="array_unpacking_support_for_string_keyed_arrays">
498509
<?= message('array_unpacking_title', $lang) ?>
499-
<a class="php8-rfc" href="https://wiki.php.net/rfc/array_unpacking_string_keys">RFC</a> <a class="php8-rfc" href="/manual/<?= $lang ?>/language.types.array.php#language.types.array.unpacking"><?= message('documentation', $lang) ?></a>
510+
<a class="php8-rfc" href="https://wiki.php.net/rfc/array_unpacking_string_keys">RFC</a>
511+
<a class="php8-rfc" href="/manual/<?= $documentation ?>/language.types.array.php#language.types.array.unpacking"><?= message('documentation', $lang) ?></a>
500512
</h2>
501513
<div class="php8-compare__main">
502514
<div class="php8-compare__block example-contents">

0 commit comments

Comments
 (0)