1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-10-18 09:00:11 +00:00

Compare commits

..

13 Commits

Author SHA1 Message Date
87ef71b415
lowercase lang 2021-05-02 15:25:09 +01:00
André Cruz
cf99ae880c Translated using Weblate (Spanish)
Currently translated at 100.0% (6 of 6 strings)

Translation: jfa-go/Password Reset Links
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/password-reset-links/es/
2021-05-02 16:23:10 +02:00
André Cruz
8e86078394 Translated using Weblate (Spanish)
Currently translated at 100.0% (51 of 51 strings)

Translation: jfa-go/Emails
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/emails/es/
2021-05-02 16:23:10 +02:00
André Cruz
beea903879 translation from Weblate (Spanish)
Currently translated at 100.0% (151 of 151 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/es/
2021-05-02 16:23:10 +02:00
André Cruz
c5e4c5d509 Translated using Weblate (Spanish)
Currently translated at 100.0% (13 of 13 strings)

Translation: jfa-go/Common Strings
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/common-strings/es/
2021-05-02 16:23:10 +02:00
André Cruz
fac951c733 Translated using Weblate (Spanish)
Currently translated at 100.0% (98 of 98 strings)

Translation: jfa-go/Setup
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/setup/es/
2021-05-02 16:23:10 +02:00
Cornichon420
83449f3332 Translated using Weblate (French)
Currently translated at 100.0% (51 of 51 strings)

Translation: jfa-go/Emails
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/emails/fr/
2021-05-02 16:23:10 +02:00
Cornichon420
2a9fc8c7a5 translation from Weblate (French)
Currently translated at 88.0% (133 of 151 strings)

Translation: jfa-go/Admin Page
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/admin/fr/
2021-05-02 16:23:10 +02:00
André Cruz
f8d4f79271 Translated using Weblate (Spanish)
Currently translated at 100.0% (98 of 98 strings)

Translation: jfa-go/Setup
Translate-URL: https://weblate.hrfee.dev/projects/jfa-go/setup/es/
2021-05-02 16:23:10 +02:00
André Cruz
bc466d0c6f Added translation using Weblate (Spanish) 2021-05-02 16:23:10 +02:00
382a0f4c3c
add donate button to about 2021-05-02 15:16:28 +01:00
488c2f5df5
fix broken url in welcome email 2021-05-02 14:44:19 +01:00
43effd0c32
add reset link option to setup 2021-05-02 14:15:03 +01:00
15 changed files with 109 additions and 28 deletions

13
api.go
View File

@ -1805,22 +1805,27 @@ func (app *appContext) Logout(gc *gin.Context) {
func (app *appContext) GetLanguages(gc *gin.Context) {
page := gc.Param("page")
resp := langDTO{}
if page == "form" {
switch page {
case "form":
for key, lang := range app.storage.lang.Form {
resp[key] = lang.Meta.Name
}
} else if page == "admin" {
case "admin":
for key, lang := range app.storage.lang.Admin {
resp[key] = lang.Meta.Name
}
} else if page == "setup" {
case "setup":
for key, lang := range app.storage.lang.Setup {
resp[key] = lang.Meta.Name
}
} else if page == "email" {
case "email":
for key, lang := range app.storage.lang.Email {
resp[key] = lang.Meta.Name
}
case "pwr":
for key, lang := range app.storage.lang.PasswordReset {
resp[key] = lang.Meta.Name
}
}
if len(resp) == 0 {
respond(500, "Couldn't get languages", gc)

View File

@ -653,11 +653,12 @@ func (emailer *Emailer) constructEnabled(reason string, app *appContext, noSub b
func (emailer *Emailer) welcomeValues(username string, expiry time.Time, app *appContext, noSub bool, custom bool) map[string]interface{} {
template := map[string]interface{}{
"welcome": emailer.lang.WelcomeEmail.get("welcome"),
"youCanLoginWith": emailer.lang.WelcomeEmail.get("youCanLoginWith"),
"jellyfinURLString": emailer.lang.WelcomeEmail.get("jellyfinURL"),
"usernameString": emailer.lang.Strings.get("username"),
"message": "",
"welcome": emailer.lang.WelcomeEmail.get("welcome"),
"youCanLoginWith": emailer.lang.WelcomeEmail.get("youCanLoginWith"),
"jellyfinURLString": emailer.lang.WelcomeEmail.get("jellyfinURL"),
"usernameString": emailer.lang.Strings.get("username"),
"message": "",
"yourAccountWillExpire": "",
}
if noSub {
empty := []string{"jellyfinURL", "username", "yourAccountWillExpire"}

View File

@ -45,6 +45,19 @@
<p><i class="icon ri-github-fill"></i><a href="https://github.com/hrfee/jfa-go">jfa-go</a></p>
<p>{{ .strings.version }} <span class="code monospace">{{ .version }}</span></p>
<p>{{ .strings.commitNoun }} <span class="code monospace">{{ .commit }}</span></p>
<div class="dropdown" tabindex="0">
<span class="button ~info dropdown-button">
<i class="ri-hand-heart-line mr-half"></i>
{{ .strings.donate }}
<span class="ml-1 chev"></span>
</span>
<div class="dropdown-display">
<div class="card ~neutral !low">
<a href="https://github.com/sponsors/hrfee" target="_blank" class="button input ~neutral field mb-half lang-link">GitHub</a>
<a href="https://ko-fi.com/hrfee" target="_blank" class="button input ~neutral field mb-half lang-link">Ko-fi</a>
</div>
</div>
</div>
<p><a href="https://github.com/hrfee/jfa-go/blob/main/LICENSE">Available under the MIT License.</a></p>
<pre class="monospace">{{ .license }}</pre>
</div>

View File

@ -376,7 +376,18 @@
<input type="text" class="input ~neutral !normal mt-half" id="password_resets-watch_directory" placeholder="/config/jellyfin">
<p class="support mb-1">{{ .lang.PasswordResets.pathToJellyfinNotice }}</p>
</label>
<label class="label">
<label class="switch">
<input type="checkbox" id="password_resets-link_reset"><span>{{ .lang.PasswordResets.resetLinks }}</span>
<p class="support mb-1">{{ .lang.PasswordResets.resetLinksNotice }}</p>
</label>
<label class="row label">
<p class="mt-half">{{ .lang.PasswordResets.resetLinksLanguage }}</p>
<div class="select ~neutral !normal mt-half mb-1">
<select id="password_resets-language">
</select>
</div>
</label>
<label class="row label">
<span class="mt-half">{{ .lang.Strings.emailSubject }}</span>
<input type="text" class="input ~neutral !normal mt-half mb-1" id="password_resets-subject" placeholder="{{ .emailLang.PasswordReset.title }}">
</label>

View File

@ -53,6 +53,7 @@
"preview": "Preview",
"reset": "Reset",
"edit": "Edit",
"donate": "Donate",
"extendExpiry": "Extend expiry",
"customizeEmails": "Customize Emails",
"customizeEmailsDescription": "If you don't want to use jfa-go's email templates, you can create your own using Markdown.",

View File

@ -1,6 +1,6 @@
{
"meta": {
"name": "Español (ES)"
"name": "Español(ES)"
},
"strings": {
"invites": "Invitaciones",
@ -13,7 +13,7 @@
"inviteNumberOfUses": "Números de usos",
"inviteDuration": "Duración de invitación",
"warning": "Advertencia",
"inviteInfiniteUsesWarning": "Las invitaciones con usos infinitos pueden usarse abusivamente.",
"inviteInfiniteUsesWarning": "Las invitaciones con usos infinitos pueden usarse abusivamente",
"inviteSendToEmail": "Enviar a",
"login": "Acceso",
"logout": "Cerrar sesión",

View File

@ -76,7 +76,21 @@
"preview": "Aperçu",
"reset": "Réinitialiser",
"edit": "Éditer",
"customizeEmails": "Personnaliser les e-mails"
"customizeEmails": "Personnaliser les e-mails",
"inviteDuration": "Durée de l'invitation",
"enabled": "Activé",
"disabled": "Désactivé",
"reEnable": "Ré-activé",
"disable": "Désactivé",
"admin": "Administrateur",
"expiry": "Expiration",
"advancedSettings": "Paramètres avancés",
"userExpiry": "Expiration de l'utilisateur",
"updates": "Mises à jour",
"update": "Mise à jour",
"download": "Téléchargement",
"search": "Recherche",
"conditionals": "Conditions"
},
"notifications": {
"changedEmailAddress": "Adresse e-mail modifiée de {n}.",
@ -108,7 +122,8 @@
"errorSendWelcomeEmail": "Echec lors de l'envoi du mail de bienvenue (vérifier la console/les journaux)",
"sentAnnouncement": "Annonce envoyée.",
"saveEmail": "Email enregistré.",
"errorSaveEmail": "Échec de l'enregistrement de l'e-mail."
"errorSaveEmail": "Échec de l'enregistrement de l'e-mail.",
"updateApplied": "Mise à jour appliquée, veuillez redémarrer."
},
"quantityStrings": {
"modifySettingsFor": {

View File

@ -1,6 +1,6 @@
{
"meta": {
"name": "Español (ES)"
"name": "Español(ES)"
},
"strings": {
"username": "Nombre de usuario",

View File

@ -1,6 +1,6 @@
{
"meta": {
"name": "Español (ES)"
"name": "Español(ES)"
},
"strings": {
"ifItWasNotYou": "Si no fue usted, ignore este correo electrónico.",

View File

@ -28,7 +28,8 @@
"ifItWasYou": "Si c'était bien toi, renseigne le code PIN en dessous.",
"codeExpiry": "Ce code expirera le {date}, à {time} UTC, soit dans {expiresInMinutes}.",
"pin": "PIN",
"name": "Réinitialisation du mot de passe"
"name": "Réinitialisation du mot de passe",
"ifItWasYouLink": "Si c'était bien toi, clique sur le lien en dessous."
},
"userDeleted": {
"title": "Ton compte a été désactivé - Jellyfin",
@ -40,7 +41,7 @@
"hello": "Salut",
"youHaveBeenInvited": "Tu as été invité à rejoindre Jellyfin.",
"toJoin": "Pour continuer, suis le lien en dessous.",
"inviteExpiry": "L'invitation expirera le {date}, à {time}, soit dans {expiresInMinutes}, alors fais vite !",
"inviteExpiry": "L'invitation expirera le {date}, à {time}, soit dans {expiresInMinutes}, alors fais vite.",
"linkButton": "Lien",
"name": "Courriel d'invitation"
},
@ -49,12 +50,29 @@
"title": "Bienvenue sur Jellyfin",
"welcome": "Bienvenue sur Jellyfin !",
"jellyfinURL": "URL",
"name": "Courriel de bienvenue"
"name": "Courriel de bienvenue",
"yourAccountWillExpire": "Ton compte expirera le {date}."
},
"emailConfirmation": {
"title": "Confirmez votre adresse e-mail - Jellyfin",
"clickBelow": "Clique sur le lien ci-dessous pour confirmer ton adresse e-mail et commencer à utiliser Jellyfin.",
"confirmEmail": "Confirmer l'adresse e-mail",
"name": "Email de confirmation"
},
"userExpired": {
"contactTheAdmin": "Contacte l'administrateur pour plus d'informations.",
"name": "Utilisateur expiré",
"title": "Ton compte a expiré - Jellyfin",
"yourAccountHasExpired": "Ton compte a expiré."
},
"userDisabled": {
"name": "Utilisateur désactivé",
"title": "Ton compte a été désactivé - Jellyfin",
"yourAccountWasDisabled": "Ton compte a été désactivé."
},
"userEnabled": {
"name": "Utilisateur activé",
"title": "Ton compte a été ré-activé - Jellyfin",
"yourAccountWasEnabled": "Ton compte a été ré-activé."
}
}

12
lang/pwreset/es-es.json Normal file
View File

@ -0,0 +1,12 @@
{
"meta": {
"name": "Español (ES)"
},
"strings": {
"passwordReset": "Cambiar contraseña",
"resetFailed": "Error al cambiar contraseña",
"tryAgain": "Por favor intente nuevamente.",
"youCanLogin": "Ahora puedes logearte con el codigo como contraseña.",
"changeYourPassword": "Recuerda cambiar tu contraseña luego de iniciar sesión."
}
}

View File

@ -76,7 +76,7 @@
},
"ombi": {
"title": "Ombi",
"description": "By connecting to Ombi, both a Jellyfin and Ombi account will be created when a user joins through jfa-go. After setup if finished, go to Settings to set a default profile for new ombi users.",
"description": "By connecting to Ombi, both a Jellyfin and Ombi account will be created when a user joins through jfa-go. After setup is finished, go to Settings to set a default profile for new ombi users.",
"apiKeyNotice": "Find this in the first tab of Ombi settings."
},
"email": {
@ -108,7 +108,10 @@
"title": "Password Resets",
"description": "When a user tries to reset their password, Jellyfin creates a file named 'passwordreset-*.json' which contains a PIN. jfa-go reads the file and sends the PIN to the user.",
"pathToJellyfin": "Path to Jellyfin configuration directory",
"pathToJellyfinNotice": "If you don't know where this is, try resetting your password in Jellyfin. A popup with '<path to jellyfin>/passwordreset-*.json' will appear."
"pathToJellyfinNotice": "If you don't know where this is, try resetting your password in Jellyfin. A popup with '<path to jellyfin>/passwordreset-*.json' will appear.",
"resetLinks": "Send a link instead of a PIN",
"resetLinksNotice": "If Ombi integration is enabled, use this to sync Jellyfin password resets with Ombi.",
"resetLinksLanguage": "Default reset link language"
},
"passwordValidation": {
"title": "Password Validation",

View File

@ -1,6 +1,6 @@
{
"meta": {
"name": "Español (ES)"
"name": "Español(ES)"
},
"strings": {
"pageTitle": "Configuración - jfa-go",
@ -30,7 +30,7 @@
},
"language": {
"title": "Lenguaje",
"description": "Las traducciones de la comunidad están disponibles para la mayor parte de jfa-go. Puede elegir los idiomas predeterminados a continuación, pero los usuarios aún pueden cambiarlo si lo desean. Si quieres ayudar a traducir, regístrate en {n} para empezar a contribuir.",
"description": "Las traducciones de la comunidad están disponibles para la mayor parte de jfa-go. Puede elegir los idiomas predeterminados a continuación, pero los usuarios aún pueden cambiarlo si lo desean. Si quieres ayudar a traducir, regístrate en {n} para empezar a contribuir!",
"defaultAdminLang": "Idioma de administrador predeterminado",
"defaultFormLang": "Idioma de creación de cuenta predeterminado",
"defaultEmailLang": "Idioma de correo electrónico predeterminado"
@ -75,7 +75,7 @@
"testConnection": "Probar conexión"
},
"ombi": {
"title": "Ombi",
"title": "Ombi.",
"description": "Al conectarse a Ombi, se creará una cuenta de Jellyfin y Ombi cuando un usuario se una a través de jfa-go. Una vez finalizada la configuración, vaya a Configuración para establecer un perfil predeterminado para los nuevos usuarios de ombi.",
"apiKeyNotice": "Encuentra esto en la primera pestaña de la configuración de Ombi."
},

View File

@ -62,7 +62,7 @@
<mj-text mj-class="text" font-size="16px" font-family="Noto Sans, Helvetica, Arial, sans-serif">
<h3>{{ .welcome }}</h3>
<p>{{ .youCanLoginWith }}:</p>
{{ .jellyfinURLString }}: <a href="{{ .jellyfinURLVal }}">{{ .jellyfinURL }}</a>
{{ .jellyfinURLString }}: <a href="{{ .jellyfinURL }}">{{ .jellyfinURL }}</a>
<p>{{ .usernameString }}: <i>{{ .username }}</i></p>
<p>{{ .yourAccountWillExpire }}</p>
</mj-text>

View File

@ -187,8 +187,8 @@ class Select {
}
class LangSelect extends Select {
constructor(page: string, el: HTMLElement) {
super(el);
constructor(page: string, el: HTMLElement, depends?: string, dependsTrue?: boolean, section?: string, setting?: string) {
super(el, depends, dependsTrue, section, setting);
_get("/lang/" + page, null, (req: XMLHttpRequest) => {
if (req.readyState == 4 && req.status == 200) {
for (let code in req.response) {
@ -256,7 +256,9 @@ const settings = {
"password_resets": {
"enabled": new Checkbox(get("password_resets-enabled"), "", false, "password_resets", "enabled"),
"watch_directory": new Input(get("password_resets-watch_directory"), "", "", "enabled", true, "password_resets"),
"subject": new Input(get("password_resets-subject"), "", "", "enabled", true, "password_resets")
"subject": new Input(get("password_resets-subject"), "", "", "enabled", true, "password_resets"),
"link_reset": new Checkbox(get("password_resets-link_reset"), "enabled", true, "password_resets", "link_reset"),
"language": new LangSelect("pwr", get("password_resets-language"), "link_reset", true, "password_resets", "language")
},
"notifications": {
"enabled": new Checkbox(get("notifications-enabled"))