Przeglądaj źródła

Split accounts capabilities; Info about rate limit

Miraty 2 lat temu
rodzic
commit
864f868890
6 zmienionych plików z 485 dodań i 374 usunięć
  1. 16 11
      fn/auth.php
  2. 180 158
      locales/fr/C/LC_MESSAGES/messages.po
  3. 176 141
      locales/messages.pot
  4. 26 26
      pg-view/auth/index.php
  5. 46 38
      pg-view/ht/index.php
  6. 41 0
      pg-view/reg/index.php

+ 16 - 11
fn/auth.php

@@ -95,6 +95,7 @@ function rateLimit() {
 		rateLimitInstance(PAGE_METADATA['tokens_instance_cost']);
 }
 
+const MAX_ACCOUNT_TOKENS = 86400;
 function rateLimitAccount($requestedTokens) {
 	// Get
 	$userData = query('select', 'users', ['id' => $_SESSION['id']]);
@@ -102,20 +103,24 @@ function rateLimitAccount($requestedTokens) {
 	$bucketLastUpdate = $userData[0]['bucket_last_update'];
 
 	// Compute
-	$tokens = min(86400, $tokens + (time() - $bucketLastUpdate));
+	$tokens = min(MAX_ACCOUNT_TOKENS, $tokens + (time() - $bucketLastUpdate));
 
-	if ($requestedTokens > $tokens)
-		output(453, _('Account rate limit reached, try again later.'));
+	if ($requestedTokens > 0) {
+		if ($requestedTokens > $tokens)
+			output(453, _('Account rate limit reached, try again later.'));
 
-	$tokens -= $requestedTokens;
+		$tokens -= $requestedTokens;
 
-	// Update
-	DB->prepare('UPDATE users SET bucket_tokens = :bucket_tokens, bucket_last_update = :bucket_last_update WHERE id = :id')
-	->execute([
-		':bucket_tokens' => $tokens,
-		':bucket_last_update' => time(),
-		':id' => $_SESSION['id']
-	]);
+		// Update
+		DB->prepare('UPDATE users SET bucket_tokens = :bucket_tokens, bucket_last_update = :bucket_last_update WHERE id = :id')
+		->execute([
+			':bucket_tokens' => $tokens,
+			':bucket_last_update' => time(),
+			':id' => $_SESSION['id']
+		]);
+	}
+
+	return $tokens;
 }
 
 function rateLimitInstance($requestedTokens) {

+ 180 - 158
locales/fr/C/LC_MESSAGES/messages.po

@@ -1,5 +1,7 @@
 msgid ""
 msgstr ""
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2023-05-02 19:17+0200\n"
 "Language: fr\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 
@@ -52,235 +54,235 @@ msgstr "Passer à un compte approuvé"
 msgid "Switch to an approved account using an approval key"
 msgstr "Utiliser une clé d'approbation pour passer à un compte approuvé"
 
-#: pages.php:36
+#: pages.php:37
 msgid "Change password"
 msgstr "Changer la clé de passe"
 
-#: pages.php:37
+#: pages.php:38
 msgid "Change the character string used to authenticate yourself"
 msgstr "Changer la chaîne de caractères utilisée pour s'authentifier"
 
-#: pages.php:40
+#: pages.php:42
 msgid "Change username"
 msgstr "Changer l'identifiant"
 
-#: pages.php:41
+#: pages.php:43
 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"
 
-#: pages.php:46
+#: pages.php:49
 #, php-format
 msgid "%s registry"
 msgstr "Registre %s"
 
-#: pages.php:47
+#: pages.php:50
 #, php-format
 msgid "Register and delegate a %s subdomain"
 msgstr "Obtenir et déléguer un domaine %s"
 
-#: pages.php:50
+#: pages.php:53
 msgid "Register domain"
 msgstr "Enregistrer un domaine"
 
-#: pages.php:51
+#: pages.php:54
 #, php-format
 msgid "Get a %s subdomain"
 msgstr "Obtenir un sous-domaine de %s"
 
-#: pages.php:55
+#: pages.php:58
 msgid "Unregister domain"
 msgstr "Désenregistrer un domaine"
 
-#: pages.php:56
+#: pages.php:59
 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"
 
-#: pages.php:59
+#: pages.php:62
 msgid "Display domain records"
 msgstr "Afficher les enregistrements"
 
-#: pages.php:60
+#: pages.php:63
 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"
 
-#: pages.php:63 pages.php:67 pages.php:107 pages.php:111 pages.php:115
-#: pages.php:119 pages.php:123 pages.php:127 pages.php:131 pages.php:135
-#: pages.php:139 pages.php:143
+#: pages.php:67 pages.php:72 pages.php:117 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
 #, php-format
 msgid "%s records"
 msgstr "Enregistrements %s"
 
-#: pages.php:64
+#: pages.php:68
 #, php-format
 msgid "Indicate the name servers of a %s subdomain"
 msgstr "Indiquer les serveurs de nom d'un sous-domaine de %s"
 
-#: pages.php:68
+#: pages.php:73
 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>"
 
-#: pages.php:71
+#: pages.php:77
 msgid "Receive a domain transfer"
 msgstr "Recevoir un transfert de domaine"
 
-#: pages.php:72
+#: pages.php:78
 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"
 
-#: pages.php:75
+#: pages.php:82
 msgid "Glue records"
 msgstr "Glue records"
 
-#: pages.php:76
+#: pages.php:83
 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"
 
-#: pages.php:81 pg-view/ns/index.php:24
+#: pages.php:89 pg-view/ns/index.php:24
 msgid "Name servers"
 msgstr "Serveurs de nom"
 
-#: pages.php:82
+#: pages.php:90
 msgid "Host and manage domain's records"
 msgstr "Héberger et gérer les enregistrements d'un domaine"
 
-#: pages.php:85
+#: pages.php:93
 msgid "Add zone"
 msgstr "Ajouter une zone"
 
-#: pages.php:86
+#: pages.php:94
 #, php-format
 msgid "The zone will be managed by %s name servers"
 msgstr "La zone sera gérée par les serveurs de nom de %s"
 
-#: pages.php:90
+#: pages.php:98
 msgid "Delete zone"
 msgstr "Supprimer une zone"
 
-#: pages.php:91
+#: pages.php:99
 msgid "Erase all zone data"
 msgstr "Effacer tous les enregistrements d'une zone"
 
-#: pages.php:94
+#: pages.php:102
 msgid "Display zone"
 msgstr "Afficher une zone"
 
-#: pages.php:95
+#: pages.php:103
 msgid "Print zonefile content"
 msgstr "Montrer le contenu d'un fichier de zone"
 
-#: pages.php:98
+#: pages.php:107
 msgid "Edit zone"
 msgstr "Modifier une zone"
 
-#: pages.php:99
+#: pages.php:108
 msgid "Change zonefile content"
 msgstr "Éditer le contenu d'un fichier de zone"
 
-#: pages.php:103
+#: pages.php:112
 msgid "AAAA and A records"
 msgstr "Enregistrements AAAA et A"
 
-#: pages.php:104
+#: pages.php:113
 msgid "Store domain's IP address"
 msgstr "Indiquer l'adresse IP d'un domaine"
 
-#: pages.php:108
+#: pages.php:118
 msgid "Store zone's name server"
 msgstr "Indiquer les serveurs de nom d'une zone"
 
-#: pages.php:112
+#: pages.php:123
 msgid "Associate text to domain"
 msgstr "Associer du texte à un domaine"
 
-#: pages.php:116
+#: pages.php:128
 msgid "Limit the certificate authorities allowed to certify the domain"
 msgstr "Limiter les autorités de certification autorisées à certifier un domaine"
 
-#: pages.php:120
+#: pages.php:133
 msgid "Store the location of a domain's service"
 msgstr "Indiquer l'adresse exacte d'un service pour un domaine"
 
-#: pages.php:124
+#: pages.php:138
 msgid "Store the email server's address"
 msgstr "Indiquer l'adresse d'un serveur de courriels"
 
-#: pages.php:128
+#: pages.php:143
 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>"
 
-#: pages.php:132
+#: pages.php:148
 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>"
 
-#: pages.php:136
+#: pages.php:153
 msgid "Define a domain as an alias of another"
 msgstr "Définir un domaine comme étant l'alias d'un autre"
 
-#: pages.php:140
+#: pages.php:158
 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"
 
-#: pages.php:144
+#: pages.php:163
 msgid "Store geographic coordinates"
 msgstr "Indiquer des coordonnées géographiques"
 
-#: pages.php:149
+#: pages.php:169
 msgid "Web"
 msgstr "Web"
 
-#: pages.php:150
+#: pages.php:170
 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 Transfert Protocol\">SFTP</abbr>"
 
-#: pages.php:153
+#: pages.php:173
 #, php-format
 msgid "%s subpath access"
 msgstr "Accès par sous-chemin de %s"
 
-#: pages.php:154 pages.php:159 pages.php:164
+#: pages.php:174 pages.php:179 pages.php:184
 #, php-format
 msgid "Its URL will look like %s"
 msgstr "Son URL ressemblera à %s"
 
-#: pages.php:154 pages.php:159 pages.php:164
+#: pages.php:174 pages.php:179 pages.php:184
 msgid "mysite"
 msgstr "monsite"
 
-#: pages.php:158
+#: pages.php:178
 #, php-format
 msgid "%s subdomain access"
 msgstr "Accès par sous-domaine de %s"
 
-#: pages.php:163
+#: pages.php:183
 msgid "Dedicated domain with Let's Encrypt certificate access"
 msgstr "Accès par domaine dédié avec certificat Let's Encrypt"
 
-#: pages.php:168
+#: pages.php:188
 msgid "Onion service access"
 msgstr "Accès par service Onion"
 
-#: pages.php:169
+#: pages.php:189
 #, php-format
 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"
 
-#: pages.php:173 pg-view/ht/del.php:18
+#: pages.php:193 pg-view/ht/del.php:18
 msgid "Delete access"
 msgstr "Supprimer un accès"
 
-#: pages.php:174
+#: pages.php:194
 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"
 
-#: router.php:137 view.php:39
+#: router.php:136 view.php:39
 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."
 
-#: router.php:148
+#: router.php:147
 msgid "You need to be logged in to do this."
 msgstr "Vous devez être connecté·e à un compte pour faire cela."
 
-#: router.php:150
+#: router.php:149
 msgid "This account doesn't exist anymore. Log out to end this ghost session."
 msgstr "Ce compte n'existe plus. Déconnectez-vous pour terminer cette session fantôme."
 
@@ -298,11 +300,11 @@ msgstr "Ce formulaire ne sera pas accepté car il faut %sse connecter%s d'abord.
 msgid "%sSource code%s available under %s."
 msgstr "%sCode source%s disponible sous %s."
 
-#: fn/auth.php:108
+#: fn/auth.php:110
 msgid "Account rate limit reached, try again later."
 msgstr "Limite de taux pour ce compte atteinte, réessayez plus tard."
 
-#: fn/auth.php:130
+#: fn/auth.php:135
 msgid "Global rate limit reached, try again later."
 msgstr "Limite de taux globale atteinte, réessayez plus tard."
 
@@ -322,11 +324,11 @@ msgstr "<strong>Erreur du serveur</strong>&nbsp;: "
 msgid "Wrong proof."
 msgstr "Preuve incorrecte."
 
-#: fn/dns.php:62
+#: fn/dns.php:63
 msgid "IP address malformed."
 msgstr "Adresse IP malformée."
 
-#: fn/dns.php:67 fn/ht.php:25
+#: fn/dns.php:68 fn/ht.php:28
 msgid "Domain malformed."
 msgstr "Domaine malformé."
 
@@ -344,11 +346,11 @@ msgstr "Les TTLs plus longs que %s secondes sont interdits."
 msgid "This account is already approved."
 msgstr "Ce compte est déjà approuvé."
 
-#: pg-act/auth/approval.php:7
+#: pg-act/auth/approval.php:9
 msgid "This approval key is not available. It has been mistyped, used for another account, or has expired."
 msgstr "Cette clé d'approbation n'est pas disponible. Elle a pu être mal saisie, utilisée pour un autre compte, ou a expiré."
 
-#: pg-act/auth/approval.php:18
+#: pg-act/auth/approval.php:20
 msgid "Account approved."
 msgstr "Compte approuvé."
 
@@ -365,7 +367,7 @@ msgstr "Clé de passe incorrecte."
 msgid "Wrong current password."
 msgstr "Clé de passe actuelle incorrecte."
 
-#: pg-act/auth/password.php:10
+#: pg-act/auth/password.php:12
 msgid "Password updated."
 msgstr "Clé de passe mise à jour."
 
@@ -386,7 +388,7 @@ msgstr "Votre compte ne peut pas être supprimé car le service %s est actuellem
 msgid "Account deleted."
 msgstr "Compte supprimé."
 
-#: pg-act/auth/username.php:20
+#: pg-act/auth/username.php:22
 msgid "Username updated."
 msgstr "Identifiant mis à jour."
 
@@ -408,13 +410,13 @@ msgstr "Ce domaine doit avoir %2$s pour unique enregistrement %1$s."
 msgid "No TXT record with the expected format has been found."
 msgstr "Aucun enregistrement TXT avec le format attendu n'a été trouvé."
 
-#: pg-act/ht/add-dns.php:41 pg-act/ht/add-onion.php:31
+#: pg-act/ht/add-dns.php:41 pg-act/ht/add-onion.php:37
 #: pg-act/ht/add-subdomain.php:19 pg-act/ht/add-subpath.php:19
 #, php-format
 msgid "%s added on this directory."
 msgstr "%s ajouté sur ce dossier."
 
-#: pg-act/ht/add-onion.php:31
+#: pg-act/ht/add-onion.php:37
 #, php-format
 msgid "Its address is: %s"
 msgstr "Son adresse est&nbsp;: %s"
@@ -435,11 +437,11 @@ msgstr "Ce chemin est déjà pris sur ce service. Utilisez-en un autre."
 msgid "Access removed."
 msgstr "Accès retiré."
 
-#: pg-act/ns/caa.php:23 pg-act/ns/cname.php:14 pg-act/ns/dname.php:14
-#: pg-act/ns/ip.php:14 pg-act/ns/loc.php:70 pg-act/ns/mx.php:18
-#: pg-act/ns/ns.php:14 pg-act/ns/srv.php:26 pg-act/ns/sshfp.php:23
-#: pg-act/ns/tlsa.php:27 pg-act/ns/txt.php:15 pg-act/reg/ds.php:30
-#: pg-act/reg/glue.php:12 pg-act/reg/ns.php:12
+#: pg-act/ns/caa.php:25 pg-act/ns/cname.php:16 pg-act/ns/dname.php:16
+#: pg-act/ns/ip.php:16 pg-act/ns/loc.php:72 pg-act/ns/mx.php:20
+#: pg-act/ns/ns.php:16 pg-act/ns/srv.php:28 pg-act/ns/sshfp.php:25
+#: pg-act/ns/tlsa.php:29 pg-act/ns/txt.php:17 pg-act/reg/ds.php:32
+#: pg-act/reg/glue.php:14 pg-act/reg/ns.php:14
 msgid "Modification done."
 msgstr "Modification effectuée."
 
@@ -465,15 +467,15 @@ msgstr "Le contenu de zone envoyé n'est pas correct (selon <code>kzonecheck</co
 msgid "This zone already exists on the service."
 msgstr "Cette zone existe déjà sur ce service."
 
-#: pg-act/ns/zone-add.php:10
+#: pg-act/ns/zone-add.php:12
 msgid "Parent zone's name servers not found."
 msgstr "Serveurs de nom de la zone parente introuvables."
 
-#: pg-act/ns/zone-add.php:16 pg-act/reg/transfer.php:16
+#: pg-act/ns/zone-add.php:18 pg-act/reg/transfer.php:18
 msgid "NS authentication record not found."
 msgstr "Enregistrement d'authentification NS introuvable."
 
-#: pg-act/ns/zone-add.php:52
+#: pg-act/ns/zone-add.php:54
 msgid "Zone created."
 msgstr "Zone créée."
 
@@ -521,7 +523,7 @@ msgstr "Domaine enregistré."
 msgid "The current account already owns this domain."
 msgstr "Le compte actuel possède déjà ce domaine."
 
-#: pg-act/reg/transfer.php:29
+#: pg-act/reg/transfer.php:33
 msgid "The domain has been transferred to the current account ; the NS authentication record has been automatically deleted."
 msgstr "Le domaine a été transféré vers le compte actuel ; l'enregistrement d'authentification NS a été automatiquement supprimé."
 
@@ -541,67 +543,47 @@ msgstr "Clé d'approbation"
 msgid "Use for this account"
 msgstr "Utiliser pour ce compte"
 
-#: pg-view/auth/index.php:5
-msgid "You are currently using a testing account."
-msgstr "Vous utilisez actuellement un compte de test."
+#: pg-view/auth/index.php:3
+msgid "Account type"
+msgstr "Type de compte"
 
-#: pg-view/auth/index.php:6
-msgid "You are currently using an approved account."
-msgstr "Vous utilisez actuellement un compte approuvé."
+#: pg-view/auth/index.php:9
+msgid "You are currently using a <strong>testing</strong> account."
+msgstr "Vous utilisez actuellement un compte <strong>de test</strong>."
 
-#: pg-view/auth/index.php:7
-#, php-format
-msgid "It's internal ID is %s."
-msgstr "Son identifiant interne est %s."
+#: pg-view/auth/index.php:10
+msgid "You are currently using an <strong>approved</strong> account."
+msgstr "Vous utilisez actuellement un compte <strong>approuvé</strong>."
 
-#: pg-view/auth/index.php:9
+#: pg-view/auth/index.php:13
 msgid "You are not logged in."
 msgstr "Vous n'êtes connecté·e à aucun compte."
 
-#: pg-view/auth/index.php:13
-msgid "Account types"
-msgstr "Types de comptes"
-
-#: pg-view/auth/index.php:16
-msgid "Testing"
-msgstr "De test"
-
 #: pg-view/auth/index.php:18
-msgid "It's the default account type, with limited capabilities in order to avoid abuses:"
-msgstr "C'est le type de compte par défaut, avec des capacités limitées afin de limiter les abus&nbsp;:"
-
-#: pg-view/auth/index.php:20
-msgid "May be deleted anytime"
-msgstr "Peut être supprimé n'importe quand"
-
-#: pg-view/auth/index.php:21 pg-view/auth/index.php:29
-#, php-format
-msgid "%s of SFTP quota"
-msgstr "Quota SFTP de %s"
-
-#: pg-view/auth/index.php:21 pg-view/auth/index.php:29 pg-view/ht/index.php:51
-msgid "<abbr title=\"gibibyte\">GiB</abbr>"
-msgstr "<abbr title=\"gibioctet\">Gio</abbr>"
+msgid "When an account is created, it's a <em>testing</em> account. A testing account is only temporary and with limited capabilities on the services. Once the account is validated by using an approval key requested to an administrator, it becomes an <em>approved</em> account."
+msgstr "Quand un compte est créé, c'est un compte <em>de test</em>. Un compte de test est seulement temporaire et avec de capacités restreintes sur les services. Une fois le compte validé en utilisant une clé d'approbation demandée à ane administrataire, il devient un compte <em>approuvé</em>."
 
-#: pg-view/auth/index.php:21 pg-view/auth/index.php:29 pg-view/ht/index.php:51
-msgid "<abbr title=\"mebibyte\">MiB</abbr>"
-msgstr "<abbr title=\"mébioctet\">Mio</abbr>"
-
-#: pg-view/auth/index.php:22
-msgid "Let's Encrypt certificate from the staging environment (not trusted by clients)"
-msgstr "Certificat Let's Encrypt de test (n'est pas reconnu par les clients)"
+#: pg-view/auth/index.php:21
+msgid "Rate limit"
+msgstr "Limite de débit"
 
 #: pg-view/auth/index.php:25
-msgid "Approved"
-msgstr "Approuvé"
+#, php-format
+msgid "Your account is at %s%% of the rate limit."
+msgstr "Votre compte est à %s%% de la limite de débit."
 
 #: pg-view/auth/index.php:27
-msgid "It was originally a testing account, but has been approved by an administrator, and is suitable for stable use cases:"
-msgstr "C'est originellement un compte de test, mais qui a été approuvé par ane administrataire, et qui permet une utilisation stable&nbsp;:"
+msgid "Most of the form submissions bring you closer to the rate limit. If you reach it, you need to wait in order to be able to submit forms again."
+msgstr "La plupart des traitements de formulaires vous rapprochent de la limite de débit. Si vous l'atteignez, vous devez attendre avant de pouvoir envoyer des formulaires à nouveau."
 
-#: pg-view/auth/index.php:30
-msgid "Stable Let's Encrypt certificates"
-msgstr "Vrai certificat Let's Encrypt"
+#: pg-view/auth/index.php:31
+msgid "Internal ID"
+msgstr "Identifiant interne"
+
+#: pg-view/auth/index.php:33
+#, php-format
+msgid "The current account's internal ID is %s."
+msgstr "L'identifiant interne du compte actuel est %s."
 
 #: pg-view/auth/login.php:1
 msgid "New?"
@@ -611,11 +593,11 @@ msgstr "Nouvele ?"
 msgid "Create an account"
 msgstr "Créer un compte"
 
-#: pg-view/auth/login.php:4 pg-view/auth/register.php:4 pg-view/ht/index.php:94
+#: pg-view/auth/login.php:4 pg-view/auth/register.php:4 pg-view/ht/index.php:64
 msgid "Username"
 msgstr "Identifiant"
 
-#: pg-view/auth/login.php:8 pg-view/auth/register.php:9 pg-view/ht/index.php:98
+#: pg-view/auth/login.php:8 pg-view/auth/register.php:9 pg-view/ht/index.php:68
 msgid "Password"
 msgstr "Clé de passe"
 
@@ -719,63 +701,91 @@ msgstr "Ajouter un accès de site"
 msgid "In order to be able to set up an HTTP site with this service, a subdirectory for this site must be created inside the SFTP space first. The name of this subdirectory can only contain %1$s, %2$s, %3$s, %4$s and %5$s."
 msgstr "Pour pouvoir créer un site HTTP avec ce service, un sous-dossier pour ce site doit d'abord être créé dans l'espace SFTP. Le nom de ce sous-dossier ne peut contenir que %1$s, %2$s, %3$s, %4$s et %5$s."
 
-#: pg-view/ht/index.php:51
-#, php-format
-msgid "The SFTP space is limited to %s. Indicate the following values to your SFTP client to access it."
-msgstr "L'espace SFTP est limité à %s. Indiquez les valeurs suivantes à votre client pour y accéder."
+#: pg-view/ht/index.php:44
+msgid "Connecting to the SFTP server"
+msgstr "Se connecter au serveur SFTP"
+
+#: pg-view/ht/index.php:52
+msgid "Server"
+msgstr "Serveur"
+
+#: pg-view/ht/index.php:56 pg-view/ns/srv.php:16
+msgid "Port"
+msgstr "Port"
+
+#: pg-view/ht/index.php:60
+msgid "Directory"
+msgstr "Dossier"
+
+#: pg-view/ht/index.php:70
+msgid "The one of your account"
+msgstr "Celle de votre compte"
 
-#: pg-view/ht/index.php:55
+#: pg-view/ht/index.php:74
 msgid "Authenticating the server"
 msgstr "Authentifier le serveur"
 
-#: pg-view/ht/index.php:57
+#: pg-view/ht/index.php:76
 msgid "An SSHFP record is available."
 msgstr "Un enregistrement SSHFP est disponible."
 
-#: pg-view/ht/index.php:60
+#: pg-view/ht/index.php:79
 msgid "Plain public key"
 msgstr "Clé publique"
 
-#: pg-view/ht/index.php:65
+#: pg-view/ht/index.php:84
 msgid "Public key fingerprint"
 msgstr "Empreinte de la clé publique"
 
-#: pg-view/ht/index.php:70
+#: pg-view/ht/index.php:89
 msgid "ASCII art"
 msgstr "Art ASCII"
 
-#: pg-view/ht/index.php:77
-msgid "Connecting to the server"
-msgstr "Se connecter au serveur"
-
-#: pg-view/ht/index.php:82
-msgid "Server"
-msgstr "Serveur"
-
-#: pg-view/ht/index.php:86 pg-view/ns/srv.php:16
-msgid "Port"
-msgstr "Port"
-
-#: pg-view/ht/index.php:90
-msgid "Directory"
-msgstr "Dossier"
-
-#: pg-view/ht/index.php:100
-msgid "The one of your account"
-msgstr "Celle de votre compte"
-
-#: pg-view/ht/index.php:111
+#: pg-view/ht/index.php:102
 msgid "A content security policy (CSP) forbids Web browsers from loading JavaScript or third-party resources."
 msgstr "Une politique de sécurité du contenu (CSP) interdit l'intégration de ressources tierces ou de JavaScript."
 
-#: pg-view/ht/index.php:114
+#: pg-view/ht/index.php:105
 msgid "<code>.htaccess</code> configuration"
 msgstr "Configuration par <code>.htaccess</code>"
 
-#: pg-view/ht/index.php:116
+#: pg-view/ht/index.php:107
 msgid "You can change the way the HTTP server answers to requests in a directory by setting some directives in a file named <code>.htaccess</code> at the root of this directory. Only the following directives are allowed:"
 msgstr "Vous pouvez modifier la façon dont le serveur HTTP répond aux requêtes dans un dossier en indiquant des directives dans un fichier nommé <code>.htaccess</code> à la racine de ce dossier. Seules les directives suivantes sont autorisées&nbsp;:"
 
+#: pg-view/ht/index.php:161
+msgid "Accounts capabilities"
+msgstr "Capacités des comptes"
+
+#: pg-view/ht/index.php:163
+msgid "Testing"
+msgstr "De test"
+
+#: pg-view/ht/index.php:166 pg-view/ht/index.php:173
+#, php-format
+msgid "%s of SFTP quota"
+msgstr "Quota SFTP de %s"
+
+#: pg-view/ht/index.php:166 pg-view/ht/index.php:173
+msgid "<abbr title=\"gibibyte\">GiB</abbr>"
+msgstr "<abbr title=\"gibioctet\">Gio</abbr>"
+
+#: pg-view/ht/index.php:166 pg-view/ht/index.php:173
+msgid "<abbr title=\"mebibyte\">MiB</abbr>"
+msgstr "<abbr title=\"mébioctet\">Mio</abbr>"
+
+#: pg-view/ht/index.php:167
+msgid "Let's Encrypt certificate from the staging environment (not trusted by clients)"
+msgstr "Certificat Let's Encrypt de test (n'est pas reconnu par les clients)"
+
+#: pg-view/ht/index.php:170
+msgid "Approved"
+msgstr "Approuvé"
+
+#: pg-view/ht/index.php:174
+msgid "Stable Let's Encrypt certificates"
+msgstr "Vrai certificat Let's Encrypt"
+
 #: pg-view/ns/caa.php:3
 msgid "Flag"
 msgstr "Flag"
@@ -1086,6 +1096,18 @@ msgstr "Ce registre de noms de domaine permet d'enregistrer des domaines se term
 msgid "Currently registered domains"
 msgstr "Domaines actuellement enregistrés"
 
+#: pg-view/reg/index.php:27
+msgid "Both <span aria-hidden=\"true\">⏳ </span><em>testing</em> and <span aria-hidden=\"true\">👤 </span><em>approved</em> accounts can register a domain under these suffixes:"
+msgstr "Les comptes <span aria-hidden=\"true\">⏳ </span><em>de test</em> et <span aria-hidden=\"true\">👤 </span><em>approuvés</em> peuvent enregistrer un domaine sous ces suffixes&nbsp;:"
+
+#: pg-view/reg/index.php:38
+msgid "Only <span aria-hidden=\"true\">👤 </span><em>approved</em> accounts can register a domain under these suffixes:"
+msgstr "Seuls les comptes <span aria-hidden=\"true\">👤 </span><em>approuvés</em> peuvent enregistrer un domaine sous ces suffixes&nbsp;:"
+
+#: pg-view/reg/index.php:49
+msgid "Nobody can register a domain under these suffixes:"
+msgstr "Personne ne peut enregistrer un domain sous ces suffixes&nbsp;:"
+
 #: pg-view/reg/register.php:2
 msgid "Register a new domain on your account. It must consist of between 4 and 63 letters and digits."
 msgstr "Enregistrer un nouveau domaine sur son compte. Il doit être composé d'entre 4 et 63 lettres et chiffres."

+ 176 - 141
locales/messages.pot

@@ -1,6 +1,21 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
 msgid ""
 msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2023-05-02 19:17+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
 
 #: pages.php:9
 msgid "Authentication"
@@ -51,235 +66,235 @@ msgstr ""
 msgid "Switch to an approved account using an approval key"
 msgstr ""
 
-#: pages.php:36
+#: pages.php:37
 msgid "Change password"
 msgstr ""
 
-#: pages.php:37
+#: pages.php:38
 msgid "Change the character string used to authenticate yourself"
 msgstr ""
 
-#: pages.php:40
+#: pages.php:42
 msgid "Change username"
 msgstr ""
 
-#: pages.php:41
+#: pages.php:43
 msgid "Change the name used to identify your account when logging in and displayed at the start of every page"
 msgstr ""
 
-#: pages.php:46
+#: pages.php:49
 #, php-format
 msgid "%s registry"
 msgstr ""
 
-#: pages.php:47
+#: pages.php:50
 #, php-format
 msgid "Register and delegate a %s subdomain"
 msgstr ""
 
-#: pages.php:50
+#: pages.php:53
 msgid "Register domain"
 msgstr ""
 
-#: pages.php:51
+#: pages.php:54
 #, php-format
 msgid "Get a %s subdomain"
 msgstr ""
 
-#: pages.php:55
+#: pages.php:58
 msgid "Unregister domain"
 msgstr ""
 
-#: pages.php:56
+#: pages.php:59
 msgid "Delete all data related to a domain and make it available to the public again"
 msgstr ""
 
-#: pages.php:59
+#: pages.php:62
 msgid "Display domain records"
 msgstr ""
 
-#: pages.php:60
+#: pages.php:63
 msgid "Print every record related to a domain and served by the registry"
 msgstr ""
 
-#: pages.php:63 pages.php:67 pages.php:107 pages.php:111 pages.php:115
-#: pages.php:119 pages.php:123 pages.php:127 pages.php:131 pages.php:135
-#: pages.php:139 pages.php:143
+#: pages.php:67 pages.php:72 pages.php:117 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
 #, php-format
 msgid "%s records"
 msgstr ""
 
-#: pages.php:64
+#: pages.php:68
 #, php-format
 msgid "Indicate the name servers of a %s subdomain"
 msgstr ""
 
-#: pages.php:68
+#: pages.php:73
 msgid "Delegate <abbr title=\"Domain Name System Security Extensions\">DNSSEC</abbr> trust"
 msgstr ""
 
-#: pages.php:71
+#: pages.php:77
 msgid "Receive a domain transfer"
 msgstr ""
 
-#: pages.php:72
+#: pages.php:78
 msgid "Transfer a domain owned by another account to the current account"
 msgstr ""
 
-#: pages.php:75
+#: pages.php:82
 msgid "Glue records"
 msgstr ""
 
-#: pages.php:76
+#: pages.php:83
 msgid "Advanced: store the IP address of a name server whose domain is inside the domain it serves"
 msgstr ""
 
-#: pages.php:81 pg-view/ns/index.php:24
+#: pages.php:89 pg-view/ns/index.php:24
 msgid "Name servers"
 msgstr ""
 
-#: pages.php:82
+#: pages.php:90
 msgid "Host and manage domain's records"
 msgstr ""
 
-#: pages.php:85
+#: pages.php:93
 msgid "Add zone"
 msgstr ""
 
-#: pages.php:86
+#: pages.php:94
 #, php-format
 msgid "The zone will be managed by %s name servers"
 msgstr ""
 
-#: pages.php:90
+#: pages.php:98
 msgid "Delete zone"
 msgstr ""
 
-#: pages.php:91
+#: pages.php:99
 msgid "Erase all zone data"
 msgstr ""
 
-#: pages.php:94
+#: pages.php:102
 msgid "Display zone"
 msgstr ""
 
-#: pages.php:95
+#: pages.php:103
 msgid "Print zonefile content"
 msgstr ""
 
-#: pages.php:98
+#: pages.php:107
 msgid "Edit zone"
 msgstr ""
 
-#: pages.php:99
+#: pages.php:108
 msgid "Change zonefile content"
 msgstr ""
 
-#: pages.php:103
+#: pages.php:112
 msgid "AAAA and A records"
 msgstr ""
 
-#: pages.php:104
+#: pages.php:113
 msgid "Store domain's IP address"
 msgstr ""
 
-#: pages.php:108
+#: pages.php:118
 msgid "Store zone's name server"
 msgstr ""
 
-#: pages.php:112
+#: pages.php:123
 msgid "Associate text to domain"
 msgstr ""
 
-#: pages.php:116
+#: pages.php:128
 msgid "Limit the certificate authorities allowed to certify the domain"
 msgstr ""
 
-#: pages.php:120
+#: pages.php:133
 msgid "Store the location of a domain's service"
 msgstr ""
 
-#: pages.php:124
+#: pages.php:138
 msgid "Store the email server's address"
 msgstr ""
 
-#: pages.php:128
+#: pages.php:143
 msgid "Store <abbr title=\"Secure SHell\">SSH</abbr> public keys fingerprints"
 msgstr ""
 
-#: pages.php:132
+#: pages.php:148
 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 ""
 
-#: pages.php:136
+#: pages.php:153
 msgid "Define a domain as an alias of another"
 msgstr ""
 
-#: pages.php:140
+#: pages.php:158
 msgid "Define all subdomains of a domain as aliases of subdomains of another domain"
 msgstr ""
 
-#: pages.php:144
+#: pages.php:163
 msgid "Store geographic coordinates"
 msgstr ""
 
-#: pages.php:149
+#: pages.php:169
 msgid "Web"
 msgstr ""
 
-#: pages.php:150
+#: pages.php:170
 msgid "Upload a static website into an <abbr title=\"SSH File Transfer Protocol\">SFTP</abbr> space"
 msgstr ""
 
-#: pages.php:153
+#: pages.php:173
 #, php-format
 msgid "%s subpath access"
 msgstr ""
 
-#: pages.php:154 pages.php:159 pages.php:164
+#: pages.php:174 pages.php:179 pages.php:184
 #, php-format
 msgid "Its URL will look like %s"
 msgstr ""
 
-#: pages.php:154 pages.php:159 pages.php:164
+#: pages.php:174 pages.php:179 pages.php:184
 msgid "mysite"
 msgstr ""
 
-#: pages.php:158
+#: pages.php:178
 #, php-format
 msgid "%s subdomain access"
 msgstr ""
 
-#: pages.php:163
+#: pages.php:183
 msgid "Dedicated domain with Let's Encrypt certificate access"
 msgstr ""
 
-#: pages.php:168
+#: pages.php:188
 msgid "Onion service access"
 msgstr ""
 
-#: pages.php:169
+#: pages.php:189
 #, php-format
 msgid "Its URL will look like %s, and work only through the Tor network"
 msgstr ""
 
-#: pages.php:173 pg-view/ht/del.php:18
+#: pages.php:193 pg-view/ht/del.php:18
 msgid "Delete access"
 msgstr ""
 
-#: pages.php:174
+#: pages.php:194
 msgid "Delete an existing HTTP access from a subdirectory of the SFTP space"
 msgstr ""
 
-#: router.php:137 view.php:39
+#: router.php:136 view.php:39
 msgid "This service is currently under maintenance. No action can be taken on it until an administrator finishes repairing it."
 msgstr ""
 
-#: router.php:148
+#: router.php:147
 msgid "You need to be logged in to do this."
 msgstr ""
 
-#: router.php:150
+#: router.php:149
 msgid "This account doesn't exist anymore. Log out to end this ghost session."
 msgstr ""
 
@@ -297,11 +312,11 @@ msgstr ""
 msgid "%sSource code%s available under %s."
 msgstr ""
 
-#: fn/auth.php:108
+#: fn/auth.php:110
 msgid "Account rate limit reached, try again later."
 msgstr ""
 
-#: fn/auth.php:130
+#: fn/auth.php:135
 msgid "Global rate limit reached, try again later."
 msgstr ""
 
@@ -321,11 +336,11 @@ msgstr ""
 msgid "Wrong proof."
 msgstr ""
 
-#: fn/dns.php:62
+#: fn/dns.php:63
 msgid "IP address malformed."
 msgstr ""
 
-#: fn/dns.php:67 fn/ht.php:25
+#: fn/dns.php:68 fn/ht.php:28
 msgid "Domain malformed."
 msgstr ""
 
@@ -343,11 +358,11 @@ msgstr ""
 msgid "This account is already approved."
 msgstr ""
 
-#: pg-act/auth/approval.php:7
+#: pg-act/auth/approval.php:9
 msgid "This approval key is not available. It has been mistyped, used for another account, or has expired."
 msgstr ""
 
-#: pg-act/auth/approval.php:18
+#: pg-act/auth/approval.php:20
 msgid "Account approved."
 msgstr ""
 
@@ -364,7 +379,7 @@ msgstr ""
 msgid "Wrong current password."
 msgstr ""
 
-#: pg-act/auth/password.php:10
+#: pg-act/auth/password.php:12
 msgid "Password updated."
 msgstr ""
 
@@ -385,7 +400,7 @@ msgstr ""
 msgid "Account deleted."
 msgstr ""
 
-#: pg-act/auth/username.php:20
+#: pg-act/auth/username.php:22
 msgid "Username updated."
 msgstr ""
 
@@ -407,13 +422,13 @@ msgstr ""
 msgid "No TXT record with the expected format has been found."
 msgstr ""
 
-#: pg-act/ht/add-dns.php:41 pg-act/ht/add-onion.php:31
+#: pg-act/ht/add-dns.php:41 pg-act/ht/add-onion.php:37
 #: pg-act/ht/add-subdomain.php:19 pg-act/ht/add-subpath.php:19
 #, php-format
 msgid "%s added on this directory."
 msgstr ""
 
-#: pg-act/ht/add-onion.php:31
+#: pg-act/ht/add-onion.php:37
 #, php-format
 msgid "Its address is: %s"
 msgstr ""
@@ -434,11 +449,11 @@ msgstr ""
 msgid "Access removed."
 msgstr ""
 
-#: pg-act/ns/caa.php:23 pg-act/ns/cname.php:14 pg-act/ns/dname.php:14
-#: pg-act/ns/ip.php:14 pg-act/ns/loc.php:70 pg-act/ns/mx.php:18
-#: pg-act/ns/ns.php:14 pg-act/ns/srv.php:26 pg-act/ns/sshfp.php:23
-#: pg-act/ns/tlsa.php:27 pg-act/ns/txt.php:15 pg-act/reg/ds.php:30
-#: pg-act/reg/glue.php:12 pg-act/reg/ns.php:12
+#: pg-act/ns/caa.php:25 pg-act/ns/cname.php:16 pg-act/ns/dname.php:16
+#: pg-act/ns/ip.php:16 pg-act/ns/loc.php:72 pg-act/ns/mx.php:20
+#: pg-act/ns/ns.php:16 pg-act/ns/srv.php:28 pg-act/ns/sshfp.php:25
+#: pg-act/ns/tlsa.php:29 pg-act/ns/txt.php:17 pg-act/reg/ds.php:32
+#: pg-act/reg/glue.php:14 pg-act/reg/ns.php:14
 msgid "Modification done."
 msgstr ""
 
@@ -464,15 +479,15 @@ msgstr ""
 msgid "This zone already exists on the service."
 msgstr ""
 
-#: pg-act/ns/zone-add.php:10
+#: pg-act/ns/zone-add.php:12
 msgid "Parent zone's name servers not found."
 msgstr ""
 
-#: pg-act/ns/zone-add.php:16 pg-act/reg/transfer.php:16
+#: pg-act/ns/zone-add.php:18 pg-act/reg/transfer.php:18
 msgid "NS authentication record not found."
 msgstr ""
 
-#: pg-act/ns/zone-add.php:52
+#: pg-act/ns/zone-add.php:54
 msgid "Zone created."
 msgstr ""
 
@@ -520,7 +535,7 @@ msgstr ""
 msgid "The current account already owns this domain."
 msgstr ""
 
-#: pg-act/reg/transfer.php:29
+#: pg-act/reg/transfer.php:33
 msgid "The domain has been transferred to the current account ; the NS authentication record has been automatically deleted."
 msgstr ""
 
@@ -540,66 +555,46 @@ msgstr ""
 msgid "Use for this account"
 msgstr ""
 
-#: pg-view/auth/index.php:5
-msgid "You are currently using a testing account."
-msgstr ""
-
-#: pg-view/auth/index.php:6
-msgid "You are currently using an approved account."
-msgstr ""
-
-#: pg-view/auth/index.php:7
-#, php-format
-msgid "It's internal ID is %s."
+#: pg-view/auth/index.php:3
+msgid "Account type"
 msgstr ""
 
 #: pg-view/auth/index.php:9
-msgid "You are not logged in."
+msgid "You are currently using a <strong>testing</strong> account."
 msgstr ""
 
-#: pg-view/auth/index.php:13
-msgid "Account types"
+#: pg-view/auth/index.php:10
+msgid "You are currently using an <strong>approved</strong> account."
 msgstr ""
 
-#: pg-view/auth/index.php:16
-msgid "Testing"
+#: pg-view/auth/index.php:13
+msgid "You are not logged in."
 msgstr ""
 
 #: pg-view/auth/index.php:18
-msgid "It's the default account type, with limited capabilities in order to avoid abuses:"
+msgid "When an account is created, it's a <em>testing</em> account. A testing account is only temporary and with limited capabilities on the services. Once the account is validated by using an approval key requested to an administrator, it becomes an <em>approved</em> account."
 msgstr ""
 
-#: pg-view/auth/index.php:20
-msgid "May be deleted anytime"
+#: pg-view/auth/index.php:21
+msgid "Rate limit"
 msgstr ""
 
-#: pg-view/auth/index.php:21 pg-view/auth/index.php:29
+#: pg-view/auth/index.php:25
 #, php-format
-msgid "%s of SFTP quota"
-msgstr ""
-
-#: pg-view/auth/index.php:21 pg-view/auth/index.php:29 pg-view/ht/index.php:51
-msgid "<abbr title=\"gibibyte\">GiB</abbr>"
-msgstr ""
-
-#: pg-view/auth/index.php:21 pg-view/auth/index.php:29 pg-view/ht/index.php:51
-msgid "<abbr title=\"mebibyte\">MiB</abbr>"
-msgstr ""
-
-#: pg-view/auth/index.php:22
-msgid "Let's Encrypt certificate from the staging environment (not trusted by clients)"
+msgid "Your account is at %s%% of the rate limit."
 msgstr ""
 
-#: pg-view/auth/index.php:25
-msgid "Approved"
+#: pg-view/auth/index.php:27
+msgid "Most of the form submissions bring you closer to the rate limit. If you reach it, you need to wait in order to be able to submit forms again."
 msgstr ""
 
-#: pg-view/auth/index.php:27
-msgid "It was originally a testing account, but has been approved by an administrator, and is suitable for stable use cases:"
+#: pg-view/auth/index.php:31
+msgid "Internal ID"
 msgstr ""
 
-#: pg-view/auth/index.php:30
-msgid "Stable Let's Encrypt certificates"
+#: pg-view/auth/index.php:33
+#, php-format
+msgid "The current account's internal ID is %s."
 msgstr ""
 
 #: pg-view/auth/login.php:1
@@ -610,11 +605,11 @@ msgstr ""
 msgid "Create an account"
 msgstr ""
 
-#: pg-view/auth/login.php:4 pg-view/auth/register.php:4 pg-view/ht/index.php:94
+#: pg-view/auth/login.php:4 pg-view/auth/register.php:4 pg-view/ht/index.php:64
 msgid "Username"
 msgstr ""
 
-#: pg-view/auth/login.php:8 pg-view/auth/register.php:9 pg-view/ht/index.php:98
+#: pg-view/auth/login.php:8 pg-view/auth/register.php:9 pg-view/ht/index.php:68
 msgid "Password"
 msgstr ""
 
@@ -718,61 +713,89 @@ msgstr ""
 msgid "In order to be able to set up an HTTP site with this service, a subdirectory for this site must be created inside the SFTP space first. The name of this subdirectory can only contain %1$s, %2$s, %3$s, %4$s and %5$s."
 msgstr ""
 
-#: pg-view/ht/index.php:51
-#, php-format
-msgid "The SFTP space is limited to %s. Indicate the following values to your SFTP client to access it."
+#: pg-view/ht/index.php:44
+msgid "Connecting to the SFTP server"
+msgstr ""
+
+#: pg-view/ht/index.php:52
+msgid "Server"
+msgstr ""
+
+#: pg-view/ht/index.php:56 pg-view/ns/srv.php:16
+msgid "Port"
 msgstr ""
 
-#: pg-view/ht/index.php:55
+#: pg-view/ht/index.php:60
+msgid "Directory"
+msgstr ""
+
+#: pg-view/ht/index.php:70
+msgid "The one of your account"
+msgstr ""
+
+#: pg-view/ht/index.php:74
 msgid "Authenticating the server"
 msgstr ""
 
-#: pg-view/ht/index.php:57
+#: pg-view/ht/index.php:76
 msgid "An SSHFP record is available."
 msgstr ""
 
-#: pg-view/ht/index.php:60
+#: pg-view/ht/index.php:79
 msgid "Plain public key"
 msgstr ""
 
-#: pg-view/ht/index.php:65
+#: pg-view/ht/index.php:84
 msgid "Public key fingerprint"
 msgstr ""
 
-#: pg-view/ht/index.php:70
+#: pg-view/ht/index.php:89
 msgid "ASCII art"
 msgstr ""
 
-#: pg-view/ht/index.php:77
-msgid "Connecting to the server"
+#: pg-view/ht/index.php:102
+msgid "A content security policy (CSP) forbids Web browsers from loading JavaScript or third-party resources."
 msgstr ""
 
-#: pg-view/ht/index.php:82
-msgid "Server"
+#: pg-view/ht/index.php:105
+msgid "<code>.htaccess</code> configuration"
 msgstr ""
 
-#: pg-view/ht/index.php:86 pg-view/ns/srv.php:16
-msgid "Port"
+#: pg-view/ht/index.php:107
+msgid "You can change the way the HTTP server answers to requests in a directory by setting some directives in a file named <code>.htaccess</code> at the root of this directory. Only the following directives are allowed:"
 msgstr ""
 
-#: pg-view/ht/index.php:90
-msgid "Directory"
+#: pg-view/ht/index.php:161
+msgid "Accounts capabilities"
 msgstr ""
 
-#: pg-view/ht/index.php:100
-msgid "The one of your account"
+#: pg-view/ht/index.php:163
+msgid "Testing"
 msgstr ""
 
-#: pg-view/ht/index.php:111
-msgid "A content security policy (CSP) forbids Web browsers from loading JavaScript or third-party resources."
+#: pg-view/ht/index.php:166 pg-view/ht/index.php:173
+#, php-format
+msgid "%s of SFTP quota"
 msgstr ""
 
-#: pg-view/ht/index.php:114
-msgid "<code>.htaccess</code> configuration"
+#: pg-view/ht/index.php:166 pg-view/ht/index.php:173
+msgid "<abbr title=\"gibibyte\">GiB</abbr>"
 msgstr ""
 
-#: pg-view/ht/index.php:116
-msgid "You can change the way the HTTP server answers to requests in a directory by setting some directives in a file named <code>.htaccess</code> at the root of this directory. Only the following directives are allowed:"
+#: pg-view/ht/index.php:166 pg-view/ht/index.php:173
+msgid "<abbr title=\"mebibyte\">MiB</abbr>"
+msgstr ""
+
+#: pg-view/ht/index.php:167
+msgid "Let's Encrypt certificate from the staging environment (not trusted by clients)"
+msgstr ""
+
+#: pg-view/ht/index.php:170
+msgid "Approved"
+msgstr ""
+
+#: pg-view/ht/index.php:174
+msgid "Stable Let's Encrypt certificates"
 msgstr ""
 
 #: pg-view/ns/caa.php:3
@@ -1085,6 +1108,18 @@ msgstr ""
 msgid "Currently registered domains"
 msgstr ""
 
+#: pg-view/reg/index.php:27
+msgid "Both <span aria-hidden=\"true\">⏳ </span><em>testing</em> and <span aria-hidden=\"true\">👤 </span><em>approved</em> accounts can register a domain under these suffixes:"
+msgstr ""
+
+#: pg-view/reg/index.php:38
+msgid "Only <span aria-hidden=\"true\">👤 </span><em>approved</em> accounts can register a domain under these suffixes:"
+msgstr ""
+
+#: pg-view/reg/index.php:49
+msgid "Nobody can register a domain under these suffixes:"
+msgstr ""
+
 #: pg-view/reg/register.php:2
 msgid "Register a new domain on your account. It must consist of between 4 and 63 letters and digits."
 msgstr ""

+ 26 - 26
pg-view/auth/index.php

@@ -1,33 +1,33 @@
 <?php displayIndex(); ?>
+
+<h2><?= _('Account type') ?></h2>
+
 <p>
-<?php if (isset($_SESSION['id'])) {
+<?php
+if (isset($_SESSION['id']))
 	echo match ($_SESSION['type']) {
-		'testing' => _('You are currently using a testing account.'),
-		'approved' => _('You are currently using an approved account.'),
-	} . ' ' .  sprintf(_('It\'s internal ID is %s.'), '<small><code>' . $_SESSION['id'] . '</code></small>');
-} else {
+		'testing' => _('You are currently using a <strong>testing</strong> account.'),
+		'approved' => _('You are currently using an <strong>approved</strong> account.'),
+	};
+else
 	echo _('You are not logged in.');
-} ?>
+?>
 </p>
 
-<h2><?= _('Account types') ?></h2>
+<p>
+	<?= _('When an account is created, it\'s a <em>testing</em> account. A testing account is only temporary and with limited capabilities on the services. Once the account is validated by using an approval key requested to an administrator, it becomes an <em>approved</em> account.') ?>
+</p>
+
+<h2><?= _('Rate limit') ?></h2>
+
+<details>
+	<?php $tokens = isset($_SESSION['id']) ? rateLimitAccount(0) : MAX_ACCOUNT_TOKENS; ?>
+	<summary><?= sprintf(_('Your account is at %s%% of the rate limit.'), '<span title="' . abs($tokens-MAX_ACCOUNT_TOKENS) . '/' . MAX_ACCOUNT_TOKENS . '">' . abs(intval($tokens / MAX_ACCOUNT_TOKENS * 100)-100) . '</title>') ?></summary>
+	<p>
+		<?= _('Most of the form submissions bring you closer to the rate limit. If you reach it, you need to wait in order to be able to submit forms again.') ?>
+	</p>
+</details>
+
+<h2><?= _('Internal ID') ?></h2>
 
-<dl>
-	<dt><span aria-hidden="true">⏳ </span><em><?= _('Testing') ?></em></dt>
-	<dd>
-		<?= _('It\'s the default account type, with limited capabilities in order to avoid abuses:') ?>
-		<ul>
-			<li><strong><?= _('May be deleted anytime') ?></strong></li>
-			<li><?= sprintf(_('%s of SFTP quota'), ((CONF['ht']['user_quota_testing'] >> 30) >= 1) ? CONF['ht']['user_quota_testing'] >> 30 . ' ' . _('<abbr title="gibibyte">GiB</abbr>') : CONF['ht']['user_quota_testing'] >> 20 . ' ' . _('<abbr title="mebibyte">MiB</abbr>')) ?></li>
-			<li><?= _('Let\'s Encrypt certificate from the staging environment (not trusted by clients)') ?></li>
-		</ul>
-	</dd>
-	<dt><span aria-hidden="true">👤 </span><em><?= _('Approved') ?></em></dt>
-	<dd>
-		<?= _('It was originally a testing account, but has been approved by an administrator, and is suitable for stable use cases:') ?>
-		<ul>
-			<li><?= sprintf(_('%s of SFTP quota'), ((CONF['ht']['user_quota_approved'] >> 30) >= 1) ? CONF['ht']['user_quota_approved'] >> 30 . ' ' . _('<abbr title="gibibyte">GiB</abbr>') : CONF['ht']['user_quota_approved'] >> 20 . ' ' . _('<abbr title="mebibyte">MiB</abbr>')) ?></li>
-			<li><?= _('Stable Let\'s Encrypt certificates') ?></li>
-		</ul>
-	</dd>
-</dl>
+<p><?= sprintf(_('The current account\'s internal ID is %s.'), '<small><code>' . ($_SESSION['id'] ?? '—') . '</code></small>') ?></p>

+ 46 - 38
pg-view/ht/index.php

@@ -41,16 +41,35 @@ else {
 </section>
 
 <section>
-	<h2>SFTP</h2>
+	<h2><?= _('Connecting to the SFTP server') ?></h2>
 
 <?php
-$quota = (($_SESSION['type'] ?? '') === 'approved') ? CONF['ht']['user_quota_approved'] : CONF['ht']['user_quota_testing'];
+$sftp_url = 'sftp://' . (defined('DISPLAY_USERNAME') ? DISPLAY_USERNAME : '&lt;username&gt;') . '@' . CONF['ht']['sftp_domain'] . ':' . CONF['ht']['public_sftp_port'] . '/';
 ?>
+	<a href="<?= $sftp_url ?>"><?= $sftp_url ?></a>
 
-	<p>
-		<?= sprintf(_('The SFTP space is limited to %s. Indicate the following values to your SFTP client to access it.'), (($quota >> 30) >= 1) ? $quota >> 30 . ' ' . _('<abbr title="gibibyte">GiB</abbr>') : $quota >> 20 . ' ' . _('<abbr title="mebibyte">MiB</abbr>')) ?>
-	</p>
-
+	<dl>
+		<dt><?= _('Server') ?></dt>
+		<dd>
+			<code><?= CONF['ht']['sftp_domain'] ?></code>
+		</dd>
+		<dt><?= _('Port') ?></dt>
+		<dd>
+			<code><?= CONF['ht']['public_sftp_port'] ?></code><?php if (CONF['ht']['public_sftp_port'] === 22) echo " (par défaut)"; ?>
+		</dd>
+		<dt><?= _('Directory') ?></dt>
+		<dd>
+			<code>/</code>
+		</dd>
+		<dt><?= _('Username') ?></dt>
+		<dd>
+			<code><?= defined('DISPLAY_USERNAME') ? DISPLAY_USERNAME : '&lt;username&gt;' ?></code>
+		</dd>
+		<dt><?= _('Password') ?></dt>
+		<dd>
+			<?= _('The one of your account') ?>
+		</dd>
+	</dl>
 	<section>
 		<h3><?= _('Authenticating the server') ?></h3>
 
@@ -72,40 +91,9 @@ $quota = (($_SESSION['type'] ?? '') === 'approved') ? CONF['ht']['user_quota_app
 		</details>
 
 	</section>
-
-	<section>
-		<h3><?= _('Connecting to the server') ?></h3>
-
-<?php
-$sftp_url = 'sftp://' . (defined('DISPLAY_USERNAME') ? DISPLAY_USERNAME : '&lt;username&gt;') . '@' . CONF['ht']['sftp_domain'] . ':' . CONF['ht']['public_sftp_port'] . '/';
-?>
-		<a href="<?= $sftp_url ?>"><?= $sftp_url ?></a>
-
-		<dl>
-			<dt><?= _('Server') ?></dt>
-			<dd>
-				<code><?= CONF['ht']['sftp_domain'] ?></code>
-			</dd>
-			<dt><?= _('Port') ?></dt>
-			<dd>
-				<code><?= CONF['ht']['public_sftp_port'] ?></code><?php if (CONF['ht']['public_sftp_port'] === 22) echo " (par défaut)"; ?>
-			</dd>
-			<dt><?= _('Directory') ?></dt>
-			<dd>
-				<code>/</code>
-			</dd>
-			<dt><?= _('Username') ?></dt>
-			<dd>
-				<code><?= defined('DISPLAY_USERNAME') ? DISPLAY_USERNAME : '&lt;username&gt;' ?></code>
-			</dd>
-			<dt><?= _('Password') ?></dt>
-			<dd>
-				<?= _('The one of your account') ?>
-			</dd>
-		</dl>
-	</section>
 </section>
 
+
 <section>
 	<h2>HTTP</h2>
 
@@ -168,3 +156,23 @@ $sftp_url = 'sftp://' . (defined('DISPLAY_USERNAME') ? DISPLAY_USERNAME : '&lt;u
 		<li><a rel="external help" href="https://httpd.apache.org/docs/current/mod/mod_autoindex.html#indexstylesheet"><code>IndexStyleSheet</code></a></li>
 	</ul>
 </section>
+
+<section>
+	<h2><?= _('Accounts capabilities') ?></h2>
+	<dl>
+		<dt><span aria-hidden="true">⏳ </span><em><?= _('Testing') ?></em></dt>
+		<dd>
+			<ul>
+				<li><?= sprintf(_('%s of SFTP quota'), ((CONF['ht']['user_quota_testing'] >> 30) >= 1) ? CONF['ht']['user_quota_testing'] >> 30 . ' ' . _('<abbr title="gibibyte">GiB</abbr>') : CONF['ht']['user_quota_testing'] >> 20 . ' ' . _('<abbr title="mebibyte">MiB</abbr>')) ?></li>
+				<li><?= _('Let\'s Encrypt certificate from the staging environment (not trusted by clients)') ?></li>
+			</ul>
+		</dd>
+		<dt><span aria-hidden="true">👤 </span><em><?= _('Approved') ?></em></dt>
+		<dd>
+			<ul>
+				<li><?= sprintf(_('%s of SFTP quota'), ((CONF['ht']['user_quota_approved'] >> 30) >= 1) ? CONF['ht']['user_quota_approved'] >> 30 . ' ' . _('<abbr title="gibibyte">GiB</abbr>') : CONF['ht']['user_quota_approved'] >> 20 . ' ' . _('<abbr title="mebibyte">MiB</abbr>')) ?></li>
+				<li><?= _('Stable Let\'s Encrypt certificates') ?></li>
+			</ul>
+		</dd>
+	</dl>
+</section>

+ 41 - 0
pg-view/reg/index.php

@@ -17,3 +17,44 @@ else {
 		echo '	<code><li>' . $domain . '</li></code>' . LF;
 	echo '</ul>' . LF;
 }
+
+?>
+
+<section>
+	<h2>Current subdomain registration policy</h2>
+	<dl>
+
+		<dt><?= _('Both <span aria-hidden="true">⏳ </span><em>testing</em> and <span aria-hidden="true">👤 </span><em>approved</em> accounts can register a domain under these suffixes:') ?></dt>
+		<dd>
+			<ul>
+<?php
+foreach (CONF['reg']['suffixes'] as $suffix => $condition)
+	if ($condition === 'all')
+		echo '<li><code>' . $suffix . ' </code></li>';
+?>
+			</ul>
+		</dd>
+
+		<dt><?= _('Only <span aria-hidden="true">👤 </span><em>approved</em> accounts can register a domain under these suffixes:') ?></dt>
+		<dd>
+			<ul>
+<?php
+foreach (CONF['reg']['suffixes'] as $suffix => $condition)
+	if ($condition === 'approved')
+		echo '<li><code>' . $suffix . ' </code></li>';
+?>
+			</ul>
+		</dd>
+
+		<dt><?= _('Nobody can register a domain under these suffixes:') ?></dt>
+		<dd>
+			<ul>
+<?php
+foreach (CONF['reg']['suffixes'] as $suffix => $condition)
+	if ($condition === 'none')
+		echo '<li><code>' . $suffix . ' </code></li>';
+?>
+			</ul>
+		</dd>
+	</dl>
+</section>