Procházet zdrojové kódy

add /auth/contact to set contact information

Miraty před 1 rokem
rodič
revize
d9ff87a833

+ 5 - 0
db/migrations/007-add-medium-to-users.sql

@@ -0,0 +1,5 @@
+BEGIN TRANSACTION;
+
+ALTER TABLE "users" ADD COLUMN "medium" TEXT NOT NULL DEFAULT "";
+
+COMMIT;

+ 1 - 0
db/schema.sql

@@ -18,6 +18,7 @@ CREATE TABLE IF NOT EXISTS "users" (
 	"bucket_last_update" INTEGER NOT NULL,
 	"bucket_last_update" INTEGER NOT NULL,
 	"type"               TEXT    NOT NULL,
 	"type"               TEXT    NOT NULL,
 	"services"           TEXT    NOT NULL,
 	"services"           TEXT    NOT NULL,
+	"medium"             TEXT    NOT NULL DEFAULT "",
 	PRIMARY KEY("id")
 	PRIMARY KEY("id")
 );
 );
 CREATE TABLE IF NOT EXISTS "approval-keys" (
 CREATE TABLE IF NOT EXISTS "approval-keys" (

+ 104 - 68
locales/fr/C/LC_MESSAGES/messages.po

@@ -1,7 +1,7 @@
 msgid ""
 msgid ""
 msgstr ""
 msgstr ""
 "Report-Msgid-Bugs-To: \n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2023-10-29 17:41+0100\n"
+"POT-Creation-Date: 2024-05-21 21:15+0200\n"
 "Language: fr\n"
 "Language: fr\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 
 
@@ -55,255 +55,267 @@ msgid "Switch to an approved account using an approval key"
 msgstr "Utiliser une clé d'approbation pour passer à un compte approuvé"
 msgstr "Utiliser une clé d'approbation pour passer à un compte approuvé"
 
 
 #: pages.php:37
 #: pages.php:37
+msgid "Edit contact information"
+msgstr "Modifier les informations de contact"
+
+#: pages.php:38
+msgid "Set the way you want to be contacted if your account is in a specific situation"
+msgstr "Définir un moyen de contact pour si le compte est dans une situation spécifique"
+
+#: pages.php:42
 msgid "Change password"
 msgid "Change password"
 msgstr "Changer la clé de passe"
 msgstr "Changer la clé de passe"
 
 
-#: pages.php:38
+#: pages.php:43
 msgid "Change the character string used to authenticate yourself"
 msgid "Change the character string used to authenticate yourself"
 msgstr "Changer la chaîne de caractères utilisée pour s'authentifier"
 msgstr "Changer la chaîne de caractères utilisée pour s'authentifier"
 
 
-#: pages.php:42
+#: pages.php:47
 msgid "Change username"
 msgid "Change username"
 msgstr "Changer l'identifiant"
 msgstr "Changer l'identifiant"
 
 
-#: pages.php:43
+#: pages.php:48
 msgid "Change the name used to identify your account when logging in and displayed at the start of every page"
 msgid "Change the name used to identify your account when logging in and displayed at the start of every page"
 msgstr "Changer le nom utilisé pour identifier le compte à la connexion et affiché au début de toutes les pages"
 msgstr "Changer le nom utilisé pour identifier le compte à la connexion et affiché au début de toutes les pages"
 
 
-#: pages.php:49
+#: pages.php:54
 #, php-format
 #, php-format
 msgid "%s registry"
 msgid "%s registry"
 msgstr "Registre %s"
 msgstr "Registre %s"
 
 
-#: pages.php:50
+#: pages.php:55
 #, php-format
 #, php-format
 msgid "Register and delegate a %s subdomain"
 msgid "Register and delegate a %s subdomain"
 msgstr "Obtenir et déléguer un domaine %s"
 msgstr "Obtenir et déléguer un domaine %s"
 
 
-#: pages.php:53
+#: pages.php:58
 msgid "Register domain"
 msgid "Register domain"
 msgstr "Enregistrer un domaine"
 msgstr "Enregistrer un domaine"
 
 
-#: pages.php:54
+#: pages.php:59
 #, php-format
 #, php-format
 msgid "Get a %s subdomain"
 msgid "Get a %s subdomain"
 msgstr "Obtenir un sous-domaine de %s"
 msgstr "Obtenir un sous-domaine de %s"
 
 
-#: pages.php:58
+#: pages.php:63
 msgid "Unregister domain"
 msgid "Unregister domain"
 msgstr "Désenregistrer un domaine"
 msgstr "Désenregistrer un domaine"
 
 
-#: pages.php:59
+#: pages.php:64
 msgid "Delete all data related to a domain and make it available to the public again"
 msgid "Delete all data related to a domain and make it available to the public again"
 msgstr "Supprimer toutes les informations liées à un domaine et le redisponibiliser au public"
 msgstr "Supprimer toutes les informations liées à un domaine et le redisponibiliser au public"
 
 
-#: pages.php:62
+#: pages.php:67
 msgid "Display domain records"
 msgid "Display domain records"
 msgstr "Afficher les enregistrements"
 msgstr "Afficher les enregistrements"
 
 
-#: pages.php:63
+#: pages.php:68
 msgid "Print every record related to a domain and served by the registry"
 msgid "Print every record related to a domain and served by the registry"
 msgstr "Montrer tous les enregistrements liés à un domaine et servis par le registre"
 msgstr "Montrer tous les enregistrements liés à un domaine et servis par le registre"
 
 
-#: pages.php:67
+#: pages.php:72
 msgid "Edit records"
 msgid "Edit records"
 msgstr "Modifier des enregistrements"
 msgstr "Modifier des enregistrements"
 
 
-#: pages.php:68
+#: pages.php:73
 msgid "Set registry records to delegate a domain to chosen name servers"
 msgid "Set registry records to delegate a domain to chosen name servers"
 msgstr "Définir les enregistrements du registre pour déléguer un domaine à des serveurs de nom de son choix"
 msgstr "Définir les enregistrements du registre pour déléguer un domaine à des serveurs de nom de son choix"
 
 
-#: pages.php:72 pages.php:77 pages.php:122 pages.php:127 pages.php:132
-#: pages.php:137 pages.php:142 pages.php:147 pages.php:152 pages.php:157
-#: pages.php:162 pages.php:167
+#: pages.php:77 pages.php:82 pages.php:127 pages.php:132 pages.php:137
+#: pages.php:142 pages.php:147 pages.php:152 pages.php:157 pages.php:162
+#: pages.php:167 pages.php:172
 #, php-format
 #, php-format
 msgid "%s records"
 msgid "%s records"
 msgstr "Enregistrements %s"
 msgstr "Enregistrements %s"
 
 
-#: pages.php:73
+#: pages.php:78
 #, php-format
 #, php-format
 msgid "Indicate the name servers of a %s subdomain"
 msgid "Indicate the name servers of a %s subdomain"
 msgstr "Indiquer les serveurs de nom d'un sous-domaine de %s"
 msgstr "Indiquer les serveurs de nom d'un sous-domaine de %s"
 
 
-#: pages.php:78
+#: pages.php:83
 msgid "Delegate <abbr title=\"Domain Name System Security Extensions\">DNSSEC</abbr> trust"
 msgid "Delegate <abbr title=\"Domain Name System Security Extensions\">DNSSEC</abbr> trust"
 msgstr "Déléguer la confiance <abbr title=\"Domain Name System Security Extensions\">DNSSEC</abbr>"
 msgstr "Déléguer la confiance <abbr title=\"Domain Name System Security Extensions\">DNSSEC</abbr>"
 
 
-#: pages.php:82
+#: pages.php:87
 msgid "Receive a domain transfer"
 msgid "Receive a domain transfer"
 msgstr "Recevoir un transfert de domaine"
 msgstr "Recevoir un transfert de domaine"
 
 
-#: pages.php:83
+#: pages.php:88
 msgid "Transfer a domain owned by another account to the current account"
 msgid "Transfer a domain owned by another account to the current account"
 msgstr "Transférer vers le compte actuel un domaine possédé par un autre compte"
 msgstr "Transférer vers le compte actuel un domaine possédé par un autre compte"
 
 
-#: pages.php:87
+#: pages.php:92
 msgid "Glue records"
 msgid "Glue records"
 msgstr "Glue records"
 msgstr "Glue records"
 
 
-#: pages.php:88
+#: pages.php:93
 msgid "Advanced: store the IP address of a name server whose domain is inside the domain it serves"
 msgid "Advanced: store the IP address of a name server whose domain is inside the domain it serves"
 msgstr "Avancé&nbsp;: indiquer l'adresse IP d'un serveur de nom dont le domaine descend de la zone qu'il sert"
 msgstr "Avancé&nbsp;: indiquer l'adresse IP d'un serveur de nom dont le domaine descend de la zone qu'il sert"
 
 
-#: pages.php:94 pg-view/ns/index.php:25
+#: pages.php:99 pg-view/ns/index.php:25
 msgid "Name servers"
 msgid "Name servers"
 msgstr "Serveurs de nom"
 msgstr "Serveurs de nom"
 
 
-#: pages.php:95
+#: pages.php:100
 msgid "Host and manage domain's records"
 msgid "Host and manage domain's records"
 msgstr "Héberger et gérer les enregistrements d'un domaine"
 msgstr "Héberger et gérer les enregistrements d'un domaine"
 
 
-#: pages.php:98
+#: pages.php:103
 msgid "Add zone"
 msgid "Add zone"
 msgstr "Ajouter une zone"
 msgstr "Ajouter une zone"
 
 
-#: pages.php:99
+#: pages.php:104
 #, php-format
 #, php-format
 msgid "The zone will be managed by %s name servers"
 msgid "The zone will be managed by %s name servers"
 msgstr "La zone sera gérée par les serveurs de nom de %s"
 msgstr "La zone sera gérée par les serveurs de nom de %s"
 
 
-#: pages.php:103
+#: pages.php:108
 msgid "Delete zone"
 msgid "Delete zone"
 msgstr "Supprimer une zone"
 msgstr "Supprimer une zone"
 
 
-#: pages.php:104
+#: pages.php:109
 msgid "Erase all zone data"
 msgid "Erase all zone data"
 msgstr "Effacer tous les enregistrements d'une zone"
 msgstr "Effacer tous les enregistrements d'une zone"
 
 
-#: pages.php:107
+#: pages.php:112
 msgid "Display zone"
 msgid "Display zone"
 msgstr "Afficher une zone"
 msgstr "Afficher une zone"
 
 
-#: pages.php:108
+#: pages.php:113
 msgid "Print zonefile content"
 msgid "Print zonefile content"
 msgstr "Montrer le contenu d'un fichier de zone"
 msgstr "Montrer le contenu d'un fichier de zone"
 
 
-#: pages.php:112
+#: pages.php:117
 msgid "Edit zone"
 msgid "Edit zone"
 msgstr "Modifier une zone"
 msgstr "Modifier une zone"
 
 
-#: pages.php:113
+#: pages.php:118
 msgid "Change zonefile content"
 msgid "Change zonefile content"
 msgstr "Éditer le contenu d'un fichier de zone"
 msgstr "Éditer le contenu d'un fichier de zone"
 
 
-#: pages.php:117
+#: pages.php:122
 msgid "AAAA and A records"
 msgid "AAAA and A records"
 msgstr "Enregistrements AAAA et A"
 msgstr "Enregistrements AAAA et A"
 
 
-#: pages.php:118
+#: pages.php:123
 msgid "Store domain's IP address"
 msgid "Store domain's IP address"
 msgstr "Indiquer l'adresse IP d'un domaine"
 msgstr "Indiquer l'adresse IP d'un domaine"
 
 
-#: pages.php:123
+#: pages.php:128
 msgid "Store zone's name server"
 msgid "Store zone's name server"
 msgstr "Indiquer les serveurs de nom d'une zone"
 msgstr "Indiquer les serveurs de nom d'une zone"
 
 
-#: pages.php:128
+#: pages.php:133
 msgid "Associate text to domain"
 msgid "Associate text to domain"
 msgstr "Associer du texte à un domaine"
 msgstr "Associer du texte à un domaine"
 
 
-#: pages.php:133
+#: pages.php:138
 msgid "Limit the certificate authorities allowed to certify the domain"
 msgid "Limit the certificate authorities allowed to certify the domain"
 msgstr "Limiter les autorités de certification autorisées à certifier un domaine"
 msgstr "Limiter les autorités de certification autorisées à certifier un domaine"
 
 
-#: pages.php:138
+#: pages.php:143
 msgid "Store the location of a domain's service"
 msgid "Store the location of a domain's service"
 msgstr "Indiquer l'adresse exacte d'un service pour un domaine"
 msgstr "Indiquer l'adresse exacte d'un service pour un domaine"
 
 
-#: pages.php:143
+#: pages.php:148
 msgid "Store the email server's address"
 msgid "Store the email server's address"
 msgstr "Indiquer l'adresse d'un serveur de courriels"
 msgstr "Indiquer l'adresse d'un serveur de courriels"
 
 
-#: pages.php:148
+#: pages.php:153
 msgid "Store <abbr title=\"Secure SHell\">SSH</abbr> public keys fingerprints"
 msgid "Store <abbr title=\"Secure SHell\">SSH</abbr> public keys fingerprints"
 msgstr "Indiquer les empreintes de clés publiques <abbr title=\"Secure SHell\">SSH</abbr>"
 msgstr "Indiquer les empreintes de clés publiques <abbr title=\"Secure SHell\">SSH</abbr>"
 
 
-#: pages.php:153
+#: pages.php:158
 msgid "Setup <abbr title=\"DNS-based Authentication of Named Entities\">DANE</abbr> by publishing the <abbr title=\"Transport Layer Security\">TLS</abbr> certificate fingerprint"
 msgid "Setup <abbr title=\"DNS-based Authentication of Named Entities\">DANE</abbr> by publishing the <abbr title=\"Transport Layer Security\">TLS</abbr> certificate fingerprint"
 msgstr "Mettre en place <abbr title=\"DNS-based Authentication of Named Entities\">DANE</abbr> et publiant l'empreinte d'un certificat <abbr title=\"Transport Layer Security\">TLS</abbr>"
 msgstr "Mettre en place <abbr title=\"DNS-based Authentication of Named Entities\">DANE</abbr> et publiant l'empreinte d'un certificat <abbr title=\"Transport Layer Security\">TLS</abbr>"
 
 
-#: pages.php:158
+#: pages.php:163
 msgid "Define a domain as an alias of another"
 msgid "Define a domain as an alias of another"
 msgstr "Définir un domaine comme étant l'alias d'un autre"
 msgstr "Définir un domaine comme étant l'alias d'un autre"
 
 
-#: pages.php:163
+#: pages.php:168
 msgid "Define all subdomains of a domain as aliases of subdomains of another domain"
 msgid "Define all subdomains of a domain as aliases of subdomains of another domain"
 msgstr "Définir la descendance d'un domaine comme alias de la descendance d'un autre domaine"
 msgstr "Définir la descendance d'un domaine comme alias de la descendance d'un autre domaine"
 
 
-#: pages.php:168
+#: pages.php:173
 msgid "Store geographic coordinates"
 msgid "Store geographic coordinates"
 msgstr "Indiquer des coordonnées géographiques"
 msgstr "Indiquer des coordonnées géographiques"
 
 
-#: pages.php:172
+#: pages.php:177
 #, php-format
 #, php-format
 msgid "Synchronized records"
 msgid "Synchronized records"
 msgstr "Enregistrements synchronisés"
 msgstr "Enregistrements synchronisés"
 
 
-#: pages.php:173
+#: pages.php:178
 msgid "Regularly fetch distant records and update them to a local zone"
 msgid "Regularly fetch distant records and update them to a local zone"
 msgstr "Récupérer régulièrement des enregistrements distants et les mettre à jour vers une zone locale"
 msgstr "Récupérer régulièrement des enregistrements distants et les mettre à jour vers une zone locale"
 
 
-#: pages.php:179
+#: pages.php:184
 msgid "Web"
 msgid "Web"
 msgstr "Web"
 msgstr "Web"
 
 
-#: pages.php:180
+#: pages.php:185
 msgid "Upload a static website into an <abbr title=\"SSH File Transfer Protocol\">SFTP</abbr> space"
 msgid "Upload a static website into an <abbr title=\"SSH File Transfer Protocol\">SFTP</abbr> space"
 msgstr "Téléverser un site statique dans un espace <abbr title=\"SSH File Transfer Protocol\">SFTP</abbr>"
 msgstr "Téléverser un site statique dans un espace <abbr title=\"SSH File Transfer Protocol\">SFTP</abbr>"
 
 
-#: pages.php:183
+#: pages.php:188
 #, php-format
 #, php-format
 msgid "%s subpath access"
 msgid "%s subpath access"
 msgstr "Accès par sous-chemin de %s"
 msgstr "Accès par sous-chemin de %s"
 
 
-#: pages.php:184 pages.php:189 pages.php:194
+#: pages.php:189 pages.php:194 pages.php:199
 #, php-format
 #, php-format
 msgid "Its URL will look like %s"
 msgid "Its URL will look like %s"
 msgstr "Son URL ressemblera à %s"
 msgstr "Son URL ressemblera à %s"
 
 
-#: pages.php:184 pages.php:189 pages.php:194
+#: pages.php:189 pages.php:194 pages.php:199
 msgid "mysite"
 msgid "mysite"
 msgstr "monsite"
 msgstr "monsite"
 
 
-#: pages.php:188
+#: pages.php:193
 #, php-format
 #, php-format
 msgid "%s subdomain access"
 msgid "%s subdomain access"
 msgstr "Accès par sous-domaine de %s"
 msgstr "Accès par sous-domaine de %s"
 
 
-#: pages.php:193
+#: pages.php:198
 msgid "Dedicated domain with Let's Encrypt certificate access"
 msgid "Dedicated domain with Let's Encrypt certificate access"
 msgstr "Accès par domaine dédié avec certificat Let's Encrypt"
 msgstr "Accès par domaine dédié avec certificat Let's Encrypt"
 
 
-#: pages.php:198
+#: pages.php:203
 msgid "Onion service access"
 msgid "Onion service access"
 msgstr "Accès par service Onion"
 msgstr "Accès par service Onion"
 
 
-#: pages.php:199
+#: pages.php:204
 #, php-format
 #, php-format
 msgid "Its URL will look like %s, and work only through the Tor network"
 msgid "Its URL will look like %s, and work only through the Tor network"
 msgstr "Son URL ressemblera à %s, et ne fonctionnera que par le réseau Tor"
 msgstr "Son URL ressemblera à %s, et ne fonctionnera que par le réseau Tor"
 
 
-#: pages.php:203 pg-view/ht/del.php:19
+#: pages.php:208 pg-view/ht/del.php:19
 msgid "Delete access"
 msgid "Delete access"
 msgstr "Supprimer un accès"
 msgstr "Supprimer un accès"
 
 
-#: pages.php:204
+#: pages.php:209
 msgid "Delete an existing HTTP access from a subdirectory of the SFTP space"
 msgid "Delete an existing HTTP access from a subdirectory of the SFTP space"
 msgstr "Retirer un accès HTTP existant d'un sous-dossier de l'espace SFTP"
 msgstr "Retirer un accès HTTP existant d'un sous-dossier de l'espace SFTP"
 
 
-#: pages.php:207
+#: pages.php:212
 msgid "Manage SSH keys"
 msgid "Manage SSH keys"
 msgstr "Gérer les clés SSH"
 msgstr "Gérer les clés SSH"
 
 
-#: pages.php:208
+#: pages.php:213
 msgid "Choose what SSH key can edit what directory"
 msgid "Choose what SSH key can edit what directory"
 msgstr "Choisir quelle clé SSH peut modifier quel dossier"
 msgstr "Choisir quelle clé SSH peut modifier quel dossier"
 
 
-#: router.php:106 view.php:40
+#: router.php:22
+msgid "Page not found."
+msgstr "Page introuvable."
+
+#: router.php:114 view.php:40
 msgid "This service is currently under maintenance. No action can be taken on it until an administrator finishes repairing it."
 msgid "This service is currently under maintenance. No action can be taken on it until an administrator finishes repairing it."
 msgstr "Ce service est en cours de maintenance. Aucune action ne peut être effectuée avant qu'ane administrataire termine de le réparer."
 msgstr "Ce service est en cours de maintenance. Aucune action ne peut être effectuée avant qu'ane administrataire termine de le réparer."
 
 
-#: router.php:115
+#: router.php:123
 msgid "You need to be logged in to do this."
 msgid "You need to be logged in to do this."
 msgstr "Vous devez être connecté·e à un compte pour faire cela."
 msgstr "Vous devez être connecté·e à un compte pour faire cela."
 
 
@@ -354,7 +366,7 @@ msgstr "<strong>Erreur de l'utilisataire</strong>&nbsp;: "
 msgid "<strong>Server error</strong>: "
 msgid "<strong>Server error</strong>: "
 msgstr "<strong>Erreur du serveur</strong>&nbsp;: "
 msgstr "<strong>Erreur du serveur</strong>&nbsp;: "
 
 
-#: fn/common.php:157
+#: fn/common.php:160
 msgid "Wrong proof."
 msgid "Wrong proof."
 msgstr "Preuve incorrecte."
 msgstr "Preuve incorrecte."
 
 
@@ -400,6 +412,14 @@ msgstr "Cette clé d'approbation n'est pas disponible. Elle a pu être mal saisi
 msgid "Account approved."
 msgid "Account approved."
 msgstr "Compte approuvé."
 msgstr "Compte approuvé."
 
 
+#: pg-act/auth/contact.php:4
+msgid "A forbidden character is present."
+msgstr "Un charactère interdit est présent."
+
+#: pg-act/auth/contact.php:11
+msgid "Contact information updated."
+msgstr "Informations de contact mises à jour."
+
 #: pg-act/auth/login.php:10
 #: pg-act/auth/login.php:10
 msgid "This account does not exist."
 msgid "This account does not exist."
 msgstr "Ce compte n'existe pas."
 msgstr "Ce compte n'existe pas."
@@ -456,7 +476,7 @@ msgstr "Ce domaine doit avoir %2$s pour unique enregistrement %1$s."
 msgid "No TXT record with the expected format has been found on domain %s."
 msgid "No TXT record with the expected format has been found on domain %s."
 msgstr "Aucun enregistrement TXT avec le format attendu n'a été trouvé pour le domaine %s."
 msgstr "Aucun enregistrement TXT avec le format attendu n'a été trouvé pour le domaine %s."
 
 
-#: pg-act/ht/add-dns.php:48 pg-act/ht/add-onion.php:50
+#: pg-act/ht/add-dns.php:50 pg-act/ht/add-onion.php:50
 #: pg-act/ht/add-subdomain.php:19 pg-act/ht/add-subpath.php:19
 #: pg-act/ht/add-subdomain.php:19 pg-act/ht/add-subpath.php:19
 #, php-format
 #, php-format
 msgid "%s added on this directory."
 msgid "%s added on this directory."
@@ -618,6 +638,26 @@ msgstr "Clé d'approbation"
 msgid "Use for this account"
 msgid "Use for this account"
 msgstr "Utiliser pour ce compte"
 msgstr "Utiliser pour ce compte"
 
 
+#: pg-view/auth/contact.php:3
+msgid "You can optionally tell the administrator <strong>how you want to be contacted</strong> in case a resource you own is involved in a <strong>specific problem</strong>, be it moderation, legal or technical. This may especially happen if your account's resources can host or address untrusted content."
+msgstr "Vous pouvez optionnellement dire à l'administrataire <strong>comment vous souhaitez que l'on vous contacte</strong> dans le cas où une ressource que vous possédez est concernée par un <strong>problème spécifique</strong>, qu'il soit de modération, légal ou technique. Ça risque particulièrement de se produire si les ressources de votre compte peuvent héberger ou adresser du contenu que vous n'avez pas préalablement vérifié."
+
+#: pg-view/auth/contact.php:7
+msgid "This is a free-form textual field that is only used manually. You may write detailed instructions. You should make sure the admin is able and willing to contact you this way."
+msgstr "C'est un champ textuel libre qui est seulement utilisé manuellement. Vous pouvez écrire des instructions détaillées. Vous devriez vous assurer que l'admin est capable et d'accord de vous contacter de cette manière."
+
+#: pg-view/auth/contact.php:11
+msgid "Information that is not related to a specific account is usually not conveyed this way."
+msgstr "Les informations qui ne sont pas relatives à un compte spécifique ne sont généralement pas communiquées par ce moyen."
+
+#: pg-view/auth/contact.php:15
+msgid "Contact information"
+msgstr "Informations de contact"
+
+#: pg-view/auth/contact.php:22 pg-view/ht/keys.php:35 pg-view/ns/sync.php:38
+msgid "Update"
+msgstr "Mettre à jour"
+
 #: pg-view/auth/index.php:4
 #: pg-view/auth/index.php:4
 msgid "Account type"
 msgid "Account type"
 msgstr "Type de compte"
 msgstr "Type de compte"
@@ -918,10 +958,6 @@ msgstr "Clé publique"
 msgid "Allowed directory"
 msgid "Allowed directory"
 msgstr "Dossier autorisé"
 msgstr "Dossier autorisé"
 
 
-#: pg-view/ht/keys.php:35 pg-view/ns/sync.php:38
-msgid "Update"
-msgstr "Mettre à jour"
-
 #: pg-view/ns/caa.php:4
 #: pg-view/ns/caa.php:4
 msgid "Flag"
 msgid "Flag"
 msgstr "Flag"
 msgstr "Flag"

+ 104 - 68
locales/messages.pot

@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2023-10-29 17:41+0100\n"
+"POT-Creation-Date: 2024-05-21 21:15+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -67,255 +67,267 @@ msgid "Switch to an approved account using an approval key"
 msgstr ""
 msgstr ""
 
 
 #: pages.php:37
 #: pages.php:37
-msgid "Change password"
+msgid "Edit contact information"
 msgstr ""
 msgstr ""
 
 
 #: pages.php:38
 #: pages.php:38
-msgid "Change the character string used to authenticate yourself"
+msgid "Set the way you want to be contacted if your account is in a specific situation"
 msgstr ""
 msgstr ""
 
 
 #: pages.php:42
 #: pages.php:42
-msgid "Change username"
+msgid "Change password"
 msgstr ""
 msgstr ""
 
 
 #: pages.php:43
 #: pages.php:43
+msgid "Change the character string used to authenticate yourself"
+msgstr ""
+
+#: pages.php:47
+msgid "Change username"
+msgstr ""
+
+#: pages.php:48
 msgid "Change the name used to identify your account when logging in and displayed at the start of every page"
 msgid "Change the name used to identify your account when logging in and displayed at the start of every page"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:49
+#: pages.php:54
 #, php-format
 #, php-format
 msgid "%s registry"
 msgid "%s registry"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:50
+#: pages.php:55
 #, php-format
 #, php-format
 msgid "Register and delegate a %s subdomain"
 msgid "Register and delegate a %s subdomain"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:53
+#: pages.php:58
 msgid "Register domain"
 msgid "Register domain"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:54
+#: pages.php:59
 #, php-format
 #, php-format
 msgid "Get a %s subdomain"
 msgid "Get a %s subdomain"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:58
+#: pages.php:63
 msgid "Unregister domain"
 msgid "Unregister domain"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:59
+#: pages.php:64
 msgid "Delete all data related to a domain and make it available to the public again"
 msgid "Delete all data related to a domain and make it available to the public again"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:62
+#: pages.php:67
 msgid "Display domain records"
 msgid "Display domain records"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:63
+#: pages.php:68
 msgid "Print every record related to a domain and served by the registry"
 msgid "Print every record related to a domain and served by the registry"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:67
+#: pages.php:72
 msgid "Edit records"
 msgid "Edit records"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:68
+#: pages.php:73
 msgid "Set registry records to delegate a domain to chosen name servers"
 msgid "Set registry records to delegate a domain to chosen name servers"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:72 pages.php:77 pages.php:122 pages.php:127 pages.php:132
-#: pages.php:137 pages.php:142 pages.php:147 pages.php:152 pages.php:157
-#: pages.php:162 pages.php:167
+#: pages.php:77 pages.php:82 pages.php:127 pages.php:132 pages.php:137
+#: pages.php:142 pages.php:147 pages.php:152 pages.php:157 pages.php:162
+#: pages.php:167 pages.php:172
 #, php-format
 #, php-format
 msgid "%s records"
 msgid "%s records"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:73
+#: pages.php:78
 #, php-format
 #, php-format
 msgid "Indicate the name servers of a %s subdomain"
 msgid "Indicate the name servers of a %s subdomain"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:78
+#: pages.php:83
 msgid "Delegate <abbr title=\"Domain Name System Security Extensions\">DNSSEC</abbr> trust"
 msgid "Delegate <abbr title=\"Domain Name System Security Extensions\">DNSSEC</abbr> trust"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:82
+#: pages.php:87
 msgid "Receive a domain transfer"
 msgid "Receive a domain transfer"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:83
+#: pages.php:88
 msgid "Transfer a domain owned by another account to the current account"
 msgid "Transfer a domain owned by another account to the current account"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:87
+#: pages.php:92
 msgid "Glue records"
 msgid "Glue records"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:88
+#: pages.php:93
 msgid "Advanced: store the IP address of a name server whose domain is inside the domain it serves"
 msgid "Advanced: store the IP address of a name server whose domain is inside the domain it serves"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:94 pg-view/ns/index.php:25
+#: pages.php:99 pg-view/ns/index.php:25
 msgid "Name servers"
 msgid "Name servers"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:95
+#: pages.php:100
 msgid "Host and manage domain's records"
 msgid "Host and manage domain's records"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:98
+#: pages.php:103
 msgid "Add zone"
 msgid "Add zone"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:99
+#: pages.php:104
 #, php-format
 #, php-format
 msgid "The zone will be managed by %s name servers"
 msgid "The zone will be managed by %s name servers"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:103
+#: pages.php:108
 msgid "Delete zone"
 msgid "Delete zone"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:104
+#: pages.php:109
 msgid "Erase all zone data"
 msgid "Erase all zone data"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:107
+#: pages.php:112
 msgid "Display zone"
 msgid "Display zone"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:108
+#: pages.php:113
 msgid "Print zonefile content"
 msgid "Print zonefile content"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:112
+#: pages.php:117
 msgid "Edit zone"
 msgid "Edit zone"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:113
+#: pages.php:118
 msgid "Change zonefile content"
 msgid "Change zonefile content"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:117
+#: pages.php:122
 msgid "AAAA and A records"
 msgid "AAAA and A records"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:118
+#: pages.php:123
 msgid "Store domain's IP address"
 msgid "Store domain's IP address"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:123
+#: pages.php:128
 msgid "Store zone's name server"
 msgid "Store zone's name server"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:128
+#: pages.php:133
 msgid "Associate text to domain"
 msgid "Associate text to domain"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:133
+#: pages.php:138
 msgid "Limit the certificate authorities allowed to certify the domain"
 msgid "Limit the certificate authorities allowed to certify the domain"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:138
+#: pages.php:143
 msgid "Store the location of a domain's service"
 msgid "Store the location of a domain's service"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:143
+#: pages.php:148
 msgid "Store the email server's address"
 msgid "Store the email server's address"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:148
+#: pages.php:153
 msgid "Store <abbr title=\"Secure SHell\">SSH</abbr> public keys fingerprints"
 msgid "Store <abbr title=\"Secure SHell\">SSH</abbr> public keys fingerprints"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:153
+#: pages.php:158
 msgid "Setup <abbr title=\"DNS-based Authentication of Named Entities\">DANE</abbr> by publishing the <abbr title=\"Transport Layer Security\">TLS</abbr> certificate fingerprint"
 msgid "Setup <abbr title=\"DNS-based Authentication of Named Entities\">DANE</abbr> by publishing the <abbr title=\"Transport Layer Security\">TLS</abbr> certificate fingerprint"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:158
+#: pages.php:163
 msgid "Define a domain as an alias of another"
 msgid "Define a domain as an alias of another"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:163
+#: pages.php:168
 msgid "Define all subdomains of a domain as aliases of subdomains of another domain"
 msgid "Define all subdomains of a domain as aliases of subdomains of another domain"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:168
+#: pages.php:173
 msgid "Store geographic coordinates"
 msgid "Store geographic coordinates"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:172
+#: pages.php:177
 #, php-format
 #, php-format
 msgid "Synchronized records"
 msgid "Synchronized records"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:173
+#: pages.php:178
 msgid "Regularly fetch distant records and update them to a local zone"
 msgid "Regularly fetch distant records and update them to a local zone"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:179
+#: pages.php:184
 msgid "Web"
 msgid "Web"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:180
+#: pages.php:185
 msgid "Upload a static website into an <abbr title=\"SSH File Transfer Protocol\">SFTP</abbr> space"
 msgid "Upload a static website into an <abbr title=\"SSH File Transfer Protocol\">SFTP</abbr> space"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:183
+#: pages.php:188
 #, php-format
 #, php-format
 msgid "%s subpath access"
 msgid "%s subpath access"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:184 pages.php:189 pages.php:194
+#: pages.php:189 pages.php:194 pages.php:199
 #, php-format
 #, php-format
 msgid "Its URL will look like %s"
 msgid "Its URL will look like %s"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:184 pages.php:189 pages.php:194
+#: pages.php:189 pages.php:194 pages.php:199
 msgid "mysite"
 msgid "mysite"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:188
+#: pages.php:193
 #, php-format
 #, php-format
 msgid "%s subdomain access"
 msgid "%s subdomain access"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:193
+#: pages.php:198
 msgid "Dedicated domain with Let's Encrypt certificate access"
 msgid "Dedicated domain with Let's Encrypt certificate access"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:198
+#: pages.php:203
 msgid "Onion service access"
 msgid "Onion service access"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:199
+#: pages.php:204
 #, php-format
 #, php-format
 msgid "Its URL will look like %s, and work only through the Tor network"
 msgid "Its URL will look like %s, and work only through the Tor network"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:203 pg-view/ht/del.php:19
+#: pages.php:208 pg-view/ht/del.php:19
 msgid "Delete access"
 msgid "Delete access"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:204
+#: pages.php:209
 msgid "Delete an existing HTTP access from a subdirectory of the SFTP space"
 msgid "Delete an existing HTTP access from a subdirectory of the SFTP space"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:207
+#: pages.php:212
 msgid "Manage SSH keys"
 msgid "Manage SSH keys"
 msgstr ""
 msgstr ""
 
 
-#: pages.php:208
+#: pages.php:213
 msgid "Choose what SSH key can edit what directory"
 msgid "Choose what SSH key can edit what directory"
 msgstr ""
 msgstr ""
 
 
-#: router.php:106 view.php:40
+#: router.php:22
+msgid "Page not found."
+msgstr ""
+
+#: router.php:114 view.php:40
 msgid "This service is currently under maintenance. No action can be taken on it until an administrator finishes repairing it."
 msgid "This service is currently under maintenance. No action can be taken on it until an administrator finishes repairing it."
 msgstr ""
 msgstr ""
 
 
-#: router.php:115
+#: router.php:123
 msgid "You need to be logged in to do this."
 msgid "You need to be logged in to do this."
 msgstr ""
 msgstr ""
 
 
@@ -366,7 +378,7 @@ msgstr ""
 msgid "<strong>Server error</strong>: "
 msgid "<strong>Server error</strong>: "
 msgstr ""
 msgstr ""
 
 
-#: fn/common.php:157
+#: fn/common.php:160
 msgid "Wrong proof."
 msgid "Wrong proof."
 msgstr ""
 msgstr ""
 
 
@@ -412,6 +424,14 @@ msgstr ""
 msgid "Account approved."
 msgid "Account approved."
 msgstr ""
 msgstr ""
 
 
+#: pg-act/auth/contact.php:4
+msgid "A forbidden character is present."
+msgstr ""
+
+#: pg-act/auth/contact.php:11
+msgid "Contact information updated."
+msgstr ""
+
 #: pg-act/auth/login.php:10
 #: pg-act/auth/login.php:10
 msgid "This account does not exist."
 msgid "This account does not exist."
 msgstr ""
 msgstr ""
@@ -468,7 +488,7 @@ msgstr ""
 msgid "No TXT record with the expected format has been found on domain %s."
 msgid "No TXT record with the expected format has been found on domain %s."
 msgstr ""
 msgstr ""
 
 
-#: pg-act/ht/add-dns.php:48 pg-act/ht/add-onion.php:50
+#: pg-act/ht/add-dns.php:50 pg-act/ht/add-onion.php:50
 #: pg-act/ht/add-subdomain.php:19 pg-act/ht/add-subpath.php:19
 #: pg-act/ht/add-subdomain.php:19 pg-act/ht/add-subpath.php:19
 #, php-format
 #, php-format
 msgid "%s added on this directory."
 msgid "%s added on this directory."
@@ -630,6 +650,26 @@ msgstr ""
 msgid "Use for this account"
 msgid "Use for this account"
 msgstr ""
 msgstr ""
 
 
+#: pg-view/auth/contact.php:3
+msgid "You can optionally tell the administrator <strong>how you want to be contacted</strong> in case a resource you own is involved in a <strong>specific problem</strong>, be it moderation, legal or technical. This may especially happen if your account's resources can host or address untrusted content."
+msgstr ""
+
+#: pg-view/auth/contact.php:7
+msgid "This is a free-form textual field that is only used manually. You may write detailed instructions. You should make sure the admin is able and willing to contact you this way."
+msgstr ""
+
+#: pg-view/auth/contact.php:11
+msgid "Information that is not related to a specific account is usually not conveyed this way."
+msgstr ""
+
+#: pg-view/auth/contact.php:15
+msgid "Contact information"
+msgstr ""
+
+#: pg-view/auth/contact.php:22 pg-view/ht/keys.php:35 pg-view/ns/sync.php:38
+msgid "Update"
+msgstr ""
+
 #: pg-view/auth/index.php:4
 #: pg-view/auth/index.php:4
 msgid "Account type"
 msgid "Account type"
 msgstr ""
 msgstr ""
@@ -930,10 +970,6 @@ msgstr ""
 msgid "Allowed directory"
 msgid "Allowed directory"
 msgstr ""
 msgstr ""
 
 
-#: pg-view/ht/keys.php:35 pg-view/ns/sync.php:38
-msgid "Update"
-msgstr ""
-
 #: pg-view/ns/caa.php:4
 #: pg-view/ns/caa.php:4
 msgid "Flag"
 msgid "Flag"
 msgstr ""
 msgstr ""

+ 5 - 0
pages.php

@@ -33,6 +33,11 @@ define('PAGES', [
 			'description' => _('Switch to an approved account using an approval key'),
 			'description' => _('Switch to an approved account using an approval key'),
 			'tokens_account_cost' => 300,
 			'tokens_account_cost' => 300,
 		],
 		],
+		'contact' => [
+			'title' => _('Edit contact information'),
+			'description' => _('Set the way you want to be contacted if your account is in a specific situation'),
+			'tokens_account_cost' => 300,
+		],
 		'password' => [
 		'password' => [
 			'title' => _('Change password'),
 			'title' => _('Change password'),
 			'description' => _('Change the character string used to authenticate yourself'),
 			'description' => _('Change the character string used to authenticate yourself'),

+ 11 - 0
pg-act/auth/contact.php

@@ -0,0 +1,11 @@
+<?php declare(strict_types=1);
+
+if (preg_match('/^[\p{L}\p{M}\p{N}\p{P}\p{S}\p{Z}\p{Cc}]{0,2048}$/Dsu', $_POST['medium']) !== 1)
+	output(403, _('A forbidden character is present.'));
+
+rateLimit();
+
+DB->prepare('UPDATE users SET medium = :medium WHERE id = :id')
+->execute([':medium' => $_POST['medium'], ':id' => $_SESSION['id']]);
+
+output(200, _('Contact information updated.'));

+ 1 - 1
pg-act/reg/register.php

@@ -50,7 +50,7 @@ if ($registration_data !== [])
 if ($blocked OR $registration_data !== [])
 if ($blocked OR $registration_data !== [])
 	message($message);
 	message($message);
 
 
-if ($_POST['action'] !== 'register')
+if ($_POST['action'] ?? NULL !== 'register')
 	message($message . ' ✔️ ' . _('This domain is open to registration!'));
 	message($message . ' ✔️ ' . _('This domain is open to registration!'));
 
 
 function message(string $message): never {
 function message(string $message): never {

+ 23 - 0
pg-view/auth/contact.php

@@ -0,0 +1,23 @@
+<?php declare(strict_types=1); ?>
+<p>
+	<?= _('You can optionally tell the administrator <strong>how you want to be contacted</strong> in case a resource you own is involved in a <strong>specific problem</strong>, be it moderation, legal or technical. This may especially happen if your account\'s resources can host or address untrusted content.') ?>
+</p>
+
+<p>
+	<?= _('This is a free-form textual field that is only used manually. You may write detailed instructions. You should make sure the admin is able and willing to contact you this way.') ?>
+</p>
+
+<p>
+	<?= _('Information that is not related to a specific account is usually not conveyed this way.') ?>
+</p>
+
+<form method="post">
+	<label for="medium"><?= _('Contact information') ?></label><br>
+	<textarea name="medium" id="medium" rows="5" placeholder="matrix:u/neo:matrix.example
+mailto:neo@email.example"><?php
+
+echo htmlspecialchars(query('select', 'users', ['id' => $_SESSION['id'] ?? ''], ['medium'])[0] ?? '');
+
+?></textarea>
+	<input type="submit" value="<?= _('Update') ?>">
+</form>