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

Added api password indicator text (#7340)

* Added api password indicator text

* make fix-all

* i18n

* i18n: it

Co-authored-by: UserRoot-Luca <55756898+UserRoot-Luca@users.noreply.github.com>

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Co-authored-by: UserRoot-Luca <55756898+UserRoot-Luca@users.noreply.github.com>
Jackson Culbreth 1 год назад
Родитель
Сommit
fdc564dd9e

+ 2 - 0
app/i18n/cs/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => 'Správa profilu',
 		'api' => array(
 			'_' => 'Správa API',
+			'api_not_set' => 'API password not set',	// TODO
+			'api_set' => 'API password set',	// TODO
 			'check_link' => 'Check API status via: <kbd><a href="../api/" target="_blank">%s</a></kbd>',	// TODO
 			'disabled' => 'The API access is disabled.',	// TODO
 			'documentation_link' => 'See the <a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#access-via-mobile-app" target="_blank">documentation and list of known apps</a>',	// TODO

+ 2 - 0
app/i18n/de/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => 'Profil-Verwaltung',
 		'api' => array(
 			'_' => 'API-Verwaltung',
+			'api_not_set' => 'API password not set',	// TODO
+			'api_set' => 'API password set',	// TODO
 			'check_link' => 'API-Status prüfen: <kbd><a href="../api/" target="_blank">%s</a></kbd>',
 			'disabled' => 'Der API-Zugriff ist deaktiviert.',
 			'documentation_link' => 'Siehe die <a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#access-via-mobile-app" target="_blank">Dokumentation und die Liste der bekannten Apps</a>',

+ 2 - 0
app/i18n/el/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => 'Profile management',	// TODO
 		'api' => array(
 			'_' => 'API management',	// DIRTY
+			'api_not_set' => 'API password not set',	// TODO
+			'api_set' => 'API password set',	// TODO
 			'check_link' => 'Check API status via: <kbd><a href="../api/" target="_blank">%s</a></kbd>',	// TODO
 			'disabled' => 'The API access is disabled.',	// TODO
 			'documentation_link' => 'See the <a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#access-via-mobile-app" target="_blank">documentation and list of known apps</a>',	// TODO

+ 2 - 0
app/i18n/en-us/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => 'Profile management',	// IGNORE
 		'api' => array(
 			'_' => 'API management',	// IGNORE
+			'api_not_set' => 'API password not set',	// IGNORE
+			'api_set' => 'API password set',	// IGNORE
 			'check_link' => 'Check API status via: <kbd><a href="../api/" target="_blank">%s</a></kbd>',	// IGNORE
 			'disabled' => 'The API access is disabled.',	// IGNORE
 			'documentation_link' => 'See the <a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#access-via-mobile-app" target="_blank">documentation and list of known apps</a>',	// IGNORE

+ 2 - 0
app/i18n/en/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => 'Profile management',
 		'api' => array(
 			'_' => 'External access via API',
+			'api_not_set' => 'API password not set',
+			'api_set' => 'API password set',
 			'check_link' => 'Check API status via: <kbd><a href="../api/" target="_blank">%s</a></kbd>',
 			'disabled' => 'The API access is disabled.',
 			'documentation_link' => 'See the <a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#access-via-mobile-app" target="_blank">documentation and list of known apps</a>',

+ 2 - 0
app/i18n/es/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => 'Administración de perfiles',
 		'api' => array(
 			'_' => 'Administración de API',
+			'api_not_set' => 'API password not set',	// TODO
+			'api_set' => 'API password set',	// TODO
 			'check_link' => 'Check API status via: <kbd><a href="../api/" target="_blank">%s</a></kbd>',	// TODO
 			'disabled' => 'The API access is disabled.',	// TODO
 			'documentation_link' => 'See the <a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#access-via-mobile-app" target="_blank">documentation and list of known apps</a>',	// TODO

+ 2 - 0
app/i18n/fa/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => ' مدیریت پروفایل',
 		'api' => array(
 			'_' => ' مدیریت API',
+			'api_not_set' => 'API password not set',	// TODO
+			'api_set' => 'API password set',	// TODO
 			'check_link' => 'Check API status via: <kbd><a href="../api/" target="_blank">%s</a></kbd>',	// TODO
 			'disabled' => 'The API access is disabled.',	// TODO
 			'documentation_link' => 'See the <a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#access-via-mobile-app" target="_blank">documentation and list of known apps</a>',	// TODO

+ 2 - 0
app/i18n/fi/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => 'Profiilien hallinta',
 		'api' => array(
 			'_' => 'API-hallinta',
+			'api_not_set' => 'API password not set',	// TODO
+			'api_set' => 'API password set',	// TODO
 			'check_link' => 'Check API status via: <kbd><a href="../api/" target="_blank">%s</a></kbd>',	// TODO
 			'disabled' => 'The API access is disabled.',	// TODO
 			'documentation_link' => 'See the <a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#access-via-mobile-app" target="_blank">documentation and list of known apps</a>',	// TODO

+ 2 - 0
app/i18n/fr/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => 'Gestion du profil',
 		'api' => array(
 			'_' => 'Gestion de l’API',
+			'api_not_set' => 'Pas de mot de passe API défini',
+			'api_set' => 'Mot de passe API enregistré',
 			'check_link' => 'Vérifier l’état de l’API via : <kbd><a href="../api/" target="_blank">%s</a></kbd>',
 			'disabled' => 'L’accès API est désactivé.',
 			'documentation_link' => 'Voir <a href="https://freshrss.github.io/FreshRSS/fr/users/06_Mobile_access.html" target="_blank">la documentation et une liste d’applications compatibles</a>',

+ 2 - 0
app/i18n/he/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => 'Profile management',	// TODO
 		'api' => array(
 			'_' => 'API management',	// DIRTY
+			'api_not_set' => 'API password not set',	// TODO
+			'api_set' => 'API password set',	// TODO
 			'check_link' => 'Check API status via: <kbd><a href="../api/" target="_blank">%s</a></kbd>',	// TODO
 			'disabled' => 'The API access is disabled.',	// TODO
 			'documentation_link' => 'See the <a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#access-via-mobile-app" target="_blank">documentation and list of known apps</a>',	// TODO

+ 2 - 0
app/i18n/hu/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => 'Profil kezelés',
 		'api' => array(
 			'_' => 'API menedzsment',
+			'api_not_set' => 'API password not set',	// TODO
+			'api_set' => 'API password set',	// TODO
 			'check_link' => 'API státusz ellenőrzése: <kbd><a href="../api/" target="_blank">%s</a></kbd>',
 			'disabled' => 'Az API hozzáférés ki van kapcsolva.',
 			'documentation_link' => 'Lásd az <a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#access-via-mobile-app" target="_blank">ismert appok dokumentációját és listáját</a>',

+ 2 - 0
app/i18n/id/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => 'Manajemen Profil',
 		'api' => array(
 			'_' => 'Manajemen API',
+			'api_not_set' => 'API password not set',	// TODO
+			'api_set' => 'API password set',	// TODO
 			'check_link' => 'Check API status via: <kbd><a href="../api/" target="_blank">%s</a></kbd>',	// TODO
 			'disabled' => 'The API access is disabled.',	// TODO
 			'documentation_link' => 'See the <a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#access-via-mobile-app" target="_blank">documentation and list of known apps</a>',	// TODO

+ 2 - 0
app/i18n/it/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => 'Gestione profili',
 		'api' => array(
 			'_' => 'Gestione API',
+			'api_not_set' => 'Password API non impostata',
+			'api_set' => 'Password API impostata',
 			'check_link' => 'Verificare lo stato dell’API tramite: <kbd><a href="../api/" target="_blank">%s</a></kbd>',
 			'disabled' => 'L’accesso all’API è disabilitato.',
 			'documentation_link' => 'Vedi la <a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#access-via-mobile-app" target="_blank">documentazione e l’elenco delle applicazioni</a>',

+ 2 - 0
app/i18n/ja/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => 'プロフィール',
 		'api' => array(
 			'_' => 'API管理',
+			'api_not_set' => 'API password not set',	// TODO
+			'api_set' => 'API password set',	// TODO
 			'check_link' => 'APIステータスを確認する: <kbd><a href="../api/" target="_blank">%s</a></kbd>',
 			'disabled' => 'APIアクセスは無効です。',
 			'documentation_link' => '既知のアプリの一覧は<a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#access-via-mobile-app" target="_blank">ドキュメント</a>を参照してください',

+ 2 - 0
app/i18n/ko/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => '프로필 관리',
 		'api' => array(
 			'_' => 'API 관리',
+			'api_not_set' => 'API password not set',	// TODO
+			'api_set' => 'API password set',	// TODO
 			'check_link' => 'Check API status via: <kbd><a href="../api/" target="_blank">%s</a></kbd>',	// TODO
 			'disabled' => 'The API access is disabled.',	// TODO
 			'documentation_link' => 'See the <a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#access-via-mobile-app" target="_blank">documentation and list of known apps</a>',	// TODO

+ 2 - 0
app/i18n/lv/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => 'Profila pārvalde',
 		'api' => array(
 			'_' => 'API pārvalde',
+			'api_not_set' => 'API password not set',	// TODO
+			'api_set' => 'API password set',	// TODO
 			'check_link' => 'Check API status via: <kbd><a href="../api/" target="_blank">%s</a></kbd>',	// TODO
 			'disabled' => 'The API access is disabled.',	// TODO
 			'documentation_link' => 'See the <a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#access-via-mobile-app" target="_blank">documentation and list of known apps</a>',	// TODO

+ 2 - 0
app/i18n/nl/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => 'Profielbeheer',
 		'api' => array(
 			'_' => 'API-beheer',
+			'api_not_set' => 'API password not set',	// TODO
+			'api_set' => 'API password set',	// TODO
 			'check_link' => 'Check API status via: <kbd><a href="../api/" target="_blank">%s</a></kbd>',	// TODO
 			'disabled' => 'The API access is disabled.',	// TODO
 			'documentation_link' => 'See the <a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#access-via-mobile-app" target="_blank">documentation and list of known apps</a>',	// TODO

+ 2 - 0
app/i18n/oc/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => 'Gestion del perfil',
 		'api' => array(
 			'_' => 'Gestion API',
+			'api_not_set' => 'API password not set',	// TODO
+			'api_set' => 'API password set',	// TODO
 			'check_link' => 'Check API status via: <kbd><a href="../api/" target="_blank">%s</a></kbd>',	// TODO
 			'disabled' => 'The API access is disabled.',	// TODO
 			'documentation_link' => 'See the <a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#access-via-mobile-app" target="_blank">documentation and list of known apps</a>',	// TODO

+ 2 - 0
app/i18n/pl/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => 'Zarządzanie profilem',
 		'api' => array(
 			'_' => 'Zarządzanie API',
+			'api_not_set' => 'API password not set',	// TODO
+			'api_set' => 'API password set',	// TODO
 			'check_link' => 'Check API status via: <kbd><a href="../api/" target="_blank">%s</a></kbd>',	// TODO
 			'disabled' => 'The API access is disabled.',	// TODO
 			'documentation_link' => 'See the <a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#access-via-mobile-app" target="_blank">documentation and list of known apps</a>',	// TODO

+ 2 - 0
app/i18n/pt-br/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => 'Gerenciamento de perfil',
 		'api' => array(
 			'_' => 'Administração da API',
+			'api_not_set' => 'API password not set',	// TODO
+			'api_set' => 'API password set',	// TODO
 			'check_link' => 'Check API status via: <kbd><a href="../api/" target="_blank">%s</a></kbd>',	// TODO
 			'disabled' => 'The API access is disabled.',	// TODO
 			'documentation_link' => 'See the <a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#access-via-mobile-app" target="_blank">documentation and list of known apps</a>',	// TODO

+ 2 - 0
app/i18n/pt-pt/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => 'Gestão de perfil',
 		'api' => array(
 			'_' => 'Administração da API',
+			'api_not_set' => 'API password not set',	// TODO
+			'api_set' => 'API password set',	// TODO
 			'check_link' => 'Check API status via: <kbd><a href="../api/" target="_blank">%s</a></kbd>',	// TODO
 			'disabled' => 'The API access is disabled.',	// TODO
 			'documentation_link' => 'See the <a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#access-via-mobile-app" target="_blank">documentation and list of known apps</a>',	// TODO

+ 2 - 0
app/i18n/ru/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => 'Настройки профиля',
 		'api' => array(
 			'_' => 'Настройки API',
+			'api_not_set' => 'API password not set',	// TODO
+			'api_set' => 'API password set',	// TODO
 			'check_link' => 'Check API status via: <kbd><a href="../api/" target="_blank">%s</a></kbd>',	// TODO
 			'disabled' => 'The API access is disabled.',	// TODO
 			'documentation_link' => 'See the <a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#access-via-mobile-app" target="_blank">documentation and list of known apps</a>',	// TODO

+ 2 - 0
app/i18n/sk/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => 'Správca profilu',
 		'api' => array(
 			'_' => 'Správa API',
+			'api_not_set' => 'API password not set',	// TODO
+			'api_set' => 'API password set',	// TODO
 			'check_link' => 'Check API status via: <kbd><a href="../api/" target="_blank">%s</a></kbd>',	// TODO
 			'disabled' => 'The API access is disabled.',	// TODO
 			'documentation_link' => 'See the <a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#access-via-mobile-app" target="_blank">documentation and list of known apps</a>',	// TODO

+ 2 - 0
app/i18n/tr/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => 'Profil yönetimi',
 		'api' => array(
 			'_' => 'API yönetimi',
+			'api_not_set' => 'API password not set',	// TODO
+			'api_set' => 'API password set',	// TODO
 			'check_link' => 'Check API status via: <kbd><a href="../api/" target="_blank">%s</a></kbd>',	// TODO
 			'disabled' => 'The API access is disabled.',	// TODO
 			'documentation_link' => 'See the <a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#access-via-mobile-app" target="_blank">documentation and list of known apps</a>',	// TODO

+ 2 - 0
app/i18n/zh-cn/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => '账户管理',
 		'api' => array(
 			'_' => 'API 管理',
+			'api_not_set' => 'API password not set',	// TODO
+			'api_set' => 'API password set',	// TODO
 			'check_link' => 'Check API status via: <kbd><a href="../api/" target="_blank">%s</a></kbd>',	// TODO
 			'disabled' => 'The API access is disabled.',	// TODO
 			'documentation_link' => 'See the <a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#access-via-mobile-app" target="_blank">documentation and list of known apps</a>',	// TODO

+ 2 - 0
app/i18n/zh-tw/conf.php

@@ -107,6 +107,8 @@ return array(
 		'_' => '個人資料管理',
 		'api' => array(
 			'_' => 'API 管理',
+			'api_not_set' => 'API password not set',	// TODO
+			'api_set' => 'API password set',	// TODO
 			'check_link' => 'Check API status via: <kbd><a href="../api/" target="_blank">%s</a></kbd>',	// TODO
 			'disabled' => 'The API access is disabled.',	// TODO
 			'documentation_link' => 'See the <a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#access-via-mobile-app" target="_blank">documentation and list of known apps</a>',	// TODO

+ 5 - 0
app/views/user/profile.phtml

@@ -82,6 +82,11 @@
 				<div class="group-controls">
 					<div class="stick">
 						<input type="password" id="apiPasswordPlain" name="apiPasswordPlain" autocomplete="new-password"
+							<?php if (FreshRSS_Context::userConf()->apiPasswordHash != '') {?>
+								placeholder="<?= _t('conf.profile.api.api_set') ?>"
+							<?php } else {?>
+								placeholder="<?= _t('conf.profile.api.api_not_set') ?>"
+							<?php } ?>
 							pattern=".{7,}" <?= cryptAvailable() ? '' : 'disabled="disabled" ' ?>/>
 						<button type="button" class="btn toggle-password" data-toggle="apiPasswordPlain"><?= _i('key') ?></button>
 					</div>

+ 3 - 3
cli/README.md

@@ -47,7 +47,7 @@ cd /usr/share/FreshRSS
 # --db-type can be: 'sqlite' (default), 'mysql' (MySQL or MariaDB), 'pgsql' (PostgreSQL).
 # --db-host URL of the database server. Default is 'localhost'.
 # --db-user sets database user.
-# --db-password sets database password.
+# --db-API password sets database password.
 # --db-base sets database name.
 # --db-prefix is an optional prefix in front of the names of the tables. We suggest using 'freshrss_' (default).
 # This command does not create the default user. Do that with ./cli/create-user.php.
@@ -65,8 +65,8 @@ cd /usr/share/FreshRSS
 
 ./cli/create-user.php --user username [ --password 'password' --api-password 'api_password' --language en --email user@example.net --token 'longRandomString' --no-default-feeds --purge-after-months 3 --feed-min-articles-default 50 --feed-ttl-default 3600 --since-hours-posts-per-rss 168 --max-posts-per-rss 400 ]
 # --user must be alphanumeric, not longer than 38 characters. The name of the user to be created/updated.
-# --password sets the user's password.
-# --api-password sets the user's api password.
+# --API password sets the user's password.
+# --api-API password sets the user's api password.
 # --language can be: 'en' (default), 'fr', or one of the [supported languages](../app/i18n/).
 # --email sets an email for the user which will be used email validation if it forced email validation is enabled.
 # --no-default-feeds do not add this FreshRSS instance's default feeds to the user during creation.