A free, self-hostable news aggregator…
Add missing translations (#3034)
Alexis Degrugillier8c4d71da2ef1
diff --git a/Makefile b/Makefileindex 1e5433a44..b5b69e6bf 100644--- a/Makefile+++ b/Makefile@@ -146,6 +146,14 @@ endif@$(PHP) ./cli/manipulate.translation.php -a ignore -k $(key) -l $(lang)@echo Key ignored.+.PHONY: i18n-key-exists+i18n-key-exists: ## Check if a translation key exists+ifndef key+ @echo To check if a key exists, you need to provide one in the "key" variable.+ @exit 10+endif+ @$(PHP) ./cli/manipulate.translation.php -a exist -k $(key)+############# TOOLS #############diff --git a/app/Controllers/extensionController.php b/app/Controllers/extensionController.phpindex 68bd90f4c..8ac45acc7 100644--- a/app/Controllers/extensionController.php+++ b/app/Controllers/extensionController.php@@ -246,7 +246,7 @@ class FreshRSS_extension_Controller extends Minz_ActionController {Minz_Request::good(_t('feedback.extensions.removed', $ext_name),$url_redirect);} else {- Minz_Request::bad(_t('feedback.extensions.cannot_delete', $ext_name),+ Minz_Request::bad(_t('feedback.extensions.cannot_remove', $ext_name),$url_redirect);}}diff --git a/app/i18n/cz/feedback.php b/app/i18n/cz/feedback.phpindex 426fe2e69..315be55aa 100644--- a/app/i18n/cz/feedback.php+++ b/app/i18n/cz/feedback.php@@ -36,6 +36,7 @@ return array(),'extensions' => array('already_enabled' => '%s je již zapnut',+ 'cannot_remove' => '%s cannot be removed', // TODO - Translation'disable' => array('ko' => '%s nelze vypnout. Pro více detailů <a href="%s">zkontrolujte logy FreshRSS</a>.','ok' => '%s je nyní vypnut',@@ -47,6 +48,7 @@ return array('no_access' => 'Nemáte přístup k %s','not_enabled' => '%s není ještě zapnut','not_found' => '%s neexistuje',+ 'removed' => '%s removed', // TODO - Translation),'import_export' => array('export_no_zip_extension' => 'Na serveru není naistalována podpora ZIP. Zkuste prosím exportovat soubory jeden po druhém.',diff --git a/app/i18n/de/feedback.php b/app/i18n/de/feedback.phpindex afd96bf33..e0c1db9b0 100644--- a/app/i18n/de/feedback.php+++ b/app/i18n/de/feedback.php@@ -36,6 +36,7 @@ return array(),'extensions' => array('already_enabled' => '%s ist bereits aktiviert',+ 'cannot_remove' => '%s cannot be removed', // TODO - Translation'disable' => array('ko' => '%s kann nicht deaktiviert werden. Für Details <a href="%s">prüfen Sie die FreshRSS-Protokolle</a>.','ok' => '%s ist jetzt deaktiviert',@@ -47,6 +48,7 @@ return array('no_access' => 'Sie haben keinen Zugang zu %s','not_enabled' => '%s ist noch nicht aktiviert','not_found' => '%s existiert nicht',+ 'removed' => '%s removed', // TODO - Translation),'import_export' => array('export_no_zip_extension' => 'Die ZIP-Erweiterung fehlt auf Ihrem Server. Bitte versuchen Sie die Dateien eine nach der anderen zu exportieren.',diff --git a/app/i18n/en/feedback.php b/app/i18n/en/feedback.phpindex 606a7ad6a..6d6796dda 100644--- a/app/i18n/en/feedback.php+++ b/app/i18n/en/feedback.php@@ -36,6 +36,7 @@ return array(),'extensions' => array('already_enabled' => '%s is already enabled',+ 'cannot_remove' => '%s cannot be removed','disable' => array('ko' => '%s cannot be disabled. <a href="%s">Check FreshRSS logs</a> for details.','ok' => '%s is now disabled',@@ -47,6 +48,7 @@ return array('no_access' => 'You have no access on %s','not_enabled' => '%s is not enabled','not_found' => '%s does not exist',+ 'removed' => '%s removed',),'import_export' => array('export_no_zip_extension' => 'ZIP extension is not present on your server. Please try to export files one by one.',diff --git a/app/i18n/es/feedback.php b/app/i18n/es/feedback.phpindex 0a9af5e55..b0e76fc46 100755--- a/app/i18n/es/feedback.php+++ b/app/i18n/es/feedback.php@@ -36,6 +36,7 @@ return array(),'extensions' => array('already_enabled' => '%s ya está activado',+ 'cannot_remove' => '%s cannot be removed', // TODO - Translation'disable' => array('ko' => '%s no se puede desactivar. <a href="%s">Revisa el registro de FreshRSS</a> para más información.','ok' => '%s ha quedado desactivado',@@ -47,6 +48,7 @@ return array('no_access' => 'No tienes acceso a %s','not_enabled' => '%s no está activado','not_found' => '%s no existe',+ 'removed' => '%s removed', // TODO - Translation),'import_export' => array('export_no_zip_extension' => 'La extensión ZIP no está disponible en tu servidor. Por favor, exporta estos archivos uno a uno.',diff --git a/app/i18n/fr/feedback.php b/app/i18n/fr/feedback.phpindex a31c4f249..e09518892 100644--- a/app/i18n/fr/feedback.php+++ b/app/i18n/fr/feedback.php@@ -36,6 +36,7 @@ return array(),'extensions' => array('already_enabled' => '%s est déjà activée',+ 'cannot_remove' => '%s ne peut pas être supprimée','disable' => array('ko' => '%s ne peut pas être désactivée. <a href="%s">Consulter les logs de FreshRSS</a> pour plus de détails.','ok' => '%s est désormais désactivée',@@ -47,6 +48,7 @@ return array('no_access' => 'Vous n’avez aucun accès sur %s','not_enabled' => '%s n’est pas encore activée','not_found' => '%s n’existe pas',+ 'removed' => '%s a été supprimée',),'import_export' => array('export_no_zip_extension' => 'L’extension ZIP n’est pas présente sur votre serveur. Veuillez essayer d’exporter les fichiers un par un.',diff --git a/app/i18n/he/feedback.php b/app/i18n/he/feedback.phpindex 10966b0ef..be5b74165 100644--- a/app/i18n/he/feedback.php+++ b/app/i18n/he/feedback.php@@ -36,6 +36,7 @@ return array(),'extensions' => array('already_enabled' => '%s is already enabled', // TODO - Translation+ 'cannot_remove' => '%s cannot be removed', // TODO - Translation'disable' => array('ko' => '%s cannot be disabled. <a href="%s">Check FreshRSS logs</a> for details.', // TODO - Translation'ok' => '%s is now disabled', // TODO - Translation@@ -47,6 +48,7 @@ return array('no_access' => 'You have no access on %s', // TODO - Translation'not_enabled' => '%s is not enabled yet','not_found' => '%s does not exist', // TODO - Translation+ 'removed' => '%s removed', // TODO - Translation),'import_export' => array('export_no_zip_extension' => 'הרחבת ZIP אינה מותקנת על השרת.',diff --git a/app/i18n/it/feedback.php b/app/i18n/it/feedback.phpindex af6275f97..d9c6cca75 100644--- a/app/i18n/it/feedback.php+++ b/app/i18n/it/feedback.php@@ -36,6 +36,7 @@ return array(),'extensions' => array('already_enabled' => '%s è già abilitata',+ 'cannot_remove' => '%s cannot be removed', // TODO - Translation'disable' => array('ko' => '%s non può essere disabilitata. <a href="%s">Verifica i logs</a> per dettagli.','ok' => '%s è disabilitata',@@ -47,6 +48,7 @@ return array('no_access' => 'Accesso negato a %s','not_enabled' => '%s non abilitato','not_found' => '%s non disponibile',+ 'removed' => '%s removed', // TODO - Translation),'import_export' => array('export_no_zip_extension' => 'Estensione ZIP non presente sul server. Per favore esporta i files singolarmente.',diff --git a/app/i18n/kr/feedback.php b/app/i18n/kr/feedback.phpindex 1ba91f2bd..e6745c3a5 100644--- a/app/i18n/kr/feedback.php+++ b/app/i18n/kr/feedback.php@@ -36,6 +36,7 @@ return array(),'extensions' => array('already_enabled' => '%s 확장 기능은 이미 활성화되어 있습니다',+ 'cannot_remove' => '%s cannot be removed', // TODO - Translation'disable' => array('ko' => '%s 확장 기능을 비활성화 할 수 없습니다. 자세한 내용은 <a href="%s">FreshRSS 로그</a>를 참고하세요.','ok' => '%s 확장 기능이 비활성화되었습니다',@@ -47,6 +48,7 @@ return array('no_access' => '%s 확장 기능에 접근 권한이 없습니다','not_enabled' => '%s 확장 기능이 활성화되지 않았습니다','not_found' => '%s 확장 기능이 존재하지 않습니다',+ 'removed' => '%s removed', // TODO - Translation),'import_export' => array('export_no_zip_extension' => 'ZIP 확장 기능을 서버에서 찾을 수 없습니다. 파일을 하나씩 내보내세요.',diff --git a/app/i18n/nl/feedback.php b/app/i18n/nl/feedback.phpindex d94a1b667..e9b1d62b0 100644--- a/app/i18n/nl/feedback.php+++ b/app/i18n/nl/feedback.php@@ -36,6 +36,7 @@ return array(),'extensions' => array('already_enabled' => '%s is al ingeschakeld',+ 'cannot_remove' => '%s cannot be removed', // TODO - Translation'disable' => array('ko' => '%s kan niet worden uitgeschakeld. <a href="%s">Controleer FreshRSS log bestanden</a> voor details.','ok' => '%s is nu uitgeschakeld',@@ -47,6 +48,7 @@ return array('no_access' => 'U hebt geen toegang voor %s','not_enabled' => '%s is nog niet ingeschakeld','not_found' => '%s bestaat niet',+ 'removed' => '%s removed', // TODO - Translation),'import_export' => array('export_no_zip_extension' => 'ZIP uitbreiding is niet aanwezig op uw server. Exporteer a.u.b. uw bestanden één voor één.',diff --git a/app/i18n/oc/feedback.php b/app/i18n/oc/feedback.phpindex b5f069938..7b1d28d40 100644--- a/app/i18n/oc/feedback.php+++ b/app/i18n/oc/feedback.php@@ -36,6 +36,7 @@ return array(),'extensions' => array('already_enabled' => '%s es ja activada',+ 'cannot_remove' => '%s cannot be removed', // TODO - Translation'disable' => array('ko' => '%s pòt pas èsser desactivada. <a href="%s">Consultatz los jornals d’audit de FreshRSS logs</a> per mai de detalhs.','ok' => '%s es ara desactivada',@@ -47,6 +48,7 @@ return array('no_access' => 'Avètz pas accès sus %s','not_enabled' => '%s es pas encara activada','not_found' => '%s existís pas',+ 'removed' => '%s removed', // TODO - Translation),'import_export' => array('export_no_zip_extension' => 'L\'extension ZIP es pas presenta sul servidor. Volgatz ensajar d\'exportar los fichièrs un per un.',diff --git a/app/i18n/pt-br/feedback.php b/app/i18n/pt-br/feedback.phpindex 184ef4cc4..0b903db13 100644--- a/app/i18n/pt-br/feedback.php+++ b/app/i18n/pt-br/feedback.php@@ -36,6 +36,7 @@ return array(),'extensions' => array('already_enabled' => '%s já está habilitado',+ 'cannot_remove' => '%s cannot be removed', // TODO - Translation'disable' => array('ko' => '%s não pode ser desabilitado. <a href="%s">verifique os logs do FreshRSS</a> para detalhes.','ok' => '%s agora está desabilitado',@@ -47,6 +48,7 @@ return array('no_access' => 'Você não tem acesso ao %s','not_enabled' => '%s não está habilitado','not_found' => '%s não existe',+ 'removed' => '%s removed', // TODO - Translation),'import_export' => array('export_no_zip_extension' => 'extensão ZIP não está presente em seu servidor. Por favor tente exportar os arquivos um por vez.',diff --git a/app/i18n/ru/feedback.php b/app/i18n/ru/feedback.phpindex 04ec06cf0..dbd6a7f52 100644--- a/app/i18n/ru/feedback.php+++ b/app/i18n/ru/feedback.php@@ -36,6 +36,7 @@ return array(),'extensions' => array('already_enabled' => '%s is already enabled', // TODO - Translation+ 'cannot_remove' => '%s cannot be removed', // TODO - Translation'disable' => array('ko' => '%s cannot be disabled. <a href="%s">Check FreshRSS logs</a> for details.', // TODO - Translation'ok' => '%s is now disabled', // TODO - Translation@@ -47,6 +48,7 @@ return array('no_access' => 'You have no access on %s', // TODO - Translation'not_enabled' => '%s is not enabled yet','not_found' => '%s does not exist', // TODO - Translation+ 'removed' => '%s removed', // TODO - Translation),'import_export' => array('export_no_zip_extension' => 'ZIP extension is not present on your server. Please try to export files one by one.', // TODO - Translationdiff --git a/app/i18n/sk/feedback.php b/app/i18n/sk/feedback.phpindex ed880f1c8..04017c95c 100644--- a/app/i18n/sk/feedback.php+++ b/app/i18n/sk/feedback.php@@ -36,6 +36,7 @@ return array(),'extensions' => array('already_enabled' => '%s už je povolené',+ 'cannot_remove' => '%s cannot be removed', // TODO - Translation'disable' => array('ko' => '%s sa nepodarilo nainštalovať. <a href="%s">Prečítajte si záznamy FreshRSS</a>, ak chcete poznať podrobnosti.','ok' => '%s je teraz zakázaný',@@ -47,6 +48,7 @@ return array('no_access' => 'Nemáte prístup k %s','not_enabled' => '%s nie je povolený','not_found' => '%s neexistuje',+ 'removed' => '%s removed', // TODO - Translation),'import_export' => array('export_no_zip_extension' => 'ZIP rozšírenie sa na vašom serveri nenachádza. Prosím, skúste exportovať súbory pojednom.',diff --git a/app/i18n/tr/feedback.php b/app/i18n/tr/feedback.phpindex c0c71d65a..90b77360b 100644--- a/app/i18n/tr/feedback.php+++ b/app/i18n/tr/feedback.php@@ -36,6 +36,7 @@ return array(),'extensions' => array('already_enabled' => '%s zaten aktif',+ 'cannot_remove' => '%s cannot be removed', // TODO - Translation'disable' => array('ko' => '%s gösterilemiyor. Detaylar için <a href="%s">FreshRSS log kayıtlarını</a> kontrol edin.','ok' => '%s pasif',@@ -47,6 +48,7 @@ return array('no_access' => '%s de yetkiniz yok','not_enabled' => '%s henüz aktif değil','not_found' => '%s bulunmamaktadır',+ 'removed' => '%s removed', // TODO - Translation),'import_export' => array('export_no_zip_extension' => 'ZIP eklentisi mevcut sunucunuzda yer almıyor. Lütfen başka dosya formatında dışarı aktarmayı deneyin.',diff --git a/app/i18n/zh-cn/feedback.php b/app/i18n/zh-cn/feedback.phpindex fc8f46e03..677154ea9 100644--- a/app/i18n/zh-cn/feedback.php+++ b/app/i18n/zh-cn/feedback.php@@ -36,6 +36,7 @@ return array(),'extensions' => array('already_enabled' => '%s 已启用',+ 'cannot_remove' => '%s cannot be removed', // TODO - Translation'disable' => array('ko' => '禁用 %s 失败。<a href="%s">检查 FreshRSS 日志</a> 查看详情。','ok' => '%s 现已禁用',@@ -47,6 +48,7 @@ return array('no_access' => '你无权访问 %s','not_enabled' => '%s 未启用','not_found' => '%s 不存在',+ 'removed' => '%s removed', // TODO - Translation),'import_export' => array('export_no_zip_extension' => '服务器未启用 ZIP 扩展。请尝试逐个导出文件。',diff --git a/cli/i18n/I18nData.php b/cli/i18n/I18nData.phpindex a6d260a8f..2f09a5525 100644--- a/cli/i18n/I18nData.php+++ b/cli/i18n/I18nData.php@@ -132,6 +132,17 @@ class I18nData {$this->data[$language] = $this->data[static::REFERENCE_LANGUAGE];}+ /**+ * Check if the key is known.+ *+ * @param string $key+ * @return bool+ */+ public function isKnown($key) {+ return array_key_exists($this->getFilenamePrefix($key), $this->data[static::REFERENCE_LANGUAGE]) &&+ array_key_exists($key, $this->data[static::REFERENCE_LANGUAGE][$this->getFilenamePrefix($key)]);+ }+/*** Add a new key to all languages.*@@ -140,8 +151,7 @@ class I18nData {* @throws Exception*/public function addKey($key, $value) {- if (array_key_exists($this->getFilenamePrefix($key), $this->data[static::REFERENCE_LANGUAGE]) &&- array_key_exists($key, $this->data[static::REFERENCE_LANGUAGE][$this->getFilenamePrefix($key)])) {+ if ($this->isKnown($key)) {throw new Exception('The selected key already exist.');}@@ -178,8 +188,7 @@ class I18nData {* @throws Exception*/public function removeKey($key) {- if (!array_key_exists($this->getFilenamePrefix($key), $this->data[static::REFERENCE_LANGUAGE]) ||- !array_key_exists($key, $this->data[static::REFERENCE_LANGUAGE][$this->getFilenamePrefix($key)])) {+ if (!$this->isKnown($key)) {throw new Exception('The selected key does not exist.');}foreach ($this->getAvailableLanguages() as $language) {diff --git a/cli/manipulate.translation.php b/cli/manipulate.translation.phpindex c6aa328d9..c1f1132b4 100644--- a/cli/manipulate.translation.php+++ b/cli/manipulate.translation.php@@ -39,6 +39,19 @@ switch ($options['a']) {exit;}break;+ case 'exist':+ if (array_key_exists('k', $options)) {+ $key = $options['k'];+ if ($i18nData->isKnown($key)) {+ echo "The '{$key}' key is known.\n\n";+ } else {+ echo "The '{$key}' key is unknown.\n\n";+ }+ } else {+ error('You need to specify the key to check.');+ exit;+ }+ break;case 'format' :break;case 'ignore' :@@ -85,7 +98,7 @@ DESCRIPTION-a=ACTIONselect the action to perform. Available actions are add, delete,- format, and ignore. This option is mandatory.+ exist, format, and ignore. This option is mandatory.-k=KEY select the key to work on.-v=VAL select the value to set.-l=LANG select the language to work on.@@ -111,7 +124,10 @@ Exemple 6: ignore a key. It adds the key in the ignore file to mark it as translphp %1\$s -a ignore -k my_key -l my_langExemple 7: revert ignore a key. It removes the key from the ignore file.- php %1\$s -a ignore -r -k my_key -l my_lang\n\n+ php %1\$s -a ignore -r -k my_key -l my_lang++Exemple 8: check if a key exist.+ php %1\$s -a exist -k my_key\n\nHELP;$file = str_replace(__DIR__ . '/', '', __FILE__);echo sprintf($help, $file);