77
88declare(strict_types=1);
99
10+ use Drupal\path_alias\Entity\PathAlias;
11+
1012/**
1113 * Creates District nodes from Project district taxonomy terms.
1214 */
@@ -29,3 +31,38 @@ function helfi_kymp_content_update_9002(): void {
2931 $storage->load($id)->delete();
3032 }
3133}
34+
35+
36+ /**
37+ * UHF-12838: Translate hakuvahti paths.
38+ */
39+ function helfi_kymp_content_update_11001(): void {
40+ $paths = [
41+ '/hakuvahti/confirm' => [
42+ 'en' => '/parking/confirm-vehicle-removal-alert',
43+ 'fi' => '/pysakointi/vahvista-siirtovahti',
44+ 'sv' => '/parkering/bekrafta-flyttningsvakten',
45+ ],
46+ '/hakuvahti/renew' => [
47+ 'en' => '/parking/extend-vehicle-removal-alert',
48+ 'fi' => '/pysakointi/jatka-siirtovahti',
49+ 'sv' => '/parkering/forlang-flyttningsvakten',
50+ ],
51+ '/hakuvahti/unsubscribe' => [
52+ 'en' => '/parking/remove-vehicle-removal-alert',
53+ 'fi' => '/pysakointi/poista-siirtovahti',
54+ 'sv' => '/parkering/redigera-flyttningsvakten',
55+ ],
56+ ];
57+
58+ foreach ($paths as $path => $info) {
59+ foreach ($info as $langcode => $alias) {
60+ PathAlias::create([
61+ 'path' => $path,
62+ 'alias' => $alias,
63+ 'langcode' => $langcode,
64+ ])->save();
65+ }
66+ }
67+ }
68+
0 commit comments