fix(time): make weekdays translatable
This commit is contained in:
parent
11978dff82
commit
9a734a81f8
3 changed files with 10 additions and 1 deletions
|
|
@ -18,6 +18,7 @@ crate::cache_dynamic_lazy! {
|
|||
static TIME_FORMAT_TWENTY_FOUR: String = fl!("time-format", "twenty-four");
|
||||
static TIME_FORMAT_FIRST: String = fl!("time-format", "first");
|
||||
static TIME_FORMAT_SHOW_DATE: String = fl!("time-format", "show-date");
|
||||
static TIME_FORMAT_WEEKDAYS: [String; 4] = [fl!("time-format", "friday"), fl!("time-format", "saturday"), fl!("time-format", "sunday"), fl!("time-format", "monday")];
|
||||
}
|
||||
|
||||
pub struct Page {
|
||||
|
|
@ -153,7 +154,7 @@ fn format() -> Section<crate::pages::Message> {
|
|||
// First day of week
|
||||
.add(
|
||||
settings::item::builder(&*TIME_FORMAT_FIRST).control(dropdown(
|
||||
&["Friday", "Saturday", "Sunday", "Monday"],
|
||||
&*TIME_FORMAT_WEEKDAYS,
|
||||
match page.first_day_of_week {
|
||||
4 => Some(0), // friday
|
||||
5 => Some(1), // saturday
|
||||
|
|
|
|||
|
|
@ -294,6 +294,10 @@ time-format = Date & Time Format
|
|||
.twenty-four = 24-hour time
|
||||
.first = First day of week
|
||||
.show-date = Show Date on Top Panel
|
||||
.friday = Friday
|
||||
.saturday = Saturday
|
||||
.sunday = Sunday
|
||||
.monday = Monday
|
||||
|
||||
time-region = Region & Language
|
||||
.desc = Format dates, times, and numbers based on your region
|
||||
|
|
|
|||
|
|
@ -299,6 +299,10 @@ time-format = Format Daty i Czasu
|
|||
.twenty-four = Czas 24-godzinny
|
||||
.first = Pierwszy dzień tygodnia
|
||||
.show-date = Pokaż Datę w Górnym Panelu
|
||||
.friday = Piątek
|
||||
.saturday = Sobota
|
||||
.sunday = Niedziela
|
||||
.monday = Poniedziałek
|
||||
|
||||
time-region = Region i Język
|
||||
.desc = Format dat, czasu i numerów na podstawie wybranego regionu
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue