From 374ffbf01ff49a7461ffff6d226620e38dc27a1d Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Wed, 7 Apr 2021 17:42:15 +0100 Subject: [PATCH] fix incomplete lang patching, add en-gb stub en-gb is empty, so it's patched with en-us strings. Added so DD/MM/YY date formatting was possible in the ui. --- cl.md | 14 ++++++++++++++ lang/admin/en-gb.json | 5 +++++ lang/common/en-gb.json | 5 +++++ lang/email/en-gb.json | 5 +++++ lang/form/en-gb.json | 5 +++++ lang/setup/en-gb.json | 5 +++++ storage.go | 7 ++++++- 7 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 cl.md create mode 100644 lang/admin/en-gb.json create mode 100644 lang/common/en-gb.json create mode 100644 lang/email/en-gb.json create mode 100644 lang/form/en-gb.json create mode 100644 lang/setup/en-gb.json diff --git a/cl.md b/cl.md new file mode 100644 index 0000000..e10d954 --- /dev/null +++ b/cl.md @@ -0,0 +1,14 @@ +This one isn't super big but includes some pretty important bug fixes. + +Features: +* Link-only password resets: Instead of the user having to enter a code, a magic link is sent which will reset the password once clicked. The password reset PIN input sometimes seems broken on Jellyfin (at least for me) so this is kind of a workaround. +* Proper time handling in the web UI: Times displayed on the invites & accounts tab now match the language you're using (e.g MM/DD/YY for en-US and DD/MM/YY for everywhere else). 12/24 hour time can also be toggled in the language menu in the top left. + +Fixes: +* Fix missing "Last Active" time on newer versions of Jellyfin (#69) + * Time parser was rewritten so it should handle a lot more formats automatically now. +* Fix bug where user expiry would change/disappear after a restart (#77) +* Add missing attributes that weren't being stored in profiles (#76) + +Other: +* Massively cleaned up build files diff --git a/lang/admin/en-gb.json b/lang/admin/en-gb.json new file mode 100644 index 0000000..fb17ca3 --- /dev/null +++ b/lang/admin/en-gb.json @@ -0,0 +1,5 @@ +{ + "meta": { + "name": "English (GB)" + } +} diff --git a/lang/common/en-gb.json b/lang/common/en-gb.json new file mode 100644 index 0000000..fb17ca3 --- /dev/null +++ b/lang/common/en-gb.json @@ -0,0 +1,5 @@ +{ + "meta": { + "name": "English (GB)" + } +} diff --git a/lang/email/en-gb.json b/lang/email/en-gb.json new file mode 100644 index 0000000..fb17ca3 --- /dev/null +++ b/lang/email/en-gb.json @@ -0,0 +1,5 @@ +{ + "meta": { + "name": "English (GB)" + } +} diff --git a/lang/form/en-gb.json b/lang/form/en-gb.json new file mode 100644 index 0000000..fb17ca3 --- /dev/null +++ b/lang/form/en-gb.json @@ -0,0 +1,5 @@ +{ + "meta": { + "name": "English (GB)" + } +} diff --git a/lang/setup/en-gb.json b/lang/setup/en-gb.json new file mode 100644 index 0000000..fb17ca3 --- /dev/null +++ b/lang/setup/en-gb.json @@ -0,0 +1,5 @@ +{ + "meta": { + "name": "English (GB)" + } +} diff --git a/storage.go b/storage.go index edc8599..d8b8280 100644 --- a/storage.go +++ b/storage.go @@ -144,11 +144,14 @@ func patchLang(english, other *langSection) { } func patchQuantityStrings(english, other *map[string]quantityString) { + if *other == nil { + *other = map[string]quantityString{} + } for n, ev := range *english { qs, ok := (*other)[n] if !ok { (*other)[n] = ev - return + continue } else if qs.Singular == "" { qs.Singular = ev.Singular } else if (*other)[n].Plural == "" { @@ -429,6 +432,8 @@ func (st *Storage) loadLangEmail(filesystems ...fs.FS) error { patchLang(&english.UserDeleted, &lang.UserDeleted) patchLang(&english.InviteEmail, &lang.InviteEmail) patchLang(&english.WelcomeEmail, &lang.WelcomeEmail) + patchLang(&english.EmailConfirmation, &lang.EmailConfirmation) + patchLang(&english.UserExpired, &lang.UserExpired) } st.lang.Email[index] = lang return nil