#132 - clean up notifications (#147)

* #132 - added translations

* wip

* #132 - added translations

* #132 - cs fix

* #132 - cs fix

Co-authored-by: Adrian Hopek <adrian.hopek@blumilk.pl>
This commit is contained in:
Ewelina Lasowy
2022-05-17 15:17:09 +02:00
committed by GitHub
parent 74f33d6c0b
commit 7154caa340
22 changed files with 92 additions and 46 deletions

View File

@@ -14,9 +14,9 @@ class AbsencesAttachment extends ListAttachment
parent::__construct();
$this
->setTitle("Nieobecności :palm_tree:")
->setTitle(__("Absences :palm_tree:"))
->setColor("#eab308")
->setItems($absences->map(fn(Vacation $vacation): string => $vacation->user->profile->full_name))
->setEmptyText("Wszyscy dzisiaj pracują :muscle:");
->setEmptyText(__("Everybody works today :muscle:"));
}
}

View File

@@ -14,9 +14,9 @@ class BirthdaysAttachment extends ListAttachment
parent::__construct();
$this
->setTitle("Urodziny :birthday:")
->setTitle(__("Birthdays :birthday:"))
->setColor("#3c5f97")
->setItems($birthdays->map(fn(User $user): string => $user->profile->full_name))
->setEmptyText("Dzisiaj nikt nie ma urodzin :cry:");
->setEmptyText(__("Nobody has a birthday today :cry:"));
}
}

View File

@@ -16,6 +16,6 @@ class KeysAttachment extends ListAttachment
$this
->setColor("#3c5f97")
->setItems($keys->map(fn(Key $key): string => "Klucz nr {$key->id} - <@{$key->user->profile->slack_id}>"))
->setEmptyText("Nie ma żadnych kluczy w tobym");
->setEmptyText(__("There are no keys in toby"));
}
}

View File

@@ -14,9 +14,9 @@ class RemotesAttachment extends ListAttachment
parent::__construct();
$this
->setTitle("Praca zdalna :house_with_garden:")
->setTitle(__("Remote work :house_with_garden:"))
->setColor("#527aba")
->setItems($remoteDays->map(fn(Vacation $vacation): string => $vacation->user->profile->full_name))
->setEmptyText("Wszyscy dzisiaj są w biurze :boom:");
->setEmptyText(__("Everybody is in the office :boom:"));
}
}

View File

@@ -27,7 +27,12 @@ class VacationRequestsAttachment extends ListAttachment
? "{$request->from->toDisplayString()}"
: "{$request->from->toDisplayString()} - {$request->to->toDisplayString()}";
return "<{$url}|Wniosek nr {$request->name}> użytkownika {$request->user->profile->full_name} ({$date})";
return __("<:url|Request no. :request> for user :user (:date)", [
"url" => $url,
"request" => $request->name,
"user" => $request->user->profile->full_name,
"date" => $date,
]);
});
}
}