From a1411c7f2c10ab7c0e3cd49b8ffff38009ade35b Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Wed, 10 Sep 2025 01:04:17 -0400 Subject: Translate the API information page (#7922) Closes #6222 Translate the `api/index.php` page * Update app/i18n/pl/api.php Co-authored-by: Inverle * Update app/i18n/de/api.php Co-authored-by: maTh <1645099+math-GH@users.noreply.github.com> * i18n: fr * Co-authored-by: Alexandre Alapetite --------- Co-authored-by: Inverle Co-authored-by: maTh <1645099+math-GH@users.noreply.github.com> Co-authored-by: Alexandre Alapetite --- app/i18n/cs/api.php | 33 ++++++++++++ app/i18n/de/api.php | 33 ++++++++++++ app/i18n/el/api.php | 33 ++++++++++++ app/i18n/en-us/api.php | 33 ++++++++++++ app/i18n/en/api.php | 33 ++++++++++++ app/i18n/es/api.php | 33 ++++++++++++ app/i18n/fa/api.php | 33 ++++++++++++ app/i18n/fi/api.php | 33 ++++++++++++ app/i18n/fr/api.php | 33 ++++++++++++ app/i18n/he/api.php | 33 ++++++++++++ app/i18n/hu/api.php | 33 ++++++++++++ app/i18n/id/api.php | 33 ++++++++++++ app/i18n/it/api.php | 33 ++++++++++++ app/i18n/ja/api.php | 33 ++++++++++++ app/i18n/ko/api.php | 33 ++++++++++++ app/i18n/lv/api.php | 33 ++++++++++++ app/i18n/nl/api.php | 33 ++++++++++++ app/i18n/oc/api.php | 33 ++++++++++++ app/i18n/pl/api.php | 33 ++++++++++++ app/i18n/pt-br/api.php | 33 ++++++++++++ app/i18n/pt-pt/api.php | 33 ++++++++++++ app/i18n/ru/api.php | 33 ++++++++++++ app/i18n/sk/api.php | 33 ++++++++++++ app/i18n/tr/api.php | 33 ++++++++++++ app/i18n/zh-cn/api.php | 33 ++++++++++++ app/i18n/zh-tw/api.php | 33 ++++++++++++ docs/i18n/flags/gen/el.svg | 2 +- docs/i18n/flags/gen/en-us.svg | 2 +- docs/i18n/flags/gen/es.svg | 2 +- docs/i18n/flags/gen/fa.svg | 2 +- docs/i18n/flags/gen/fi.svg | 2 +- docs/i18n/flags/gen/he.svg | 2 +- docs/i18n/flags/gen/hu.svg | 2 +- docs/i18n/flags/gen/id.svg | 2 +- docs/i18n/flags/gen/it.svg | 2 +- docs/i18n/flags/gen/ja.svg | 2 +- docs/i18n/flags/gen/lv.svg | 2 +- docs/i18n/flags/gen/nl.svg | 2 +- docs/i18n/flags/gen/oc.svg | 2 +- docs/i18n/flags/gen/pt-br.svg | 2 +- docs/i18n/flags/gen/pt-pt.svg | 2 +- docs/i18n/flags/gen/sk.svg | 2 +- docs/i18n/flags/gen/tr.svg | 2 +- p/api/index.php | 58 +++++++++++---------- p/scripts/api.js | 114 ++++++++++++++++++++++++++---------------- 45 files changed, 979 insertions(+), 85 deletions(-) create mode 100644 app/i18n/cs/api.php create mode 100644 app/i18n/de/api.php create mode 100644 app/i18n/el/api.php create mode 100644 app/i18n/en-us/api.php create mode 100644 app/i18n/en/api.php create mode 100644 app/i18n/es/api.php create mode 100644 app/i18n/fa/api.php create mode 100644 app/i18n/fi/api.php create mode 100644 app/i18n/fr/api.php create mode 100644 app/i18n/he/api.php create mode 100644 app/i18n/hu/api.php create mode 100644 app/i18n/id/api.php create mode 100644 app/i18n/it/api.php create mode 100644 app/i18n/ja/api.php create mode 100644 app/i18n/ko/api.php create mode 100644 app/i18n/lv/api.php create mode 100644 app/i18n/nl/api.php create mode 100644 app/i18n/oc/api.php create mode 100644 app/i18n/pl/api.php create mode 100644 app/i18n/pt-br/api.php create mode 100644 app/i18n/pt-pt/api.php create mode 100644 app/i18n/ru/api.php create mode 100644 app/i18n/sk/api.php create mode 100644 app/i18n/tr/api.php create mode 100644 app/i18n/zh-cn/api.php create mode 100644 app/i18n/zh-tw/api.php diff --git a/app/i18n/cs/api.php b/app/i18n/cs/api.php new file mode 100644 index 000000000..6a0eedb08 --- /dev/null +++ b/app/i18n/cs/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'Your API address:', // TODO + 'output' => array( + 'encoding-support' => '⚠️ WARN: no %2F support, some clients might not work!', // TODO + 'invalid-configuration' => '⚠️ WARN: Probable invalid base URL in ./data/config.php', // TODO + 'pass' => '✔️ PASS', // TODO + 'unknown-error' => '❌ ', // TODO + ), + 'test' => array( + 'fever' => 'Fever API configuration test:', // TODO + 'greader' => 'Google Reader API configuration test:', // TODO + ), + 'title' => array( + '_' => 'FreshRSS API endpoints', // TODO + 'extension' => 'API for extensions', // TODO + 'fever' => 'Fever compatible API', // TODO + 'greader' => 'Google Reader compatible API', // TODO + ), + ), +); diff --git a/app/i18n/de/api.php b/app/i18n/de/api.php new file mode 100644 index 000000000..79c36a6af --- /dev/null +++ b/app/i18n/de/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'API-Adresse:', + 'output' => array( + 'encoding-support' => '⚠️ WARNUNG: Kein %2F support, Einige Clients/Apps funktionieren ggf. nicht!', + 'invalid-configuration' => '⚠️ WARNUNG: Die Base URL in ./data/config.php könnte ungültig sein', + 'pass' => '✔️ OK', + 'unknown-error' => '❌ ', // IGNORE + ), + 'test' => array( + 'fever' => 'Prüfung der Fever API Einstellungen:', + 'greader' => 'Prüfung der Google Reader API Einstellungen:', + ), + 'title' => array( + '_' => 'FreshRSS API-Endpoints', + 'extension' => 'API für Erweiterungen', + 'fever' => 'Fever kompatible API', + 'greader' => 'Google Reader kompatible API', + ), + ), +); diff --git a/app/i18n/el/api.php b/app/i18n/el/api.php new file mode 100644 index 000000000..6a0eedb08 --- /dev/null +++ b/app/i18n/el/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'Your API address:', // TODO + 'output' => array( + 'encoding-support' => '⚠️ WARN: no %2F support, some clients might not work!', // TODO + 'invalid-configuration' => '⚠️ WARN: Probable invalid base URL in ./data/config.php', // TODO + 'pass' => '✔️ PASS', // TODO + 'unknown-error' => '❌ ', // TODO + ), + 'test' => array( + 'fever' => 'Fever API configuration test:', // TODO + 'greader' => 'Google Reader API configuration test:', // TODO + ), + 'title' => array( + '_' => 'FreshRSS API endpoints', // TODO + 'extension' => 'API for extensions', // TODO + 'fever' => 'Fever compatible API', // TODO + 'greader' => 'Google Reader compatible API', // TODO + ), + ), +); diff --git a/app/i18n/en-us/api.php b/app/i18n/en-us/api.php new file mode 100644 index 000000000..be50cb63d --- /dev/null +++ b/app/i18n/en-us/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'Your API address:', // IGNORE + 'output' => array( + 'encoding-support' => '⚠️ WARN: no %2F support, some clients might not work!', // TODO + 'invalid-configuration' => '⚠️ WARN: Probable invalid base URL in ./data/config.php', // TODO + 'pass' => '✔️ PASS', // TODO + 'unknown-error' => '❌ ', // TODO + ), + 'test' => array( + 'fever' => 'Fever API configuration test:', // IGNORE + 'greader' => 'Google Reader API configuration test:', // IGNORE + ), + 'title' => array( + '_' => 'FreshRSS API endpoints', // IGNORE + 'extension' => 'API for extensions', // IGNORE + 'fever' => 'Fever compatible API', // IGNORE + 'greader' => 'Google Reader compatible API', // IGNORE + ), + ), +); diff --git a/app/i18n/en/api.php b/app/i18n/en/api.php new file mode 100644 index 000000000..850fc04f0 --- /dev/null +++ b/app/i18n/en/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'Your API address:', + 'output' => array( + 'encoding-support' => '⚠️ WARN: no %2F support, some clients might not work!', // TODO + 'invalid-configuration' => '⚠️ WARN: Probable invalid base URL in ./data/config.php', // TODO + 'pass' => '✔️ PASS', // TODO + 'unknown-error' => '❌ ', // TODO + ), + 'test' => array( + 'fever' => 'Fever API configuration test:', + 'greader' => 'Google Reader API configuration test:', + ), + 'title' => array( + '_' => 'FreshRSS API endpoints', + 'extension' => 'API for extensions', + 'fever' => 'Fever compatible API', + 'greader' => 'Google Reader compatible API', + ), + ), +); diff --git a/app/i18n/es/api.php b/app/i18n/es/api.php new file mode 100644 index 000000000..6a0eedb08 --- /dev/null +++ b/app/i18n/es/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'Your API address:', // TODO + 'output' => array( + 'encoding-support' => '⚠️ WARN: no %2F support, some clients might not work!', // TODO + 'invalid-configuration' => '⚠️ WARN: Probable invalid base URL in ./data/config.php', // TODO + 'pass' => '✔️ PASS', // TODO + 'unknown-error' => '❌ ', // TODO + ), + 'test' => array( + 'fever' => 'Fever API configuration test:', // TODO + 'greader' => 'Google Reader API configuration test:', // TODO + ), + 'title' => array( + '_' => 'FreshRSS API endpoints', // TODO + 'extension' => 'API for extensions', // TODO + 'fever' => 'Fever compatible API', // TODO + 'greader' => 'Google Reader compatible API', // TODO + ), + ), +); diff --git a/app/i18n/fa/api.php b/app/i18n/fa/api.php new file mode 100644 index 000000000..6a0eedb08 --- /dev/null +++ b/app/i18n/fa/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'Your API address:', // TODO + 'output' => array( + 'encoding-support' => '⚠️ WARN: no %2F support, some clients might not work!', // TODO + 'invalid-configuration' => '⚠️ WARN: Probable invalid base URL in ./data/config.php', // TODO + 'pass' => '✔️ PASS', // TODO + 'unknown-error' => '❌ ', // TODO + ), + 'test' => array( + 'fever' => 'Fever API configuration test:', // TODO + 'greader' => 'Google Reader API configuration test:', // TODO + ), + 'title' => array( + '_' => 'FreshRSS API endpoints', // TODO + 'extension' => 'API for extensions', // TODO + 'fever' => 'Fever compatible API', // TODO + 'greader' => 'Google Reader compatible API', // TODO + ), + ), +); diff --git a/app/i18n/fi/api.php b/app/i18n/fi/api.php new file mode 100644 index 000000000..6a0eedb08 --- /dev/null +++ b/app/i18n/fi/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'Your API address:', // TODO + 'output' => array( + 'encoding-support' => '⚠️ WARN: no %2F support, some clients might not work!', // TODO + 'invalid-configuration' => '⚠️ WARN: Probable invalid base URL in ./data/config.php', // TODO + 'pass' => '✔️ PASS', // TODO + 'unknown-error' => '❌ ', // TODO + ), + 'test' => array( + 'fever' => 'Fever API configuration test:', // TODO + 'greader' => 'Google Reader API configuration test:', // TODO + ), + 'title' => array( + '_' => 'FreshRSS API endpoints', // TODO + 'extension' => 'API for extensions', // TODO + 'fever' => 'Fever compatible API', // TODO + 'greader' => 'Google Reader compatible API', // TODO + ), + ), +); diff --git a/app/i18n/fr/api.php b/app/i18n/fr/api.php new file mode 100644 index 000000000..3bb80d9ce --- /dev/null +++ b/app/i18n/fr/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'Adresse de votre API :', + 'output' => array( + 'encoding-support' => '⚠️ Avertissement : pas de support %2F ; certains clients pourraient ne pas fonctionner !', + 'invalid-configuration' => '⚠️ Avertissement : base_url probablement invalide dans ./data/config.php', + 'pass' => '✔️ Succès', + 'unknown-error' => '❌ ', // IGNORE + ), + 'test' => array( + 'fever' => 'Test de configuration de l’API Fever :', + 'greader' => 'Test de configuration de l’API Google Reader :', + ), + 'title' => array( + '_' => 'API de FreshRSS', + 'extension' => 'API des extensions', + 'fever' => 'API compatible avec l’API Fever', + 'greader' => 'API compatible avec l’API Google Reader', + ), + ), +); diff --git a/app/i18n/he/api.php b/app/i18n/he/api.php new file mode 100644 index 000000000..6a0eedb08 --- /dev/null +++ b/app/i18n/he/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'Your API address:', // TODO + 'output' => array( + 'encoding-support' => '⚠️ WARN: no %2F support, some clients might not work!', // TODO + 'invalid-configuration' => '⚠️ WARN: Probable invalid base URL in ./data/config.php', // TODO + 'pass' => '✔️ PASS', // TODO + 'unknown-error' => '❌ ', // TODO + ), + 'test' => array( + 'fever' => 'Fever API configuration test:', // TODO + 'greader' => 'Google Reader API configuration test:', // TODO + ), + 'title' => array( + '_' => 'FreshRSS API endpoints', // TODO + 'extension' => 'API for extensions', // TODO + 'fever' => 'Fever compatible API', // TODO + 'greader' => 'Google Reader compatible API', // TODO + ), + ), +); diff --git a/app/i18n/hu/api.php b/app/i18n/hu/api.php new file mode 100644 index 000000000..6a0eedb08 --- /dev/null +++ b/app/i18n/hu/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'Your API address:', // TODO + 'output' => array( + 'encoding-support' => '⚠️ WARN: no %2F support, some clients might not work!', // TODO + 'invalid-configuration' => '⚠️ WARN: Probable invalid base URL in ./data/config.php', // TODO + 'pass' => '✔️ PASS', // TODO + 'unknown-error' => '❌ ', // TODO + ), + 'test' => array( + 'fever' => 'Fever API configuration test:', // TODO + 'greader' => 'Google Reader API configuration test:', // TODO + ), + 'title' => array( + '_' => 'FreshRSS API endpoints', // TODO + 'extension' => 'API for extensions', // TODO + 'fever' => 'Fever compatible API', // TODO + 'greader' => 'Google Reader compatible API', // TODO + ), + ), +); diff --git a/app/i18n/id/api.php b/app/i18n/id/api.php new file mode 100644 index 000000000..6a0eedb08 --- /dev/null +++ b/app/i18n/id/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'Your API address:', // TODO + 'output' => array( + 'encoding-support' => '⚠️ WARN: no %2F support, some clients might not work!', // TODO + 'invalid-configuration' => '⚠️ WARN: Probable invalid base URL in ./data/config.php', // TODO + 'pass' => '✔️ PASS', // TODO + 'unknown-error' => '❌ ', // TODO + ), + 'test' => array( + 'fever' => 'Fever API configuration test:', // TODO + 'greader' => 'Google Reader API configuration test:', // TODO + ), + 'title' => array( + '_' => 'FreshRSS API endpoints', // TODO + 'extension' => 'API for extensions', // TODO + 'fever' => 'Fever compatible API', // TODO + 'greader' => 'Google Reader compatible API', // TODO + ), + ), +); diff --git a/app/i18n/it/api.php b/app/i18n/it/api.php new file mode 100644 index 000000000..6a0eedb08 --- /dev/null +++ b/app/i18n/it/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'Your API address:', // TODO + 'output' => array( + 'encoding-support' => '⚠️ WARN: no %2F support, some clients might not work!', // TODO + 'invalid-configuration' => '⚠️ WARN: Probable invalid base URL in ./data/config.php', // TODO + 'pass' => '✔️ PASS', // TODO + 'unknown-error' => '❌ ', // TODO + ), + 'test' => array( + 'fever' => 'Fever API configuration test:', // TODO + 'greader' => 'Google Reader API configuration test:', // TODO + ), + 'title' => array( + '_' => 'FreshRSS API endpoints', // TODO + 'extension' => 'API for extensions', // TODO + 'fever' => 'Fever compatible API', // TODO + 'greader' => 'Google Reader compatible API', // TODO + ), + ), +); diff --git a/app/i18n/ja/api.php b/app/i18n/ja/api.php new file mode 100644 index 000000000..6a0eedb08 --- /dev/null +++ b/app/i18n/ja/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'Your API address:', // TODO + 'output' => array( + 'encoding-support' => '⚠️ WARN: no %2F support, some clients might not work!', // TODO + 'invalid-configuration' => '⚠️ WARN: Probable invalid base URL in ./data/config.php', // TODO + 'pass' => '✔️ PASS', // TODO + 'unknown-error' => '❌ ', // TODO + ), + 'test' => array( + 'fever' => 'Fever API configuration test:', // TODO + 'greader' => 'Google Reader API configuration test:', // TODO + ), + 'title' => array( + '_' => 'FreshRSS API endpoints', // TODO + 'extension' => 'API for extensions', // TODO + 'fever' => 'Fever compatible API', // TODO + 'greader' => 'Google Reader compatible API', // TODO + ), + ), +); diff --git a/app/i18n/ko/api.php b/app/i18n/ko/api.php new file mode 100644 index 000000000..6a0eedb08 --- /dev/null +++ b/app/i18n/ko/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'Your API address:', // TODO + 'output' => array( + 'encoding-support' => '⚠️ WARN: no %2F support, some clients might not work!', // TODO + 'invalid-configuration' => '⚠️ WARN: Probable invalid base URL in ./data/config.php', // TODO + 'pass' => '✔️ PASS', // TODO + 'unknown-error' => '❌ ', // TODO + ), + 'test' => array( + 'fever' => 'Fever API configuration test:', // TODO + 'greader' => 'Google Reader API configuration test:', // TODO + ), + 'title' => array( + '_' => 'FreshRSS API endpoints', // TODO + 'extension' => 'API for extensions', // TODO + 'fever' => 'Fever compatible API', // TODO + 'greader' => 'Google Reader compatible API', // TODO + ), + ), +); diff --git a/app/i18n/lv/api.php b/app/i18n/lv/api.php new file mode 100644 index 000000000..6a0eedb08 --- /dev/null +++ b/app/i18n/lv/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'Your API address:', // TODO + 'output' => array( + 'encoding-support' => '⚠️ WARN: no %2F support, some clients might not work!', // TODO + 'invalid-configuration' => '⚠️ WARN: Probable invalid base URL in ./data/config.php', // TODO + 'pass' => '✔️ PASS', // TODO + 'unknown-error' => '❌ ', // TODO + ), + 'test' => array( + 'fever' => 'Fever API configuration test:', // TODO + 'greader' => 'Google Reader API configuration test:', // TODO + ), + 'title' => array( + '_' => 'FreshRSS API endpoints', // TODO + 'extension' => 'API for extensions', // TODO + 'fever' => 'Fever compatible API', // TODO + 'greader' => 'Google Reader compatible API', // TODO + ), + ), +); diff --git a/app/i18n/nl/api.php b/app/i18n/nl/api.php new file mode 100644 index 000000000..6a0eedb08 --- /dev/null +++ b/app/i18n/nl/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'Your API address:', // TODO + 'output' => array( + 'encoding-support' => '⚠️ WARN: no %2F support, some clients might not work!', // TODO + 'invalid-configuration' => '⚠️ WARN: Probable invalid base URL in ./data/config.php', // TODO + 'pass' => '✔️ PASS', // TODO + 'unknown-error' => '❌ ', // TODO + ), + 'test' => array( + 'fever' => 'Fever API configuration test:', // TODO + 'greader' => 'Google Reader API configuration test:', // TODO + ), + 'title' => array( + '_' => 'FreshRSS API endpoints', // TODO + 'extension' => 'API for extensions', // TODO + 'fever' => 'Fever compatible API', // TODO + 'greader' => 'Google Reader compatible API', // TODO + ), + ), +); diff --git a/app/i18n/oc/api.php b/app/i18n/oc/api.php new file mode 100644 index 000000000..6a0eedb08 --- /dev/null +++ b/app/i18n/oc/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'Your API address:', // TODO + 'output' => array( + 'encoding-support' => '⚠️ WARN: no %2F support, some clients might not work!', // TODO + 'invalid-configuration' => '⚠️ WARN: Probable invalid base URL in ./data/config.php', // TODO + 'pass' => '✔️ PASS', // TODO + 'unknown-error' => '❌ ', // TODO + ), + 'test' => array( + 'fever' => 'Fever API configuration test:', // TODO + 'greader' => 'Google Reader API configuration test:', // TODO + ), + 'title' => array( + '_' => 'FreshRSS API endpoints', // TODO + 'extension' => 'API for extensions', // TODO + 'fever' => 'Fever compatible API', // TODO + 'greader' => 'Google Reader compatible API', // TODO + ), + ), +); diff --git a/app/i18n/pl/api.php b/app/i18n/pl/api.php new file mode 100644 index 000000000..406ee6d72 --- /dev/null +++ b/app/i18n/pl/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'Twój adres API:', + 'output' => array( + 'encoding-support' => '⚠️ UWAGA: brak wsparcia dla %2F, niektóre aplikacje mogą nie działać!', + 'invalid-configuration' => '⚠️ UWAGA: Prawdopodobnie nieprawidłowy bazowy URL w ./data/config.php', + 'pass' => '✔️ OK', + 'unknown-error' => '❌ ', // IGNORE + ), + 'test' => array( + 'fever' => 'Test konfiguracji Fever API:', + 'greader' => 'Test konfiguracji Google Reader API:', + ), + 'title' => array( + '_' => 'Endpointy API FreshRSS', + 'extension' => 'API dla rozszerzeń', + 'fever' => 'API kompatybilne z Fever', + 'greader' => 'API kompatybilne z Google Reader', + ), + ), +); diff --git a/app/i18n/pt-br/api.php b/app/i18n/pt-br/api.php new file mode 100644 index 000000000..6a0eedb08 --- /dev/null +++ b/app/i18n/pt-br/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'Your API address:', // TODO + 'output' => array( + 'encoding-support' => '⚠️ WARN: no %2F support, some clients might not work!', // TODO + 'invalid-configuration' => '⚠️ WARN: Probable invalid base URL in ./data/config.php', // TODO + 'pass' => '✔️ PASS', // TODO + 'unknown-error' => '❌ ', // TODO + ), + 'test' => array( + 'fever' => 'Fever API configuration test:', // TODO + 'greader' => 'Google Reader API configuration test:', // TODO + ), + 'title' => array( + '_' => 'FreshRSS API endpoints', // TODO + 'extension' => 'API for extensions', // TODO + 'fever' => 'Fever compatible API', // TODO + 'greader' => 'Google Reader compatible API', // TODO + ), + ), +); diff --git a/app/i18n/pt-pt/api.php b/app/i18n/pt-pt/api.php new file mode 100644 index 000000000..6a0eedb08 --- /dev/null +++ b/app/i18n/pt-pt/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'Your API address:', // TODO + 'output' => array( + 'encoding-support' => '⚠️ WARN: no %2F support, some clients might not work!', // TODO + 'invalid-configuration' => '⚠️ WARN: Probable invalid base URL in ./data/config.php', // TODO + 'pass' => '✔️ PASS', // TODO + 'unknown-error' => '❌ ', // TODO + ), + 'test' => array( + 'fever' => 'Fever API configuration test:', // TODO + 'greader' => 'Google Reader API configuration test:', // TODO + ), + 'title' => array( + '_' => 'FreshRSS API endpoints', // TODO + 'extension' => 'API for extensions', // TODO + 'fever' => 'Fever compatible API', // TODO + 'greader' => 'Google Reader compatible API', // TODO + ), + ), +); diff --git a/app/i18n/ru/api.php b/app/i18n/ru/api.php new file mode 100644 index 000000000..6a0eedb08 --- /dev/null +++ b/app/i18n/ru/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'Your API address:', // TODO + 'output' => array( + 'encoding-support' => '⚠️ WARN: no %2F support, some clients might not work!', // TODO + 'invalid-configuration' => '⚠️ WARN: Probable invalid base URL in ./data/config.php', // TODO + 'pass' => '✔️ PASS', // TODO + 'unknown-error' => '❌ ', // TODO + ), + 'test' => array( + 'fever' => 'Fever API configuration test:', // TODO + 'greader' => 'Google Reader API configuration test:', // TODO + ), + 'title' => array( + '_' => 'FreshRSS API endpoints', // TODO + 'extension' => 'API for extensions', // TODO + 'fever' => 'Fever compatible API', // TODO + 'greader' => 'Google Reader compatible API', // TODO + ), + ), +); diff --git a/app/i18n/sk/api.php b/app/i18n/sk/api.php new file mode 100644 index 000000000..6a0eedb08 --- /dev/null +++ b/app/i18n/sk/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'Your API address:', // TODO + 'output' => array( + 'encoding-support' => '⚠️ WARN: no %2F support, some clients might not work!', // TODO + 'invalid-configuration' => '⚠️ WARN: Probable invalid base URL in ./data/config.php', // TODO + 'pass' => '✔️ PASS', // TODO + 'unknown-error' => '❌ ', // TODO + ), + 'test' => array( + 'fever' => 'Fever API configuration test:', // TODO + 'greader' => 'Google Reader API configuration test:', // TODO + ), + 'title' => array( + '_' => 'FreshRSS API endpoints', // TODO + 'extension' => 'API for extensions', // TODO + 'fever' => 'Fever compatible API', // TODO + 'greader' => 'Google Reader compatible API', // TODO + ), + ), +); diff --git a/app/i18n/tr/api.php b/app/i18n/tr/api.php new file mode 100644 index 000000000..6a0eedb08 --- /dev/null +++ b/app/i18n/tr/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'Your API address:', // TODO + 'output' => array( + 'encoding-support' => '⚠️ WARN: no %2F support, some clients might not work!', // TODO + 'invalid-configuration' => '⚠️ WARN: Probable invalid base URL in ./data/config.php', // TODO + 'pass' => '✔️ PASS', // TODO + 'unknown-error' => '❌ ', // TODO + ), + 'test' => array( + 'fever' => 'Fever API configuration test:', // TODO + 'greader' => 'Google Reader API configuration test:', // TODO + ), + 'title' => array( + '_' => 'FreshRSS API endpoints', // TODO + 'extension' => 'API for extensions', // TODO + 'fever' => 'Fever compatible API', // TODO + 'greader' => 'Google Reader compatible API', // TODO + ), + ), +); diff --git a/app/i18n/zh-cn/api.php b/app/i18n/zh-cn/api.php new file mode 100644 index 000000000..6a0eedb08 --- /dev/null +++ b/app/i18n/zh-cn/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'Your API address:', // TODO + 'output' => array( + 'encoding-support' => '⚠️ WARN: no %2F support, some clients might not work!', // TODO + 'invalid-configuration' => '⚠️ WARN: Probable invalid base URL in ./data/config.php', // TODO + 'pass' => '✔️ PASS', // TODO + 'unknown-error' => '❌ ', // TODO + ), + 'test' => array( + 'fever' => 'Fever API configuration test:', // TODO + 'greader' => 'Google Reader API configuration test:', // TODO + ), + 'title' => array( + '_' => 'FreshRSS API endpoints', // TODO + 'extension' => 'API for extensions', // TODO + 'fever' => 'Fever compatible API', // TODO + 'greader' => 'Google Reader compatible API', // TODO + ), + ), +); diff --git a/app/i18n/zh-tw/api.php b/app/i18n/zh-tw/api.php new file mode 100644 index 000000000..6a0eedb08 --- /dev/null +++ b/app/i18n/zh-tw/api.php @@ -0,0 +1,33 @@ + array( + 'address' => 'Your API address:', // TODO + 'output' => array( + 'encoding-support' => '⚠️ WARN: no %2F support, some clients might not work!', // TODO + 'invalid-configuration' => '⚠️ WARN: Probable invalid base URL in ./data/config.php', // TODO + 'pass' => '✔️ PASS', // TODO + 'unknown-error' => '❌ ', // TODO + ), + 'test' => array( + 'fever' => 'Fever API configuration test:', // TODO + 'greader' => 'Google Reader API configuration test:', // TODO + ), + 'title' => array( + '_' => 'FreshRSS API endpoints', // TODO + 'extension' => 'API for extensions', // TODO + 'fever' => 'Fever compatible API', // TODO + 'greader' => 'Google Reader compatible API', // TODO + ), + ), +); diff --git a/docs/i18n/flags/gen/el.svg b/docs/i18n/flags/gen/el.svg index 46a4486da..99d090aeb 100644 --- a/docs/i18n/flags/gen/el.svg +++ b/docs/i18n/flags/gen/el.svg @@ -2,6 +2,6 @@ - 🇬🇷 23% + 🇬🇷 22% \ No newline at end of file diff --git a/docs/i18n/flags/gen/en-us.svg b/docs/i18n/flags/gen/en-us.svg index ba7f59f32..78a4b9076 100644 --- a/docs/i18n/flags/gen/en-us.svg +++ b/docs/i18n/flags/gen/en-us.svg @@ -2,6 +2,6 @@ - 🇺🇸 100% + 🇺🇸 99% \ No newline at end of file diff --git a/docs/i18n/flags/gen/es.svg b/docs/i18n/flags/gen/es.svg index 192232725..6d976bfc8 100644 --- a/docs/i18n/flags/gen/es.svg +++ b/docs/i18n/flags/gen/es.svg @@ -2,6 +2,6 @@ - 🇪🇸 93% + 🇪🇸 92% \ No newline at end of file diff --git a/docs/i18n/flags/gen/fa.svg b/docs/i18n/flags/gen/fa.svg index 52a95d1c8..0870a09f7 100644 --- a/docs/i18n/flags/gen/fa.svg +++ b/docs/i18n/flags/gen/fa.svg @@ -2,6 +2,6 @@ - 🇮🇷 99% + 🇮🇷 98% \ No newline at end of file diff --git a/docs/i18n/flags/gen/fi.svg b/docs/i18n/flags/gen/fi.svg index feec22330..98ccc4e86 100644 --- a/docs/i18n/flags/gen/fi.svg +++ b/docs/i18n/flags/gen/fi.svg @@ -2,6 +2,6 @@ - 🇫🇮 93% + 🇫🇮 92% \ No newline at end of file diff --git a/docs/i18n/flags/gen/he.svg b/docs/i18n/flags/gen/he.svg index 7f81280a5..ff45b2a3c 100644 --- a/docs/i18n/flags/gen/he.svg +++ b/docs/i18n/flags/gen/he.svg @@ -2,6 +2,6 @@ - 🇮🇱 46% + 🇮🇱 45% \ No newline at end of file diff --git a/docs/i18n/flags/gen/hu.svg b/docs/i18n/flags/gen/hu.svg index 533b380dd..ff7bf3a4d 100644 --- a/docs/i18n/flags/gen/hu.svg +++ b/docs/i18n/flags/gen/hu.svg @@ -2,6 +2,6 @@ - 🇭🇺 97% + 🇭🇺 96% \ No newline at end of file diff --git a/docs/i18n/flags/gen/id.svg b/docs/i18n/flags/gen/id.svg index 6e2a1e6d0..16eb76b21 100644 --- a/docs/i18n/flags/gen/id.svg +++ b/docs/i18n/flags/gen/id.svg @@ -2,6 +2,6 @@ - 🇮🇩 98% + 🇮🇩 97% \ No newline at end of file diff --git a/docs/i18n/flags/gen/it.svg b/docs/i18n/flags/gen/it.svg index c44f0acfc..7c5dda104 100644 --- a/docs/i18n/flags/gen/it.svg +++ b/docs/i18n/flags/gen/it.svg @@ -2,6 +2,6 @@ - 🇮🇹 98% + 🇮🇹 97% \ No newline at end of file diff --git a/docs/i18n/flags/gen/ja.svg b/docs/i18n/flags/gen/ja.svg index e14f6bd58..001a08553 100644 --- a/docs/i18n/flags/gen/ja.svg +++ b/docs/i18n/flags/gen/ja.svg @@ -2,6 +2,6 @@ - 🇯🇵 96% + 🇯🇵 95% \ No newline at end of file diff --git a/docs/i18n/flags/gen/lv.svg b/docs/i18n/flags/gen/lv.svg index c59343296..9fabb834f 100644 --- a/docs/i18n/flags/gen/lv.svg +++ b/docs/i18n/flags/gen/lv.svg @@ -2,6 +2,6 @@ - 🇱🇻 83% + 🇱🇻 82% \ No newline at end of file diff --git a/docs/i18n/flags/gen/nl.svg b/docs/i18n/flags/gen/nl.svg index 44a70a67a..395350abf 100644 --- a/docs/i18n/flags/gen/nl.svg +++ b/docs/i18n/flags/gen/nl.svg @@ -2,6 +2,6 @@ - 🇳🇱 91% + 🇳🇱 90% \ No newline at end of file diff --git a/docs/i18n/flags/gen/oc.svg b/docs/i18n/flags/gen/oc.svg index 93f4d3d39..950bc44b9 100644 --- a/docs/i18n/flags/gen/oc.svg +++ b/docs/i18n/flags/gen/oc.svg @@ -5,6 +5,6 @@ - 82% + 81% \ No newline at end of file diff --git a/docs/i18n/flags/gen/pt-br.svg b/docs/i18n/flags/gen/pt-br.svg index 301556546..8e2c5e007 100644 --- a/docs/i18n/flags/gen/pt-br.svg +++ b/docs/i18n/flags/gen/pt-br.svg @@ -2,6 +2,6 @@ - 🇧🇷 89% + 🇧🇷 88% \ No newline at end of file diff --git a/docs/i18n/flags/gen/pt-pt.svg b/docs/i18n/flags/gen/pt-pt.svg index aa24013a2..00718c072 100644 --- a/docs/i18n/flags/gen/pt-pt.svg +++ b/docs/i18n/flags/gen/pt-pt.svg @@ -2,6 +2,6 @@ - 🇵🇹 89% + 🇵🇹 88% \ No newline at end of file diff --git a/docs/i18n/flags/gen/sk.svg b/docs/i18n/flags/gen/sk.svg index 5be810f48..b0a410ce5 100644 --- a/docs/i18n/flags/gen/sk.svg +++ b/docs/i18n/flags/gen/sk.svg @@ -2,6 +2,6 @@ - 🇸🇰 89% + 🇸🇰 88% \ No newline at end of file diff --git a/docs/i18n/flags/gen/tr.svg b/docs/i18n/flags/gen/tr.svg index 32a930f88..c298e0e09 100644 --- a/docs/i18n/flags/gen/tr.svg +++ b/docs/i18n/flags/gen/tr.svg @@ -2,6 +2,6 @@ - 🇹🇷 98% + 🇹🇷 97% \ No newline at end of file diff --git a/p/api/index.php b/p/api/index.php index 1db1273dc..279826aa5 100644 --- a/p/api/index.php +++ b/p/api/index.php @@ -1,52 +1,58 @@ -FreshRSS API endpoints +<?= _t('api.information.title') ?> - -

FreshRSS API endpoints

+

-

Google Reader compatible API

+

-
Your API address:
-
-
Google Reader API configuration test:
-
?
+
+
+
+
+
?
-

Fever compatible API

+

-
Your API address:
-
-
Fever API configuration test:
-
?
+
+
+
+
?
-

API for extensions

+

-
Your API address:
-
+
+
diff --git a/p/scripts/api.js b/p/scripts/api.js index ce52c50ad..62ce386f8 100644 --- a/p/scripts/api.js +++ b/p/scripts/api.js @@ -1,7 +1,7 @@ // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0 'use strict'; -function check(url, next) { +const check = function (url, next) { if (!url || !next) { return; } @@ -19,45 +19,75 @@ function check(url, next) { } }; req.send(); -} - -const jsonVars = JSON.parse(document.getElementById('jsonVars').innerHTML); - -check(jsonVars.greader + '/check/compatibility', function next(result1) { - const greaderOutput = document.getElementById('greaderOutput'); - if (result1 === 'PASS') { - greaderOutput.innerHTML = '✔️ ' + result1; - } else { - check(jsonVars.greader + '/check%2Fcompatibility', function next(result2) { - if (result2 === 'PASS') { - greaderOutput.innerHTML = '⚠️ WARN: no %2F support, so some clients will not work!'; - } else { - check('./greader.php/check/compatibility', function next(result3) { - if (result3 === 'PASS') { - greaderOutput.innerHTML = '⚠️ WARN: Probable invalid base URL in ./data/config.php'; - } else { - greaderOutput.innerHTML = '❌ ' + result1; - } - }); - } - }); - } -}); - -check(jsonVars.fever + '?api', function next(result1) { - const feverOutput = document.getElementById('feverOutput'); - try { - JSON.parse(result1); - feverOutput.innerHTML = '✔️ PASS'; - } catch (ex) { - check('./fever.php?api', function next(result2) { - try { - JSON.parse(result2); - feverOutput.innerHTML = '⚠️ WARN: Probable invalid base URL in ./data/config.php'; - } catch (ex) { - feverOutput.innerHTML = '❌ ' + result1; - } - }); - } -}); +}; + +const pass = function (output) { + output.innerHTML = output.dataset.i18nPass; +}; + +const encodingSupport = function (output) { + output.innerHTML = output.dataset.i18nEncodingSupport; +}; + +const invalidConfiguration = function (output) { + output.innerHTML = output.dataset.i18nInvalidConfiguration; +}; + +const unknownError = function (output, message) { + output.innerHTML = output.dataset.i18nUnknownError + message; +}; + +const checkGReaderAPI = function () { + const output = document.getElementById('greaderOutput'); + const apiUrl = output.dataset.apiUrl; + + check(apiUrl + '/check/compatibility', function next(result1) { + if (result1 === 'PASS') { + pass(output); + } else { + check(apiUrl + '/check%2Fcompatibility', function next(result2) { + if (result2 === 'PASS') { + encodingSupport(output); + } else { + check('./greader.php/check/compatibility', function next(result3) { + if (result3 === 'PASS') { + invalidConfiguration(output); + } else { + unknownError(output, result1); + } + }); + } + }); + } + }); +}; + +const checkFeverAPI = function () { + const output = document.getElementById('feverOutput'); + const apiUrl = output.dataset.apiUrl; + + check(apiUrl + '?api', function next(result1) { + try { + JSON.parse(result1); + pass(output); + } catch (ex) { + check('./fever.php?api', function next(result2) { + try { + JSON.parse(result2); + invalidConfiguration(output); + } catch (ex) { + unknownError(output, result1); + } + }); + } + }); +}; + +/** + * The API tests are done this way to simulate in a more accurate manner + * outside requests. Since the APIs are used by third-party tools, they + * cannot interact at the server level. + */ +checkGReaderAPI(); +checkFeverAPI(); // @license-end -- cgit v1.2.3