Skip to content

Commit 3a9c793

Browse files
committed
WIP
1 parent bc27d9f commit 3a9c793

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

app/Drupal/niklan/src/Repository/KeyValue/AboutSettings.php

+8-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
namespace Drupal\niklan\Repository\KeyValue;
66

7+
use Drupal\Core\StringTranslation\TranslatableMarkup;
8+
79
final class AboutSettings extends LanguageAwareSettingsStore {
810

911
public function getPhotoMediaId(): ?string {
@@ -25,7 +27,9 @@ public function setTitle(string $title): self {
2527
}
2628

2729
public function getTitle(): string {
28-
return $this->getStore()->get('title', "I'm an alien 👽");
30+
$default = (string) new TranslatableMarkup("I'm an alien 👽");
31+
32+
return $this->getStore()->get('title', $default);
2933
}
3034

3135
public function setSubtitle(string $subtitle): self {
@@ -35,7 +39,9 @@ public function setSubtitle(string $subtitle): self {
3539
}
3640

3741
public function getSubtitle(): string {
38-
return $this->getStore()->get('subtitle', 'Greetings traveller!');
42+
$default = (string) new TranslatableMarkup('Greetings traveller!');
43+
44+
return $this->getStore()->get('subtitle', $default);
3945
}
4046

4147
public function setSummary(string $summary): self {

assets/translation/ru.po

+6
Original file line numberDiff line numberDiff line change
@@ -411,3 +411,9 @@ msgstr "Настройки страницы \"Контакты\""
411411

412412
msgid "Configure a contact page."
413413
msgstr "Настройте страницу \"Контакты\"."
414+
415+
msgid "I'm an alien 👽"
416+
msgstr "Я инопланетянин 👽"
417+
418+
msgid "Greetings traveller!"
419+
msgstr "Привет, путешественник!"
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
name: Drupal
1+
slogan: "Web Developer's Blog"

0 commit comments

Comments
 (0)