Просмотр исходного кода

Warn testing accounts users on every page

Miraty 2 лет назад
Родитель
Сommit
a07baa7f62
4 измененных файлов с 28 добавлено и 12 удалено
  1. 12 4
      locales/fr/C/LC_MESSAGES/messages.po
  2. 12 4
      locales/messages.pot
  3. 1 1
      pg-view/auth/index.php
  4. 3 3
      view.php

+ 12 - 4
locales/fr/C/LC_MESSAGES/messages.po

@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2023-05-18 23:15+0200\n"
+"POT-Creation-Date: 2023-06-02 22:42+0200\n"
 "Language: fr\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 
@@ -274,18 +274,26 @@ msgstr "Supprimer un accès"
 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:151 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:147
+#: router.php:161
 msgid "You need to be logged in to do this."
 msgstr "Vous devez être connecté·e à un compte pour faire cela."
 
-#: router.php:149
+#: router.php:163
 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."
 
+#: view.php:19
+msgid "You are using a testing account. It may be deleted anytime."
+msgstr "Vous utilisez un compte de test. Il risque d'être supprimé n'importe quand."
+
+#: view.php:19
+msgid "Read more"
+msgstr "En savoir plus"
+
 #: view.php:21
 msgid "Anonymous"
 msgstr "Anonyme"

+ 12 - 4
locales/messages.pot

@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2023-05-18 23:15+0200\n"
+"POT-Creation-Date: 2023-06-02 22:42+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"
@@ -286,18 +286,26 @@ msgstr ""
 msgid "Delete an existing HTTP access from a subdirectory of the SFTP space"
 msgstr ""
 
-#: router.php:137 view.php:39
+#: router.php:151 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:147
+#: router.php:161
 msgid "You need to be logged in to do this."
 msgstr ""
 
-#: router.php:149
+#: router.php:163
 msgid "This account doesn't exist anymore. Log out to end this ghost session."
 msgstr ""
 
+#: view.php:19
+msgid "You are using a testing account. It may be deleted anytime."
+msgstr ""
+
+#: view.php:19
+msgid "Read more"
+msgstr ""
+
 #: view.php:21
 msgid "Anonymous"
 msgstr ""

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

@@ -1,6 +1,6 @@
 <?php displayIndex(); ?>
 
-<h2><?= _('Account type') ?></h2>
+<h2 id="type"><?= _('Account type') ?></h2>
 
 <p>
 <?php

+ 3 - 3
view.php

@@ -14,11 +14,11 @@ foreach (glob('css/*.css') as $css_path)
 	</head>
 	<body>
 		<header>
-			<p>
+			<p class="auth">
 <?php if (isset($_SESSION['id'])) { ?>
-				<span aria-hidden="true"><?= ($_SESSION['type'] === 'approved') ? '👤' : '⏳' ?> </span><strong><?= (defined('DISPLAY_USERNAME') ? DISPLAY_USERNAME : '<em>?</em>') ?></strong> <a class="auth" href="<?= CONF['common']['prefix'] ?>/auth/logout"><?= _('Log out') ?></a>
+				<span aria-hidden="true"><?= ($_SESSION['type'] === 'approved') ? '👤' : '⏳' ?> </span><strong><?= (defined('DISPLAY_USERNAME') ? DISPLAY_USERNAME : '<em>?</em>') ?></strong> <a href="<?= CONF['common']['prefix'] ?>/auth/logout"><?= _('Log out') ?></a><?= ($_SESSION['type'] === 'testing') ? '<br>' . _('You are using a testing account. It may be deleted anytime.') . ' <a href="' . CONF['common']['prefix'] . '/auth/#type">' . _('Read more') . '</a>' : '' ?>
 <?php } else { ?>
-				<span aria-hidden="true">👻 </span><em><?= _('Anonymous') ?></em> <a class="auth" href="<?= redirUrl('auth/login') ?>"><?= _('Log in') ?></a>
+				<span aria-hidden="true">👻 </span><em><?= _('Anonymous') ?></em> <a href="<?= redirUrl('auth/login') ?>"><?= _('Log in') ?></a>
 <?php } ?>
 			</p>
 			<nav>