From 0248b051efa95afc6c8b1c15733f0a3a8ee61e33 Mon Sep 17 00:00:00 2001 From: Athozus Date: Sun, 16 Jul 2023 22:59:56 +0200 Subject: [PATCH] Add a setting for automatic marking read When a message is opened --- init.lua | 3 ++- locale/mail.de.tr | 62 +++++++++++++++++++++++--------------------- locale/mail.es.tr | 62 +++++++++++++++++++++++--------------------- locale/mail.fr.tr | 62 +++++++++++++++++++++++--------------------- locale/mail.hu.tr | 62 +++++++++++++++++++++++--------------------- locale/mail.pt_BR.tr | 62 +++++++++++++++++++++++--------------------- locale/mail.zh_CN.tr | 62 +++++++++++++++++++++++--------------------- locale/mail.zh_TW.tr | 62 +++++++++++++++++++++++--------------------- locale/template.txt | 62 +++++++++++++++++++++++--------------------- storage.lua | 1 + ui/message.lua | 2 +- ui/settings.lua | 7 +++++ 12 files changed, 267 insertions(+), 242 deletions(-) diff --git a/init.lua b/init.lua index 143b86f..1a9ef9d 100644 --- a/init.lua +++ b/init.lua @@ -34,7 +34,8 @@ mail = { sound_notifications = {}, unreadcolorenable = {}, cccolorenable = {}, - trash_move_enable = {} + trash_move_enable = {}, + auto_marking_read = {}, }, colors = { diff --git a/locale/mail.de.tr b/locale/mail.de.tr index c67dd27..b2a1495 100644 --- a/locale/mail.de.tr +++ b/locale/mail.de.tr @@ -6,8 +6,6 @@ Expat (code), WTFPL (textures)=Expat (Code), WTFPL (Texturen) Communication using this system is NOT guaranteed to be private!=Die Kommunikation über dieses System ist NICHT garantiert privat! Admins are able to view the messages of any player.=Admins können die Nachrichten aller Spieler sehen. Contributors=Mitwirkende -Settings=Einstellungen -About=Über You have a new message from @1! Subject: @2=Sie haben eine neue Nachricht von @1! Betreff: @2 To view it, type /mail=Geben Sie zum Anzeigen „/mail“ ein You could also use the button in your inventory.=Sie können auch die Schaltfläche in Ihrem Inventar verwenden. @@ -16,12 +14,13 @@ Cancel=Abbrechen Save draft=Entwurf speichern Send=Senden No contacts=Keine Kontakte +Edit=Bearbeiten No drafts=Keine Entwürfe -Subject=Betreff -To=An Player name=Spielername That name is already in your contacts=Dieser Name ist bereits in Ihren Kontakten The contact name cannot be empty.=Der Kontaktname kann nicht leer sein. +Note=Anmerkung +Back=Zurück Save=Speichern Maillist name=Verteilerlistenname Desc=Beschreibung @@ -30,34 +29,41 @@ That name is already in your mailing lists.=Dieser Name ist bereits in Ihren Ver The mailing list name cannot be empty.=Der Verteilerlistenname kann nicht leer sein. Mark Read=Als gelesen makieren Mark Unread=Als ungelesen makieren -(No description)=(Keine Beschreibung) -No maillist=Keine Verteilerliste -Note=Anmerkung -Edit=Bearbeiten -Delete=Löschen -New=Neu -Back=Zurück -Name=Name -Receivers=Empfänger -From=Von Reply=Antworten Reply all=Allen antworten Forward=Weiterleiten Reply only to the sender= Reply to all involved people= Transfer message to other people= -Date=Datum -CC=CC -You have mail! Type /mail to read=Sie haben Post! „/mail“ eingeben zum Lesen +From=Von Filter=Filter Allow multiple selection=Mehrfachauswahl zulassen @1 of @2 selected=@1 von @2 ausgewählt (Un)select all=Alle aus-/abwählen No mail=Keine Nachrichten -Ascending=Aufsteigend -Descending=Absteigend +Subject=Betreff +New=Neu +Delete=Löschen +Date=Datum +(No description)=(Keine Beschreibung) +No maillist=Keine Verteilerliste +Receivers=Empfänger +You have mail! Type /mail to read=Sie haben Post! „/mail“ eingeben zum Lesen +Read=Lesen +Trash=Papierkorb +Inbox=Posteingang +Outbox=Senden +Drafts=Entwürfe +Contacts=Kontakte +Mail lists=Verteilerlisten +Options=Einstellungen +Close=Schließen +(No subject)=(Kein Betreff) +To=An Add=Hinzufügen Remove=Entfernen +Name=Name +CC=CC Notifications=Benachrichtigungen Chat notifications=Chat-Benachrichtigungen On join notifications=Bei-Eintritt-Benachrichtigungen @@ -69,11 +75,18 @@ Show CC/BCC in different color=CC/BCC in anderer Farbe anzeigen Default sorting fields=Standardsortierfelder Other=Anderes Move deleted messages to trash=Gelöschte Nachrichten in den Papierkorb verschieben +Automatic marking read= Receive a message in the chat when there is a new message= Receive a message at login when inbox isn't empty= Show an HUD notification when inbox isn't empty= Play a sound when there is a new message= +Mark a message as read when opened= Reset=Zurücksetzen +Settings=Einstellungen +About=Über +Ascending=Aufsteigend +Descending=Absteigend +From/To=Von/An years= months= weeks= @@ -85,14 +98,3 @@ seconds= Restore=Wiederherstellen Empty=Leer Trash is empty=Papierkorb ist leer -Trash=Papierkorb -Inbox=Posteingang -Outbox=Senden -Drafts=Entwürfe -Contacts=Kontakte -Mail lists=Verteilerlisten -Options=Einstellungen -Close=Schließen -(No subject)=(Kein Betreff) -Read=Lesen -From/To=Von/An diff --git a/locale/mail.es.tr b/locale/mail.es.tr index b80cdf7..a34c440 100644 --- a/locale/mail.es.tr +++ b/locale/mail.es.tr @@ -6,8 +6,6 @@ Expat (code), WTFPL (textures)= Communication using this system is NOT guaranteed to be private!= Admins are able to view the messages of any player.= Contributors= -Settings= -About=Acerca de You have a new message from @1! Subject: @2= To view it, type /mail= You could also use the button in your inventory.= @@ -16,12 +14,13 @@ Cancel=Cancelar Save draft=Guardar borrador Send=Enviar No contacts= +Edit=Editar No drafts=No hay borradores -Subject=Asunto -To=Para Player name=Nombre del jugador That name is already in your contacts=Ese nombre ya está en tus contactos The contact name cannot be empty.=Ese nombre de contacto no puede estar vacío. +Note=Nota +Back=Volver Save=Guardar Maillist name=Nombre de la lista de correo Desc=Desc @@ -30,34 +29,41 @@ That name is already in your mailing lists.=Ese nombre ya está entus listas de The mailing list name cannot be empty.=Ese nombre de lista de correo no puede estar vacío. Mark Read=Marcar como leído Mark Unread=Marcar como no leído -(No description)=(Sin descripción) -No maillist=Sin lista de correo -Note=Nota -Edit=Editar -Delete=Borrar -New=Nuevo -Back=Volver -Name=Nombre -Receivers= -From=De Reply=Responder Reply all=Responder a todos Forward=Reenviar Reply only to the sender= Reply to all involved people= Transfer message to other people= -Date=Fecha -CC=CC -You have mail! Type /mail to read= +From=De Filter=Filtrar Allow multiple selection=Permitir selección múltiple @1 of @2 selected= (Un)select all=(Des)seleccionar todos No mail=Sin correo -Ascending=Ascendente -Descending=Descendiente +Subject=Asunto +New=Nuevo +Delete=Borrar +Date=Fecha +(No description)=(Sin descripción) +No maillist=Sin lista de correo +Receivers= +You have mail! Type /mail to read= +Read=Leído +Trash= +Inbox=Entrada +Outbox=Enviados +Drafts=Borradores +Contacts=Contactos +Mail lists=Listas de correo +Options= +Close=Cerrar +(No subject)=(Sin asunto) +To=Para Add=Añadir Remove=Quitar +Name=Nombre +CC=CC Notifications= Chat notifications= On join notifications= @@ -69,11 +75,18 @@ Show CC/BCC in different color= Default sorting fields= Other= Move deleted messages to trash= +Automatic marking read= Receive a message in the chat when there is a new message= Receive a message at login when inbox isn't empty= Show an HUD notification when inbox isn't empty= Play a sound when there is a new message= +Mark a message as read when opened= Reset= +Settings= +About=Acerca de +Ascending=Ascendente +Descending=Descendiente +From/To=De/Para years= months= weeks= @@ -85,14 +98,3 @@ seconds= Restore= Empty= Trash is empty= -Trash= -Inbox=Entrada -Outbox=Enviados -Drafts=Borradores -Contacts=Contactos -Mail lists=Listas de correo -Options= -Close=Cerrar -(No subject)=(Sin asunto) -Read=Leído -From/To=De/Para diff --git a/locale/mail.fr.tr b/locale/mail.fr.tr index 0e52998..ba345af 100644 --- a/locale/mail.fr.tr +++ b/locale/mail.fr.tr @@ -6,8 +6,6 @@ Expat (code), WTFPL (textures)=Expat (code), WTFPL (textures) Communication using this system is NOT guaranteed to be private!=La communication par ce système n'est pas garantie d'être privée ! Admins are able to view the messages of any player.=Les administrateurs peuvent voir les messages de chaque joueur. Contributors=Contributeurs -Settings=Paramètres -About=À propos You have a new message from @1! Subject: @2=Vous avez un nouveau message de @1 ! Objet : @2 To view it, type /mail=Pour le consulter, entrez /mail You could also use the button in your inventory.=Vous pouvez également utiliser le bouton dans votre inventaire @@ -16,12 +14,13 @@ Cancel=Annuler Save draft=Enregistrer le brouillon Send=Envoyer No contacts=Aucun contact +Edit=Modifier No drafts=Aucun brouillon -Subject=Objet -To=À Player name=Nom du joueur That name is already in your contacts=Ce nom est déjà dans vos contacts The contact name cannot be empty.=Le nom du contact ne peut pas être vide. +Note=Note +Back=Retour Save=Sauvegarder Maillist name=Nom de la liste de diffusion Desc=Desc @@ -30,34 +29,41 @@ That name is already in your mailing lists.=Ce nom est déjà présent dans vos The mailing list name cannot be empty.=Le nom de la liste de diffusion ne peut pas être vide. Mark Read=Marquer comme lu Mark Unread=Marquer non lu -(No description)=Sans description -No maillist=Aucune liste de diffusion -Note=Note -Edit=Modifier -Delete=Supprimer -New=Nouveau -Back=Retour -Name=Nom -Receivers=Destinataires -From=De Reply=Répondre Reply all=Répondre à tous Forward=Transférer Reply only to the sender=Répondre uniquement à l'expéditeur Reply to all involved people=Répondre à toutes les personnes concernées Transfer message to other people=Transférer le message à d'autres personnes -Date=Date -CC=Cc -You have mail! Type /mail to read=Vous avez reçu un mail ! Entrez /mail pour le consulter +From=De Filter=Filtre Allow multiple selection=Autoriser la sélection multiple @1 of @2 selected=@1 sur @2 sélectionnés (Un)select all=Tout (dé)selectionner No mail=Aucun mail -Ascending=Croissant -Descending=Décroissant +Subject=Objet +New=Nouveau +Delete=Supprimer +Date=Date +(No description)=Sans description +No maillist=Aucune liste de diffusion +Receivers=Destinataires +You have mail! Type /mail to read=Vous avez reçu un mail ! Entrez /mail pour le consulter +Read=Lire +Trash=Corbeille +Inbox=Boîte de réception +Outbox=Envoyés +Drafts=Brouillons +Contacts=Contacts +Mail lists=Listes de diffusion +Options=Options +Close=Fermer +(No subject)=(Sans objet) +To=À Add=Ajouter Remove=Enlever +Name=Nom +CC=Cc Notifications=Notifications Chat notifications=Notifications dans le tchat On join notifications=Notifications à la connexion @@ -69,11 +75,18 @@ Show CC/BCC in different color=Coloriser les Cc/Cci Default sorting fields=Champs de tri par défaut Other=Autre Move deleted messages to trash=Supprimer les messages dans la corbeille +Automatic marking read=Lu automatique Receive a message in the chat when there is a new message=Recevoir un message dans le tchat lorsqu'un nouveau message est reçu Receive a message at login when inbox isn't empty=Recevoir un message à la connexion lorsque la boîte de réception n'est pas vide Show an HUD notification when inbox isn't empty=Indiquer dans l'ATH que la boîte de réception n'est pas vide Play a sound when there is a new message=Jouer un son lorsqu'un nouveau message est reçu +Mark a message as read when opened=Marquer un message comme lu lorsqu'il est ouvert Reset=Réinitialiser +Settings=Paramètres +About=À propos +Ascending=Croissant +Descending=Décroissant +From/To=De/À years=années months=mois weeks=semaines @@ -85,14 +98,3 @@ seconds=secondes Restore=Restaurer Empty=Vider Trash is empty=La corbeille est vide -Trash=Corbeille -Inbox=Boîte de réception -Outbox=Envoyés -Drafts=Brouillons -Contacts=Contacts -Mail lists=Listes de diffusion -Options=Options -Close=Fermer -(No subject)=(Sans objet) -Read=Lire -From/To=De/À diff --git a/locale/mail.hu.tr b/locale/mail.hu.tr index 6615216..73bd461 100644 --- a/locale/mail.hu.tr +++ b/locale/mail.hu.tr @@ -6,8 +6,6 @@ Expat (code), WTFPL (textures)=Expat (kód), WTFPL (textúrák) Communication using this system is NOT guaranteed to be private!=A systemben lévő komunikáció nem garantáltan privát! Admins are able to view the messages of any player.=Az adminok megtudják nézni minden játékos üzenetjét. Contributors=Közreműködöttek -Settings=Beállítások -About=Róla You have a new message from @1! Subject: @2=Van egy új üzeneted @1-től Cím: @2 To view it, type /mail=Ahhoz hogy megnézd, írd /mail You could also use the button in your inventory.=A gombot is tudod használni az inventoridban. @@ -16,12 +14,13 @@ Cancel=Mégse Save draft=mentés piszkozatként Send=Küldés No contacts= +Edit=Szerkesztés No drafts=Nincsenek piszkozatok -Subject=Cím -To=Neki Player name=Játékos neve That name is already in your contacts=A név már a kontaktok között van The contact name cannot be empty.=A contakt neve nem lehet üres. +Note=Jegyzet +Back=Visza Save=Mentés Maillist name=Levelező lista neve Desc=Desc @@ -30,34 +29,41 @@ That name is already in your mailing lists.=A név már benne van a levelező li The mailing list name cannot be empty.=A levelező lista neve nem lehet üres Mark Read=Jelöld olvasottként Mark Unread=Jelöld olvasatlanul -(No description)=(Nincs leírás) -No maillist=Nincs levelező lista -Note=Jegyzet -Edit=Szerkesztés -Delete=Törlés -New=Új -Back=Visza -Name=Név -Receivers= -From=Tőle Reply=Válasz Reply all=Válaszmindenkinek Forward=Továbbítás Reply only to the sender= Reply to all involved people= Transfer message to other people= -Date=Dátum -CC=CC -You have mail! Type /mail to read=Van egy leveled! Írd /mail az olvasáshoz +From=Tőle Filter=Filterek Allow multiple selection= @1 of @2 selected= (Un)select all=(ne válaszd ki) mindegyik választása No mail=Nincs levél -Ascending=Emelkedő -Descending=Sűlyedő +Subject=Cím +New=Új +Delete=Törlés +Date=Dátum +(No description)=(Nincs leírás) +No maillist=Nincs levelező lista +Receivers= +You have mail! Type /mail to read=Van egy leveled! Írd /mail az olvasáshoz +Read=Olvasott +Trash= +Inbox=PostaLáda +Outbox=Elküldött +Drafts=Piszkozatok +Contacts=Contaktok +Mail lists=Levelező lista +Options=Lehetőségek +Close=Bezár +(No subject)=(nincs cím) +To=Neki Add=Hozzáadás Remove=Elvétel +Name=Név +CC=CC Notifications=Értesítések Chat notifications=Chates értesítések On join notifications=Belépési értesírés @@ -69,11 +75,18 @@ Show CC/BCC in different color=Mutasd a CC-t/BCC-t más színnel Default sorting fields=Alap válogató terület Other= Move deleted messages to trash= +Automatic marking read= Receive a message in the chat when there is a new message= Receive a message at login when inbox isn't empty= Show an HUD notification when inbox isn't empty= Play a sound when there is a new message= +Mark a message as read when opened= Reset=Viszaállítás +Settings=Beállítások +About=Róla +Ascending=Emelkedő +Descending=Sűlyedő +From/To=Tól(től)/neki years= months= weeks= @@ -85,14 +98,3 @@ seconds= Restore= Empty= Trash is empty= -Trash= -Inbox=PostaLáda -Outbox=Elküldött -Drafts=Piszkozatok -Contacts=Contaktok -Mail lists=Levelező lista -Options=Lehetőségek -Close=Bezár -(No subject)=(nincs cím) -Read=Olvasott -From/To=Tól(től)/neki diff --git a/locale/mail.pt_BR.tr b/locale/mail.pt_BR.tr index 28b8b28..c994b14 100644 --- a/locale/mail.pt_BR.tr +++ b/locale/mail.pt_BR.tr @@ -6,8 +6,6 @@ Expat (code), WTFPL (textures)= Communication using this system is NOT guaranteed to be private!=A comunicação usando este sistema não possui garantia de privacidade Admins are able to view the messages of any player.=Administradores poderão ler as mensagens de qualquer jogador Contributors= -Settings=Ajustes -About=Sobre You have a new message from @1! Subject: @2=Você tem uma mensagem de @1! Assunto: @2 To view it, type /mail=Para visualizar a mensagem, digite /mail You could also use the button in your inventory.=Você também pode usar o botão do seu inventário. @@ -16,12 +14,13 @@ Cancel=Cancelar Save draft=Salvar rascunho Send=Enviar No contacts= +Edit=Editar No drafts=Sem rascunhos -Subject=Assunto -To=Para Player name=Nome do jogador That name is already in your contacts=Esse nome já consta em sua lista de contatos The contact name cannot be empty.=Informe o nome do destinatário +Note=Nota +Back=Voltar Save=Salvar Maillist name=Nome da lista de discussão Desc=Descrição @@ -30,34 +29,41 @@ That name is already in your mailing lists.=Esse nome ja está sendo usado em su The mailing list name cannot be empty.=O nome da lista de discussões deve ser informado Mark Read=Marcar como lido Mark Unread=Marcar como não lido -(No description)=(sem descrição) -No maillist=Sem lista de discussão -Note=Nota -Edit=Editar -Delete=Apagar -New=Novo -Back=Voltar -Name=Nome -Receivers= -From=De Reply=Responder Reply all=Responder Todos Forward=Encaminhar Reply only to the sender= Reply to all involved people= Transfer message to other people= -Date=Data -CC=CC -You have mail! Type /mail to read=Você recebeu e-mail! Tecle /mail para ler +From=De Filter=Filtrar Allow multiple selection=Permitir selecionar vários @1 of @2 selected= (Un)select all=Desmarcar todos No mail=Sem e-mails no momento -Ascending=Ascendente -Descending=Descendente +Subject=Assunto +New=Novo +Delete=Apagar +Date=Data +(No description)=(sem descrição) +No maillist=Sem lista de discussão +Receivers= +You have mail! Type /mail to read=Você recebeu e-mail! Tecle /mail para ler +Read=Ler +Trash= +Inbox=Entrada +Outbox=Enviadas +Drafts=Rascunhos +Contacts=Contatos +Mail lists=Lista de correios +Options=Opções +Close=Fechar +(No subject)=(Sem assunto) +To=Para Add=Adicionar Remove=Remover +Name=Nome +CC=CC Notifications=Notificações Chat notifications=Notificação de conversa On join notifications=Notificação ao entrar @@ -69,11 +75,18 @@ Show CC/BCC in different color=Exibir mensagens com copia em uma cor diferente Default sorting fields=Ordenamento de campos padrão Other= Move deleted messages to trash= +Automatic marking read= Receive a message in the chat when there is a new message= Receive a message at login when inbox isn't empty= Show an HUD notification when inbox isn't empty= Play a sound when there is a new message= +Mark a message as read when opened= Reset= +Settings=Ajustes +About=Sobre +Ascending=Ascendente +Descending=Descendente +From/To=De/Para years= months= weeks= @@ -85,14 +98,3 @@ seconds= Restore= Empty= Trash is empty= -Trash= -Inbox=Entrada -Outbox=Enviadas -Drafts=Rascunhos -Contacts=Contatos -Mail lists=Lista de correios -Options=Opções -Close=Fechar -(No subject)=(Sem assunto) -Read=Ler -From/To=De/Para diff --git a/locale/mail.zh_CN.tr b/locale/mail.zh_CN.tr index 18d9e71..e69caeb 100644 --- a/locale/mail.zh_CN.tr +++ b/locale/mail.zh_CN.tr @@ -6,8 +6,6 @@ Expat (code), WTFPL (textures)= Communication using this system is NOT guaranteed to be private!= Admins are able to view the messages of any player.= Contributors= -Settings= -About=关于 You have a new message from @1! Subject: @2= To view it, type /mail= You could also use the button in your inventory.= @@ -16,13 +14,14 @@ Cancel=取消 Save draft=保存草稿 Send=发送 No contacts= +Edit=编辑 #if new means new mail, it would be New=新邮件 No drafts=没有草稿 -Subject=主题 -To=收件人 Player name=玩家名字 That name is already in your contacts= The contact name cannot be empty.= +Note=备注 +Back=返回 Save=保存 Maillist name=建组名 Desc=描述 @@ -31,34 +30,41 @@ That name is already in your mailing lists.= The mailing list name cannot be empty.= Mark Read=标记为已读 Mark Unread=标记为未读 -(No description)=(无描述) -No maillist=无建组 -Note=备注 -Edit=编辑 -Delete=删除 -New=新 -Back=返回 -Name=名字 -Receivers= -From=发件人 Reply=回复 Reply all=回复所有 Forward=转发 Reply only to the sender= Reply to all involved people= Transfer message to other people= -Date=时间 -CC=抄送 -You have mail! Type /mail to read= +From=发件人 Filter=筛选 Allow multiple selection=允许多选 @1 of @2 selected= (Un)select all=(取消)选中所有 No mail=无邮件 -Ascending=升序 -Descending=降序 +Subject=主题 +New=新 +Delete=删除 +Date=时间 +(No description)=(无描述) +No maillist=无建组 +Receivers= +You have mail! Type /mail to read= +Read=浏览 +Trash= +Inbox=收件箱 +Outbox=已发送 +Drafts=草稿 +Contacts=通讯录 +Mail lists=建组 +Options= +Close=关闭 +(No subject)=(无主题) +To=收件人 Add=添加 Remove=移除 +Name=名字 +CC=抄送 Notifications= Chat notifications= On join notifications= @@ -70,11 +76,18 @@ Show CC/BCC in different color= Default sorting fields= Other= Move deleted messages to trash= +Automatic marking read= Receive a message in the chat when there is a new message= Receive a message at login when inbox isn't empty= Show an HUD notification when inbox isn't empty= Play a sound when there is a new message= +Mark a message as read when opened= Reset= +Settings= +About=关于 +Ascending=升序 +Descending=降序 +From/To= years= months= weeks= @@ -86,14 +99,3 @@ seconds= Restore= Empty= Trash is empty= -Trash= -Inbox=收件箱 -Outbox=已发送 -Drafts=草稿 -Contacts=通讯录 -Mail lists=建组 -Options= -Close=关闭 -(No subject)=(无主题) -Read=浏览 -From/To= diff --git a/locale/mail.zh_TW.tr b/locale/mail.zh_TW.tr index 9af36a2..bace234 100644 --- a/locale/mail.zh_TW.tr +++ b/locale/mail.zh_TW.tr @@ -6,8 +6,6 @@ Expat (code), WTFPL (textures)= Communication using this system is NOT guaranteed to be private!= Admins are able to view the messages of any player.= Contributors= -Settings= -About=關於 You have a new message from @1! Subject: @2= To view it, type /mail= You could also use the button in your inventory.= @@ -16,12 +14,13 @@ Cancel=取消 Save draft=儲存草稿 Send=發送 No contacts= +Edit=編輯 No drafts=沒有草稿 -Subject=主旨 -To=收件人 Player name=玩家名稱 That name is already in your contacts= The contact name cannot be empty.= +Note=備註 +Back=返回 Save=儲存 Maillist name=郵件列表名稱 Desc=描述 @@ -30,34 +29,41 @@ That name is already in your mailing lists.= The mailing list name cannot be empty.= Mark Read=標記已讀 Mark Unread=標記未讀 -(No description)=(沒有描述) -No maillist=沒有郵件列表 -Note=備註 -Edit=編輯 -Delete=刪除 -New=新建 -Back=返回 -Name=名稱 -Receivers= -From=寄件者 Reply=回覆 Reply all=回覆所有人 Forward=轉寄 Reply only to the sender= Reply to all involved people= Transfer message to other people= -Date=日期 -CC=副本 -You have mail! Type /mail to read= +From=寄件者 Filter= Allow multiple selection= @1 of @2 selected= (Un)select all= No mail=沒有郵件 -Ascending= -Descending= +Subject=主旨 +New=新建 +Delete=刪除 +Date=日期 +(No description)=(沒有描述) +No maillist=沒有郵件列表 +Receivers= +You have mail! Type /mail to read= +Read=閱讀 +Trash= +Inbox=收件箱 +Outbox=寄件備份 +Drafts=草稿 +Contacts=聯繫人 +Mail lists=郵件列表 +Options= +Close=關閉 +(No subject)=(沒有主旨) +To=收件人 Add=加入 Remove=移除 +Name=名稱 +CC=副本 Notifications= Chat notifications= On join notifications= @@ -69,11 +75,18 @@ Show CC/BCC in different color= Default sorting fields= Other= Move deleted messages to trash= +Automatic marking read= Receive a message in the chat when there is a new message= Receive a message at login when inbox isn't empty= Show an HUD notification when inbox isn't empty= Play a sound when there is a new message= +Mark a message as read when opened= Reset= +Settings= +About=關於 +Ascending= +Descending= +From/To= years= months= weeks= @@ -85,14 +98,3 @@ seconds= Restore= Empty= Trash is empty= -Trash= -Inbox=收件箱 -Outbox=寄件備份 -Drafts=草稿 -Contacts=聯繫人 -Mail lists=郵件列表 -Options= -Close=關閉 -(No subject)=(沒有主旨) -Read=閱讀 -From/To= diff --git a/locale/template.txt b/locale/template.txt index 20a231f..c58c17c 100644 --- a/locale/template.txt +++ b/locale/template.txt @@ -6,8 +6,6 @@ Expat (code), WTFPL (textures)= Communication using this system is NOT guaranteed to be private!= Admins are able to view the messages of any player.= Contributors= -Settings= -About= You have a new message from @1! Subject: @2= To view it, type /mail= You could also use the button in your inventory.= @@ -16,12 +14,13 @@ Cancel= Save draft= Send= No contacts= +Edit= No drafts= -Subject= -To= Player name= That name is already in your contacts= The contact name cannot be empty.= +Note= +Back= Save= Maillist name= Desc= @@ -30,34 +29,41 @@ That name is already in your mailing lists.= The mailing list name cannot be empty.= Mark Read= Mark Unread= -(No description)= -No maillist= -Note= -Edit= -Delete= -New= -Back= -Name= -Receivers= -From= Reply= Reply all= Forward= Reply only to the sender= Reply to all involved people= Transfer message to other people= -Date= -CC= -You have mail! Type /mail to read= +From= Filter= Allow multiple selection= @1 of @2 selected= (Un)select all= No mail= -Ascending= -Descending= +Subject= +New= +Delete= +Date= +(No description)= +No maillist= +Receivers= +You have mail! Type /mail to read= +Read= +Trash= +Inbox= +Outbox= +Drafts= +Contacts= +Mail lists= +Options= +Close= +(No subject)= +To= Add= Remove= +Name= +CC= Notifications= Chat notifications= On join notifications= @@ -69,11 +75,18 @@ Show CC/BCC in different color= Default sorting fields= Other= Move deleted messages to trash= +Automatic marking read= Receive a message in the chat when there is a new message= Receive a message at login when inbox isn't empty= Show an HUD notification when inbox isn't empty= Play a sound when there is a new message= +Mark a message as read when opened= Reset= +Settings= +About= +Ascending= +Descending= +From/To= years= months= weeks= @@ -85,14 +98,3 @@ seconds= Restore= Empty= Trash is empty= -Trash= -Inbox= -Outbox= -Drafts= -Contacts= -Mail lists= -Options= -Close= -(No subject)= -Read= -From/To= diff --git a/storage.lua b/storage.lua index 3c3b994..3352d04 100644 --- a/storage.lua +++ b/storage.lua @@ -404,6 +404,7 @@ function mail.get_setting_default_value(setting_name) defaultsortfield = 3, defaultsortdirection = 1, trash_move_enable = true, + auto_marking_read = true, } return default_values[setting_name] end diff --git a/ui/message.lua b/ui/message.lua index 849bb6b..51126cd 100644 --- a/ui/message.lua +++ b/ui/message.lua @@ -44,7 +44,7 @@ function mail.show_message(name, id) local body = minetest.formspec_escape(message.body) or "" formspec = string.format(formspec, from, to, cc, date, subject, body) - if not message.read then + if not message.read and mail.get_setting(name, "auto_marking_read") then -- mark as read mail.mark_read(name, id) end diff --git a/ui/settings.lua b/ui/settings.lua index 1bcc3f8..cdd940c 100644 --- a/ui/settings.lua +++ b/ui/settings.lua @@ -39,11 +39,14 @@ function mail.show_settings(name) label[0.2,3.2;]] .. S("Other") .. [[] checkbox[0,3.6;trash_move_enable;]] .. S("Move deleted messages to trash") .. [[;]] .. tostring(mail.get_setting(name, "trash_move_enable")) .. [[] + checkbox[0,4.0;auto_marking_read;]] .. S("Automatic marking read") .. [[;]] .. + tostring(mail.get_setting(name, "auto_marking_read")) .. [[] tooltip[chat_notifications;]] .. S("Receive a message in the chat when there is a new message") .. [[] tooltip[onjoin_notifications;]] .. S("Receive a message at login when inbox isn't empty") .. [[] tooltip[hud_notifications;]] .. S("Show an HUD notification when inbox isn't empty") .. [[] tooltip[sound_notifications;]] .. S("Play a sound when there is a new message") .. [[] + tooltip[auto_marking_read;]] .. S("Mark a message as read when opened") .. [[] button[0,5.5;2.5,0.5;save;]] .. S("Save") .. [[] button[2.7,5.5;2.5,0.5;reset;]] .. S("Reset") .. [[] @@ -92,6 +95,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) elseif fields.trash_move_enable then mail.selected_idxs.trash_move_enable[playername] = fields.trash_move_enable == "true" + elseif fields.auto_marking_read then + mail.selected_idxs.auto_marking_read[playername] = fields.auto_marking_read == "true" + elseif fields.save then -- checkboxes mail.set_setting(playername, "chat_notifications", mail.selected_idxs.chat_notifications[playername]) @@ -101,6 +107,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) mail.set_setting(playername, "unreadcolorenable", mail.selected_idxs.unreadcolorenable[playername]) mail.set_setting(playername, "cccolorenable", mail.selected_idxs.cccolorenable[playername]) mail.set_setting(playername, "trash_move_enable", mail.selected_idxs.trash_move_enable[playername]) + mail.set_setting(playername, "auto_marking_read", mail.selected_idxs.auto_marking_read[playername]) -- dropdowns local defaultsortfield = fields.defaultsortfield or mail.get_setting("defaultsortfield") local defaultsortdirection = fields.defaultsortdirection or mail.get_setting("defaultsortdirection")