From: Nicolas Lœuillet Date: Thu, 1 Dec 2016 18:08:12 +0000 (+0100) Subject: Merge pull request #2677 from wallabag/add-wallabag_user.de.yml X-Git-Tag: 2.2.0~3^2~34 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=1093e979ff49f9072c30d1d576c6adf1f8e76bdf;hp=10d85dbae39ae22cd55f4363fda1ef065c83a109;p=github%2Fwallabag%2Fwallabag.git Merge pull request #2677 from wallabag/add-wallabag_user.de.yml add translations/wallabag_user.de.yml (fixes #2673) --- diff --git a/.editorconfig b/.editorconfig index d4ef7349..92c9a4c3 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,6 +9,6 @@ indent_size = 4 trim_trailing_whitespace = true insert_final_newline = true -[*.css] +[*.{js,css}] indent_style = space indent_size = 2 diff --git a/.eslintrc.json b/.eslintrc.json index 1137e2fc..3aee614f 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -2,7 +2,11 @@ "extends": "airbnb-base", "parser": "babel-eslint", "env": { - "browser": true + "browser": true, + "es6": true + }, + "globals": { + "Routing": true }, "rules": { "import/no-extraneous-dependencies": ["error", {"devDependencies": true, "optionalDependencies": true, "peerDependencies": true}] diff --git a/.gitignore b/.gitignore index 32b0fbbb..84fb95d7 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,8 @@ web/uploads/ !web/bundles web/bundles/* !web/bundles/wallabagcore +/web/assets/images/* +!web/assets/images/.gitkeep # Build /app/build @@ -34,7 +36,6 @@ web/bundles/* /composer.phar # Data for wallabag -data/assets/* data/db/wallabag*.sqlite # Docker container logs and data diff --git a/.travis.yml b/.travis.yml index a8f6a744..bffa0704 100644 --- a/.travis.yml +++ b/.travis.yml @@ -76,5 +76,5 @@ script: - if [[ $CS_FIXER = run ]]; then php bin/php-cs-fixer fix src/ --verbose --dry-run ; fi; - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi; - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml app/Resources/CraueConfigBundle/translations -v ; fi; - - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml app/Resources/FOSUserBundle/translations -v ; fi; + - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/UserBundle/Resources/translations -v ; fi; - if [[ $ASSETS = build ]]; then ./node_modules/grunt-cli/bin/grunt tests; fi; diff --git a/app/AppKernel.php b/app/AppKernel.php index 52f85558..c8382d5f 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -29,8 +29,9 @@ class AppKernel extends Kernel new KPhoen\RulerZBundle\KPhoenRulerZBundle(), new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(), new Craue\ConfigBundle\CraueConfigBundle(), - new Lexik\Bundle\MaintenanceBundle\LexikMaintenanceBundle(), new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(), + new FOS\JsRoutingBundle\FOSJsRoutingBundle(), + new BD\GuzzleSiteAuthenticatorBundle\BDGuzzleSiteAuthenticatorBundle(), // wallabag bundles new Wallabag\CoreBundle\WallabagCoreBundle(), diff --git a/app/DoctrineMigrations/Version20160410190541.php b/app/DoctrineMigrations/Version20160410190541.php index f034b0e4..0cdec008 100644 --- a/app/DoctrineMigrations/Version20160410190541.php +++ b/app/DoctrineMigrations/Version20160410190541.php @@ -21,7 +21,7 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI private function getTable($tableName) { - return $this->container->getParameter('database_table_prefix') . $tableName; + return $this->container->getParameter('database_table_prefix').$tableName; } /** @@ -29,13 +29,14 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI */ public function up(Schema $schema) { - if ($this->connection->getDatabasePlatform()->getName() == 'postgresql') { - $this->addSql('ALTER TABLE "'.$this->getTable('entry').'" ADD uuid UUID DEFAULT NULL'); - } else { - $this->addSql('ALTER TABLE "'.$this->getTable('entry').'" ADD uuid LONGTEXT DEFAULT NULL'); - } + $entryTable = $schema->getTable($this->getTable('entry')); - $this->addSql("INSERT INTO \"".$this->getTable('craue_config_setting')."\" (name, value, section) VALUES ('share_public', '1', 'entry')"); + $this->skipIf($entryTable->hasColumn('uuid'), 'It seems that you already played this migration.'); + + $entryTable->addColumn('uuid', 'guid', [ + 'notnull' => false, + ]); + $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('share_public', '1', 'entry')"); } /** @@ -43,9 +44,9 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI */ public function down(Schema $schema) { - $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'sqlite', 'This down migration can\'t be executed on SQLite databases, because SQLite don\'t support DROP COLUMN.'); + $entryTable = $schema->getTable($this->getTable('entry')); + $entryTable->dropColumn('uuid'); - $this->addSql('ALTER TABLE "'.$this->getTable('entry').'" DROP uuid'); - $this->addSql("DELETE FROM \"".$this->getTable('craue_config_setting')."\" WHERE name = 'share_public'"); + $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'share_public'"); } } diff --git a/app/DoctrineMigrations/Version20160812120952.php b/app/DoctrineMigrations/Version20160812120952.php index 3aafea64..053b8d88 100644 --- a/app/DoctrineMigrations/Version20160812120952.php +++ b/app/DoctrineMigrations/Version20160812120952.php @@ -21,7 +21,7 @@ class Version20160812120952 extends AbstractMigration implements ContainerAwareI private function getTable($tableName) { - return $this->container->getParameter('database_table_prefix') . $tableName; + return $this->container->getParameter('database_table_prefix').$tableName; } /** @@ -29,16 +29,10 @@ class Version20160812120952 extends AbstractMigration implements ContainerAwareI */ public function up(Schema $schema) { - switch ($this->connection->getDatabasePlatform()->getName()) { - case 'sqlite': - $this->addSql('ALTER TABLE '.$this->getTable('oauth2_clients').' ADD name longtext DEFAULT NULL'); - break; - case 'mysql': - $this->addSql('ALTER TABLE '.$this->getTable('oauth2_clients').' ADD name longtext COLLATE \'utf8_unicode_ci\' DEFAULT NULL'); - break; - case 'postgresql': - $this->addSql('ALTER TABLE '.$this->getTable('oauth2_clients').' ADD name text DEFAULT NULL'); - } + $clientsTable = $schema->getTable($this->getTable('oauth2_clients')); + $this->skipIf($clientsTable->hasColumn('name'), 'It seems that you already played this migration.'); + + $clientsTable->addColumn('name', 'blob'); } /** @@ -46,8 +40,7 @@ class Version20160812120952 extends AbstractMigration implements ContainerAwareI */ public function down(Schema $schema) { - $this->abortIf($this->connection->getDatabasePlatform()->getName() == 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); - - $this->addSql('ALTER TABLE '.$this->getTable('oauth2_clients').' DROP COLUMN name'); + $clientsTable = $schema->getTable($this->getTable('oauth2_clients')); + $clientsTable->dropColumn('name'); } } diff --git a/app/DoctrineMigrations/Version20160911214952.php b/app/DoctrineMigrations/Version20160911214952.php index f14f7bc6..963821ae 100644 --- a/app/DoctrineMigrations/Version20160911214952.php +++ b/app/DoctrineMigrations/Version20160911214952.php @@ -21,7 +21,7 @@ class Version20160911214952 extends AbstractMigration implements ContainerAwareI private function getTable($tableName) { - return $this->container->getParameter('database_table_prefix') . $tableName; + return $this->container->getParameter('database_table_prefix').$tableName; } /** @@ -29,8 +29,8 @@ class Version20160911214952 extends AbstractMigration implements ContainerAwareI */ public function up(Schema $schema) { - $this->addSql('INSERT INTO "'.$this->getTable('craue_config_setting').'" (name, value, section) VALUES (\'import_with_redis\', \'0\', \'import\')'); - $this->addSql('INSERT INTO "'.$this->getTable('craue_config_setting').'" (name, value, section) VALUES (\'import_with_rabbitmq\', \'0\', \'import\')'); + $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('import_with_redis', 0, 'import')"); + $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('import_with_rabbitmq', 0, 'import')"); } /** @@ -38,5 +38,7 @@ class Version20160911214952 extends AbstractMigration implements ContainerAwareI */ public function down(Schema $schema) { + $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'import_with_redis';"); + $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'import_with_rabbitmq';"); } } diff --git a/app/DoctrineMigrations/Version20160916201049.php b/app/DoctrineMigrations/Version20160916201049.php index 0d2edf9e..9390755e 100644 --- a/app/DoctrineMigrations/Version20160916201049.php +++ b/app/DoctrineMigrations/Version20160916201049.php @@ -21,7 +21,7 @@ class Version20160916201049 extends AbstractMigration implements ContainerAwareI private function getTable($tableName) { - return $this->container->getParameter('database_table_prefix') . $tableName; + return $this->container->getParameter('database_table_prefix').$tableName; } /** @@ -29,8 +29,12 @@ class Version20160916201049 extends AbstractMigration implements ContainerAwareI */ public function up(Schema $schema) { - $this->addSql('ALTER TABLE "'.$this->getTable('config').'" ADD pocket_consumer_key VARCHAR(255) DEFAULT NULL'); - $this->addSql("DELETE FROM \"".$this->getTable('craue_config_setting')."\" WHERE name = 'pocket_consumer_key';"); + $configTable = $schema->getTable($this->getTable('config')); + + $this->skipIf($configTable->hasColumn('pocket_consumer_key'), 'It seems that you already played this migration.'); + + $configTable->addColumn('pocket_consumer_key', 'string'); + $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'pocket_consumer_key';"); } /** @@ -38,9 +42,8 @@ class Version20160916201049 extends AbstractMigration implements ContainerAwareI */ public function down(Schema $schema) { - $this->abortIf($this->connection->getDatabasePlatform()->getName() == 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); - - $this->addSql('ALTER TABLE "'.$this->getTable('config').'" DROP pocket_consumer_key'); - $this->addSql("INSERT INTO \"".$this->getTable('craue_config_setting')."\" (name, value, section) VALUES ('pocket_consumer_key', NULL, 'import')"); + $configTable = $schema->getTable($this->getTable('config')); + $configTable->dropColumn('pocket_consumer_key'); + $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('pocket_consumer_key', NULL, 'import')"); } } diff --git a/app/DoctrineMigrations/Version20161001072726.php b/app/DoctrineMigrations/Version20161001072726.php new file mode 100644 index 00000000..5ab88555 --- /dev/null +++ b/app/DoctrineMigrations/Version20161001072726.php @@ -0,0 +1,63 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $this->skipIf($this->connection->getDatabasePlatform()->getName() == 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); + + // remove all FK from entry_tag + $query = $this->connection->query("SELECT CONSTRAINT_NAME FROM information_schema.key_column_usage WHERE TABLE_NAME = '".$this->getTable('entry_tag')."' AND CONSTRAINT_NAME LIKE 'FK_%' AND TABLE_SCHEMA = '".$this->connection->getDatabase()."'"); + $query->execute(); + + foreach ($query->fetchAll() as $fk) { + $this->addSql('ALTER TABLE '.$this->getTable('entry_tag').' DROP FOREIGN KEY '.$fk['CONSTRAINT_NAME']); + } + + $this->addSql('ALTER TABLE '.$this->getTable('entry_tag').' ADD CONSTRAINT FK_entry_tag_entry FOREIGN KEY (entry_id) REFERENCES '.$this->getTable('entry').' (id) ON DELETE CASCADE'); + $this->addSql('ALTER TABLE '.$this->getTable('entry_tag').' ADD CONSTRAINT FK_entry_tag_tag FOREIGN KEY (tag_id) REFERENCES '.$this->getTable('tag').' (id) ON DELETE CASCADE'); + + // remove entry FK from annotation + $query = $this->connection->query("SELECT CONSTRAINT_NAME FROM information_schema.key_column_usage WHERE TABLE_NAME = '".$this->getTable('annotation')."' AND CONSTRAINT_NAME LIKE 'FK_%' and COLUMN_NAME = 'entry_id' AND TABLE_SCHEMA = '".$this->connection->getDatabase()."'"); + $query->execute(); + + foreach ($query->fetchAll() as $fk) { + $this->addSql('ALTER TABLE '.$this->getTable('annotation').' DROP FOREIGN KEY '.$fk['CONSTRAINT_NAME']); + } + + $this->addSql('ALTER TABLE '.$this->getTable('annotation').' ADD CONSTRAINT FK_annotation_entry FOREIGN KEY (entry_id) REFERENCES '.$this->getTable('entry').' (id) ON DELETE CASCADE'); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + throw new SkipMigrationException('Too complex ...'); + } +} diff --git a/app/DoctrineMigrations/Version20161022134138.php b/app/DoctrineMigrations/Version20161022134138.php new file mode 100644 index 00000000..b3d02b40 --- /dev/null +++ b/app/DoctrineMigrations/Version20161022134138.php @@ -0,0 +1,76 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL'); + + $this->addSql('ALTER DATABASE '.$this->container->getParameter('database_name').' CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;'); + + $this->addSql('ALTER TABLE '.$this->getTable('annotation').' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); + $this->addSql('ALTER TABLE '.$this->getTable('entry').' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); + $this->addSql('ALTER TABLE '.$this->getTable('tag').' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); + $this->addSql('ALTER TABLE '.$this->getTable('user').' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); + + $this->addSql('ALTER TABLE '.$this->getTable('annotation').' CHANGE `text` `text` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); + $this->addSql('ALTER TABLE '.$this->getTable('annotation').' CHANGE `quote` `quote` VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); + + $this->addSql('ALTER TABLE '.$this->getTable('entry').' CHANGE `title` `title` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); + $this->addSql('ALTER TABLE '.$this->getTable('entry').' CHANGE `content` `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); + + $this->addSql('ALTER TABLE '.$this->getTable('tag').' CHANGE `label` `label` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); + + $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE `name` `name` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL'); + + $this->addSql('ALTER DATABASE '.$this->container->getParameter('database_name').' CHARACTER SET = utf8 COLLATE = utf8_unicode_ci;'); + + $this->addSql('ALTER TABLE '.$this->getTable('annotation').' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); + $this->addSql('ALTER TABLE '.$this->getTable('entry').' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); + $this->addSql('ALTER TABLE '.$this->getTable('tag').' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); + $this->addSql('ALTER TABLE '.$this->getTable('user').' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); + + $this->addSql('ALTER TABLE '.$this->getTable('annotation').' CHANGE `text` `text` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); + $this->addSql('ALTER TABLE '.$this->getTable('annotation').' CHANGE `quote` `quote` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); + + $this->addSql('ALTER TABLE '.$this->getTable('entry').' CHANGE `title` `title` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); + $this->addSql('ALTER TABLE '.$this->getTable('entry').' CHANGE `content` `content` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); + + $this->addSql('ALTER TABLE '.$this->getTable('tag').' CHANGE `label` `label` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); + + $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE `name` `name` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); + } +} diff --git a/app/DoctrineMigrations/Version20161024212538.php b/app/DoctrineMigrations/Version20161024212538.php new file mode 100644 index 00000000..75ff86f1 --- /dev/null +++ b/app/DoctrineMigrations/Version20161024212538.php @@ -0,0 +1,52 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $clientsTable = $schema->getTable($this->getTable('oauth2_clients')); + + $this->skipIf($clientsTable->hasColumn('user_id'), 'It seems that you already played this migration.'); + + $clientsTable->addColumn('user_id', 'integer'); + + $clientsTable->addForeignKeyConstraint( + $this->getTable('user'), + ['user_id'], + ['id'], + ['onDelete' => 'CASCADE'] + ); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + } +} diff --git a/app/DoctrineMigrations/Version20161031132655.php b/app/DoctrineMigrations/Version20161031132655.php new file mode 100644 index 00000000..39b85ea9 --- /dev/null +++ b/app/DoctrineMigrations/Version20161031132655.php @@ -0,0 +1,42 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $this->addSql('INSERT INTO "'.$this->getTable('craue_config_setting')."\" (name, value, section) VALUES ('download_images_enabled', 0, 'misc')"); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $this->addSql('DELETE FROM "'.$this->getTable('craue_config_setting')."\" WHERE name = 'download_images_enabled';"); + } +} diff --git a/app/DoctrineMigrations/Version20161104073720.php b/app/DoctrineMigrations/Version20161104073720.php new file mode 100644 index 00000000..4721426a --- /dev/null +++ b/app/DoctrineMigrations/Version20161104073720.php @@ -0,0 +1,50 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $entryTable = $schema->getTable($this->getTable('entry')); + $this->skipIf($entryTable->hasIndex($this->indexName), 'It seems that you already played this migration.'); + + $entryTable->addIndex(['created_at'], $this->indexName); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $entryTable = $schema->getTable($this->getTable('entry')); + $this->skipIf(false === $entryTable->hasIndex($this->indexName), 'It seems that you already played this migration.'); + + $entryTable->dropIndex($this->indexName); + } +} diff --git a/app/DoctrineMigrations/Version20161106113822.php b/app/DoctrineMigrations/Version20161106113822.php new file mode 100644 index 00000000..5032a8f0 --- /dev/null +++ b/app/DoctrineMigrations/Version20161106113822.php @@ -0,0 +1,49 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $configTable = $schema->getTable($this->getTable('config')); + + $this->skipIf($configTable->hasColumn('action_mark_as_read'), 'It seems that you already played this migration.'); + + $configTable->addColumn('action_mark_as_read', 'integer', [ + 'default' => 0, + ]); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $configTable = $schema->getTable($this->getTable('config')); + $userTable->dropColumn('action_mark_as_read'); + } +} diff --git a/app/DoctrineMigrations/Version20161117071626.php b/app/DoctrineMigrations/Version20161117071626.php new file mode 100644 index 00000000..33f5707e --- /dev/null +++ b/app/DoctrineMigrations/Version20161117071626.php @@ -0,0 +1,44 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('share_unmark', 0, 'entry')"); + $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('unmark_url', 'https://unmark.it', 'entry')"); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'share_unmark';"); + $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'unmark_url';"); + } +} diff --git a/app/DoctrineMigrations/Version20161118134328.php b/app/DoctrineMigrations/Version20161118134328.php new file mode 100644 index 00000000..f168cb53 --- /dev/null +++ b/app/DoctrineMigrations/Version20161118134328.php @@ -0,0 +1,53 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $entryTable = $schema->getTable($this->getTable('entry')); + + $this->skipIf($entryTable->hasColumn('http_status'), 'It seems that you already played this migration.'); + + $entryTable->addColumn('http_status', 'string', [ + 'length' => 3, + 'notnull' => false, + ]); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $userTable = $schema->getTable($this->getTable('entry')); + $userTable->dropColumn('http_status'); + } +} diff --git a/app/DoctrineMigrations/Version20161122144743.php b/app/DoctrineMigrations/Version20161122144743.php new file mode 100644 index 00000000..536b8339 --- /dev/null +++ b/app/DoctrineMigrations/Version20161122144743.php @@ -0,0 +1,45 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('restricted_access', 0, 'entry')"); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'restricted_access';"); + } +} diff --git a/app/DoctrineMigrations/Version20161122203647.php b/app/DoctrineMigrations/Version20161122203647.php new file mode 100644 index 00000000..94197193 --- /dev/null +++ b/app/DoctrineMigrations/Version20161122203647.php @@ -0,0 +1,60 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $userTable = $schema->getTable($this->getTable('user')); + + $this->skipIf(false === $userTable->hasColumn('expired') || false === $userTable->hasColumn('credentials_expired'), 'It seems that you already played this migration.'); + + $userTable->dropColumn('expired'); + $userTable->dropColumn('credentials_expired'); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $userTable = $schema->getTable($this->getTable('user')); + $userTable->addColumn('expired', 'smallint'); + $userTable->addColumn('credentials_expired', 'smallint'); + } +} diff --git a/app/DoctrineMigrations/Version20161128084725.php b/app/DoctrineMigrations/Version20161128084725.php new file mode 100644 index 00000000..242d5900 --- /dev/null +++ b/app/DoctrineMigrations/Version20161128084725.php @@ -0,0 +1,49 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $configTable = $schema->getTable($this->getTable('config')); + $this->skipIf($configTable->hasColumn('list_mode'), 'It seems that you already played this migration.'); + + $configTable->addColumn('list_mode', 'integer'); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $configTable = $schema->getTable($this->getTable('config')); + $configTable->dropColumn('list_mode'); + } +} diff --git a/app/DoctrineMigrations/Version20161128131503.php b/app/DoctrineMigrations/Version20161128131503.php new file mode 100644 index 00000000..f0e016c8 --- /dev/null +++ b/app/DoctrineMigrations/Version20161128131503.php @@ -0,0 +1,61 @@ + 'smallint', + 'credentials_expire_at' => 'datetime', + 'expires_at' => 'datetime', + ]; + + /** + * @var ContainerInterface + */ + private $container; + + public function setContainer(ContainerInterface $container = null) + { + $this->container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $userTable = $schema->getTable($this->getTable('user')); + + foreach ($this->fields as $field => $type) { + $this->skipIf(!$userTable->hasColumn($field), 'It seems that you already played this migration.'); + $userTable->dropColumn($field); + } + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $userTable = $schema->getTable($this->getTable('user')); + + foreach ($this->fields as $field => $type) { + $this->skipIf($userTable->hasColumn($field), 'It seems that you already played this migration.'); + $userTable->addColumn($field, $type); + } + } +} diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml index 3e11d675..c65463db 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml @@ -1,3 +1,4 @@ +# settings_changed: Configuration updated download_pictures: Download billeder pÃ¥ din server carrot: Aktiver deling til Carrot diaspora_url: Diaspora URL, hvis tjenesten er aktiv @@ -15,6 +16,7 @@ share_diaspora: Aktiver deling til Diaspora share_mail: Aktiver deling med email share_shaarli: Aktiver deling gennem Shaarli share_twitter: Aktiver deling gennem Twitter +share_unmark: Aktiver deling gennem Unmark.it show_printlink: Vis et link til print-indhold wallabag_support_url: Support-URL for wallabag wallabag_url: URL for *sin* wallabag-installation @@ -29,3 +31,5 @@ piwik_enabled: Aktiver Piwik demo_mode_enabled: "Aktiver demo-indstilling? (anvendes kun til wallabags offentlige demo)" demo_mode_username: "Demobruger" # share_public: Allow public url for entries +# download_images_enabled: Download images locally +# restricted_access: Enable authentication for websites with paywall diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml index c74b5c1f..bc378147 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml @@ -1,3 +1,4 @@ +# settings_changed: Configuration updated download_pictures: Bilder auf den Server herunterladen carrot: Teilen zu Carrot aktivieren diaspora_url: Diaspora-URL, sofern der Service aktiviert ist @@ -15,6 +16,7 @@ share_diaspora: Teilen zu Diaspora aktiveren share_mail: Teilen via E-Mail aktiveren share_shaarli: Teilen zu Shaarli aktiveren share_twitter: Teilen zu Twitter aktiveren +share_unmark: Teilen zu Unmark.it aktiveren show_printlink: Link anzeigen, um den Inhalt auszudrucken wallabag_support_url: Support-URL für wallabag wallabag_url: URL von *deiner* wallabag-Instanz @@ -29,3 +31,5 @@ piwik_enabled: Piwik aktivieren demo_mode_enabled: "Test-Modus aktivieren? (nur für die öffentliche wallabag-Demo genutzt)" demo_mode_username: "Test-Benutzer" share_public: Erlaube eine öffentliche URL für Einträge +# download_images_enabled: Download images locally +# restricted_access: Enable authentication for websites with paywall diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml index 77c09db4..52cb8e20 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml @@ -1,3 +1,4 @@ +settings_changed: Configuration updated download_pictures: Download pictures on your server carrot: Enable share to Carrot diaspora_url: Diaspora URL, if the service is enabled @@ -15,6 +16,7 @@ share_diaspora: Enable share to Diaspora share_mail: Enable share by email share_shaarli: Enable share to Shaarli share_twitter: Enable share to Twitter +share_unmark: Enable share to Unmark.it show_printlink: Display a link to print content wallabag_support_url: Support URL for wallabag wallabag_url: URL of *your* wallabag instance @@ -29,3 +31,5 @@ piwik_enabled: Enable Piwik demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)" demo_mode_username: "Demo user" share_public: Allow public url for entries +download_images_enabled: Download images locally +restricted_access: Enable authentication for websites with paywall diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml index baa83849..dbec0e81 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml @@ -1,3 +1,4 @@ +# settings_changed: Configuration updated download_pictures: Descargar imágenes carrot: Activar compartir con Carrot diaspora_url: Diaspora URL, si el servicio está activado @@ -15,6 +16,7 @@ share_diaspora: Activar compartir con Diaspora share_mail: Activar compartir con email share_shaarli: Activar compartir con Shaarli share_twitter: Activar compartir con Twitter +share_unmark: Activar compartir con Unmark.it show_printlink: Mostrar un enlace para imprimir contenido wallabag_support_url: URL de soporte de wallabag wallabag_url: URL de *tu* instancia de wallabag @@ -29,3 +31,5 @@ piwik_enabled: Activar Piwik demo_mode_enabled: "Activar modo demo (sólo usado para la demo de wallabag)" demo_mode_username: "Nombre de usuario demo" # share_public: Allow public url for entries +# download_images_enabled: Download images locally +# restricted_access: Enable authentication for websites with paywall diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml index b394977e..7a341e0b 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml @@ -1,3 +1,4 @@ +# settings_changed: Configuration updated download_pictures: تصاویر را در کارگزار خودتان باربگیرید carrot: فعال‌سازی هم‌رسانی به Carrot diaspora_url: نشانی Diaspora، اگر فعال بود @@ -15,6 +16,7 @@ share_diaspora: فعال‌سازی هم‌رسانی به Diaspora share_mail: فعال‌سازی هم‌رسانی با ایمیل share_shaarli: فعال‌سازی هم‌رسانی به Shaarli share_twitter: فعال‌سازی هم‌رسانی به Twitter +share_unmark: فعال‌سازی هم‌رسانی به Unmark.it show_printlink: نمایش پیوندی برای چاپ مطلب wallabag_support_url: نشانی صفحهٔ پشتیبانی wallabag wallabag_url: نشانی صفحهٔ wallabag *شما* @@ -29,3 +31,5 @@ modify_settings: "اعمال" # demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)" # demo_mode_username: "Demo user" # share_public: Allow public url for entries +# download_images_enabled: Download images locally +# restricted_access: Enable authentication for websites with paywall diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml index 31a80880..f5c886d6 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml @@ -1,3 +1,4 @@ +settings_changed: Configuration mise à jour download_pictures: Télécharger les images sur le serveur carrot: Activer le partage vers Carrot diaspora_url: URL de Diaspora, si le service Diaspora est activé @@ -15,6 +16,7 @@ share_diaspora: Activer le partage vers Diaspora share_mail: Activer le partage par email share_shaarli: Activer le partage vers Shaarli share_twitter: Activer le partage vers Twitter +share_unmark: Activer le partage vers Unmark.it show_printlink: Afficher un lien pour imprimer wallabag_support_url: URL de support de wallabag wallabag_url: URL de *votre* instance de wallabag @@ -29,3 +31,5 @@ piwik_enabled: Activer Piwik demo_mode_enabled: "Activer le mode démo ? (utiliser uniquement pour la démo publique de wallabag)" demo_mode_username: "Utilisateur de la démo" share_public: Autoriser une URL publique pour les articles +download_images_enabled: Télécharger les images en local +restricted_access: Activer l'authentification pour les articles derrière un paywall diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml index ba038556..88a1b4f6 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml @@ -1,3 +1,4 @@ +# settings_changed: Configuration updated download_pictures: Scarica le immagini sul tuo server carrot: Abilita la condivisione con Carrot diaspora_url: Diaspora URL, se il servizio è abilitato @@ -15,6 +16,7 @@ share_diaspora: Abilita la condivisione con Diaspora share_mail: Abilita la condivisione per email share_shaarli: Abilita la condivisione con Shaarli share_twitter: Abilita la condivisione con Twitter +share_unmark: Abilita la condivisione con Unmark.it show_printlink: Mostra un collegamento per stampare il contenuto wallabag_support_url: URL di supporto per wallabag wallabag_url: URL della *tua* installazione di wallabag @@ -29,3 +31,5 @@ piwik_enabled: Abilita Piwik demo_mode_enabled: "Abilita modalità demo ? (usato solo per la demo pubblica di wallabag)" demo_mode_username: "Utente Demo" # share_public: Allow public url for entries +# download_images_enabled: Download images locally +# restricted_access: Enable authentication for websites with paywall diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml index 55249e33..00deeade 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml @@ -1,3 +1,4 @@ +# settings_changed: Configuration updated download_pictures: Telecargar los imatges sul servidor carrot: Activar lo partatge cap a Carrot diaspora_url: URL de Diaspora, se lo servici Diaspora es activat @@ -15,6 +16,7 @@ share_diaspora: Activar lo partatge cap a Diaspora share_mail: Activar lo partatge per corrièl share_shaarli: Activar lo partatge cap a Shaarli share_twitter: Activar lo partatge cap a Twitter +share_unmark: Activar lo partatge cap a Unmark.it show_printlink: Afichar un ligam per imprimir wallabag_support_url: URL d'assisténcia de wallabag wallabag_url: URL de *vòstra* instància de wallabag @@ -29,3 +31,5 @@ piwik_enabled: Activar Piwik demo_mode_enabled: "Activar lo mode demostracion ? (utilizar solament per la demostracion publica de wallabag)" demo_mode_username: "Utilizaire de la demostracion" # share_public: Allow public url for entries +# download_images_enabled: Download images locally +# restricted_access: Enable authentication for websites with paywall diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml index 42cc5b52..744031e8 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml @@ -1,3 +1,4 @@ +# settings_changed: Configuration updated download_pictures: Pobierz obrazy na swój serwer carrot: Włącz udostępnianie dla Carrot diaspora_url: Adres URL Diaspora, jeżeli usługa jest włączona @@ -15,6 +16,7 @@ share_diaspora: Włącz udostępnianie dla Diaspora share_mail: Włącz udostępnianie przez email share_shaarli: Włącz udostępnianie dla Shaarli share_twitter: Włącz udostępnianie dla Twitter +share_unmark: Włącz udostępnianie dla Unmark.it show_printlink: Pokaż link do wydrukowania zawartości wallabag_support_url: Adres URL wsparcia dla wallabag wallabag_url: Adres *twojej* instacji wallabag @@ -29,3 +31,5 @@ piwik_enabled: Włacz Piwik demo_mode_enabled: "Włacz tryb demo? (używany wyłącznie dla publicznej demonstracji Wallabag)" demo_mode_username: "Użytkownik Demonstracyjny" share_public: Zezwalaj na publiczny adres url dla wpisow +# download_images_enabled: Download images locally +# restricted_access: Enable authentication for websites with paywall diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml index e8260422..1edde87a 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml @@ -1,3 +1,4 @@ +# settings_changed: Configuration updated download_pictures: Download imagens no seu servidor carrot: Habilitar compartilhamento para o Carrot diaspora_url: URL Diaspora, se o serviço está habilitado @@ -8,12 +9,14 @@ export_csv: Habilita exportação para CSV export_json: Habilita exportação para JSON export_txt: Habilita exportação para TXT export_xml: Habilita exportação para XML -pocket_consumer_key: Chave de consumidor do Pocket para importar conteúdo (https://getpocket.com/developer/docs/authentication) +# import_with_rabbitmq: Enable RabbitMQ to import data asynchronously +# import_with_redis: Enable Redis to import data asynchronously shaarli_url: URL Shaarli, se o serviço está habilitado share_diaspora: Habilitar compartilhamento para o Diaspora share_mail: Habilitar compartilhamento por e-mail share_shaarli: Habilitar compartilhamento para o Shaarli share_twitter: Habilitar compartilhamento para o Twitter +share_unmark: Habilitar compartilhamento para o Unmark.it show_printlink: Mostrar um link para imprimir o conteúdo wallabag_support_url: URL de Suporte do wallabag wallabag_url: URL de *sua* instância do wallabag @@ -27,3 +30,6 @@ piwik_site_id: ID de seu website Piwik piwik_enabled: Habilitar Piwik demo_mode_enabled: "Habilitar modo demo? (somente usado para o demo público do wallabag)" demo_mode_username: "Usuário demo" +# share_public: Allow public url for entries +# download_images_enabled: Download images locally +# restricted_access: Enable authentication for websites with paywall diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml index 8e72b955..f0c935d3 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml @@ -1,3 +1,4 @@ +# settings_changed: Configuration updated download_pictures: Descarcă poze pe server carrot: Permite share către Carrot diaspora_url: Diaspora URL, dacă serviciul este permis @@ -15,6 +16,7 @@ share_diaspora: Permite share către Diaspora share_mail: Permite share prin email share_shaarli: Permite share către Shaarli share_twitter: Permite share către Twitter +share_unmark: Permite share către Unmark.it show_printlink: Afișează un link pentru a printa content-ul wallabag_support_url: URL-ul de suport pentru wallabag wallabag_url: URL-ul instanței tale wallabag @@ -29,3 +31,5 @@ modify_settings: "aplică" # demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)" # demo_mode_username: "Demo user" # share_public: Allow public url for entries +# download_images_enabled: Download images locally +# restricted_access: Enable authentication for websites with paywall diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml index 55f70843..eb40fc5e 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml @@ -1,3 +1,4 @@ +# settings_changed: Configuration updated # download_pictures: Download pictures on your server # carrot: Enable share to Carrot # diaspora_url: Diaspora URL, if the service is enabled @@ -15,6 +16,7 @@ # share_mail: Enable share by email # share_shaarli: Enable share to Shaarli # share_twitter: Enable share to Twitter +# share_unmark: Enable share to Unmark.it # show_printlink: Display a link to print content # wallabag_support_url: Support URL for wallabag # wallabag_url: URL of *your* wallabag instance @@ -29,3 +31,5 @@ # demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)" # demo_mode_username: "Demo user" # share_public: Allow public url for entries +# download_images_enabled: Download images locally +# restricted_access: Enable authentication for websites with paywall diff --git a/app/Resources/FOSUserBundle/translations/FOSUserBundle.da.yml b/app/Resources/FOSUserBundle/translations/FOSUserBundle.da.yml deleted file mode 100644 index 015989ef..00000000 --- a/app/Resources/FOSUserBundle/translations/FOSUserBundle.da.yml +++ /dev/null @@ -1,2 +0,0 @@ -Login: "Log ind" -Enter your email address below and we'll send you password reset instructions.: "Indtast din emailadresse nedenfor, sÃ¥ sender vi dig instrukser til at nulstille din adgangskode." diff --git a/app/Resources/FOSUserBundle/translations/FOSUserBundle.de.yml b/app/Resources/FOSUserBundle/translations/FOSUserBundle.de.yml deleted file mode 100644 index 944a0d41..00000000 --- a/app/Resources/FOSUserBundle/translations/FOSUserBundle.de.yml +++ /dev/null @@ -1,2 +0,0 @@ -Login: "Anmelden" -Enter your email address below and we'll send you password reset instructions.: "Tippe deine E-Mail-Adresse unten ein und wir senden dir die Anweisungen, wie du dein Kennwort zurücksetzen kannst." diff --git a/app/Resources/FOSUserBundle/translations/FOSUserBundle.es.yml b/app/Resources/FOSUserBundle/translations/FOSUserBundle.es.yml deleted file mode 100644 index 968eb241..00000000 --- a/app/Resources/FOSUserBundle/translations/FOSUserBundle.es.yml +++ /dev/null @@ -1,2 +0,0 @@ -Login: "Logearse" -Enter your email address below and we'll send you password reset instructions.: "Introduzca su dirección de email y le enviaremos las instrucciones para resetear su contraseña." diff --git a/app/Resources/FOSUserBundle/translations/FOSUserBundle.fr.yml b/app/Resources/FOSUserBundle/translations/FOSUserBundle.fr.yml deleted file mode 100644 index 1c5ea640..00000000 --- a/app/Resources/FOSUserBundle/translations/FOSUserBundle.fr.yml +++ /dev/null @@ -1,2 +0,0 @@ -Login: "Se connecter" -Enter your email address below and we'll send you password reset instructions.: "Renseignez votre adresse courriel, nous vous enverrons les instructions pour réinitialiser votre mot de passe." diff --git a/app/Resources/FOSUserBundle/translations/FOSUserBundle.oc.yml b/app/Resources/FOSUserBundle/translations/FOSUserBundle.oc.yml deleted file mode 100644 index b8a75172..00000000 --- a/app/Resources/FOSUserBundle/translations/FOSUserBundle.oc.yml +++ /dev/null @@ -1,2 +0,0 @@ -Login: "Se connectar" -Enter your email address below and we'll send you password reset instructions.: "Picatz vòstra adreça de corrièl çai-jos, vos mandarem las instruccions per reïnicializar vòstre senhal." diff --git a/app/Resources/FOSUserBundle/translations/FOSUserBundle.pl.yml b/app/Resources/FOSUserBundle/translations/FOSUserBundle.pl.yml deleted file mode 100644 index 7e0a2490..00000000 --- a/app/Resources/FOSUserBundle/translations/FOSUserBundle.pl.yml +++ /dev/null @@ -1,2 +0,0 @@ -Login: "Logowanie" -Enter your email address below and we'll send you password reset instructions.: "Wpisz poniżej swój adres email, abyśmy mogli wysłać ci instrukcję resetowania hasła." diff --git a/app/Resources/FOSUserBundle/translations/FOSUserBundle.pt.yml b/app/Resources/FOSUserBundle/translations/FOSUserBundle.pt.yml deleted file mode 100644 index 85eadfd8..00000000 --- a/app/Resources/FOSUserBundle/translations/FOSUserBundle.pt.yml +++ /dev/null @@ -1,2 +0,0 @@ -Login: "Login" -Enter your email address below and we'll send you password reset instructions.: "Digite seu endereço de e-mail para enviarmos as instruções de recupeção de sua senha." diff --git a/app/Resources/static/themes/_global/img/icons/unmark-icon--black.png b/app/Resources/static/themes/_global/img/icons/unmark-icon--black.png new file mode 100644 index 00000000..45f679ee Binary files /dev/null and b/app/Resources/static/themes/_global/img/icons/unmark-icon--black.png differ diff --git a/app/Resources/static/themes/_global/img/list.png b/app/Resources/static/themes/_global/img/list.png new file mode 100755 index 00000000..bd5aff5a Binary files /dev/null and b/app/Resources/static/themes/_global/img/list.png differ diff --git a/app/Resources/static/themes/_global/img/table.png b/app/Resources/static/themes/_global/img/table.png new file mode 100755 index 00000000..859c4cd8 Binary files /dev/null and b/app/Resources/static/themes/_global/img/table.png differ diff --git a/app/Resources/static/themes/_global/js/bookmarklet.js b/app/Resources/static/themes/_global/js/bookmarklet.js index 5174ff47..a497628b 100644 --- a/app/Resources/static/themes/_global/js/bookmarklet.js +++ b/app/Resources/static/themes/_global/js/bookmarklet.js @@ -1,4 +1,3 @@ - top['bookmarklet-url@wallabag.org'] = 'bag it!' + '' + diff --git a/data/assets/.gitignore b/app/Resources/static/themes/_global/js/shortcuts/entry.js similarity index 100% rename from data/assets/.gitignore rename to app/Resources/static/themes/_global/js/shortcuts/entry.js diff --git a/app/Resources/static/themes/_global/js/shortcuts/main.js b/app/Resources/static/themes/_global/js/shortcuts/main.js new file mode 100644 index 00000000..c81bf869 --- /dev/null +++ b/app/Resources/static/themes/_global/js/shortcuts/main.js @@ -0,0 +1,15 @@ +import Mousetrap from 'mousetrap'; + +/** Shortcuts **/ + +/* Go to */ +Mousetrap.bind('g u', () => { window.location.href = Routing.generate('homepage'); }); +Mousetrap.bind('g s', () => { window.location.href = Routing.generate('starred'); }); +Mousetrap.bind('g r', () => { window.location.href = Routing.generate('archive'); }); +Mousetrap.bind('g a', () => { window.location.href = Routing.generate('all'); }); +Mousetrap.bind('g t', () => { window.location.href = Routing.generate('tag'); }); +Mousetrap.bind('g c', () => { window.location.href = Routing.generate('config'); }); +Mousetrap.bind('g i', () => { window.location.href = Routing.generate('import'); }); +Mousetrap.bind('g d', () => { window.location.href = Routing.generate('developer'); }); +Mousetrap.bind('?', () => { window.location.href = Routing.generate('howto'); }); +Mousetrap.bind('g l', () => { window.location.href = Routing.generate('fos_user_security_logout'); }); diff --git a/app/Resources/static/themes/_global/js/tools.js b/app/Resources/static/themes/_global/js/tools.js index ab30deb1..568b2dce 100644 --- a/app/Resources/static/themes/_global/js/tools.js +++ b/app/Resources/static/themes/_global/js/tools.js @@ -1,4 +1,9 @@ -const $ = require('jquery'); +import $ from 'jquery'; +import './shortcuts/main'; +import './shortcuts/entry'; + +/* Allows inline call qr-code call */ +import jrQrcode from 'jr-qrcode'; // eslint-disable-line function supportsLocalStorage() { try { diff --git a/app/Resources/static/themes/baggy/css/main.css b/app/Resources/static/themes/baggy/css/main.css index 4dfa8790..e16846ea 100755 --- a/app/Resources/static/themes/baggy/css/main.css +++ b/app/Resources/static/themes/baggy/css/main.css @@ -297,18 +297,14 @@ h2::after { text-decoration: none; } -#listmode a:hover { - opacity: 1; -} - #listmode.tablemode { - background-image: url("../img/baggy/table.png"); + background-image: url("../../_global/img/table.png"); background-repeat: no-repeat; background-position: bottom; } #listmode.listmode { - background-image: url("../img/baggy/list.png"); + background-image: url("../../_global/img/list.png"); background-repeat: no-repeat; background-position: bottom; } @@ -352,9 +348,9 @@ footer a { letter-spacing: -5px; } -.listmode .entry { - width: 100% !important; - margin-left: 0 !important; +.listmode.entry { + width: 100%; + height: inherit; } .card-entry-labels { @@ -588,6 +584,7 @@ div.pagination ul { text-align: left; font-style: italic; color: #999; + display: inline-flex; } div.pagination ul > * { @@ -620,6 +617,10 @@ div.pagination ul .current { background-color: #ccc; } +.hide { + display: none; +} + /* ========================================================================== 2.1 = "save a link" related styles ========================================================================== */ @@ -936,6 +937,11 @@ a.add-to-wallabag-link-after::after { background-image: url("../../_global/img/icons/diaspora-icon--black.png"); } +/* Unmark.it */ +.icon-image--unmark { + background-image: url("../../_global/img/icons/unmark-icon--black.png"); +} + /* shaarli */ .icon-image--shaarli { background-image: url("../../_global/img/icons/shaarli.png"); diff --git a/app/Resources/static/themes/baggy/js/autoCompleteTags.js b/app/Resources/static/themes/baggy/js/autoCompleteTags.js index f287ebfa..64fdaa92 100755 --- a/app/Resources/static/themes/baggy/js/autoCompleteTags.js +++ b/app/Resources/static/themes/baggy/js/autoCompleteTags.js @@ -5,4 +5,4 @@ function extractLast(term) { return split(term).pop(); } -export { split, extractLast }; +export default { split, extractLast }; diff --git a/app/Resources/static/themes/baggy/js/init.js b/app/Resources/static/themes/baggy/js/init.js index dc11043a..05360a28 100755 --- a/app/Resources/static/themes/baggy/js/init.js +++ b/app/Resources/static/themes/baggy/js/init.js @@ -1,11 +1,26 @@ -import { savePercent, retrievePercent } from '../../_global/js/tools'; -import { toggleSaveLinkForm } from './uiTools'; +/* jQuery */ +import $ from 'jquery'; + +/* eslint-disable no-unused-vars */ +/* jquery has default scope */ +import cookie from 'jquery.cookie'; +import ui from 'jquery-ui-browserify'; +/* eslint-enable no-unused-vars */ + +/* Annotations */ +import annotator from 'annotator'; -const $ = global.jquery = require('jquery'); -require('jquery.cookie'); -require('jquery-ui-browserify'); -const annotator = require('annotator'); +/* Shortcuts */ +import './shortcuts/main'; +import './shortcuts/entry'; +import '../../_global/js/shortcuts/main'; +import '../../_global/js/shortcuts/entry'; + +/* Tools */ +import { savePercent, retrievePercent } from '../../_global/js/tools'; +import toggleSaveLinkForm from './uiTools'; +global.jquery = $; $.fn.ready(() => { const $listmode = $('#listmode'); diff --git a/app/Resources/static/themes/baggy/js/shortcuts/entry.js b/app/Resources/static/themes/baggy/js/shortcuts/entry.js new file mode 100644 index 00000000..c87408b9 --- /dev/null +++ b/app/Resources/static/themes/baggy/js/shortcuts/entry.js @@ -0,0 +1,26 @@ +import Mousetrap from 'mousetrap'; +import $ from 'jquery'; + +$(document).ready(() => { + if ($('#article').length > 0) { + /* Article view */ + Mousetrap.bind('o', () => { + $('div#article_toolbar ul.links a.original')[0].click(); + }); + + /* mark as favorite */ + Mousetrap.bind('f', () => { + $('div#article_toolbar ul.links a.favorite')[0].click(); + }); + + /* mark as read */ + Mousetrap.bind('a', () => { + $('div#article_toolbar ul.links a.markasread')[0].click(); + }); + + /* delete */ + Mousetrap.bind('del', () => { + $('div#article_toolbar ul.links a.delete')[0].click(); + }); + } +}); diff --git a/app/Resources/static/themes/baggy/js/shortcuts/main.js b/app/Resources/static/themes/baggy/js/shortcuts/main.js new file mode 100644 index 00000000..aed09aee --- /dev/null +++ b/app/Resources/static/themes/baggy/js/shortcuts/main.js @@ -0,0 +1,7 @@ +$(document).ready(() => { + Mousetrap.bind('s', () => { + $('#search').trigger('click'); + $('#search_entry_term').focus(); + return false; + }); +}); diff --git a/app/Resources/static/themes/baggy/js/uiTools.js b/app/Resources/static/themes/baggy/js/uiTools.js index 900b2707..713c53f7 100644 --- a/app/Resources/static/themes/baggy/js/uiTools.js +++ b/app/Resources/static/themes/baggy/js/uiTools.js @@ -1,4 +1,4 @@ -const $ = require('jquery'); +import $ from 'jquery'; function toggleSaveLinkForm(url, event) { $('#add-link-result').empty(); @@ -32,4 +32,4 @@ function toggleSaveLinkForm(url, event) { plainUrl.focus(); } -export { toggleSaveLinkForm }; +export default toggleSaveLinkForm; diff --git a/app/Resources/static/themes/material/css/main.css b/app/Resources/static/themes/material/css/main.css index 408fe14c..8f7b7a3d 100755 --- a/app/Resources/static/themes/material/css/main.css +++ b/app/Resources/static/themes/material/css/main.css @@ -150,6 +150,11 @@ background-image: url("../../_global/img/icons/diaspora-icon--black.png"); } +/* Unmark.it */ +.icon-image--unmark { + background-image: url("../../_global/img/icons/unmark-icon--black.png"); +} + /* Shaarli */ .icon-image--shaarli { background-image: url("../../_global/img/icons/shaarli.png"); @@ -159,7 +164,7 @@ body { display: flex; min-height: 100vh; flex-direction: column; - background: #f0f0f0; + background: #fafafa; } body.login main { @@ -189,7 +194,6 @@ main, .results { height: 1em; - line-height: 30px; } .results .nb-results, @@ -198,6 +202,14 @@ main, margin-bottom: 0; } +.results .nb-results { + display: inline-flex; +} + +.results a { + color: #444; +} + .pagination { float: right; } @@ -317,11 +329,13 @@ nav input { color: #444; } -.input-field.nav-panel-add label { +.input-field.nav-panel-add label, +.input-field.nav-panel-search label { left: 1rem; } -.input-field.nav-panel-add .close { +.input-field.nav-panel-add .close, +.input-field.nav-panel-search .close { position: absolute; top: 0; right: 1rem; @@ -340,7 +354,9 @@ nav input { } .input-field.nav-panel-add, -.input-field.nav-panel-add form { +.input-field.nav-panel-add form, +.input-field.nav-panel-search, +.input-field.nav-panel-search form { height: 100%; } @@ -535,6 +551,18 @@ a.original { line-height: 24px; } +.card .card-action ul.tools li a.tool { + margin-right: 5px !important; +} + +.card-stacked:hover ul.tools-list { + display: block; +} + +.card-stacked ul.tools-list { + display: none; +} + .card .card-action a { color: #fff; margin: 0; @@ -587,7 +615,55 @@ a.original { #article { font-size: 20px; margin: 0 auto; - max-width: 40em; + max-width: 45em; +} + +#article article { + color: #424242; + font-size: 18px; + line-height: 1.7em; +} + +#article article h1, +#article article h2, +#article article h3, +#article article h4, +#article article h5, +#article article h6 { + color: #212121; +} + +#article article h1 strong, +#article article h2 strong, +#article article h3 strong, +#article article h4 strong, +#article article h5 strong, +#article article h6 strong { + font-weight: 500; +} + +#article article h6 { + font-size: 1.2rem; +} + +#article article h5 { + font-size: 1.6rem; +} + +#article article h4 { + font-size: 1.9rem; +} + +#article article h3 { + font-size: 2.2rem; +} + +#article article h2 { + font-size: 2.5rem; +} + +#article article h1 { + font-size: 2.7rem; } #article img, @@ -596,6 +672,46 @@ a.original { height: auto; } +#article article a { + border-bottom: 1px dotted #03a9f4; + text-decoration: none; +} + +#article article a:hover { + border-bottom-style: solid; +} + +#article article ul { + padding-left: 30px; +} + +#article article ul, +#article article ul li { + list-style-type: disc; +} + +#article article blockquote { + font-style: italic; +} + +#article article strong { + font-weight: bold; +} + +#article article pre { + box-sizing: border-box; + margin: 0 0 1.75em; + border: #e3f2fd 1px solid; + width: 100%; + padding: 10px; + font-family: monospace; + font-size: 0.8em; + white-space: pre; + overflow: auto; + background: #f5f5f5; + border-radius: 3px; +} + #article > header > h1 { font-size: 2em; margin: 2.1rem 0 0.68rem; diff --git a/app/Resources/static/themes/material/js/init.js b/app/Resources/static/themes/material/js/init.js index a68269e0..0b2832c0 100755 --- a/app/Resources/static/themes/material/js/init.js +++ b/app/Resources/static/themes/material/js/init.js @@ -1,10 +1,21 @@ +/* jQuery */ +import $ from 'jquery'; + +/* Annotations */ +import annotator from 'annotator'; + +/* Tools */ import { savePercent, retrievePercent, initFilters, initExport } from '../../_global/js/tools'; -const $ = require('jquery'); +/* Import shortcuts */ +import './shortcuts/main'; +import './shortcuts/entry'; +import '../../_global/js/shortcuts/main'; +import '../../_global/js/shortcuts/entry'; -global.jQuery = $; require('materialize'); // eslint-disable-line -const annotator = require('annotator'); + +global.jQuery = $; $(document).ready(() => { // sideNav @@ -44,7 +55,7 @@ $(document).ready(() => { $('.nav-panels .action').hide(100); $('.nav-panel-menu').addClass('hidden'); $('.nav-panels').css('background', 'white'); - $('#searchfield').focus(); + $('#search_entry_term').focus(); return false; }); $('.close').on('click', () => { diff --git a/app/Resources/static/themes/material/js/shortcuts/entry.js b/app/Resources/static/themes/material/js/shortcuts/entry.js new file mode 100644 index 00000000..e19800bd --- /dev/null +++ b/app/Resources/static/themes/material/js/shortcuts/entry.js @@ -0,0 +1,26 @@ +import Mousetrap from 'mousetrap'; +import $ from 'jquery'; + +$(document).ready(() => { + if ($('#article').length > 0) { + /* open original article */ + Mousetrap.bind('o', () => { + $('ul.side-nav a.original i')[0].click(); + }); + + /* mark as favorite */ + Mousetrap.bind('f', () => { + $('ul.side-nav a.favorite i')[0].click(); + }); + + /* mark as read */ + Mousetrap.bind('a', () => { + $('ul.side-nav a.markasread i')[0].click(); + }); + + /* delete */ + Mousetrap.bind('del', () => { + $('ul.side-nav a.delete i')[0].click(); + }); + } +}); diff --git a/app/Resources/static/themes/material/js/shortcuts/main.js b/app/Resources/static/themes/material/js/shortcuts/main.js new file mode 100644 index 00000000..ad4ca80a --- /dev/null +++ b/app/Resources/static/themes/material/js/shortcuts/main.js @@ -0,0 +1,76 @@ +import Mousetrap from 'mousetrap'; +import $ from 'jquery'; + +function toggleFocus(cardToToogleFocus) { + if (cardToToogleFocus) { + $(cardToToogleFocus).toggleClass('z-depth-4'); + } +} + +$(document).ready(() => { + let cardIndex = 0; + const cardNumber = $('#content ul.data > li').length; + let card = $('#content ul.data > li')[cardIndex]; + const pagination = $('.pagination'); + + /* Show nothing on quickstart */ + if ($('#content > div.quickstart').length > 0) { + return; + } + + /* If we come from next page */ + if (window.location.hash === '#prev') { + cardIndex = cardNumber - 1; + card = $('ul.data > li')[cardIndex]; + } + + /* Focus current card */ + toggleFocus(card); + + /* Actions */ + Mousetrap.bind('g n', () => { + $('#nav-btn-add').trigger('click'); + return false; + }); + + Mousetrap.bind('s', () => { + $('#nav-btn-search').trigger('click'); + return false; + }); + + Mousetrap.bind('esc', () => { + $('.close').trigger('click'); + }); + + /* Select right card. If there's a next page, go to next page */ + Mousetrap.bind('right', () => { + if (cardIndex >= 0 && cardIndex < cardNumber - 1) { + toggleFocus(card); + cardIndex += 1; + card = $('ul.data > li')[cardIndex]; + toggleFocus(card); + return; + } + if (pagination.length > 0 && pagination.find('li.next:not(.disabled)').length > 0 && cardIndex === cardNumber - 1) { + window.location.href = window.location.origin + $(pagination).find('li.next a').attr('href'); + } + }); + + /* Select previous card. If there's a previous page, go to next page */ + Mousetrap.bind('left', () => { + if (cardIndex > 0 && cardIndex < cardNumber) { + toggleFocus(card); + cardIndex -= 1; + card = $('ul.data > li')[cardIndex]; + toggleFocus(card); + return; + } + if (pagination.length > 0 && $(pagination).find('li.prev:not(.disabled)').length > 0 && cardIndex === 0) { + window.location.href = `${window.location.origin + $(pagination).find('li.prev a').attr('href')}#prev`; + } + }); + + Mousetrap.bind('enter', () => { + window.location.href = window.location.origin + $(card).find('span.card-title a').attr('href'); + }); +}); diff --git a/app/config/config.yml b/app/config/config.yml index 3d9067d1..6b1ed056 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -78,7 +78,7 @@ doctrine: dbname: "%database_name%" user: "%database_user%" password: "%database_password%" - charset: UTF8 + charset: "%database_charset%" path: "%database_path%" unix_socket: "%database_socket%" server_version: 5.6 @@ -115,12 +115,26 @@ swiftmailer: fos_rest: param_fetcher_listener: true body_listener: true - format_listener: true view: + mime_types: + csv: + - 'text/csv' + - 'text/plain' + pdf: + - 'application/pdf' + epub: + - 'application/epub+zip' + mobi: + - 'application/x-mobipocket-ebook' view_response_listener: 'force' formats: xml: true - json : true + json: true + txt: true + csv: true + pdf: true + epub: true + mobi: true templating_formats: html: true force_redirects: @@ -129,10 +143,21 @@ fos_rest: default_engine: twig routing_loader: default_format: json + format_listener: + enabled: true + rules: + - { path: "^/api/entries/([0-9]+)/export.(.*)", priorities: ['epub', 'mobi', 'pdf', 'txt', 'csv'], fallback_format: false, prefer_extension: false } + - { path: "^/api", priorities: ['json', 'xml'], fallback_format: false, prefer_extension: false } + - { path: "^/annotations", priorities: ['json', 'xml'], fallback_format: false, prefer_extension: false } + # for an unknown reason, EACH REQUEST goes to FOS\RestBundle\EventListener\FormatListener + # so we need to add custom rule for custom api export but also for all other routes of the application... + - { path: '^/', priorities: ['text/html', '*/*'], fallback_format: html, prefer_extension: false } nelmio_api_doc: sandbox: enabled: false + cache: + enabled: true name: wallabag API documentation nelmio_cors: @@ -185,6 +210,7 @@ fos_user: from_email: address: "%from_email%" sender_name: wallabag + fos_oauth_server: db_driver: orm client_class: Wallabag\ApiBundle\Entity\Client @@ -192,10 +218,10 @@ fos_oauth_server: refresh_token_class: Wallabag\ApiBundle\Entity\RefreshToken auth_code_class: Wallabag\ApiBundle\Entity\AuthCode service: - user_provider: fos_user.user_manager + user_provider: fos_user.user_provider.username_email options: refresh_token_lifetime: 1209600 - + scheb_two_factor: trusted_computer: enabled: true @@ -213,16 +239,6 @@ kphoen_rulerz: executors: doctrine: true -lexik_maintenance: - authorized: - ips: ['127.0.0.1'] - driver: - ttl: 3600 - class: 'Lexik\Bundle\MaintenanceBundle\Drivers\DatabaseDriver' - response: - code: 503 - status: "wallabag Service Temporarily Unavailable" - old_sound_rabbit_mq: connections: default: @@ -243,6 +259,11 @@ old_sound_rabbit_mq: exchange_options: name: 'wallabag.import.readability' type: topic + import_pinboard: + connection: default + exchange_options: + name: 'wallabag.import.pinboard' + type: topic import_instapaper: connection: default exchange_options: @@ -293,6 +314,14 @@ old_sound_rabbit_mq: queue_options: name: 'wallabag.import.instapaper' callback: wallabag_import.consumer.amqp.instapaper + import_pinboard: + connection: default + exchange_options: + name: 'wallabag.import.pinboard' + type: topic + queue_options: + name: 'wallabag.import.pinboard' + callback: wallabag_import.consumer.amqp.pinboard import_wallabag_v1: connection: default exchange_options: @@ -325,3 +354,17 @@ old_sound_rabbit_mq: queue_options: name: 'wallabag.import.chrome' callback: wallabag_import.consumer.amqp.chrome + +fos_js_routing: + routes_to_expose: + - homepage + - starred + - archive + - all + - tag + - config + - import + - developer + - howto + - fos_user_security_logout + - new diff --git a/app/config/config_test.yml b/app/config/config_test.yml index 3eab6fb2..f5e2c25e 100644 --- a/app/config/config_test.yml +++ b/app/config/config_test.yml @@ -28,7 +28,7 @@ doctrine: dbname: "%test_database_name%" user: "%test_database_user%" password: "%test_database_password%" - charset: UTF8 + charset: "%test_database_charset%" path: "%test_database_path%" orm: metadata_cache_driver: diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index ece4903a..a4dc0bde 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -19,16 +19,18 @@ parameters: database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite" database_table_prefix: wallabag_ database_socket: null + # with MySQL, use "utf8mb4" if you got problem with content with emojis + database_charset: utf8 - mailer_transport: smtp - mailer_host: 127.0.0.1 - mailer_user: ~ - mailer_password: ~ + mailer_transport: smtp + mailer_host: 127.0.0.1 + mailer_user: ~ + mailer_password: ~ - locale: en + locale: en # A secret key that's used to generate certain security-related tokens - secret: ovmpmAWXRCabNlMgzlzFXDYmCFfzGv + secret: ovmpmAWXRCabNlMgzlzFXDYmCFfzGv # two factor stuff twofactor_auth: true @@ -53,3 +55,7 @@ parameters: redis_host: localhost redis_port: 6379 redis_path: null + redis_password: null + + # sites credentials + sites_credentials: {} diff --git a/app/config/parameters_test.yml b/app/config/parameters_test.yml index 2943b27a..5f2e25bb 100644 --- a/app/config/parameters_test.yml +++ b/app/config/parameters_test.yml @@ -6,3 +6,4 @@ parameters: test_database_user: null test_database_password: null test_database_path: '%kernel.root_dir%/../data/db/wallabag_test.sqlite' + test_database_charset: utf8 diff --git a/app/config/routing.yml b/app/config/routing.yml index 750ed435..eedf51d5 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml @@ -52,3 +52,6 @@ craue_config_settings_modify: path: /settings defaults: _controller: CraueConfigBundle:Settings:modify + +fos_js_routing: + resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml" diff --git a/app/config/routing_rest.yml b/app/config/routing_rest.yml index 52d395dd..29f4ab14 100644 --- a/app/config/routing_rest.yml +++ b/app/config/routing_rest.yml @@ -1,4 +1,3 @@ Rest_Wallabag: - type : rest - resource: "@WallabagApiBundle/Resources/config/routing_rest.yml" - + type : rest + resource: "@WallabagApiBundle/Resources/config/routing_rest.yml" diff --git a/app/config/services.yml b/app/config/services.yml index a57ef0f3..9a1ce80b 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -32,13 +32,13 @@ services: - { name: twig.extension } wallabag.locale_listener: - class: Wallabag\CoreBundle\EventListener\LocaleListener + class: Wallabag\CoreBundle\Event\Listener\LocaleListener arguments: ["%kernel.default_locale%"] tags: - { name: kernel.event_subscriber } wallabag.user_locale_listener: - class: Wallabag\CoreBundle\EventListener\UserLocaleListener + class: Wallabag\CoreBundle\Event\Listener\UserLocaleListener arguments: ["@session"] tags: - { name: kernel.event_listener, event: security.interactive_login, method: onInteractiveLogin } diff --git a/app/config/tests/parameters_test.mysql.yml b/app/config/tests/parameters_test.mysql.yml index d8512845..bca2d466 100644 --- a/app/config/tests/parameters_test.mysql.yml +++ b/app/config/tests/parameters_test.mysql.yml @@ -6,3 +6,4 @@ parameters: test_database_user: root test_database_password: ~ test_database_path: ~ + test_database_charset: utf8mb4 diff --git a/app/config/tests/parameters_test.pgsql.yml b/app/config/tests/parameters_test.pgsql.yml index 41383868..3e18d4a0 100644 --- a/app/config/tests/parameters_test.pgsql.yml +++ b/app/config/tests/parameters_test.pgsql.yml @@ -6,3 +6,4 @@ parameters: test_database_user: travis test_database_password: ~ test_database_path: ~ + test_database_charset: utf8 diff --git a/app/config/tests/parameters_test.sqlite.yml b/app/config/tests/parameters_test.sqlite.yml index 1952e3a6..b8a5f41a 100644 --- a/app/config/tests/parameters_test.sqlite.yml +++ b/app/config/tests/parameters_test.sqlite.yml @@ -6,3 +6,4 @@ parameters: test_database_user: ~ test_database_password: ~ test_database_path: "%kernel.root_dir%/../data/db/wallabag_test.sqlite" + test_database_charset: utf8 diff --git a/composer.json b/composer.json index 70f5fc99..a5ef9529 100644 --- a/composer.json +++ b/composer.json @@ -49,7 +49,7 @@ "doctrine/doctrine-cache-bundle": "^1.2", "twig/extensions": "~1.0", "symfony/swiftmailer-bundle": "^2.3", - "symfony/monolog-bundle": "^2.8", + "symfony/monolog-bundle": "^3.0", "sensio/distribution-bundle": "^5.0", "sensio/framework-extra-bundle": "^3.0.2", "incenteev/composer-parameter-handler": "^2.0", @@ -58,14 +58,14 @@ "jms/serializer-bundle": "~1.1", "nelmio/api-doc-bundle": "~2.7", "mgargano/simplehtmldom": "~1.5", - "tecnickcom/tcpdf": "~6.2", + "tecnickcom/tc-lib-pdf": "dev-master", "simplepie/simplepie": "~1.3.1", "willdurand/hateoas-bundle": "~1.0", "htmlawed/htmlawed": "~1.1.19", "liip/theme-bundle": "~1.1", "lexik/form-filter-bundle": "~5.0", "j0k3r/graby": "~1.0", - "friendsofsymfony/user-bundle": "dev-master#e168ed64629d034cb9cbbffb9d4350f62ef04fab as 2.0.x-dev", + "friendsofsymfony/user-bundle": "2.0.x-dev", "friendsofsymfony/oauth-server-bundle": "^1.5", "stof/doctrine-extensions-bundle": "^1.2", "scheb/two-factor-bundle": "~2.0", @@ -77,12 +77,14 @@ "paragonie/random_compat": "~1.0", "craue/config-bundle": "~1.4", "mnapoli/piwik-twig-extension": "^1.0", - "lexik/maintenance-bundle": "~2.1", "ocramius/proxy-manager": "1.*", "white-october/pagerfanta-bundle": "^1.0", "php-amqplib/rabbitmq-bundle": "^1.8", "predis/predis": "^1.0", - "javibravo/simpleue": "^1.0" + "javibravo/simpleue": "^1.0", + "symfony/dom-crawler": "^3.1", + "friendsofsymfony/jsrouting-bundle": "^1.6", + "bdunogier/guzzle-site-authenticator": "^1.0@beta" }, "require-dev": { "doctrine/doctrine-fixtures-bundle": "~2.2", @@ -98,6 +100,7 @@ "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile" ], "post-install-cmd": [ @@ -113,6 +116,7 @@ "symfony-var-dir": "var", "symfony-web-dir": "web", "symfony-tests-dir": "tests", + "symfony-assets-install": "symlink", "incenteev-parameters": { "file": "app/config/parameters.yml" } diff --git a/docs/de/developer/asynchronous.rst b/docs/de/developer/asynchronous.rst index 1d241a72..1707f321 100644 --- a/docs/de/developer/asynchronous.rst +++ b/docs/de/developer/asynchronous.rst @@ -149,10 +149,10 @@ Abhängig davon, über welchen Service du importieren möchtest, musst du den en bin/console wallabag:import:redis-worker -e=prod firefox -vv >> /path/to/wallabag/var/logs/redis-firefox.log # für den Chrome-Import - bin/console wallabag:import:redis-worker -e=prod instapaper -vv >> /path/to/wallabag/var/logs/redis-chrome.log + bin/console wallabag:import:redis-worker -e=prod chrome -vv >> /path/to/wallabag/var/logs/redis-chrome.log Wenn du den Import nur für einige Artikel nutzen willst, kannst du die Nummer festlegen (hier: 12) und der Consumer wird nach dem zwölften Artikel aufhören: .. code:: bash - bin/console wallabag:import:redis-worker -e=prod pocket -vv --maxIterations=12 \ No newline at end of file + bin/console wallabag:import:redis-worker -e=prod pocket -vv --maxIterations=12 diff --git a/docs/de/developer/maintenance.rst b/docs/de/developer/maintenance.rst deleted file mode 100644 index 31343876..00000000 --- a/docs/de/developer/maintenance.rst +++ /dev/null @@ -1,32 +0,0 @@ -Wartungsmodus -============= - -Wenn du längere Aufgaben auf deiner wallabag Instanz ausführen willst, kannst du den Wartungsmodus aktivieren. -Keiner wird dann Zugang zu deiner Instanz haben. - -Aktivieren des Wartungsmodus ----------------------------- - -Um den Wartungsmodus zu aktivieren, führe folgendes Kommando aus: - -:: - - bin/console lexik:maintenance:lock -e=prod --no-interaction - -Du kannst deine IP Adresse in ``app/config/config.yml`` setzen, wenn du Zugriff zu wallabag haben willst, auch wenn der Wartungsmodus aktiv ist. Zum Beispiel: - -:: - - lexik_maintenance: - authorized: - ips: ['127.0.0.1'] - - -Deaktivieren des Wartungsmodus ------------------------- - -Um den Wartungsmodus zu deaktivieren, führe dieses Kommando aus: - -:: - - bin/console lexik:maintenance:unlock -e=prod diff --git a/docs/de/developer/paywall.rst b/docs/de/developer/paywall.rst new file mode 100644 index 00000000..365027b4 --- /dev/null +++ b/docs/de/developer/paywall.rst @@ -0,0 +1,56 @@ +Articles behind a paywall +========================= + +wallabag can fetch articles from websites which use a paywall system. + +Enable paywall authentication +----------------------------- + +In internal settings, in the **Article** section, enable authentication for websites with paywall (with the value 1). + +Configure credentials in wallabag +--------------------------------- + +Edit your ``app/config/parameters.yml`` file to edit credentials for each website with paywall. Here is an example for some french websites: + +.. code:: yaml + + sites_credentials: + mediapart.fr: {username: "myMediapartLogin", password: "mypassword"} + arretsurimages.net: {username: "myASILogin", password: "mypassword"} + +.. note:: + + These credentials will be shared between each user of your wallabag instance. + +Parsing configuration files +--------------------------- + +.. note:: + + Read `this part of the documentation `_ to understand the configuration files. + +Each parsing configuration file needs to be improved by adding ``requires_login``, ``login_uri``, +``login_username_field``, ``login_password_field`` and ``not_logged_in_xpath``. + +Be careful, the login form must be in the page content when wallabag loads it. It's impossible for wallabag to be authenticated +on a website where the login form is loaded after the page (by ajax for example). + +``login_uri`` is the action URL of the form (``action`` attribute in the form). +``login_username_field`` is the ``name`` attribute of the login field. +``login_password_field`` is the ``name`` attribute of the password field. + +For example: + +.. code:: + + title://div[@id="titrage-contenu"]/h1[@class="title"] + body: //div[@class="contenu-html"]/div[@class="page-pane"] + + requires_login: yes + + login_uri: http://www.arretsurimages.net/forum/login.php + login_username_field: username + login_password_field: password + + not_logged_in_xpath: //body[@class="not-logged-in"] diff --git a/docs/de/developer/translate.rst b/docs/de/developer/translate.rst index 50e136ea..10544e31 100644 --- a/docs/de/developer/translate.rst +++ b/docs/de/developer/translate.rst @@ -20,7 +20,7 @@ der ISO 639-1 Code deiner Sprache ist (`siehe Wikipedia `_ about that, which means you'll find the ``next``, ``previous`` & ``last`` page link inside the `` tag of each RSS feed. + Benutzer-Informationen ---------------------- diff --git a/docs/de/user/filters.rst b/docs/de/user/filters.rst index c9cda6b6..94b82b24 100644 --- a/docs/de/user/filters.rst +++ b/docs/de/user/filters.rst @@ -30,6 +30,11 @@ Sprache wallabag (via graby) kann die Artikelsprache erkennen. Es ist einfach für dich, Artikel in einer bestimmten Sprache zu filtern. +HTTP status +----------- + +You can retrieve the articles by filtering by their HTTP status code: 200, 404, 500, etc. + Lesezeit -------- diff --git a/docs/de/user/import.rst b/docs/de/user/import.rst index 55ab9291..399a1b98 100644 --- a/docs/de/user/import.rst +++ b/docs/de/user/import.rst @@ -42,35 +42,50 @@ Du musst wallabag erlauben, mit deinem Pocketaccount zu interagieren. Deine Daten werden importiert. Datenimport kann ein sehr anspruchsvoller Prozess für deinen Server sein (wir müssen daran arbeiten, um diesen Import zu verbessern). -Readability ------------ +Von Readability +---------------- -Exportiere deine Readability-Daten +Exportiere deine Readability Daten +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Auf der Seite Tools (`https://www.readability.com/tools/ `_), klicke auf "Exportiere deine Daten" in dem Abschnitt "Daten Export". Du wirst eine E-Mail empfangen, um eine JSON Datei herunterladen zu können (Datei endet aber nicht auf .json). + +Importiere deine Daten in wallabag 2.x ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Auf der Tools-Seite (`https://www.readability.com/tools/ `_), klicke auf "Daten exportieren" im "Daten-Export"-Abschnitt. Du wirst eine E-Mail mit einem Downloadlink zu einer JSON-Datei erhalten, welche zugegebenermaßen nicht mit .json endet. +Klicke auf den ``Importieren`` Link im Menü, auf ``Importiere Inhalte`` in dem Readability Abschnitt und wähle dann deine JSON Datei aus und lade sie hoch. + +Deine Daten werden importiert. Der Datenimport can ein beanspruchender Prozess für deinen Server sein. + +Von Pinboard +------------- + +Exportiere deine Pinboard Daten +~~~~~~~~~~~~~~~~~~~~~~~~~ + +Auf der Seite Backup (`https://pinboard.in/settings/backup `_), klicke auf "JSON" in dem Abschnitt "Lesezeichen". Eine JSON Datei wird heruntergeladen (z.B. ``pinboard_export``). Importiere deine Daten in wallabag 2.x -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Klicke auf den ``Importieren``-Link im Menü, auf ``Inhalte importieren`` im Readability-Abschnitt und wähle dann deine JSON-Datei aus und lade sie hoch. +Klicke auf den ``Importieren`` Link im Menü, auf ``Importiere Inhalte`` in dem Pinboard Abschnitt und wähle dann deine JSON Datei aus und lade sie hoch. -Deine Daten werden dann importiert. Dies kann eine starke Belastung für den Server sein. +Deine Daten werden importiert. Der Datenimport can ein beanspruchender Prozess für deinen Server sein. -Instapaper ----------- +Von Instapaper +--------------- -Exportiere deine Instapaper-Daten -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Exportiere deine Instapaper Daten +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Klicke in den Einstellungen (`https://www.instapaper.com/user `_) auf "CSV-Datei herunterladen" im Export-Abschnitt. Eine CSV-Datei mit dem Namen ``instapaper-export.csv`` wird heruntergeladen. +Auf der Seite Einstellungen (`https://www.instapaper.com/user `_), klicke auf "Download .CSV Datei" in dem Abschnitt "Export". Eine CSV Datei wird heruntergeladen (z.B. ``instapaper-export.csv``). Importiere deine Daten in wallabag 2.x -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Klicke auf den ``Importieren``-Link im Menü, auf ``Inhalte importieren`` im Instapaper-Abschnitt und wähle dann deine CSV-Datei aus und lade sie hoch. +Klicke auf den ``Importieren`` Link im Menü, auf ``Importiere Inhalte`` in dem Instapaper Abschnitt und wähle dann deine JSON Datei aus und lade sie hoch. -Deine Daten werden dann importiert. Dies kann eine starke Belastung für den Server sein. +Deine Daten werden importiert. Der Datenimport can ein beanspruchender Prozess für deinen Server sein. wallabag 1.x ------------ @@ -134,4 +149,4 @@ Als Ergebnis wirst du so etwas erhalten: Start : 05-04-2016 11:36:07 --- 403 imported 0 already saved - End : 05-04-2016 11:36:09 --- \ No newline at end of file + End : 05-04-2016 11:36:09 --- diff --git a/docs/de/user/parameters.rst b/docs/de/user/parameters.rst index a5a4e4f2..8d8f9206 100644 --- a/docs/de/user/parameters.rst +++ b/docs/de/user/parameters.rst @@ -39,6 +39,7 @@ Wenn du nicht weißt, welchen Wert du setzen sollst, belasse es bei dem Standard redis_host: localhost redis_port: 6379 redis_path: null + redis_password: null Bedeutung von jedem Parameter ----------------------------- @@ -91,3 +92,4 @@ Bedeutung von jedem Parameter "redis_host", "localhost", "IP oder Hostname des Zielservers (ignoriert bei Unix Schema)" "redis_port", "6379", "TCP/IP Port des Zielservers (ignoriert bei Unix Schema)" "redis_path", "null", "Pfad zur Unix Domain Socket Datei, wenn Redis Unix Domain Sockets nutzt" + "redis_password", "null", "Kennwort, welches in der Redis-Server-Konfiguration definiert ist (Parameter `requirepass` in `redis.conf`)" diff --git a/docs/en/developer/asynchronous.rst b/docs/en/developer/asynchronous.rst index 6a991cf6..5cd40231 100644 --- a/docs/en/developer/asynchronous.rst +++ b/docs/en/developer/asynchronous.rst @@ -150,7 +150,7 @@ Depending on which service you want to import from you need to enable one (or ma bin/console wallabag:import:redis-worker -e=prod firefox -vv >> /path/to/wallabag/var/logs/redis-firefox.log # for Chrome import - bin/console wallabag:import:redis-worker -e=prod instapaper -vv >> /path/to/wallabag/var/logs/redis-chrome.log + bin/console wallabag:import:redis-worker -e=prod chrome -vv >> /path/to/wallabag/var/logs/redis-chrome.log If you want to launch the import only for some messages and not all, you can specify this number (here 12) and the worker will stop right after the 12th message : diff --git a/docs/en/developer/maintenance.rst b/docs/en/developer/maintenance.rst deleted file mode 100644 index 6d55ed60..00000000 --- a/docs/en/developer/maintenance.rst +++ /dev/null @@ -1,32 +0,0 @@ -Maintenance mode -================ - -If you have some long tasks to do on your wallabag instance, you can enable a maintenance mode. -Nobody will have access to your instance. - -Enable maintenance mode ------------------------ - -To enable maintenance mode, execute this command: - -:: - - bin/console lexik:maintenance:lock --no-interaction -e=prod - -You can set your IP address in ``app/config/config.yml`` if you want to access to wallabag even if maintenance mode is enabled. For example: - -:: - - lexik_maintenance: - authorized: - ips: ['127.0.0.1'] - - -Disable maintenance mode ------------------------- - -To disable maintenance mode, execute this command: - -:: - - bin/console lexik:maintenance:unlock -e=prod diff --git a/docs/en/developer/paywall.rst b/docs/en/developer/paywall.rst new file mode 100644 index 00000000..365027b4 --- /dev/null +++ b/docs/en/developer/paywall.rst @@ -0,0 +1,56 @@ +Articles behind a paywall +========================= + +wallabag can fetch articles from websites which use a paywall system. + +Enable paywall authentication +----------------------------- + +In internal settings, in the **Article** section, enable authentication for websites with paywall (with the value 1). + +Configure credentials in wallabag +--------------------------------- + +Edit your ``app/config/parameters.yml`` file to edit credentials for each website with paywall. Here is an example for some french websites: + +.. code:: yaml + + sites_credentials: + mediapart.fr: {username: "myMediapartLogin", password: "mypassword"} + arretsurimages.net: {username: "myASILogin", password: "mypassword"} + +.. note:: + + These credentials will be shared between each user of your wallabag instance. + +Parsing configuration files +--------------------------- + +.. note:: + + Read `this part of the documentation `_ to understand the configuration files. + +Each parsing configuration file needs to be improved by adding ``requires_login``, ``login_uri``, +``login_username_field``, ``login_password_field`` and ``not_logged_in_xpath``. + +Be careful, the login form must be in the page content when wallabag loads it. It's impossible for wallabag to be authenticated +on a website where the login form is loaded after the page (by ajax for example). + +``login_uri`` is the action URL of the form (``action`` attribute in the form). +``login_username_field`` is the ``name`` attribute of the login field. +``login_password_field`` is the ``name`` attribute of the password field. + +For example: + +.. code:: + + title://div[@id="titrage-contenu"]/h1[@class="title"] + body: //div[@class="contenu-html"]/div[@class="page-pane"] + + requires_login: yes + + login_uri: http://www.arretsurimages.net/forum/login.php + login_username_field: username + login_password_field: password + + not_logged_in_xpath: //body[@class="not-logged-in"] diff --git a/docs/en/developer/translate.rst b/docs/en/developer/translate.rst index d412d3e9..1e5d5009 100644 --- a/docs/en/developer/translate.rst +++ b/docs/en/developer/translate.rst @@ -20,7 +20,7 @@ is the ISO 639-1 code of your language (`see wikipedia `_ about that, which means you'll find the ``next``, ``previous`` & ``last`` page link inside the `` tag of each RSS feed. + User information ---------------- You can change your name, your email address and enable ``Two factor authentication``. +If the wallabag instance has more than one enabled user, you can delete your account here. **Take care, we delete all your data**. + Two factor authentication (2FA) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/en/user/filters.rst b/docs/en/user/filters.rst index 4d1df6eb..aae8a749 100644 --- a/docs/en/user/filters.rst +++ b/docs/en/user/filters.rst @@ -30,6 +30,11 @@ Language wallabag (via graby) can detect article language. It's easy to you to retrieve articles written in a specific language. +HTTP status +----------- + +You can retrieve the articles by filtering by their HTTP status code: 200, 404, 500, etc. + Reading time ------------ diff --git a/docs/en/user/import.rst b/docs/en/user/import.rst index a6754fa0..f420a131 100644 --- a/docs/en/user/import.rst +++ b/docs/en/user/import.rst @@ -1,13 +1,13 @@ Migrate from ... ================ -In wallabag 2.x, you can import data from: +In wallabag 2.x, you can import data from: -- `Pocket <#id1>`_ -- `Readability <#id2>`_ -- `Instapaper <#id4>`_ -- `wallabag 1.x <#id6>`_ -- `wallabag 2.x <#id7>`_ +- `Pocket <#id1>`_ +- `Readability <#id2>`_ +- `Instapaper <#id4>`_ +- `wallabag 1.x <#id6>`_ +- `wallabag 2.x <#id7>`_ We also developed `a script to execute migrations via command-line interface <#import-via-command-line-interface-cli>`_. @@ -57,8 +57,24 @@ and then select your json file and upload it. Your data will be imported. Data import can be a demanding process for your server. -Instapaper ----------- +From Pinboard +------------- + +Export your Pinboard data +~~~~~~~~~~~~~~~~~~~~~~~~~ + +On the backup (`https://pinboard.in/settings/backup `_) page, click on "JSON" in the "Bookmarks" section. A JSON file will be downloaded (like ``pinboard_export``). + +Import your data into wallabag 2.x +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Click on ``Import`` link in the menu, on ``Import contents`` in Pinboard section +and then select your json file and upload it. + +Your data will be imported. Data import can be a demanding process for your server. + +From Instapaper +--------------- Export your Instapaper data ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/en/user/parameters.rst b/docs/en/user/parameters.rst index 2b02a34d..d8a209e7 100644 --- a/docs/en/user/parameters.rst +++ b/docs/en/user/parameters.rst @@ -39,6 +39,7 @@ If you don't know which value you need to set, please leave the default one. redis_host: localhost redis_port: 6379 redis_path: null + redis_password: null Meaning of each parameter ------------------------- @@ -55,6 +56,7 @@ Meaning of each parameter "database_path", "``""%kernel.root_dir%/../data/db/wallabag.sqlite""``", "only for SQLite, define where to put the database file. Leave it empty for other database" "database_table_prefix", "wallabag_", "all wallabag's tables will be prefixed with that string. You can include a ``_`` for clarity" "database_socket", "null", "If your database is using a socket instead of tcp, put the path of the socket (other connection parameters will then be ignored)" + "database_charset", "utf8mb4", "For PostgreSQL & SQLite you should use utf8, for MySQL use utf8mb4 which handle emoji" .. csv-table:: Configuration to send emails from wallabag :header: "name", "default", "description" @@ -91,3 +93,4 @@ Meaning of each parameter "redis_host", "localhost", "IP or hostname of the target server (ignored for unix scheme)" "redis_port", "6379", "TCP/IP port of the target server (ignored for unix scheme)" "redis_path", "null", "Path of the UNIX domain socket file used when connecting to Redis using UNIX domain sockets" + "redis_password", "null", "Password defined in the Redis server configuration (parameter `requirepass` in `redis.conf`)" diff --git a/docs/fr/developer/asynchronous.rst b/docs/fr/developer/asynchronous.rst index c5489228..8a493acf 100644 --- a/docs/fr/developer/asynchronous.rst +++ b/docs/fr/developer/asynchronous.rst @@ -150,7 +150,7 @@ En fonction du service dont vous souhaitez importer vos données, vous devez act bin/console wallabag:import:redis-worker -e=prod firefox -vv >> /path/to/wallabag/var/logs/redis-firefox.log # for Chrome import - bin/console wallabag:import:redis-worker -e=prod instapaper -vv >> /path/to/wallabag/var/logs/redis-chrome.log + bin/console wallabag:import:redis-worker -e=prod chrome -vv >> /path/to/wallabag/var/logs/redis-chrome.log Si vous souhaitez démarrer l'import pour quelques messages uniquement, vous pouvez spécifier cette valeur en paramètre (ici 12) et le client va s'arrêter après le 12ème message : diff --git a/docs/fr/developer/maintenance.rst b/docs/fr/developer/maintenance.rst deleted file mode 100644 index 8007a85f..00000000 --- a/docs/fr/developer/maintenance.rst +++ /dev/null @@ -1,33 +0,0 @@ -Mode maintenance -================ - -Si vous devez effectuer de longues tâches sur votre instance de wallabag, vous pouvez activer le mode maintenance. -Plus personne ne pourra accéder à wallabag. - -Activer le mode maintenance ---------------------------- - -Pour activer le mode maintenance, exécutez cette commande : - -:: - - bin/console lexik:maintenance:lock --no-interaction -e=prod - -Vous pouvez spécifier votre adresse IP dans ``app/config/config.yml`` si vous souhaitez accéder à wallabag même si - le mode maintenance est activé. Par exemple : - -:: - - lexik_maintenance: - authorized: - ips: ['127.0.0.1'] - - -Désactiver le mode maintenance ------------------------------- - -Pour désactiver le mode maintenance, exécutez cette commande : - -:: - - bin/console lexik:maintenance:unlock -e=prod diff --git a/docs/fr/developer/paywall.rst b/docs/fr/developer/paywall.rst new file mode 100644 index 00000000..c1c410b1 --- /dev/null +++ b/docs/fr/developer/paywall.rst @@ -0,0 +1,56 @@ +Articles derrière un paywall +============================ + +wallabag peut récupérer le contenu des articles des sites qui utilisent un système de paiement. + +Activer l'authentification pour les paywall +------------------------------------------- + +Dans les paramètres internes, section **Article**, activez l'authentification pour les articles derrière un paywall (avec la valeur 1). + +Configurer les accès dans wallabag +---------------------------------- + +Éditez le fichier ``app/config/parameters.yml`` pour modifier les accès aux sites avec paywall. Voici un exemple pour certains sites : + +.. code:: yaml + + sites_credentials: + mediapart.fr: {username: "myMediapartLogin", password: "mypassword"} + arretsurimages.net: {username: "myASILogin", password: "mypassword"} + +.. note:: + + Ces accès seront partagés entre chaque utilisateur de votre instance wallabag. + +Fichiers de configuration pour parser les articles +-------------------------------------------------- + +.. note:: + + Lisez `cette documentation `_ pour en savoir plus sur ces fichiers de configuration. + +Chaque fichier de configuration doit être enrichi en ajoutant ``requires_login``, ``login_uri``, +``login_username_field``, ``login_password_field`` et ``not_logged_in_xpath``. + +Attention, le formulaire de connexion doit se trouver dans le contenu de la page lors du chargement de celle-ci. +Il sera impossible pour wallabag de se connecter à un site dont le formulaire de connexion est chargé après coup (en ajax par exemple). + +``login_uri`` correspond à l'URL à laquelle le formulaire est soumis (attribut ``action`` du formulaire). +``login_username_field`` correspond à l'attribut ``name`` du champ de l'identifiant. +``login_password_field`` correspond à l'attribut ``name`` du champ du mot de passe. + +Par exemple : + +.. code:: + + title://div[@id="titrage-contenu"]/h1[@class="title"] + body: //div[@class="contenu-html"]/div[@class="page-pane"] + + requires_login: yes + + login_uri: http://www.arretsurimages.net/forum/login.php + login_username_field: username + login_password_field: password + + not_logged_in_xpath: //body[@class="not-logged-in"] diff --git a/docs/fr/developer/translate.rst b/docs/fr/developer/translate.rst index 902c29ad..870d1c20 100644 --- a/docs/fr/developer/translate.rst +++ b/docs/fr/developer/translate.rst @@ -21,7 +21,7 @@ où CODE est le code ISO 639-1 de votre langue (`cf wikipedia `_, ce qui signifie que vous trouverez la page suivante (``next``), précédente (``previous``) et la dernière (``last``) dans la balise `` de chaque flux RSS. + Mon compte ---------- Vous pouvez ici modifier votre nom, votre adresse email et activer la ``Double authentification``. +Si l'instance de wallabag compte plus d'un utilisateur actif, vous pouvez supprimer ici votre compte. **Attention, nous supprimons toutes vos données**. + Double authentification (2FA) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/fr/user/filters.rst b/docs/fr/user/filters.rst index 449bf010..5807bdbd 100644 --- a/docs/fr/user/filters.rst +++ b/docs/fr/user/filters.rst @@ -30,6 +30,11 @@ Langage wallabag (via graby) peut détecter la langue dans laquelle l'article est écrit. C'est ainsi facile pour vous de retrouver des articles écrits dans une langue spécifique. +Statut HTTP +----------- + +Vous pouvez retrouver des articles en filtrant par leur code HTTP : 200, 404, 500, etc. + Temps de lecture ---------------- diff --git a/docs/fr/user/import.rst b/docs/fr/user/import.rst index a5d53247..9a2dda8f 100644 --- a/docs/fr/user/import.rst +++ b/docs/fr/user/import.rst @@ -1,13 +1,13 @@ Migrer depuis ... ================= -Dans wallabag 2.x, vous pouvez importer des données depuis : +Dans wallabag 2.x, vous pouvez importer des données depuis : -- `Pocket <#id1>`_ -- `Readability <#id2>`_ -- `Instapaper <#id4>`_ -- `wallabag 1.x <#id6>`_ -- `wallabag 2.x <#id7>`_ +- `Pocket <#id1>`_ +- `Readability <#id2>`_ +- `Instapaper <#id4>`_ +- `wallabag 1.x <#id6>`_ +- `wallabag 2.x <#id7>`_ Nous avons aussi développé `un script pour exécuter des migrations via la ligne de commande <#import-via-la-ligne-de-commande-cli>`_. @@ -58,8 +58,24 @@ la section Readability et ensuite sélectionnez votre fichier json pour l'upload Vos données vont être importées. L'import de données est une action qui peut être couteuse pour votre serveur. -Instapaper ----------- +Depuis Pinboard +--------------- + +Exportez vos données de Pinboard +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Sur la page « Backup » (`https://pinboard.in/settings/backup `_), cliquez sur « JSON » dans la section « Bookmarks ». Un fichier json (sans extension) sera téléchargé (``pinboard_export``). + +Importez vos données dans wallabag 2.x +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Cliquez sur le lien ``Importer`` dans le menu, sur ``Importer les contenus`` dans +la section Pinboard et ensuite sélectionnez votre fichier json pour l'uploader. + +Vos données vont être importées. L'import de données est une action qui peut être couteuse pour votre serveur. + +Depuis Instapaper +----------------- Exportez vos données de Instapaper ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -136,4 +152,4 @@ Vous obtiendrez : Start : 05-04-2016 11:36:07 --- 403 imported 0 already saved - End : 05-04-2016 11:36:09 --- \ No newline at end of file + End : 05-04-2016 11:36:09 --- diff --git a/docs/fr/user/parameters.rst b/docs/fr/user/parameters.rst index d1c20ceb..b2e33524 100644 --- a/docs/fr/user/parameters.rst +++ b/docs/fr/user/parameters.rst @@ -39,6 +39,7 @@ Si vous ne savez pas quelle valeur vous devez mettre, laissez celle par défaut. redis_host: localhost redis_port: 6379 redis_path: null + redis_password: null Meaning of each parameter ------------------------- @@ -91,3 +92,4 @@ Meaning of each parameter "redis_host", "localhost", "IP ou hôte du serveur cible (ignoré pour un schéma unix)" "redis_port", "6379", "Port TCP/IP du serveur cible (ignoré pour un schéma unix)" "redis_path", "null", "Chemin du fichier de socket du domaine UNIX utilisé quand on se connecte à Redis en utilisant les sockets du domaine UNIX" + "redis_password", "null", "Mot de passe défini dans la configuration serveur de Redis (paramètre `requirepass` dans `redis.conf`)" diff --git a/package.json b/package.json index ace74c7f..209c46c6 100644 --- a/package.json +++ b/package.json @@ -100,5 +100,9 @@ "stylelint": "^7.3.1", "stylelint-config-standard": "^13.0.2", "through": "^2.3.8" + }, + "dependencies": { + "jr-qrcode": "^1.0.5", + "mousetrap": "^1.6.0" } } diff --git a/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php b/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php index ad083e31..c13a034f 100644 --- a/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php +++ b/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php @@ -3,9 +3,8 @@ namespace Wallabag\AnnotationBundle\Controller; use FOS\RestBundle\Controller\FOSRestController; -use Nelmio\ApiDocBundle\Annotation\ApiDoc; +use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Wallabag\AnnotationBundle\Entity\Annotation; use Wallabag\CoreBundle\Entity\Entry; @@ -15,42 +14,35 @@ class WallabagAnnotationController extends FOSRestController /** * Retrieve annotations for an entry. * - * @ApiDoc( - * requirements={ - * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"} - * } - * ) + * @param Entry $entry + * + * @see Wallabag\ApiBundle\Controller\WallabagRestController * - * @return Response + * @return JsonResponse */ public function getAnnotationsAction(Entry $entry) { $annotationRows = $this - ->getDoctrine() - ->getRepository('WallabagAnnotationBundle:Annotation') - ->findAnnotationsByPageId($entry->getId(), $this->getUser()->getId()); + ->getDoctrine() + ->getRepository('WallabagAnnotationBundle:Annotation') + ->findAnnotationsByPageId($entry->getId(), $this->getUser()->getId()); $total = count($annotationRows); $annotations = ['total' => $total, 'rows' => $annotationRows]; $json = $this->get('serializer')->serialize($annotations, 'json'); - return $this->renderJsonResponse($json); + return (new JsonResponse())->setJson($json); } /** * Creates a new annotation. * - * @param Entry $entry + * @param Request $request + * @param Entry $entry * - * @ApiDoc( - * requirements={ - * {"name"="ranges", "dataType"="array", "requirement"="\w+", "description"="The range array for the annotation"}, - * {"name"="quote", "dataType"="string", "required"=false, "description"="Optional, quote for the annotation"}, - * {"name"="text", "dataType"="string", "required"=true, "description"=""}, - * } - * ) + * @return JsonResponse * - * @return Response + * @see Wallabag\ApiBundle\Controller\WallabagRestController */ public function postAnnotationAction(Request $request, Entry $entry) { @@ -75,21 +67,20 @@ class WallabagAnnotationController extends FOSRestController $json = $this->get('serializer')->serialize($annotation, 'json'); - return $this->renderJsonResponse($json); + return (new JsonResponse())->setJson($json); } /** * Updates an annotation. * - * @ApiDoc( - * requirements={ - * {"name"="annotation", "dataType"="string", "requirement"="\w+", "description"="The annotation ID"} - * } - * ) + * @see Wallabag\ApiBundle\Controller\WallabagRestController * * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation") * - * @return Response + * @param Annotation $annotation + * @param Request $request + * + * @return JsonResponse */ public function putAnnotationAction(Annotation $annotation, Request $request) { @@ -104,21 +95,19 @@ class WallabagAnnotationController extends FOSRestController $json = $this->get('serializer')->serialize($annotation, 'json'); - return $this->renderJsonResponse($json); + return (new JsonResponse())->setJson($json); } /** * Removes an annotation. * - * @ApiDoc( - * requirements={ - * {"name"="annotation", "dataType"="string", "requirement"="\w+", "description"="The annotation ID"} - * } - * ) + * @see Wallabag\ApiBundle\Controller\WallabagRestController * * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation") * - * @return Response + * @param Annotation $annotation + * + * @return JsonResponse */ public function deleteAnnotationAction(Annotation $annotation) { @@ -128,19 +117,6 @@ class WallabagAnnotationController extends FOSRestController $json = $this->get('serializer')->serialize($annotation, 'json'); - return $this->renderJsonResponse($json); - } - - /** - * Send a JSON Response. - * We don't use the Symfony JsonRespone, because it takes an array as parameter instead of a JSON string. - * - * @param string $json - * - * @return Response - */ - private function renderJsonResponse($json, $code = 200) - { - return new Response($json, $code, ['application/json']); + return (new JsonResponse())->setJson($json); } } diff --git a/src/Wallabag/AnnotationBundle/Entity/Annotation.php b/src/Wallabag/AnnotationBundle/Entity/Annotation.php index c48d8731..0838f5aa 100644 --- a/src/Wallabag/AnnotationBundle/Entity/Annotation.php +++ b/src/Wallabag/AnnotationBundle/Entity/Annotation.php @@ -82,7 +82,7 @@ class Annotation * @Exclude * * @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\Entry", inversedBy="annotations") - * @ORM\JoinColumn(name="entry_id", referencedColumnName="id") + * @ORM\JoinColumn(name="entry_id", referencedColumnName="id", onDelete="cascade") */ private $entry; diff --git a/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php b/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php index 5f7da70e..8d3f07ee 100644 --- a/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php +++ b/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php @@ -50,7 +50,8 @@ class AnnotationRepository extends EntityRepository { return $this->createQueryBuilder('a') ->andWhere('a.id = :annotationId')->setParameter('annotationId', $annotationId) - ->getQuery()->getSingleResult() + ->getQuery() + ->getSingleResult() ; } @@ -67,7 +68,8 @@ class AnnotationRepository extends EntityRepository return $this->createQueryBuilder('a') ->where('a.entry = :entryId')->setParameter('entryId', $entryId) ->andwhere('a.user = :userId')->setParameter('userId', $userId) - ->getQuery()->getResult() + ->getQuery() + ->getResult() ; } @@ -106,4 +108,18 @@ class AnnotationRepository extends EntityRepository ->getQuery() ->getSingleResult(); } + + /** + * Remove all annotations for a user id. + * Used when a user want to reset all informations. + * + * @param int $userId + */ + public function removeAllByUserId($userId) + { + $this->getEntityManager() + ->createQuery('DELETE FROM Wallabag\AnnotationBundle\Entity\Annotation a WHERE a.user = :userId') + ->setParameter('userId', $userId) + ->execute(); + } } diff --git a/src/Wallabag/ApiBundle/Controller/AnnotationRestController.php b/src/Wallabag/ApiBundle/Controller/AnnotationRestController.php new file mode 100644 index 00000000..2dd26c07 --- /dev/null +++ b/src/Wallabag/ApiBundle/Controller/AnnotationRestController.php @@ -0,0 +1,111 @@ +validateAuthentication(); + + return $this->forward('WallabagAnnotationBundle:WallabagAnnotation:getAnnotations', [ + 'entry' => $entry, + ]); + } + + /** + * Creates a new annotation. + * + * @ApiDoc( + * requirements={ + * {"name"="ranges", "dataType"="array", "requirement"="\w+", "description"="The range array for the annotation"}, + * {"name"="quote", "dataType"="string", "required"=false, "description"="Optional, quote for the annotation"}, + * {"name"="text", "dataType"="string", "required"=true, "description"=""}, + * } + * ) + * + * @param Request $request + * @param Entry $entry + * + * @return JsonResponse + */ + public function postAnnotationAction(Request $request, Entry $entry) + { + $this->validateAuthentication(); + + return $this->forward('WallabagAnnotationBundle:WallabagAnnotation:postAnnotation', [ + 'request' => $request, + 'entry' => $entry, + ]); + } + + /** + * Updates an annotation. + * + * @ApiDoc( + * requirements={ + * {"name"="annotation", "dataType"="string", "requirement"="\w+", "description"="The annotation ID"} + * } + * ) + * + * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation") + * + * @param Annotation $annotation + * @param Request $request + * + * @return JsonResponse + */ + public function putAnnotationAction(Annotation $annotation, Request $request) + { + $this->validateAuthentication(); + + return $this->forward('WallabagAnnotationBundle:WallabagAnnotation:putAnnotation', [ + 'annotation' => $annotation, + 'request' => $request, + ]); + } + + /** + * Removes an annotation. + * + * @ApiDoc( + * requirements={ + * {"name"="annotation", "dataType"="string", "requirement"="\w+", "description"="The annotation ID"} + * } + * ) + * + * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation") + * + * @param Annotation $annotation + * + * @return JsonResponse + */ + public function deleteAnnotationAction(Annotation $annotation) + { + $this->validateAuthentication(); + + return $this->forward('WallabagAnnotationBundle:WallabagAnnotation:deleteAnnotation', [ + 'annotation' => $annotation, + ]); + } +} diff --git a/src/Wallabag/ApiBundle/Controller/DeveloperController.php b/src/Wallabag/ApiBundle/Controller/DeveloperController.php index 5a36a260..550c0608 100644 --- a/src/Wallabag/ApiBundle/Controller/DeveloperController.php +++ b/src/Wallabag/ApiBundle/Controller/DeveloperController.php @@ -19,7 +19,7 @@ class DeveloperController extends Controller */ public function indexAction() { - $clients = $this->getDoctrine()->getRepository('WallabagApiBundle:Client')->findAll(); + $clients = $this->getDoctrine()->getRepository('WallabagApiBundle:Client')->findByUser($this->getUser()->getId()); return $this->render('@WallabagCore/themes/common/Developer/index.html.twig', [ 'clients' => $clients, @@ -38,7 +38,7 @@ class DeveloperController extends Controller public function createClientAction(Request $request) { $em = $this->getDoctrine()->getManager(); - $client = new Client(); + $client = new Client($this->getUser()); $clientForm = $this->createForm(ClientType::class, $client); $clientForm->handleRequest($request); @@ -75,6 +75,10 @@ class DeveloperController extends Controller */ public function deleteClientAction(Client $client) { + if (null === $this->getUser() || $client->getUser()->getId() != $this->getUser()->getId()) { + throw $this->createAccessDeniedException('You can not access this client.'); + } + $em = $this->getDoctrine()->getManager(); $em->remove($client); $em->flush(); diff --git a/src/Wallabag/ApiBundle/Controller/EntryRestController.php b/src/Wallabag/ApiBundle/Controller/EntryRestController.php index 24fa7b3b..2c2ec0c1 100644 --- a/src/Wallabag/ApiBundle/Controller/EntryRestController.php +++ b/src/Wallabag/ApiBundle/Controller/EntryRestController.php @@ -10,6 +10,8 @@ use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Wallabag\CoreBundle\Entity\Entry; use Wallabag\CoreBundle\Entity\Tag; +use Wallabag\CoreBundle\Event\EntrySavedEvent; +use Wallabag\CoreBundle\Event\EntryDeletedEvent; class EntryRestController extends WallabagRestController { @@ -148,6 +150,28 @@ class EntryRestController extends WallabagRestController return (new JsonResponse())->setJson($json); } + /** + * Retrieve a single entry as a predefined format. + * + * @ApiDoc( + * requirements={ + * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"} + * } + * ) + * + * @return Response + */ + public function getEntryExportAction(Entry $entry, Request $request) + { + $this->validateAuthentication(); + $this->validateUserAccess($entry->getUser()->getId()); + + return $this->get('wallabag_core.helper.entries_export') + ->setEntries($entry) + ->updateTitle('entry') + ->exportAs($request->attributes->get('_format')); + } + /** * Create an entry. * @@ -200,9 +224,11 @@ class EntryRestController extends WallabagRestController $em = $this->getDoctrine()->getManager(); $em->persist($entry); - $em->flush(); + // entry saved, dispatch event about it! + $this->get('event_dispatcher')->dispatch(EntrySavedEvent::NAME, new EntrySavedEvent($entry)); + $json = $this->get('serializer')->serialize($entry, 'json'); return (new JsonResponse())->setJson($json); @@ -259,6 +285,51 @@ class EntryRestController extends WallabagRestController return (new JsonResponse())->setJson($json); } + /** + * Reload an entry. + * An empty response with HTTP Status 304 will be send if we weren't able to update the content (because it hasn't changed or we got an error). + * + * @ApiDoc( + * requirements={ + * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"} + * } + * ) + * + * @return JsonResponse + */ + public function patchEntriesReloadAction(Entry $entry) + { + $this->validateAuthentication(); + $this->validateUserAccess($entry->getUser()->getId()); + + try { + $entry = $this->get('wallabag_core.content_proxy')->updateEntry($entry, $entry->getUrl()); + } catch (\Exception $e) { + $this->get('logger')->error('Error while saving an entry', [ + 'exception' => $e, + 'entry' => $entry, + ]); + + return new JsonResponse([], 304); + } + + // if refreshing entry failed, don't save it + if ($this->getParameter('wallabag_core.fetching_error_message') === $entry->getContent()) { + return new JsonResponse([], 304); + } + + $em = $this->getDoctrine()->getManager(); + $em->persist($entry); + $em->flush(); + + // entry saved, dispatch event about it! + $this->get('event_dispatcher')->dispatch(EntrySavedEvent::NAME, new EntrySavedEvent($entry)); + + $json = $this->get('serializer')->serialize($entry, 'json'); + + return (new JsonResponse())->setJson($json); + } + /** * Delete **permanently** an entry. * @@ -279,6 +350,9 @@ class EntryRestController extends WallabagRestController $em->remove($entry); $em->flush(); + // entry deleted, dispatch event about it! + $this->get('event_dispatcher')->dispatch(EntryDeletedEvent::NAME, new EntryDeletedEvent($entry)); + $json = $this->get('serializer')->serialize($entry, 'json'); return (new JsonResponse())->setJson($json); diff --git a/src/Wallabag/ApiBundle/Controller/TagRestController.php b/src/Wallabag/ApiBundle/Controller/TagRestController.php index 4e7ddc66..bc6d4e64 100644 --- a/src/Wallabag/ApiBundle/Controller/TagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/TagRestController.php @@ -131,22 +131,6 @@ class TagRestController extends WallabagRestController return (new JsonResponse())->setJson($json); } - /** - * Retrieve version number. - * - * @ApiDoc() - * - * @return JsonResponse - */ - public function getVersionAction() - { - $version = $this->container->getParameter('wallabag_core.version'); - - $json = $this->get('serializer')->serialize($version, 'json'); - - return (new JsonResponse())->setJson($json); - } - /** * Remove orphan tag in case no entries are associated to it. * diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php index e927a890..b1e08ca4 100644 --- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php @@ -3,11 +3,27 @@ namespace Wallabag\ApiBundle\Controller; use FOS\RestBundle\Controller\FOSRestController; +use Nelmio\ApiDocBundle\Annotation\ApiDoc; +use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\Security\Core\Exception\AccessDeniedException; -use Wallabag\CoreBundle\Entity\Entry; class WallabagRestController extends FOSRestController { + /** + * Retrieve version number. + * + * @ApiDoc() + * + * @return JsonResponse + */ + public function getVersionAction() + { + $version = $this->container->getParameter('wallabag_core.version'); + $json = $this->get('serializer')->serialize($version, 'json'); + + return (new JsonResponse())->setJson($json); + } + protected function validateAuthentication() { if (false === $this->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_FULLY')) { diff --git a/src/Wallabag/ApiBundle/Entity/Client.php b/src/Wallabag/ApiBundle/Entity/Client.php index f7898ac8..427a4c7f 100644 --- a/src/Wallabag/ApiBundle/Entity/Client.php +++ b/src/Wallabag/ApiBundle/Entity/Client.php @@ -4,6 +4,7 @@ namespace Wallabag\ApiBundle\Entity; use Doctrine\ORM\Mapping as ORM; use FOS\OAuthServerBundle\Entity\Client as BaseClient; +use Wallabag\UserBundle\Entity\User; /** * @ORM\Table("oauth2_clients") @@ -35,9 +36,15 @@ class Client extends BaseClient */ protected $accessTokens; - public function __construct() + /** + * @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User", inversedBy="clients") + */ + private $user; + + public function __construct(User $user) { parent::__construct(); + $this->user = $user; } /** @@ -63,4 +70,12 @@ class Client extends BaseClient return $this; } + + /** + * @return User + */ + public function getUser() + { + return $this->user; + } } diff --git a/src/Wallabag/ApiBundle/Resources/config/routing_rest.yml b/src/Wallabag/ApiBundle/Resources/config/routing_rest.yml index c1af9e02..57d37f4b 100644 --- a/src/Wallabag/ApiBundle/Resources/config/routing_rest.yml +++ b/src/Wallabag/ApiBundle/Resources/config/routing_rest.yml @@ -1,9 +1,19 @@ -entries: +entry: type: rest - resource: "WallabagApiBundle:EntryRest" + resource: "WallabagApiBundle:EntryRest" name_prefix: api_ -tags: +tag: type: rest - resource: "WallabagApiBundle:TagRest" + resource: "WallabagApiBundle:TagRest" + name_prefix: api_ + +annotation: + type: rest + resource: "WallabagApiBundle:AnnotationRest" + name_prefix: api_ + +misc: + type: rest + resource: "WallabagApiBundle:WallabagRest" name_prefix: api_ diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index 2daf2dd8..f0738b91 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php @@ -40,7 +40,7 @@ class InstallCommand extends ContainerAwareCommand { $this ->setName('wallabag:install') - ->setDescription('Wallabag installer.') + ->setDescription('wallabag installer.') ->addOption( 'reset', null, @@ -55,7 +55,7 @@ class InstallCommand extends ContainerAwareCommand $this->defaultInput = $input; $this->defaultOutput = $output; - $output->writeln('Installing Wallabag...'); + $output->writeln('Installing wallabag...'); $output->writeln(''); $this @@ -65,7 +65,7 @@ class InstallCommand extends ContainerAwareCommand ->setupConfig() ; - $output->writeln('Wallabag has been successfully installed.'); + $output->writeln('wallabag has been successfully installed.'); $output->writeln('Just execute `php bin/console server:run --env=prod` for using wallabag: http://localhost:8000'); } @@ -78,7 +78,7 @@ class InstallCommand extends ContainerAwareCommand // testing if database driver exists $fulfilled = true; - $label = 'PDO Driver'; + $label = 'PDO Driver (%s)'; $status = 'OK!'; $help = ''; @@ -88,7 +88,7 @@ class InstallCommand extends ContainerAwareCommand $help = 'Database driver "'.$this->getContainer()->getParameter('database_driver').'" is not installed.'; } - $rows[] = [$label, $status, $help]; + $rows[] = [sprintf($label, $this->getContainer()->getParameter('database_driver')), $status, $help]; // testing if connection to the database can be etablished $label = 'Database connection'; @@ -96,7 +96,8 @@ class InstallCommand extends ContainerAwareCommand $help = ''; try { - $doctrineManager->getConnection()->connect(); + $conn = $this->getContainer()->get('doctrine')->getManager()->getConnection(); + $conn->connect(); } catch (\Exception $e) { if (false === strpos($e->getMessage(), 'Unknown database') && false === strpos($e->getMessage(), 'database "'.$this->getContainer()->getParameter('database_name').'" does not exist')) { @@ -108,12 +109,25 @@ class InstallCommand extends ContainerAwareCommand $rows[] = [$label, $status, $help]; - // testing if PostgreSQL > 9.1 - $label = 'SGBD version'; + // check MySQL & PostgreSQL version + $label = 'Database version'; $status = 'OK!'; $help = ''; - if ('postgresql' === $doctrineManager->getConnection()->getSchemaManager()->getDatabasePlatform()->getName()) { + // now check if MySQL isn't too old to handle utf8mb4 + if ($conn->isConnected() && 'mysql' === $conn->getDatabasePlatform()->getName()) { + $version = $conn->query('select version()')->fetchColumn(); + $minimalVersion = '5.5.4'; + + if (false === version_compare($version, $minimalVersion, '>')) { + $fulfilled = false; + $status = 'ERROR!'; + $help = 'Your MySQL version ('.$version.') is too old, consider upgrading ('.$minimalVersion.'+).'; + } + } + + // testing if PostgreSQL > 9.1 + if ($conn->isConnected() && 'postgresql' === $conn->getDatabasePlatform()->getName()) { // return version should be like "PostgreSQL 9.5.4 on x86_64-apple-darwin15.6.0, compiled by Apple LLVM version 8.0.0 (clang-800.0.38), 64-bit" $version = $doctrineManager->getConnection()->query('SELECT version();')->fetchColumn(); @@ -152,7 +166,7 @@ class InstallCommand extends ContainerAwareCommand throw new \RuntimeException('Some system requirements are not fulfilled. Please check output messages and fix them.'); } - $this->defaultOutput->writeln('Success! Your system can run Wallabag properly.'); + $this->defaultOutput->writeln('Success! Your system can run wallabag properly.'); $this->defaultOutput->writeln(''); @@ -298,6 +312,16 @@ class InstallCommand extends ContainerAwareCommand 'value' => 'http://diasporapod.com', 'section' => 'entry', ], + [ + 'name' => 'share_unmark', + 'value' => '1', + 'section' => 'entry', + ], + [ + 'name' => 'unmark_url', + 'value' => 'https://unmark.it', + 'section' => 'entry', + ], [ 'name' => 'share_shaarli', 'value' => '1', @@ -375,7 +399,7 @@ class InstallCommand extends ContainerAwareCommand ], [ 'name' => 'wallabag_url', - 'value' => 'http://v2.wallabag.org', + 'value' => '', 'section' => 'misc', ], [ @@ -403,6 +427,16 @@ class InstallCommand extends ContainerAwareCommand 'value' => 'wallabag', 'section' => 'misc', ], + [ + 'name' => 'download_images_enabled', + 'value' => '0', + 'section' => 'misc', + ], + [ + 'name' => 'restricted_access', + 'value' => '0', + 'section' => 'entry', + ], ]; foreach ($settings as $setting) { diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php index 46fb9503..68f30f6e 100644 --- a/src/Wallabag/CoreBundle/Controller/ConfigController.php +++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php @@ -7,6 +7,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; use Wallabag\CoreBundle\Entity\Config; use Wallabag\CoreBundle\Entity\TaggingRule; use Wallabag\CoreBundle\Form\Type\ConfigType; @@ -150,6 +151,10 @@ class ConfigController extends Controller 'token' => $config->getRssToken(), ], 'twofactor_auth' => $this->getParameter('twofactor_auth'), + 'wallabag_url' => $this->get('craue_config')->get('wallabag_url'), + 'enabled_users' => $this->getDoctrine() + ->getRepository('WallabagUserBundle:User') + ->getSumEnabledUsers(), ]); } @@ -222,6 +227,78 @@ class ConfigController extends Controller return $this->redirect($this->generateUrl('config').'?tagging-rule='.$rule->getId().'#set5'); } + /** + * Remove all annotations OR tags OR entries for the current user. + * + * @Route("/reset/{type}", requirements={"id" = "annotations|tags|entries"}, name="config_reset") + * + * @return RedirectResponse + */ + public function resetAction($type) + { + switch ($type) { + case 'annotations': + $this->getDoctrine() + ->getRepository('WallabagAnnotationBundle:Annotation') + ->removeAllByUserId($this->getUser()->getId()); + break; + + case 'tags': + $this->removeAllTagsByUserId($this->getUser()->getId()); + break; + + case 'entries': + // SQLite doesn't care about cascading remove, so we need to manually remove associated stuf + // otherwise they won't be removed ... + if ($this->get('doctrine')->getConnection()->getDriver() instanceof \Doctrine\DBAL\Driver\PDOSqlite\Driver) { + $this->getDoctrine()->getRepository('WallabagAnnotationBundle:Annotation')->removeAllByUserId($this->getUser()->getId()); + } + + // manually remove tags to avoid orphan tag + $this->removeAllTagsByUserId($this->getUser()->getId()); + + $this->getDoctrine() + ->getRepository('WallabagCoreBundle:Entry') + ->removeAllByUserId($this->getUser()->getId()); + } + + $this->get('session')->getFlashBag()->add( + 'notice', + 'flashes.config.notice.'.$type.'_reset' + ); + + return $this->redirect($this->generateUrl('config').'#set3'); + } + + /** + * Remove all tags for a given user and cleanup orphan tags. + * + * @param int $userId + */ + private function removeAllTagsByUserId($userId) + { + $tags = $this->getDoctrine()->getRepository('WallabagCoreBundle:Tag')->findAllTags($userId); + + if (empty($tags)) { + return; + } + + $this->getDoctrine() + ->getRepository('WallabagCoreBundle:Entry') + ->removeTags($userId, $tags); + + // cleanup orphan tags + $em = $this->getDoctrine()->getManager(); + + foreach ($tags as $tag) { + if (count($tag->getEntries()) === 0) { + $em->remove($tag); + } + } + + $em->flush(); + } + /** * Validate that a rule can be edited/deleted by the current user. * @@ -253,4 +330,58 @@ class ConfigController extends Controller return $config; } + + /** + * Delete account for current user. + * + * @Route("/account/delete", name="delete_account") + * + * @param Request $request + * + * @throws AccessDeniedHttpException + * + * @return \Symfony\Component\HttpFoundation\RedirectResponse + */ + public function deleteAccountAction(Request $request) + { + $enabledUsers = $this->getDoctrine() + ->getRepository('WallabagUserBundle:User') + ->getSumEnabledUsers(); + + if ($enabledUsers <= 1) { + throw new AccessDeniedHttpException(); + } + + $user = $this->getUser(); + + // logout current user + $this->get('security.token_storage')->setToken(null); + $request->getSession()->invalidate(); + + $em = $this->get('fos_user.user_manager'); + $em->deleteUser($user); + + return $this->redirect($this->generateUrl('fos_user_security_login')); + } + + /** + * Switch view mode for current user. + * + * @Route("/config/view-mode", name="switch_view_mode") + * + * @param Request $request + * + * @return \Symfony\Component\HttpFoundation\RedirectResponse + */ + public function changeViewModeAction(Request $request) + { + $user = $this->getUser(); + $user->getConfig()->setListMode(!$user->getConfig()->getListMode()); + + $em = $this->getDoctrine()->getManager(); + $em->persist($user); + $em->flush(); + + return $this->redirect($request->headers->get('referer')); + } } diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index 97bb3d12..8c13255e 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php @@ -13,9 +13,36 @@ use Wallabag\CoreBundle\Form\Type\EntryFilterType; use Wallabag\CoreBundle\Form\Type\EditEntryType; use Wallabag\CoreBundle\Form\Type\NewEntryType; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache; +use Wallabag\CoreBundle\Event\EntrySavedEvent; +use Wallabag\CoreBundle\Event\EntryDeletedEvent; +use Wallabag\CoreBundle\Form\Type\SearchEntryType; class EntryController extends Controller { + /** + * @param Request $request + * @param int $page + * + * @Route("/search/{page}", name="search", defaults={"page" = "1"}) + * + * @return \Symfony\Component\HttpFoundation\Response + */ + public function searchFormAction(Request $request, $page, $currentRoute) + { + $form = $this->createForm(SearchEntryType::class); + + $form->handleRequest($request); + + if ($form->isValid()) { + return $this->showEntries('search', $request, $page); + } + + return $this->render('WallabagCoreBundle:Entry:search_form.html.twig', [ + 'form' => $form->createView(), + 'currentRoute' => $currentRoute, + ]); + } + /** * Fetch content and update entry. * In case it fails, entry will return to avod loosing the data. @@ -81,6 +108,9 @@ class EntryController extends Controller $em->persist($entry); $em->flush(); + // entry saved, dispatch event about it! + $this->get('event_dispatcher')->dispatch(EntrySavedEvent::NAME, new EntrySavedEvent($entry)); + return $this->redirect($this->generateUrl('homepage')); } @@ -107,6 +137,9 @@ class EntryController extends Controller $em = $this->getDoctrine()->getManager(); $em->persist($entry); $em->flush(); + + // entry saved, dispatch event about it! + $this->get('event_dispatcher')->dispatch(EntrySavedEvent::NAME, new EntrySavedEvent($entry)); } return $this->redirect($this->generateUrl('homepage')); @@ -236,8 +269,14 @@ class EntryController extends Controller private function showEntries($type, Request $request, $page) { $repository = $this->get('wallabag_core.entry_repository'); + $searchTerm = (isset($request->get('search_entry')['term']) ? $request->get('search_entry')['term'] : ''); + $currentRoute = (!is_null($request->get('currentRoute')) ? $request->get('currentRoute') : ''); switch ($type) { + case 'search': + $qb = $repository->getBuilderForSearchByUser($this->getUser()->getId(), $searchTerm, $currentRoute); + + break; case 'untagged': $qb = $repository->getBuilderForUntaggedByUser($this->getUser()->getId()); @@ -286,11 +325,11 @@ class EntryController extends Controller } return $this->render( - 'WallabagCoreBundle:Entry:entries.html.twig', - [ + 'WallabagCoreBundle:Entry:entries.html.twig', [ 'form' => $form->createView(), 'entries' => $entries, 'currentPage' => $page, + 'searchTerm' => $searchTerm, ] ); } @@ -343,6 +382,9 @@ class EntryController extends Controller $em->persist($entry); $em->flush(); + // entry saved, dispatch event about it! + $this->get('event_dispatcher')->dispatch(EntrySavedEvent::NAME, new EntrySavedEvent($entry)); + return $this->redirect($this->generateUrl('view', ['id' => $entry->getId()])); } @@ -431,6 +473,9 @@ class EntryController extends Controller UrlGeneratorInterface::ABSOLUTE_PATH ); + // entry deleted, dispatch event about it! + $this->get('event_dispatcher')->dispatch(EntryDeletedEvent::NAME, new EntryDeletedEvent($entry)); + $em = $this->getDoctrine()->getManager(); $em->remove($entry); $em->flush(); diff --git a/src/Wallabag/CoreBundle/Controller/ExportController.php b/src/Wallabag/CoreBundle/Controller/ExportController.php index 79653cfe..abc3336a 100644 --- a/src/Wallabag/CoreBundle/Controller/ExportController.php +++ b/src/Wallabag/CoreBundle/Controller/ExportController.php @@ -48,7 +48,7 @@ class ExportController extends Controller * * @Route("/export/{category}.{format}", name="export_entries", requirements={ * "format": "epub|mobi|pdf|json|xml|txt|csv", - * "category": "all|unread|starred|archive|tag_entries|untagged" + * "category": "all|unread|starred|archive|tag_entries|untagged|search" * }) * * @return \Symfony\Component\HttpFoundation\Response diff --git a/src/Wallabag/CoreBundle/Controller/RssController.php b/src/Wallabag/CoreBundle/Controller/RssController.php index 38e3b5a0..2290386f 100644 --- a/src/Wallabag/CoreBundle/Controller/RssController.php +++ b/src/Wallabag/CoreBundle/Controller/RssController.php @@ -3,12 +3,15 @@ namespace Wallabag\CoreBundle\Controller; use Pagerfanta\Adapter\DoctrineORMAdapter; +use Pagerfanta\Exception\OutOfRangeCurrentPageException; use Pagerfanta\Pagerfanta; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; +use Symfony\Component\HttpFoundation\Request; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Wallabag\CoreBundle\Entity\Entry; use Wallabag\UserBundle\Entity\User; +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; class RssController extends Controller { @@ -20,9 +23,9 @@ class RssController extends Controller * * @return \Symfony\Component\HttpFoundation\Response */ - public function showUnreadAction(User $user) + public function showUnreadAction(Request $request, User $user) { - return $this->showEntries('unread', $user); + return $this->showEntries('unread', $user, $request->query->get('page', 1)); } /** @@ -33,9 +36,9 @@ class RssController extends Controller * * @return \Symfony\Component\HttpFoundation\Response */ - public function showArchiveAction(User $user) + public function showArchiveAction(Request $request, User $user) { - return $this->showEntries('archive', $user); + return $this->showEntries('archive', $user, $request->query->get('page', 1)); } /** @@ -46,9 +49,9 @@ class RssController extends Controller * * @return \Symfony\Component\HttpFoundation\Response */ - public function showStarredAction(User $user) + public function showStarredAction(Request $request, User $user) { - return $this->showEntries('starred', $user); + return $this->showEntries('starred', $user, $request->query->get('page', 1)); } /** @@ -57,10 +60,11 @@ class RssController extends Controller * * @param string $type Entries type: unread, starred or archive * @param User $user + * @param int $page * * @return \Symfony\Component\HttpFoundation\Response */ - private function showEntries($type, User $user) + private function showEntries($type, User $user, $page = 1) { $repository = $this->getDoctrine()->getRepository('WallabagCoreBundle:Entry'); @@ -87,8 +91,26 @@ class RssController extends Controller $perPage = $user->getConfig()->getRssLimit() ?: $this->getParameter('wallabag_core.rss_limit'); $entries->setMaxPerPage($perPage); + $url = $this->generateUrl( + $type.'_rss', + [ + 'username' => $user->getUsername(), + 'token' => $user->getConfig()->getRssToken(), + ], + UrlGeneratorInterface::ABSOLUTE_URL + ); + + try { + $entries->setCurrentPage((int) $page); + } catch (OutOfRangeCurrentPageException $e) { + if ($page > 1) { + return $this->redirect($url.'?page='.$entries->getNbPages(), 302); + } + } + return $this->render('@WallabagCore/themes/common/Entry/entries.xml.twig', [ 'type' => $type, + 'url' => $url, 'entries' => $entries, ]); } diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php index 707f3bbe..a3e70fd0 100644 --- a/src/Wallabag/CoreBundle/Controller/TagController.php +++ b/src/Wallabag/CoreBundle/Controller/TagController.php @@ -90,15 +90,15 @@ class TagController extends Controller $flatTags = []; - foreach ($tags as $key => $tag) { + foreach ($tags as $tag) { $nbEntries = $this->getDoctrine() ->getRepository('WallabagCoreBundle:Entry') - ->countAllEntriesByUserIdAndTagId($this->getUser()->getId(), $tag['id']); + ->countAllEntriesByUserIdAndTagId($this->getUser()->getId(), $tag->getId()); $flatTags[] = [ - 'id' => $tag['id'], - 'label' => $tag['label'], - 'slug' => $tag['slug'], + 'id' => $tag->getId(), + 'label' => $tag->getLabel(), + 'slug' => $tag->getSlug(), 'nbEntries' => $nbEntries, ]; } diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php index 921c739f..45358022 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php @@ -21,6 +21,7 @@ class LoadConfigData extends AbstractFixture implements OrderedFixtureInterface $adminConfig->setReadingSpeed(1); $adminConfig->setLanguage('en'); $adminConfig->setPocketConsumerKey('xxxxx'); + $adminConfig->setActionMarkAsRead(0); $manager->persist($adminConfig); @@ -32,6 +33,7 @@ class LoadConfigData extends AbstractFixture implements OrderedFixtureInterface $bobConfig->setReadingSpeed(1); $bobConfig->setLanguage('fr'); $bobConfig->setPocketConsumerKey(null); + $bobConfig->setActionMarkAsRead(1); $manager->persist($bobConfig); @@ -43,6 +45,7 @@ class LoadConfigData extends AbstractFixture implements OrderedFixtureInterface $emptyConfig->setReadingSpeed(1); $emptyConfig->setLanguage('en'); $emptyConfig->setPocketConsumerKey(null); + $emptyConfig->setActionMarkAsRead(0); $manager->persist($emptyConfig); diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php index a5e1be65..a723656e 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php @@ -35,6 +35,16 @@ class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface 'value' => 'http://diasporapod.com', 'section' => 'entry', ], + [ + 'name' => 'share_unmark', + 'value' => '1', + 'section' => 'entry', + ], + [ + 'name' => 'unmark_url', + 'value' => 'https://unmark.it', + 'section' => 'entry', + ], [ 'name' => 'share_shaarli', 'value' => '1', @@ -140,6 +150,16 @@ class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface 'value' => 'wallabag', 'section' => 'misc', ], + [ + 'name' => 'download_images_enabled', + 'value' => '0', + 'section' => 'misc', + ], + [ + 'name' => 'restricted_access', + 'value' => '0', + 'section' => 'entry', + ], ]; foreach ($settings as $setting) { @@ -158,6 +178,6 @@ class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface */ public function getOrder() { - return 50; + return 29; } } diff --git a/src/Wallabag/CoreBundle/Entity/Config.php b/src/Wallabag/CoreBundle/Entity/Config.php index 69393ac9..0b75270d 100644 --- a/src/Wallabag/CoreBundle/Entity/Config.php +++ b/src/Wallabag/CoreBundle/Entity/Config.php @@ -16,6 +16,9 @@ use Wallabag\UserBundle\Entity\User; */ class Config { + const REDIRECT_TO_HOMEPAGE = 0; + const REDIRECT_TO_CURRENT_PAGE = 1; + /** * @var int * @@ -87,6 +90,20 @@ class Config */ private $pocketConsumerKey; + /** + * @var int + * + * @ORM\Column(name="action_mark_as_read", type="integer", nullable=true) + */ + private $actionMarkAsRead; + + /** + * @var int + * + * @ORM\Column(name="list_mode", type="integer", nullable=true) + */ + private $listMode; + /** * @ORM\OneToOne(targetEntity="Wallabag\UserBundle\Entity\User", inversedBy="config") */ @@ -309,6 +326,46 @@ class Config return $this->pocketConsumerKey; } + /** + * @return int + */ + public function getActionMarkAsRead() + { + return $this->actionMarkAsRead; + } + + /** + * @param int $actionMarkAsRead + * + * @return Config + */ + public function setActionMarkAsRead($actionMarkAsRead) + { + $this->actionMarkAsRead = $actionMarkAsRead; + + return $this; + } + + /** + * @return int + */ + public function getListMode() + { + return $this->listMode; + } + + /** + * @param int $listMode + * + * @return Config + */ + public function setListMode($listMode) + { + $this->listMode = $listMode; + + return $this; + } + /** * @param TaggingRule $rule * diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index f2da3f4d..3cf9ac1a 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php @@ -19,7 +19,11 @@ use Wallabag\AnnotationBundle\Entity\Annotation; * * @XmlRoot("entry") * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\EntryRepository") - * @ORM\Table(name="`entry`") + * @ORM\Table( + * name="`entry`", + * options={"collate"="utf8mb4_unicode_ci", "charset"="utf8mb4"}, + * indexes={@ORM\Index(name="created_at", columns={"created_at"})} + * ) * @ORM\HasLifecycleCallbacks() * @Hateoas\Relation("self", href = "expr('/api/entries/' ~ object.getId())") */ @@ -176,6 +180,15 @@ class Entry */ private $isPublic; + /** + * @var string + * + * @ORM\Column(name="http_status", type="text", nullable=true) + * + * @Groups({"entries_for_user", "export_all"}) + */ + private $httpStatus; + /** * @Exclude * @@ -190,10 +203,10 @@ class Entry * @ORM\JoinTable( * name="entry_tag", * joinColumns={ - * @ORM\JoinColumn(name="entry_id", referencedColumnName="id") + * @ORM\JoinColumn(name="entry_id", referencedColumnName="id", onDelete="cascade") * }, * inverseJoinColumns={ - * @ORM\JoinColumn(name="tag_id", referencedColumnName="id") + * @ORM\JoinColumn(name="tag_id", referencedColumnName="id", onDelete="cascade") * } * ) */ @@ -665,4 +678,24 @@ class Entry { $this->uuid = null; } + + /** + * @return int + */ + public function getHttpStatus() + { + return $this->httpStatus; + } + + /** + * @param int $httpStatus + * + * @return Entry + */ + public function setHttpStatus($httpStatus) + { + $this->httpStatus = $httpStatus; + + return $this; + } } diff --git a/src/Wallabag/CoreBundle/Event/EntryDeletedEvent.php b/src/Wallabag/CoreBundle/Event/EntryDeletedEvent.php new file mode 100644 index 00000000..e9061d04 --- /dev/null +++ b/src/Wallabag/CoreBundle/Event/EntryDeletedEvent.php @@ -0,0 +1,26 @@ +entry = $entry; + } + + public function getEntry() + { + return $this->entry; + } +} diff --git a/src/Wallabag/CoreBundle/Event/EntrySavedEvent.php b/src/Wallabag/CoreBundle/Event/EntrySavedEvent.php new file mode 100644 index 00000000..5fdb5221 --- /dev/null +++ b/src/Wallabag/CoreBundle/Event/EntrySavedEvent.php @@ -0,0 +1,26 @@ +entry = $entry; + } + + public function getEntry() + { + return $this->entry; + } +} diff --git a/src/Wallabag/CoreBundle/EventListener/LocaleListener.php b/src/Wallabag/CoreBundle/Event/Listener/LocaleListener.php similarity index 96% rename from src/Wallabag/CoreBundle/EventListener/LocaleListener.php rename to src/Wallabag/CoreBundle/Event/Listener/LocaleListener.php index a1c7e5ab..b435d99e 100644 --- a/src/Wallabag/CoreBundle/EventListener/LocaleListener.php +++ b/src/Wallabag/CoreBundle/Event/Listener/LocaleListener.php @@ -1,6 +1,6 @@ em = $em; + $this->downloadImages = $downloadImages; + $this->enabled = $enabled; + $this->logger = $logger; + } + + public static function getSubscribedEvents() + { + return [ + EntrySavedEvent::NAME => 'onEntrySaved', + EntryDeletedEvent::NAME => 'onEntryDeleted', + ]; + } + + /** + * Download images and updated the data into the entry. + * + * @param EntrySavedEvent $event + */ + public function onEntrySaved(EntrySavedEvent $event) + { + if (!$this->enabled) { + $this->logger->debug('DownloadImagesSubscriber: disabled.'); + + return; + } + + $entry = $event->getEntry(); + + $html = $this->downloadImages($entry); + if (false !== $html) { + $this->logger->debug('DownloadImagesSubscriber: updated html.'); + + $entry->setContent($html); + } + + // update preview picture + $previewPicture = $this->downloadPreviewImage($entry); + if (false !== $previewPicture) { + $this->logger->debug('DownloadImagesSubscriber: update preview picture.'); + + $entry->setPreviewPicture($previewPicture); + } + + $this->em->persist($entry); + $this->em->flush(); + } + + /** + * Remove images related to the entry. + * + * @param EntryDeletedEvent $event + */ + public function onEntryDeleted(EntryDeletedEvent $event) + { + if (!$this->enabled) { + $this->logger->debug('DownloadImagesSubscriber: disabled.'); + + return; + } + + $this->downloadImages->removeImages($event->getEntry()->getId()); + } + + /** + * Download all images from the html. + * + * @todo If we want to add async download, it should be done in that method + * + * @param Entry $entry + * + * @return string|false False in case of async + */ + private function downloadImages(Entry $entry) + { + return $this->downloadImages->processHtml( + $entry->getId(), + $entry->getContent(), + $entry->getUrl() + ); + } + + /** + * Download the preview picture. + * + * @todo If we want to add async download, it should be done in that method + * + * @param Entry $entry + * + * @return string|false False in case of async + */ + private function downloadPreviewImage(Entry $entry) + { + return $this->downloadImages->processSingleImage( + $entry->getId(), + $entry->getPreviewPicture(), + $entry->getUrl() + ); + } +} diff --git a/src/Wallabag/CoreBundle/Event/Subscriber/SQLiteCascadeDeleteSubscriber.php b/src/Wallabag/CoreBundle/Event/Subscriber/SQLiteCascadeDeleteSubscriber.php new file mode 100644 index 00000000..3b4c4cf9 --- /dev/null +++ b/src/Wallabag/CoreBundle/Event/Subscriber/SQLiteCascadeDeleteSubscriber.php @@ -0,0 +1,70 @@ +doctrine = $doctrine; + } + + /** + * @return array + */ + public function getSubscribedEvents() + { + return [ + 'preRemove', + ]; + } + + /** + * We removed everything related to the upcoming removed entry because SQLite can't handle it on it own. + * We do it in the preRemove, because we can't retrieve tags in the postRemove (because the entry id is gone). + * + * @param LifecycleEventArgs $args + */ + public function preRemove(LifecycleEventArgs $args) + { + $entity = $args->getEntity(); + + if (!$this->doctrine->getConnection()->getDriver() instanceof \Doctrine\DBAL\Driver\PDOSqlite\Driver || + !$entity instanceof Entry) { + return; + } + + $em = $this->doctrine->getManager(); + + if (null !== $entity->getTags()) { + foreach ($entity->getTags() as $tag) { + $entity->removeTag($tag); + } + } + + if (null !== $entity->getAnnotations()) { + foreach ($entity->getAnnotations() as $annotation) { + $em->remove($annotation); + } + } + + $em->flush(); + } +} diff --git a/src/Wallabag/CoreBundle/Subscriber/TablePrefixSubscriber.php b/src/Wallabag/CoreBundle/Event/Subscriber/TablePrefixSubscriber.php similarity index 91% rename from src/Wallabag/CoreBundle/Subscriber/TablePrefixSubscriber.php rename to src/Wallabag/CoreBundle/Event/Subscriber/TablePrefixSubscriber.php index 0379ad6a..711c3bf8 100644 --- a/src/Wallabag/CoreBundle/Subscriber/TablePrefixSubscriber.php +++ b/src/Wallabag/CoreBundle/Event/Subscriber/TablePrefixSubscriber.php @@ -1,6 +1,6 @@ setTableName($this->prefix.$classMetadata->getTableName()); + $classMetadata->setPrimaryTable(['name' => $this->prefix.$classMetadata->getTableName()]); foreach ($classMetadata->getAssociationMappings() as $fieldName => $mapping) { if ($mapping['type'] === ClassMetadataInfo::MANY_TO_MANY && isset($classMetadata->associationMappings[$fieldName]['joinTable']['name'])) { diff --git a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php index 0bac2874..7e3b9dd4 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php @@ -7,6 +7,7 @@ use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; +use Wallabag\CoreBundle\Entity\Config; class ConfigType extends AbstractType { @@ -48,6 +49,13 @@ class ConfigType extends AbstractType 'config.form_settings.reading_speed.400_word' => '2', ], ]) + ->add('action_mark_as_read', ChoiceType::class, [ + 'label' => 'config.form_settings.action_mark_as_read.label', + 'choices' => [ + 'config.form_settings.action_mark_as_read.redirect_homepage' => Config::REDIRECT_TO_HOMEPAGE, + 'config.form_settings.action_mark_as_read.redirect_current_page' => Config::REDIRECT_TO_CURRENT_PAGE, + ], + ]) ->add('language', ChoiceType::class, [ 'choices' => array_flip($this->languages), 'label' => 'config.form_settings.language_label', diff --git a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php index a3e36fdd..ee66c728 100644 --- a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php +++ b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php @@ -11,6 +11,7 @@ use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\CheckboxFilterType; use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\ChoiceFilterType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\HttpFoundation\Response; use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; @@ -89,12 +90,27 @@ class EntryFilterType extends AbstractType if (strlen($value) <= 2 || empty($value)) { return; } - $expression = $filterQuery->getExpr()->like($field, $filterQuery->getExpr()->literal('%'.$value.'%')); + $expression = $filterQuery->getExpr()->like($field, $filterQuery->getExpr()->lower($filterQuery->getExpr()->literal('%'.$value.'%'))); return $filterQuery->createCondition($expression); }, 'label' => 'entry.filters.domain_label', ]) + ->add('httpStatus', TextFilterType::class, [ + 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { + $value = $values['value']; + if (false === array_key_exists($value, Response::$statusTexts)) { + return; + } + + $paramName = sprintf('%s', str_replace('.', '_', $field)); + $expression = $filterQuery->getExpr()->eq($field, ':'.$paramName); + $parameters = array($paramName => $value); + + return $filterQuery->createCondition($expression, $parameters); + }, + 'label' => 'entry.filters.http_status_label', + ]) ->add('isArchived', CheckboxFilterType::class, [ 'label' => 'entry.filters.archived_label', ]) diff --git a/src/Wallabag/CoreBundle/Form/Type/NewTagType.php b/src/Wallabag/CoreBundle/Form/Type/NewTagType.php index 3db4105f..e830ade4 100644 --- a/src/Wallabag/CoreBundle/Form/Type/NewTagType.php +++ b/src/Wallabag/CoreBundle/Form/Type/NewTagType.php @@ -3,6 +3,7 @@ namespace Wallabag\CoreBundle\Form\Type; use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -12,7 +13,15 @@ class NewTagType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder - ->add('label', TextType::class, ['required' => true]) + ->add('label', TextType::class, [ + 'required' => true, + 'attr' => [ + 'placeholder' => 'tag.new.placeholder', + ], + ]) + ->add('add', SubmitType::class, [ + 'label' => 'tag.new.add', + ]) ; } diff --git a/src/Wallabag/CoreBundle/Form/Type/SearchEntryType.php b/src/Wallabag/CoreBundle/Form/Type/SearchEntryType.php new file mode 100644 index 00000000..b56cae8e --- /dev/null +++ b/src/Wallabag/CoreBundle/Form/Type/SearchEntryType.php @@ -0,0 +1,29 @@ +setMethod('GET') + ->add('term', TextType::class, [ + 'required' => true, + 'label' => 'entry.new.form_search.term_label', + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults([ + 'csrf_protection' => false, + ]); + } +} diff --git a/src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php b/src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php new file mode 100644 index 00000000..6d4129e8 --- /dev/null +++ b/src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php @@ -0,0 +1,68 @@ +grabyConfigBuilder = $grabyConfigBuilder; + $this->credentials = $credentials; + } + + /** + * Builds the SiteConfig for a host. + * + * @param string $host The "www." prefix is ignored + * + * @return SiteConfig + * + * @throws OutOfRangeException If there is no config for $host + */ + public function buildForHost($host) + { + // required by credentials below + $host = strtolower($host); + if (substr($host, 0, 4) == 'www.') { + $host = substr($host, 4); + } + + $config = $this->grabyConfigBuilder->buildForHost($host); + $parameters = [ + 'host' => $host, + 'requiresLogin' => $config->requires_login ?: false, + 'loginUri' => $config->login_uri ?: null, + 'usernameField' => $config->login_username_field ?: null, + 'passwordField' => $config->login_password_field ?: null, + 'extraFields' => is_array($config->login_extra_fields) ? $config->login_extra_fields : [], + 'notLoggedInXpath' => $config->not_logged_in_xpath ?: null, + ]; + + if (isset($this->credentials[$host])) { + $parameters['username'] = $this->credentials[$host]['username']; + $parameters['password'] = $this->credentials[$host]['password']; + } + + return new SiteConfig($parameters); + } +} diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php index bbd5db5d..fd059325 100644 --- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php +++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php @@ -3,7 +3,7 @@ namespace Wallabag\CoreBundle\Helper; use Graby\Graby; -use Psr\Log\LoggerInterface as Logger; +use Psr\Log\LoggerInterface; use Wallabag\CoreBundle\Entity\Entry; use Wallabag\CoreBundle\Entity\Tag; use Wallabag\CoreBundle\Tools\Utils; @@ -22,7 +22,7 @@ class ContentProxy protected $tagRepository; protected $mimeGuesser; - public function __construct(Graby $graby, RuleBasedTagger $tagger, TagRepository $tagRepository, Logger $logger) + public function __construct(Graby $graby, RuleBasedTagger $tagger, TagRepository $tagRepository, LoggerInterface $logger) { $this->graby = $graby; $this->tagger = $tagger; @@ -69,6 +69,8 @@ class ContentProxy $entry->setUrl($content['url'] ?: $url); $entry->setTitle($title); $entry->setContent($html); + $entry->setHttpStatus(isset($content['status']) ? $content['status'] : ''); + $entry->setLanguage($content['language']); $entry->setMimetype($content['content_type']); $entry->setReadingTime(Utils::getReadingTime($html)); diff --git a/src/Wallabag/CoreBundle/Helper/DownloadImages.php b/src/Wallabag/CoreBundle/Helper/DownloadImages.php new file mode 100644 index 00000000..264bc6a3 --- /dev/null +++ b/src/Wallabag/CoreBundle/Helper/DownloadImages.php @@ -0,0 +1,233 @@ +client = $client; + $this->baseFolder = $baseFolder; + $this->wallabagUrl = rtrim($wallabagUrl, '/'); + $this->logger = $logger; + $this->mimeGuesser = new MimeTypeExtensionGuesser(); + + $this->setFolder(); + } + + /** + * Setup base folder where all images are going to be saved. + */ + private function setFolder() + { + // if folder doesn't exist, attempt to create one and store the folder name in property $folder + if (!file_exists($this->baseFolder)) { + mkdir($this->baseFolder, 0777, true); + } + } + + /** + * Process the html and extract image from it, save them to local and return the updated html. + * + * @param int $entryId ID of the entry + * @param string $html + * @param string $url Used as a base path for relative image and folder + * + * @return string + */ + public function processHtml($entryId, $html, $url) + { + $crawler = new Crawler($html); + $result = $crawler + ->filterXpath('//img') + ->extract(array('src')); + + $relativePath = $this->getRelativePath($entryId); + + // download and save the image to the folder + foreach ($result as $image) { + $imagePath = $this->processSingleImage($entryId, $image, $url, $relativePath); + + if (false === $imagePath) { + continue; + } + + $html = str_replace($image, $imagePath, $html); + } + + return $html; + } + + /** + * Process a single image: + * - retrieve it + * - re-saved it (for security reason) + * - return the new local path. + * + * @param int $entryId ID of the entry + * @param string $imagePath Path to the image to retrieve + * @param string $url Url from where the image were found + * @param string $relativePath Relative local path to saved the image + * + * @return string Relative url to access the image from the web + */ + public function processSingleImage($entryId, $imagePath, $url, $relativePath = null) + { + if (null === $relativePath) { + $relativePath = $this->getRelativePath($entryId); + } + + $this->logger->debug('DownloadImages: working on image: '.$imagePath); + + $folderPath = $this->baseFolder.'/'.$relativePath; + + // build image path + $absolutePath = $this->getAbsoluteLink($url, $imagePath); + if (false === $absolutePath) { + $this->logger->error('DownloadImages: Can not determine the absolute path for that image, skipping.'); + + return false; + } + + try { + $res = $this->client->get($absolutePath); + } catch (\Exception $e) { + $this->logger->error('DownloadImages: Can not retrieve image, skipping.', ['exception' => $e]); + + return false; + } + + $ext = $this->mimeGuesser->guess($res->getHeader('content-type')); + $this->logger->debug('DownloadImages: Checking extension', ['ext' => $ext, 'header' => $res->getHeader('content-type')]); + if (!in_array($ext, ['jpeg', 'jpg', 'gif', 'png'], true)) { + $this->logger->error('DownloadImages: Processed image with not allowed extension. Skipping '.$imagePath); + + return false; + } + $hashImage = hash('crc32', $absolutePath); + $localPath = $folderPath.'/'.$hashImage.'.'.$ext; + + try { + $im = imagecreatefromstring($res->getBody()); + } catch (\Exception $e) { + $im = false; + } + + if (false === $im) { + $this->logger->error('DownloadImages: Error while regenerating image', ['path' => $localPath]); + + return false; + } + + switch ($ext) { + case 'gif': + imagegif($im, $localPath); + $this->logger->debug('DownloadImages: Re-creating gif'); + break; + case 'jpeg': + case 'jpg': + imagejpeg($im, $localPath, self::REGENERATE_PICTURES_QUALITY); + $this->logger->debug('DownloadImages: Re-creating jpg'); + break; + case 'png': + imagepng($im, $localPath, ceil(self::REGENERATE_PICTURES_QUALITY / 100 * 9)); + $this->logger->debug('DownloadImages: Re-creating png'); + } + + imagedestroy($im); + + return $this->wallabagUrl.'/assets/images/'.$relativePath.'/'.$hashImage.'.'.$ext; + } + + /** + * Remove all images for the given entry id. + * + * @param int $entryId ID of the entry + */ + public function removeImages($entryId) + { + $relativePath = $this->getRelativePath($entryId); + $folderPath = $this->baseFolder.'/'.$relativePath; + + $finder = new Finder(); + $finder + ->files() + ->ignoreDotFiles(true) + ->in($folderPath); + + foreach ($finder as $file) { + @unlink($file->getRealPath()); + } + + @rmdir($folderPath); + } + + /** + * Generate the folder where we are going to save images based on the entry url. + * + * @param int $entryId ID of the entry + * + * @return string + */ + private function getRelativePath($entryId) + { + $hashId = hash('crc32', $entryId); + $relativePath = $hashId[0].'/'.$hashId[1].'/'.$hashId; + $folderPath = $this->baseFolder.'/'.$relativePath; + + if (!file_exists($folderPath)) { + mkdir($folderPath, 0777, true); + } + + $this->logger->debug('DownloadImages: Folder used for that Entry id', ['folder' => $folderPath, 'entryId' => $entryId]); + + return $relativePath; + } + + /** + * Make an $url absolute based on the $base. + * + * @see Graby->makeAbsoluteStr + * + * @param string $base Base url + * @param string $url Url to make it absolute + * + * @return false|string + */ + private function getAbsoluteLink($base, $url) + { + if (preg_match('!^https?://!i', $url)) { + // already absolute + return $url; + } + + $base = new \SimplePie_IRI($base); + + // remove '//' in URL path (causes URLs not to resolve properly) + if (isset($base->ipath)) { + $base->ipath = preg_replace('!//+!', '/', $base->ipath); + } + + if ($absolute = \SimplePie_IRI::absolutize($base, $url)) { + return $absolute->get_uri(); + } + + $this->logger->error('DownloadImages: Can not make an absolute link', ['base' => $base, 'url' => $url]); + + return false; + } +} diff --git a/src/Wallabag/CoreBundle/Helper/HttpClientFactory.php b/src/Wallabag/CoreBundle/Helper/HttpClientFactory.php new file mode 100644 index 00000000..8891887b --- /dev/null +++ b/src/Wallabag/CoreBundle/Helper/HttpClientFactory.php @@ -0,0 +1,54 @@ +authenticatorSubscriber = $authenticatorSubscriber; + $this->cookieJar = $cookieJar; + $this->restrictedAccess = $restrictedAccess; + } + + /** + * @return \GuzzleHttp\Client|null + */ + public function buildHttpClient() + { + if (0 === (int) $this->restrictedAccess) { + return null; + } + + // we clear the cookie to avoid websites who use cookies for analytics + $this->cookieJar->clear(); + // need to set the (shared) cookie jar + $client = new Client(['handler' => new SafeCurlHandler(), 'defaults' => ['cookies' => $this->cookieJar]]); + $client->getEmitter()->attach($this->authenticatorSubscriber); + + return $client; + } +} diff --git a/src/Wallabag/CoreBundle/Helper/Redirect.php b/src/Wallabag/CoreBundle/Helper/Redirect.php index c14c79d1..f78b7fe0 100644 --- a/src/Wallabag/CoreBundle/Helper/Redirect.php +++ b/src/Wallabag/CoreBundle/Helper/Redirect.php @@ -3,6 +3,8 @@ namespace Wallabag\CoreBundle\Helper; use Symfony\Component\Routing\Router; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Wallabag\CoreBundle\Entity\Config; /** * Manage redirections to avoid redirecting to empty routes. @@ -10,10 +12,12 @@ use Symfony\Component\Routing\Router; class Redirect { private $router; + private $tokenStorage; - public function __construct(Router $router) + public function __construct(Router $router, TokenStorageInterface $tokenStorage) { $this->router = $router; + $this->tokenStorage = $tokenStorage; } /** @@ -24,6 +28,16 @@ class Redirect */ public function to($url, $fallback = '') { + $user = $this->tokenStorage->getToken() ? $this->tokenStorage->getToken()->getUser() : null; + + if (null === $user || !is_object($user)) { + return $url; + } + + if (Config::REDIRECT_TO_HOMEPAGE === $user->getConfig()->getActionMarkAsRead()) { + return $this->router->generate('homepage'); + } + if (null !== $url) { return $url; } diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index 4f03ae0f..47e24d6b 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php @@ -85,6 +85,36 @@ class EntryRepository extends EntityRepository ; } + /** + * Retrieves entries filtered with a search term for a user. + * + * @param int $userId + * @param string $term + * @param strint $currentRoute + * + * @return QueryBuilder + */ + public function getBuilderForSearchByUser($userId, $term, $currentRoute) + { + $qb = $this + ->getBuilderByUser($userId); + + if ('starred' === $currentRoute) { + $qb->andWhere('e.isStarred = true'); + } elseif ('unread' === $currentRoute) { + $qb->andWhere('e.isArchived = false'); + } elseif ('archive' === $currentRoute) { + $qb->andWhere('e.isArchived = true'); + } + + $qb + ->andWhere('e.content LIKE :term OR e.title LIKE :term')->setParameter('term', '%'.$term.'%') + ->leftJoin('e.tags', 't') + ->groupBy('e.id'); + + return $qb; + } + /** * Retrieves untagged entries for a user. * @@ -329,4 +359,18 @@ class EntryRepository extends EntityRepository return $qb->getQuery()->getSingleScalarResult(); } + + /** + * Remove all entries for a user id. + * Used when a user want to reset all informations. + * + * @param int $userId + */ + public function removeAllByUserId($userId) + { + $this->getEntityManager() + ->createQuery('DELETE FROM Wallabag\CoreBundle\Entity\Entry e WHERE e.user = :userId') + ->setParameter('userId', $userId) + ->execute(); + } } diff --git a/src/Wallabag/CoreBundle/Repository/TagRepository.php b/src/Wallabag/CoreBundle/Repository/TagRepository.php index e76878d4..81445989 100644 --- a/src/Wallabag/CoreBundle/Repository/TagRepository.php +++ b/src/Wallabag/CoreBundle/Repository/TagRepository.php @@ -34,6 +34,9 @@ class TagRepository extends EntityRepository /** * Find all tags per user. + * Instead of just left joined on the Entry table, we select only id and group by id to avoid tag multiplication in results. + * Once we have all tags id, we can safely request them one by one. + * This'll still be fastest than the previous query. * * @param int $userId * @@ -41,15 +44,20 @@ class TagRepository extends EntityRepository */ public function findAllTags($userId) { - return $this->createQueryBuilder('t') - ->select('t.slug', 't.label', 't.id') + $ids = $this->createQueryBuilder('t') + ->select('t.id') ->leftJoin('t.entries', 'e') ->where('e.user = :userId')->setParameter('userId', $userId) - ->groupBy('t.slug') - ->addGroupBy('t.label') - ->addGroupBy('t.id') + ->groupBy('t.id') ->getQuery() ->getArrayResult(); + + $tags = []; + foreach ($ids as $id) { + $tags[] = $this->find($id); + } + + return $tags; } /** diff --git a/src/Wallabag/CoreBundle/Resources/config/parameters.yml b/src/Wallabag/CoreBundle/Resources/config/parameters.yml index 6068e84c..52ac90fd 100644 --- a/src/Wallabag/CoreBundle/Resources/config/parameters.yml +++ b/src/Wallabag/CoreBundle/Resources/config/parameters.yml @@ -1,8 +1,9 @@ parameters: addons_url: firefox: https://addons.mozilla.org/firefox/addon/wallabag-v2/ - chrome: https://chrome.google.com/webstore/detail/wallabagit/peehlcgckcnclnjlndmoddifcicdnabm + chrome: https://chrome.google.com/webstore/detail/wallabagger/gbmgphmejlcoihgedabhgjdkcahacjlj + opera: https://addons.opera.com/en/extensions/details/wallabagger/?display=en f_droid: https://f-droid.org/app/fr.gaulupeau.apps.InThePoche google_play: https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche - ios: https://itunes.apple.com/app/wallabag/id828331015?mt=8 + ios: https://itunes.apple.com/app/wallabag-2/id1170800946?mt=8 windows: https://www.microsoft.com/store/apps/wallabag/9nblggh11646 diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml index ed66d2be..bcf0c9ca 100644 --- a/src/Wallabag/CoreBundle/Resources/config/services.yml +++ b/src/Wallabag/CoreBundle/Resources/config/services.yml @@ -30,7 +30,7 @@ services: - "@doctrine" wallabag_core.subscriber.table_prefix: - class: Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber + class: Wallabag\CoreBundle\Event\Subscriber\TablePrefixSubscriber arguments: - "%database_table_prefix%" tags: @@ -41,11 +41,44 @@ services: arguments: - error_message: '%wallabag_core.fetching_error_message%' + - "@wallabag_core.guzzle.http_client" + - "@wallabag_core.graby.config_builder" calls: - [ setLogger, [ "@logger" ] ] tags: - { name: monolog.logger, channel: graby } + wallabag_core.graby.config_builder: + class: Graby\SiteConfig\ConfigBuilder + arguments: + - {} + - "@logger" + + wallabag_core.guzzle.http_client: + class: GuzzleHttp\ClientInterface + factory: ["@wallabag_core.guzzle.http_client_factory", buildHttpClient] + + wallabag_core.guzzle_authenticator.config_builder: + class: Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder + arguments: + - "@wallabag_core.graby.config_builder" + - "%sites_credentials%" + + # service alias override + bd_guzzle_site_authenticator.site_config_builder: + alias: wallabag_core.guzzle_authenticator.config_builder + + wallabag_core.guzzle.http_client_factory: + class: Wallabag\CoreBundle\Helper\HttpClientFactory + arguments: + - "@bd_guzzle_site_authenticator.authenticator_subscriber" + - "@wallabag_core.guzzle.cookie_jar" + - '@=service(''craue_config'').get(''restricted_access'')' + + wallabag_core.guzzle.cookie_jar: + class: GuzzleHttp\Cookie\FileCookieJar + arguments: ["%kernel.cache_dir%/cookiejar.json"] + wallabag_core.content_proxy: class: Wallabag\CoreBundle\Helper\ContentProxy arguments: @@ -94,6 +127,7 @@ services: class: Wallabag\CoreBundle\Helper\Redirect arguments: - "@router" + - "@security.token_storage" wallabag_core.helper.prepare_pager_for_entries: class: Wallabag\CoreBundle\Helper\PreparePagerForEntries @@ -109,9 +143,38 @@ services: host: '%redis_host%' port: '%redis_port%' path: '%redis_path%' + password: '%redis_password%' wallabag_core.exception_controller: class: Wallabag\CoreBundle\Controller\ExceptionController arguments: - '@twig' - '%kernel.debug%' + + wallabag_core.subscriber.sqlite_cascade_delete: + class: Wallabag\CoreBundle\Event\Subscriber\SQLiteCascadeDeleteSubscriber + arguments: + - "@doctrine" + tags: + - { name: doctrine.event_subscriber } + + wallabag_core.subscriber.download_images: + class: Wallabag\CoreBundle\Event\Subscriber\DownloadImagesSubscriber + arguments: + - "@doctrine.orm.default_entity_manager" + - "@wallabag_core.entry.download_images" + - '@=service(''craue_config'').get(''download_images_enabled'')' + - "@logger" + tags: + - { name: kernel.event_subscriber } + + wallabag_core.entry.download_images: + class: Wallabag\CoreBundle\Helper\DownloadImages + arguments: + - "@wallabag_core.entry.download_images.client" + - "%kernel.root_dir%/../web/assets/images" + - '@=service(''craue_config'').get(''wallabag_url'')' + - "@logger" + + wallabag_core.entry.download_images.client: + class: GuzzleHttp\Client diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index a1bee173..3380edca 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml @@ -70,7 +70,12 @@ config: # 200_word: 'I read ~200 words per minute' # 300_word: 'I read ~300 words per minute' # 400_word: 'I read ~400 words per minute' + action_mark_as_read: + # label: 'Where do you to be redirected after mark an article as read?' + # redirect_homepage: 'To the homepage' + # redirect_current_page: 'To the current page' pocket_consumer_key_label: Brugers nøgle til Pocket for at importere materialer + # android_configuration: Configure your Android application # help_theme: "wallabag is customizable. You can choose your prefered theme here." # help_items_per_page: "You can change the number of articles displayed on each page." # help_reading_speed: "wallabag calculates a reading time for each article. You can define here, thanks to this list, if you are a fast or a slow reader. wallabag will recalculate the reading time for each article." @@ -94,6 +99,18 @@ config: email_label: 'Emailadresse' # twoFactorAuthentication_label: 'Two factor authentication' # help_twoFactorAuthentication: "If you enable 2FA, each time you want to login to wallabag, you'll receive a code by email." + delete: + # title: Delete my account (a.k.a danger zone) + # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. + # confirm: Are you really sure? (THIS CAN'T BE UNDONE) + # button: Delete my account + reset: + # title: Reset area (a.k.a danger zone) + # description: By hiting buttons below you'll have ability to remove some informations from your account. Be aware that these actions are IRREVERSIBLE. + # annotations: Remove ALL annotations + # tags: Remove ALL tags + # entries: Remove ALL entries + # confirm: Are you really really sure? (THIS CAN'T BE UNDONE) form_password: # description: "You can change your password here. Your new password should by at least 8 characters long." old_password_label: 'Gammel adgangskode' @@ -145,6 +162,7 @@ entry: # archived: 'Archived entries' # filtered: 'Filtered entries' # filtered_tags: 'Filtered by tags:' + # filtered_search: 'Filtered by search:' # untagged: 'Untagged entries' list: # number_on_the_page: '{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.' @@ -168,6 +186,7 @@ entry: preview_picture_label: 'Har et vist billede' preview_picture_help: 'ForhÃ¥ndsvis billede' language_label: 'Sprog' + # http_status_label: 'HTTP status' reading_time: label: 'Læsetid i minutter' from: 'fra' @@ -209,6 +228,8 @@ entry: placeholder: 'http://website.com' form_new: url_label: Url + search: + # placeholder: 'What are you looking for?' edit: # page_title: 'Edit an entry' # title_label: 'Title' @@ -252,6 +273,9 @@ about: howto: page_title: 'How-to' # page_description: 'There are several ways to save an article:' + tab_menu: + # add_link: "Add a link" + # shortcuts: "Use shortcuts" top_menu: browser_addons: 'Browserudvidelser' mobile_apps: 'Apps' @@ -261,6 +285,7 @@ howto: browser_addons: firefox: 'Standardudvidelse til Firefox' chrome: 'Chrome-udvidelse' + opera: 'Opera-udvidelse' mobile_apps: android: via_f_droid: 'via F-Droid' @@ -269,6 +294,33 @@ howto: # windows: 'on the Microsoft Store' bookmarklet: description: 'Træk dette link til din bogmærkeliste:' + shortcuts: + # page_description: Here are the shortcuts available in wallabag. + # shortcut: Shortcut + # action: Action + # all_pages_title: Shortcuts available in all pages + # go_unread: Go to unread + # go_starred: Go to starred + # go_archive: Go to archive + # go_all: Go to all entries + # go_tags: Go to tags + # go_config: Go to config + # go_import: Go to import + # go_developers: Go to developers + # go_howto: Go to howto (this page!) + # go_logout: Logout + # list_title: Shortcuts available in listing pages + # search: Display the search form + # article_title: Shortcuts available in entry view + # open_original: Open original URL of the entry + # toggle_favorite: Toggle star status for the entry + # toggle_archive: Toggle read status for the entry + # delete: Delete the entry + # material_title: Shortcuts available with Material theme only + # add_link: Add a new link + # hide_form: Hide the current form (search or new link) + # arrows_navigation: Navigate through articles + # open_article: Display the selected entry quickstart: # page_title: 'Quickstart' @@ -329,6 +381,9 @@ tag: list: # number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.' # see_untagged_entries: 'See untagged entries' + new: + # add: 'Add' + # placeholder: 'You can add several tags, separated by a comma.' import: # page_title: 'Import' @@ -362,6 +417,7 @@ import: # how_to: 'Please select your Readability export and click on the below button to upload and import it.' worker: # enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:" + # download_images_warning: "You enabled downloading images for your articles. Combined with classic import it can take ages to proceed (or maybe failed). We strongly recommend to enable asynchronous import to avoid errors." # firefox: # page_title: 'Import > Firefox' # description: "This importer will import all your Firefox bookmarks. Just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file." @@ -374,6 +430,10 @@ import: # page_title: 'Import > Instapaper' # description: 'This importer will import all your Instapaper articles. On the settings (https://www.instapaper.com/user) page, click on "Download .CSV file" in the "Export" section. A CSV file will be downloaded (like "instapaper-export.csv").' # how_to: 'Please select your Instapaper export and click on the below button to upload and import it.' + pinboard: + # page_title: "Import > Pinboard" + # description: 'This importer will import all your Instapaper articles. On the backup (https://pinboard.in/settings/backup) page, click on "JSON" in the "Bookmarks" section. A JSON file will be downloaded (like "pinboard_export").' + # how_to: 'Please select your Pinboard export and click on the below button to upload and import it.' developer: # page_title: 'Developer' @@ -444,7 +504,6 @@ user: plain_password_label: '????' email_label: 'Emailadresse' # enabled_label: 'Enabled' - # locked_label: 'Locked' # last_login_label: 'Last login' # twofactor_label: Two factor authentication # save: Save @@ -465,8 +524,10 @@ flashes: rss_updated: 'RSS-oplysninger opdateret' # tagging_rules_updated: 'Tagging rules updated' # tagging_rules_deleted: 'Tagging rule deleted' - # user_added: 'User "%username%" added' # rss_token_updated: 'RSS token updated' + # annotations_reset: Annotations reset + # tags_reset: Tags reset + # entries_reset: Entries reset entry: notice: # entry_already_saved: 'Entry already saved on %date%' @@ -496,3 +557,8 @@ flashes: notice: # client_created: 'New client created.' # client_deleted: 'Client deleted' + user: + notice: + # added: 'User "%username%" added' + # updated: 'User "%username%" updated' + # deleted: 'User "%username%" deleted' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index c9625d06..cfa11e82 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml @@ -70,7 +70,12 @@ config: 200_word: 'Ich lese ~200 Wörter pro Minute' 300_word: 'Ich lese ~300 Wörter pro Minute' 400_word: 'Ich lese ~400 Wörter pro Minute' + action_mark_as_read: + label: 'Wohin soll nach dem Gelesenmarkieren eines Artikels weitergeleitet werden?' + redirect_homepage: 'Zur Homepage' + redirect_current_page: 'Zur aktuellen Seite' pocket_consumer_key_label: Consumer-Key für Pocket, um Inhalte zu importieren + android_configuration: Konfiguriere deine Android Application # help_theme: "wallabag is customizable. You can choose your prefered theme here." # help_items_per_page: "You can change the number of articles displayed on each page." # help_reading_speed: "wallabag calculates a reading time for each article. You can define here, thanks to this list, if you are a fast or a slow reader. wallabag will recalculate the reading time for each article." @@ -94,6 +99,18 @@ config: email_label: 'E-Mail-Adresse' twoFactorAuthentication_label: 'Zwei-Faktor-Authentifizierung' # help_twoFactorAuthentication: "If you enable 2FA, each time you want to login to wallabag, you'll receive a code by email." + delete: + title: Lösche mein Konto (a.k.a Gefahrenzone) + description: Wenn du dein Konto löschst, werden ALL deine Artikel, ALL deine Tags, ALL deine Anmerkungen und dein Konto dauerhaft gelöscht (kann NICHT RÜCKGÄNGIG gemacht werden). Du wirst anschließend ausgeloggt. + confirm: Bist du wirklich sicher? (DIES KANN NICHT RÜCKGÄNGIG GEMACHT WERDEN) + button: Lösche mein Konto + reset: + title: Zurücksetzen (a.k.a Gefahrenzone) + description: Beim Nutzen der folgenden Schaltflächenhast du die Möglichkeit, einige Informationen von deinem Konto zu entfernen. Sei dir bewusst, dass dies NICHT RÜCKGÄNGIG zu machen ist. + annotations: Entferne ALLE Annotationen + tags: Entferne ALLE Tags + entries: Entferne ALLE Einträge + confirm: Bist du wirklich sicher? (DIES KANN NICHT RÜCKGÄNGIG GEMACHT WERDEN) form_password: # description: "You can change your password here. Your new password should by at least 8 characters long." old_password_label: 'Altes Kennwort' @@ -145,6 +162,7 @@ entry: archived: 'Archivierte Einträge' filtered: 'Gefilterte Einträge' filtered_tags: 'Gefiltert nach Tags:' + # filtered_search: 'Filtered by search:' untagged: 'Nicht getaggte Einträge' list: number_on_the_page: '{0} Es gibt keine Einträge.|{1} Es gibt einen Eintrag.|]1,Inf[ Es gibt %count% Einträge.' @@ -168,6 +186,7 @@ entry: preview_picture_label: 'Vorschaubild vorhanden' preview_picture_help: 'Vorschaubild' language_label: 'Sprache' + # http_status_label: 'HTTP status' reading_time: label: 'Lesezeit in Minuten' from: 'von' @@ -209,6 +228,8 @@ entry: placeholder: 'https://website.de' form_new: url_label: URL + search: + # placeholder: 'What are you looking for?' edit: page_title: 'Eintrag bearbeiten' title_label: 'Titel' @@ -252,6 +273,9 @@ about: howto: page_title: 'How-To' page_description: 'Es gibt mehrere Möglichkeiten, einen Artikel zu speichern:' + tab_menu: + # add_link: "Add a link" + # shortcuts: "Use shortcuts" top_menu: browser_addons: 'Browser-Erweiterungen' mobile_apps: 'Apps' @@ -261,6 +285,7 @@ howto: browser_addons: firefox: 'Firefox-Erweiterung' chrome: 'Chrome-Erweiterung' + opera: 'Opera-Erweiterung' mobile_apps: android: via_f_droid: 'via F-Droid' @@ -269,6 +294,33 @@ howto: windows: 'im Microsoft-Store' bookmarklet: description: 'Ziehe diesen Link in deine Lesezeichenleiste:' + shortcuts: + # page_description: Here are the shortcuts available in wallabag. + # shortcut: Shortcut + # action: Action + # all_pages_title: Shortcuts available in all pages + # go_unread: Go to unread + # go_starred: Go to starred + # go_archive: Go to archive + # go_all: Go to all entries + # go_tags: Go to tags + # go_config: Go to config + # go_import: Go to import + # go_developers: Go to developers + # go_howto: Go to howto (this page!) + # go_logout: Logout + # list_title: Shortcuts available in listing pages + # search: Display the search form + # article_title: Shortcuts available in entry view + # open_original: Open original URL of the entry + # toggle_favorite: Toggle star status for the entry + # toggle_archive: Toggle read status for the entry + # delete: Delete the entry + # material_title: Shortcuts available with Material theme only + # add_link: Add a new link + # hide_form: Hide the current form (search or new link) + # arrows_navigation: Navigate through articles + # open_article: Display the selected entry quickstart: page_title: 'Schnelleinstieg' @@ -329,6 +381,9 @@ tag: list: number_on_the_page: '{0} Es gibt keine Tags.|{1} Es gibt einen Tag.|]1,Inf[ Es gibt %count% Tags.' see_untagged_entries: 'Zeige nicht getaggte Einträge' + new: + # add: 'Add' + # placeholder: 'You can add several tags, separated by a comma.' import: page_title: 'Importieren' @@ -362,6 +417,7 @@ import: how_to: 'Bitte wähle deinen Readability Export aus und klicke den unteren Button für das Hochladen und Importieren dessen.' worker: enabled: "Der Import erfolgt asynchron. Sobald der Import gestartet ist, wird diese Aufgabe extern abgearbeitet. Der aktuelle Service dafür ist:" + download_images_warning: "Du hast das Herunterladen von Bildern für deine Artikel aktiviert. Verbunden mit dem klassischen Import kann es ewig dauern fortzufahren (oder sogar fehlschlagen). Wir empfehlen den asynchronen Import zu aktivieren, um Fehler zu vermeiden." firefox: page_title: 'Aus Firefox importieren' description: "Dieser Import wird all deine Lesezeichen aus Firefox importieren. Gehe zu deinen Lesezeichen (Strg+Shift+O), dann auf \"Importen und Sichern\", wähle \"Sichern…\". Du erhälst eine .json Datei." @@ -374,6 +430,10 @@ import: page_title: 'Aus Instapaper importieren' description: 'Dieser Import wird all deine Instapaper Artikel importieren. Auf der Einstellungsseite (https://www.instapaper.com/user) klickst du auf "Download .CSV Datei" in dem Abschnitt "Export". Eine CSV Datei wird heruntergeladen (z.B. "instapaper-export.csv").' how_to: "Bitte wähle deine Instapaper Sicherungsdatei aus und klicke den nachfolgenden Button zum Importieren." + pinboard: + page_title: "Aus Pinboard importieren" + description: 'Dieser Import wird all deine Pinboard Artikel importieren. Auf der Seite Backup (https://pinboard.in/settings/backup) klickst du auf "JSON" in dem Abschnitt "Lesezeichen". Eine JSON Datei wird dann heruntergeladen (z.B. "pinboard_export").' + how_to: 'Bitte wähle deinen Pinboard Export aus und klicke den nachfolgenden Button zum Importieren.' developer: page_title: 'Entwickler' @@ -444,7 +504,6 @@ user: plain_password_label: '????' email_label: 'E-Mail-Adresse' enabled_label: 'Aktiviert' - locked_label: 'Gesperrt' last_login_label: 'Letzter Login' twofactor_label: Zwei-Faktor-Authentifizierung save: Speichern @@ -453,7 +512,7 @@ user: back_to_list: Zurück zur Liste error: - # page_title: An error occurred + page_title: Ein Fehler ist aufgetreten flashes: config: @@ -465,8 +524,10 @@ flashes: rss_updated: 'RSS-Informationen aktualisiert' tagging_rules_updated: 'Tagging-Regeln aktualisiert' tagging_rules_deleted: 'Tagging-Regel gelöscht' - user_added: 'Benutzer "%username%" erstellt' rss_token_updated: 'RSS-Token aktualisiert' + annotations_reset: Anmerkungen zurücksetzen + tags_reset: Tags zurücksetzen + entries_reset: Einträge zurücksetzen entry: notice: entry_already_saved: 'Eintrag bereits am %date% gespeichert' @@ -496,3 +557,8 @@ flashes: notice: client_created: 'Neuer Client erstellt.' client_deleted: 'Client gelöscht' + user: + notice: + added: 'Benutzer "%username%" hinzugefügt' + updated: 'Benutzer "%username%" aktualisiert' + deleted: 'Benutzer "%username%" gelöscht' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index 139cdc24..673a0a16 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml @@ -70,7 +70,12 @@ config: 200_word: 'I read ~200 words per minute' 300_word: 'I read ~300 words per minute' 400_word: 'I read ~400 words per minute' + action_mark_as_read: + label: 'Where do you want to be redirected after mark an article as read?' + redirect_homepage: 'To the homepage' + redirect_current_page: 'To the current page' pocket_consumer_key_label: Consumer key for Pocket to import contents + android_configuration: Configure your Android application help_theme: "wallabag is customizable. You can choose your prefered theme here." help_items_per_page: "You can change the number of articles displayed on each page." help_reading_speed: "wallabag calculates a reading time for each article. You can define here, thanks to this list, if you are a fast or a slow reader. wallabag will recalculate the reading time for each article." @@ -94,6 +99,18 @@ config: email_label: 'Email' twoFactorAuthentication_label: 'Two factor authentication' help_twoFactorAuthentication: "If you enable 2FA, each time you want to login to wallabag, you'll receive a code by email." + delete: + title: Delete my account (a.k.a danger zone) + description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. + confirm: Are you really sure? (THIS CAN'T BE UNDONE) + button: Delete my account + reset: + title: Reset area (a.k.a danger zone) + description: By hitting buttons below you'll have ability to remove some information from your account. Be aware that these actions are IRREVERSIBLE. + annotations: Remove ALL annotations + tags: Remove ALL tags + entries: Remove ALL entries + confirm: Are you really sure? (THIS CAN'T BE UNDONE) form_password: description: "You can change your password here. Your new password should by at least 8 characters long." old_password_label: 'Current password' @@ -145,6 +162,7 @@ entry: archived: 'Archived entries' filtered: 'Filtered entries' filtered_tags: 'Filtered by tags:' + filtered_search: 'Filtered by search:' untagged: 'Untagged entries' list: number_on_the_page: '{0} There are no entries.|{1} There is one entry.|]1,Inf[ There are %count% entries.' @@ -168,6 +186,7 @@ entry: preview_picture_label: 'Has a preview picture' preview_picture_help: 'Preview picture' language_label: 'Language' + http_status_label: 'HTTP status' reading_time: label: 'Reading time in minutes' from: 'from' @@ -209,6 +228,8 @@ entry: placeholder: 'http://website.com' form_new: url_label: Url + search: + placeholder: 'What are you looking for?' edit: page_title: 'Edit an entry' title_label: 'Title' @@ -251,6 +272,9 @@ about: howto: page_title: 'How to' + tab_menu: + add_link: "Add a link" + shortcuts: "Use shortcuts" page_description: 'There are several ways to save an article:' top_menu: browser_addons: 'Browser addons' @@ -259,8 +283,9 @@ howto: form: description: 'Thanks to this form' browser_addons: - firefox: 'Standard Firefox Add-On' - chrome: 'Chrome Extension' + firefox: 'Firefox addon' + chrome: 'Chrome addon' + opera: 'Opera addon' mobile_apps: android: via_f_droid: 'via F-Droid' @@ -269,6 +294,33 @@ howto: windows: 'on the Microsoft Store' bookmarklet: description: 'Drag & drop this link to your bookmarks bar:' + shortcuts: + page_description: Here are the shortcuts available in wallabag. + shortcut: Shortcut + action: Action + all_pages_title: Shortcuts available in all pages + go_unread: Go to unread + go_starred: Go to starred + go_archive: Go to archive + go_all: Go to all entries + go_tags: Go to tags + go_config: Go to config + go_import: Go to import + go_developers: Go to developers + go_howto: Go to howto (this page!) + go_logout: Logout + list_title: Shortcuts available in listing pages + search: Display the search form + article_title: Shortcuts available in entry view + open_original: Open original URL of the entry + toggle_favorite: Toggle star status for the entry + toggle_archive: Toggle read status for the entry + delete: Delete the entry + material_title: Shortcuts available with Material theme only + add_link: Add a new link + hide_form: Hide the current form (search or new link) + arrows_navigation: Navigate through articles + open_article: Display the selected entry quickstart: page_title: 'Quickstart' @@ -329,6 +381,9 @@ tag: list: number_on_the_page: '{0} There are no tags.|{1} There is one tag.|]1,Inf[ There are %count% tags.' see_untagged_entries: 'See untagged entries' + new: + add: 'Add' + placeholder: 'You can add several tags, separated by a comma.' import: page_title: 'Import' @@ -362,6 +417,7 @@ import: how_to: 'Please select your Readability export and click on the below button to upload and import it.' worker: enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:" + download_images_warning: "You enabled downloading images for your articles. Combined with classic import it can take ages to proceed (or maybe failed). We strongly recommend to enable asynchronous import to avoid errors." firefox: page_title: 'Import > Firefox' description: "This importer will import all your Firefox bookmarks. Just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file." @@ -374,6 +430,10 @@ import: page_title: 'Import > Instapaper' description: 'This importer will import all your Instapaper articles. On the settings (https://www.instapaper.com/user) page, click on "Download .CSV file" in the "Export" section. A CSV file will be downloaded (like "instapaper-export.csv").' how_to: 'Please select your Instapaper export and click on the below button to upload and import it.' + pinboard: + page_title: "Import > Pinboard" + description: 'This importer will import all your Pinboard articles. On the backup (https://pinboard.in/settings/backup) page, click on "JSON" in the "Bookmarks" section. A JSON file will be downloaded (like "pinboard_export").' + how_to: 'Please select your Pinboard export and click on the below button to upload and import it.' developer: page_title: 'Developer' @@ -444,7 +504,6 @@ user: plain_password_label: '????' email_label: 'Email' enabled_label: 'Enabled' - locked_label: 'Locked' last_login_label: 'Last login' twofactor_label: Two factor authentication save: Save @@ -466,6 +525,9 @@ flashes: tagging_rules_updated: 'Tagging rules updated' tagging_rules_deleted: 'Tagging rule deleted' rss_token_updated: 'RSS token updated' + annotations_reset: Annotations reset + tags_reset: Tags reset + entries_reset: Entries reset entry: notice: entry_already_saved: 'Entry already saved on %date%' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index 70e64bec..d08edd6e 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml @@ -70,7 +70,12 @@ config: 200_word: 'Leo ~200 palabras por minuto' 300_word: 'Leo ~300 palabras por minuto' 400_word: 'Leo ~400 palabras por minuto' + action_mark_as_read: + # label: 'Where do you to be redirected after mark an article as read?' + # redirect_homepage: 'To the homepage' + # redirect_current_page: 'To the current page' # pocket_consumer_key_label: Consumer key for Pocket to import contents + # android_configuration: Configure your Android application # help_theme: "wallabag is customizable. You can choose your prefered theme here." # help_items_per_page: "You can change the number of articles displayed on each page." # help_reading_speed: "wallabag calculates a reading time for each article. You can define here, thanks to this list, if you are a fast or a slow reader. wallabag will recalculate the reading time for each article." @@ -94,6 +99,18 @@ config: email_label: 'Direccion e-mail' twoFactorAuthentication_label: 'Autentificación de dos factores' # help_twoFactorAuthentication: "If you enable 2FA, each time you want to login to wallabag, you'll receive a code by email." + delete: + # title: Delete my account (a.k.a danger zone) + # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. + # confirm: Are you really sure? (THIS CAN'T BE UNDONE) + # button: Delete my account + reset: + # title: Reset area (a.k.a danger zone) + # description: By hiting buttons below you'll have ability to remove some informations from your account. Be aware that these actions are IRREVERSIBLE. + # annotations: Remove ALL annotations + # tags: Remove ALL tags + # entries: Remove ALL entries + # confirm: Are you really really sure? (THIS CAN'T BE UNDONE) form_password: # description: "You can change your password here. Your new password should by at least 8 characters long." old_password_label: 'Contraseña actual' @@ -145,6 +162,7 @@ entry: archived: 'Artículos archivados' filtered: 'Artículos filtrados' # filtered_tags: 'Filtered by tags:' + # filtered_search: 'Filtered by search:' # untagged: 'Untagged entries' list: number_on_the_page: '{0} No hay artículos.|{1} Hay un artículo.|]1,Inf[ Hay %count% artículos.' @@ -168,6 +186,7 @@ entry: preview_picture_label: 'Hay una foto' preview_picture_help: 'Foto de preview' language_label: 'Idioma' + # http_status_label: 'HTTP status' reading_time: label: 'Duración de lectura en minutos' from: 'de' @@ -209,6 +228,8 @@ entry: placeholder: 'http://website.com' form_new: url_label: Url + search: + # placeholder: 'What are you looking for?' edit: page_title: 'Editar un artículo' title_label: 'Título' @@ -252,6 +273,9 @@ about: howto: page_title: 'Ayuda' page_description: 'Hay muchas maneras para guardar un artículo:' + tab_menu: + # add_link: "Add a link" + # shortcuts: "Use shortcuts" top_menu: browser_addons: 'Extensiones de navigador' mobile_apps: 'Aplicaciones para smartphone' @@ -261,6 +285,7 @@ howto: browser_addons: firefox: 'Extensión Firefox' chrome: 'Extensión Chrome' + opera: 'Extensión Opera' mobile_apps: android: via_f_droid: 'via F-Droid' @@ -269,6 +294,33 @@ howto: windows: 'por la tienda de Microsoft' bookmarklet: description: 'Desplazar y soltar este link en la barra de marcadores :' + shortcuts: + # page_description: Here are the shortcuts available in wallabag. + # shortcut: Shortcut + # action: Action + # all_pages_title: Shortcuts available in all pages + # go_unread: Go to unread + # go_starred: Go to starred + # go_archive: Go to archive + # go_all: Go to all entries + # go_tags: Go to tags + # go_config: Go to config + # go_import: Go to import + # go_developers: Go to developers + # go_howto: Go to howto (this page!) + # go_logout: Logout + # list_title: Shortcuts available in listing pages + # search: Display the search form + # article_title: Shortcuts available in entry view + # open_original: Open original URL of the entry + # toggle_favorite: Toggle star status for the entry + # toggle_archive: Toggle read status for the entry + # delete: Delete the entry + # material_title: Shortcuts available with Material theme only + # add_link: Add a new link + # hide_form: Hide the current form (search or new link) + # arrows_navigation: Navigate through articles + # open_article: Display the selected entry quickstart: page_title: 'Comienzo rápido' @@ -329,6 +381,9 @@ tag: list: number_on_the_page: '{0} No hay ninguna etiqueta.|{1} Hay una etiqueta.|]1,Inf[ Hay %count% etiquetas.' # see_untagged_entries: 'See untagged entries' + new: + # add: 'Add' + # placeholder: 'You can add several tags, separated by a comma.' import: page_title: 'Importar' @@ -362,6 +417,7 @@ import: # how_to: 'Please select your Readability export and click on the below button to upload and import it.' worker: # enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:" + # download_images_warning: "You enabled downloading images for your articles. Combined with classic import it can take ages to proceed (or maybe failed). We strongly recommend to enable asynchronous import to avoid errors." firefox: page_title: 'Importar > Firefox' # description: "This importer will import all your Firefox bookmarks. Just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file." @@ -374,6 +430,10 @@ import: page_title: 'Importar > Instapaper' # description: 'This importer will import all your Instapaper articles. On the settings (https://www.instapaper.com/user) page, click on "Download .CSV file" in the "Export" section. A CSV file will be downloaded (like "instapaper-export.csv").' # how_to: 'Please select your Instapaper export and click on the below button to upload and import it.' + pinboard: + page_title: "Importar > Pinboard" + # description: 'This importer will import all your Instapaper articles. On the backup (https://pinboard.in/settings/backup) page, click on "JSON" in the "Bookmarks" section. A JSON file will be downloaded (like "pinboard_export").' + # how_to: 'Please select your Pinboard export and click on the below button to upload and import it.' developer: page_title: 'Promotor' @@ -444,7 +504,6 @@ user: plain_password_label: '????' email_label: 'Email' # enabled_label: 'Enabled' - # locked_label: 'Locked' # last_login_label: 'Last login' # twofactor_label: Two factor authentication # save: Save @@ -465,8 +524,10 @@ flashes: rss_updated: 'La configuración de los feeds RSS ha sido actualizada' tagging_rules_updated: 'Regla de etiquetado borrada' tagging_rules_deleted: 'Regla de etiquetado actualizada' - user_added: 'Usuario "%username%" añadido' rss_token_updated: 'RSS token actualizado' + # annotations_reset: Annotations reset + # tags_reset: Tags reset + # entries_reset: Entries reset entry: notice: entry_already_saved: 'Entrada ya guardada por %fecha%' @@ -496,3 +557,8 @@ flashes: notice: client_created: 'Nuevo cliente creado.' client_deleted: 'Cliente suprimido' + user: + notice: + # added: 'User "%username%" added' + # updated: 'User "%username%" updated' + # deleted: 'User "%username%" deleted' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index 75359901..ad6144b8 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml @@ -70,7 +70,12 @@ config: 200_word: 'من تقریباً Û²Û°Û° واژه را در دقیقه می‌خوانم' 300_word: 'من تقریباً Û³Û°Û° واژه را در دقیقه می‌خوانم' 400_word: 'من تقریباً Û´Û°Û° واژه را در دقیقه می‌خوانم' + action_mark_as_read: + # label: 'Where do you to be redirected after mark an article as read?' + # redirect_homepage: 'To the homepage' + # redirect_current_page: 'To the current page' pocket_consumer_key_label: کلید کاربری Pocket برای درون‌ریزی مطالب + # android_configuration: Configure your Android application # help_theme: "wallabag is customizable. You can choose your prefered theme here." # help_items_per_page: "You can change the number of articles displayed on each page." # help_reading_speed: "wallabag calculates a reading time for each article. You can define here, thanks to this list, if you are a fast or a slow reader. wallabag will recalculate the reading time for each article." @@ -94,6 +99,18 @@ config: email_label: 'نشانی ایمیل' twoFactorAuthentication_label: 'تأیید ۲مرحله‌ای' # help_twoFactorAuthentication: "If you enable 2FA, each time you want to login to wallabag, you'll receive a code by email." + delete: + # title: Delete my account (a.k.a danger zone) + # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. + # confirm: Are you really sure? (THIS CAN'T BE UNDONE) + # button: Delete my account + reset: + # title: Reset area (a.k.a danger zone) + # description: By hiting buttons below you'll have ability to remove some informations from your account. Be aware that these actions are IRREVERSIBLE. + # annotations: Remove ALL annotations + # tags: Remove ALL tags + # entries: Remove ALL entries + # confirm: Are you really really sure? (THIS CAN'T BE UNDONE) form_password: # description: "You can change your password here. Your new password should by at least 8 characters long." old_password_label: 'رمز قدیمی' @@ -145,6 +162,7 @@ entry: archived: 'مقاله‌های بایگانی‌شده' filtered: 'مقاله‌های فیلترشده' # filtered_tags: 'Filtered by tags:' + # filtered_search: 'Filtered by search:' # untagged: 'Untagged entries' list: number_on_the_page: '{0} هیج مقاله‌ای نیست.|{1} یک مقاله هست.|]1,Inf[ %count% مقاله هست.' @@ -168,6 +186,7 @@ entry: preview_picture_label: 'دارای عکس پیش‌نمایش' preview_picture_help: 'پیش‌نمایش عکس' language_label: 'زبان' + # http_status_label: 'HTTP status' reading_time: label: 'زمان خواندن به دقیقه' from: 'از' @@ -209,6 +228,8 @@ entry: placeholder: 'http://website.com' form_new: url_label: نشانی + search: + # placeholder: 'What are you looking for?' edit: page_title: 'ویرایش مقاله' title_label: 'عنوان' @@ -252,6 +273,9 @@ about: howto: page_title: 'خودآموز' page_description: 'راه‌های زیادی برای ذخیرهٔ مقاله‌ها هست:' + tab_menu: + # add_link: "Add a link" + # shortcuts: "Use shortcuts" top_menu: browser_addons: 'افزونه برای مرورگرها' mobile_apps: 'برنامه‌های موبایل' @@ -261,6 +285,7 @@ howto: browser_addons: firefox: 'افزونهٔ فایرفاکس' chrome: 'افزونهٔ کروم' + # opera: 'Opera addon' mobile_apps: android: via_f_droid: 'از راه F-Droid' @@ -269,6 +294,33 @@ howto: windows: 'از راه Microsoft Store' bookmarklet: description: 'این پیوند را به نوار بوک‌مارک مرورگرتان بکشید:' + shortcuts: + # page_description: Here are the shortcuts available in wallabag. + # shortcut: Shortcut + # action: Action + # all_pages_title: Shortcuts available in all pages + # go_unread: Go to unread + # go_starred: Go to starred + # go_archive: Go to archive + # go_all: Go to all entries + # go_tags: Go to tags + # go_config: Go to config + # go_import: Go to import + # go_developers: Go to developers + # go_howto: Go to howto (this page!) + # go_logout: Logout + # list_title: Shortcuts available in listing pages + # search: Display the search form + # article_title: Shortcuts available in entry view + # open_original: Open original URL of the entry + # toggle_favorite: Toggle star status for the entry + # toggle_archive: Toggle read status for the entry + # delete: Delete the entry + # material_title: Shortcuts available with Material theme only + # add_link: Add a new link + # hide_form: Hide the current form (search or new link) + # arrows_navigation: Navigate through articles + # open_article: Display the selected entry quickstart: page_title: 'Quickstart' @@ -279,6 +331,7 @@ quickstart: paragraph_2: 'ادامه دهید!' configure: title: 'برنامه را تنظیم کنید' + # description: 'In order to have an application which suits you, have a look into the configuration of wallabag.' language: 'زبان و نمای برنامه را تغییر دهید' rss: 'خوراک آر-اس-اس را فعال کنید' tagging_rules: 'قانون‌های برچسب‌گذاری خودکار مقاله‌هایتان را تعریف کنید' @@ -328,6 +381,9 @@ tag: list: number_on_the_page: '{0} هیچ برچسبی نیست.|{1} یک برچسب هست.|]1,Inf[ %count% برچسب هست.' # see_untagged_entries: 'See untagged entries' + new: + # add: 'Add' + # placeholder: 'You can add several tags, separated by a comma.' import: page_title: 'درون‌ریزی' @@ -361,6 +417,7 @@ import: # how_to: 'Please select your Readability export and click on the below button to upload and import it.' worker: # enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:" + # download_images_warning: "You enabled downloading images for your articles. Combined with classic import it can take ages to proceed (or maybe failed). We strongly recommend to enable asynchronous import to avoid errors." firefox: page_title: 'درون‌ریزی > Firefox' # description: "This importer will import all your Firefox bookmarks. Just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file." @@ -373,6 +430,10 @@ import: page_title: 'درون‌ریزی > Instapaper' # description: 'This importer will import all your Instapaper articles. On the settings (https://www.instapaper.com/user) page, click on "Download .CSV file" in the "Export" section. A CSV file will be downloaded (like "instapaper-export.csv").' # how_to: 'Please select your Instapaper export and click on the below button to upload and import it.' + pinboard: + # page_title: "Import > Pinboard" + # description: 'This importer will import all your Instapaper articles. On the backup (https://pinboard.in/settings/backup) page, click on "JSON" in the "Bookmarks" section. A JSON file will be downloaded (like "pinboard_export").' + # how_to: 'Please select your Pinboard export and click on the below button to upload and import it.' developer: # page_title: 'Developer' @@ -443,7 +504,6 @@ user: plain_password_label: '????' email_label: 'نشانی ایمیل' # enabled_label: 'Enabled' - # locked_label: 'Locked' # last_login_label: 'Last login' # twofactor_label: Two factor authentication # save: Save @@ -464,8 +524,10 @@ flashes: rss_updated: 'اطلاعات آر-اس-اس به‌روز شد' tagging_rules_updated: 'برچسب‌گذاری خودکار به‌روز شد' tagging_rules_deleted: 'قانون برچسب‌گذاری پاک شد' - user_added: 'کابر "%username%" افزوده شد' rss_token_updated: 'کد آر-اس-اس به‌روز شد' + # annotations_reset: Annotations reset + # tags_reset: Tags reset + # entries_reset: Entries reset entry: notice: entry_already_saved: 'این مقاله در تاریخ %date% ذخیره شده بود' @@ -495,3 +557,8 @@ flashes: notice: # client_created: 'New client created.' # client_deleted: 'Client deleted' + user: + notice: + # added: 'User "%username%" added' + # updated: 'User "%username%" updated' + # deleted: 'User "%username%" deleted' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index f2c9d8db..f7371d3e 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml @@ -70,7 +70,12 @@ config: 200_word: "Je lis environ 200 mots par minute" 300_word: "Je lis environ 300 mots par minute" 400_word: "Je lis environ 400 mots par minute" + action_mark_as_read: + label: 'Où souhaitez-vous être redirigé après avoir marqué un article comme lu ?' + redirect_homepage: "À la page d'accueil" + redirect_current_page: 'À la page courante' pocket_consumer_key_label: Clé d’authentification Pocket pour importer les données + android_configuration: Configurez votre application Android help_theme: "L'affichage de wallabag est personnalisable. C'est ici que vous choisissez le thème que vous préférez." help_items_per_page: "Vous pouvez définir le nombre d'articles affichés sur chaque page." help_reading_speed: "wallabag calcule une durée de lecture pour chaque article. Vous pouvez définir ici, grâce à cette liste déroulante, si vous lisez plus ou moins vite. wallabag recalculera la durée de lecture de chaque article." @@ -94,6 +99,18 @@ config: email_label: "Adresse courriel" twoFactorAuthentication_label: "Double authentification" help_twoFactorAuthentication: "Si vous activez 2FA, à chaque tentative de connexion à wallabag, vous recevrez un code par email." + delete: + title: Supprimer mon compte (attention danger !) + description: Si vous confirmez la suppression de votre compte, TOUS les articles, TOUS les tags, TOUTES les annotations et votre compte seront DÉFINITIVEMENT supprimé (c'est IRRÉVERSIBLE). Vous serez ensuite déconnecté. + confirm: Vous êtes vraiment sûr ? (C'EST IRRÉVERSIBLE) + button: 'Supprimer mon compte' + reset: + title: Réinitialisation (attention danger !) + description: En cliquant sur les boutons ci-dessous vous avez la possibilité de supprimer certaines informations de votre compte. Attention, ces actions sont IRRÉVERSIBLES ! + annotations: Supprimer TOUTES les annotations + tags: Supprimer TOUS les tags + entries: Supprimer TOUS les articles + confirm: Êtes-vous vraiment vraiment sûr ? (C'EST IRRÉVERSIBLE) form_password: description: "Vous pouvez changer ici votre mot de passe. Le mot de passe doit contenir au moins 8 caractères." old_password_label: "Mot de passe actuel" @@ -145,6 +162,7 @@ entry: archived: "Articles lus" filtered: "Articles filtrés" filtered_tags: "Articles filtrés par tags :" + filtered_search: 'Articles filtrés par recherche :' untagged: "Article sans tag" list: number_on_the_page: "{0} Il n’y a pas d’articles.|{1} Il y a un article.|]1,Inf[ Il y a %count% articles." @@ -168,6 +186,7 @@ entry: preview_picture_label: "A une photo" preview_picture_help: "Photo" language_label: "Langue" + http_status_label: 'Statut HTTP' reading_time: label: "Durée de lecture en minutes" from: "de" @@ -209,6 +228,8 @@ entry: placeholder: "http://website.com" form_new: url_label: "Adresse" + search: + placeholder: "Que recherchez-vous ?" edit: page_title: "Éditer un article" title_label: "Titre" @@ -251,6 +272,9 @@ about: howto: page_title: "Aide" + tab_menu: + add_link: "Ajouter un lien" + shortcuts: "Utiliser les raccourcis" page_description: "Il y a plusieurs façon d’enregistrer un article :" top_menu: browser_addons: "Extensions de navigateur" @@ -261,6 +285,7 @@ howto: browser_addons: firefox: "Extension Firefox" chrome: "Extension Chrome" + opera: "Extension Opera" mobile_apps: android: via_f_droid: "via F-Droid" @@ -269,6 +294,33 @@ howto: windows: "sur Microsoft Store" bookmarklet: description: "Glissez et déposez ce lien dans votre barre de favoris :" + shortcuts: + page_description: Voici les raccourcis disponibles dans wallabag. + shortcut: Raccourci + action: Action + all_pages_title: Raccourcis disponibles dans toutes les pages + go_unread: Afficher les articles non lus + go_starred: Afficher les articles favoris + go_archive: Afficher les articles lus + go_all: Afficher tous les articles + go_tags: Afficher les tags + go_config: Aller à la configuration + go_import: Aller aux imports + go_developers: Aller à la section Développeurs + go_howto: Afficher l'aide (cette page !) + go_logout: Se déconnecter + list_title: Raccourcis disponibles dans les pages de liste + search: Afficher le formulaire de recherche + article_title: Raccourcis disponibles quand on affiche un article + open_original: Ouvrir l'URL originale de l'article + toggle_favorite: Changer le statut Favori de l'article + toggle_archive: Changer le status Lu de l'article + delete: Supprimer l'article + material_title: Raccourcis disponibles avec le thème Material uniquement + add_link: Ajouter un nouvel article + hide_form: Masquer le formulaire courant (recherche ou nouvel article) + arrows_navigation: Naviguer à travers les articles + open_article: Afficher l'article sélectionné quickstart: page_title: "Pour bien débuter" @@ -329,6 +381,9 @@ tag: list: number_on_the_page: "{0} Il n’y a pas de tag.|{1} Il y a un tag.|]1,Inf[ Il y a %count% tags." see_untagged_entries: "Voir les articles sans tag" + new: + add: 'Ajouter' + placeholder: 'Vous pouvez ajouter plusieurs tags, séparés par une virgule.' import: page_title: "Importer" @@ -362,6 +417,7 @@ import: how_to: "Choisissez le fichier de votre export Readability et cliquez sur le bouton ci-dessous pour l’importer." worker: enabled: "Les imports sont asynchrones. Une fois l’import commencé un worker externe traitera les messages un par un. Le service activé est :" + download_images_warning: "Vous avez configuré le téléchagement des images pour vos articles. Combiné à l'import classique, cette opération peut être très très longue (voire échouer). Nous vous conseillons vivement d'activer les imports asynchrones." firefox: page_title: "Import > Firefox" description: "Cet outil va vous permettre d’importer tous vos marques-pages de Firefox. Ouvrez le panneau des marques-pages (Ctrl+Maj+O), puis dans « Importation et sauvegarde », choisissez « Sauvegarde... ». Vous allez récupérer un fichier .json.

" @@ -374,6 +430,10 @@ import: page_title: "Import > Instapaper" description: "Sur la page des paramètres (https://www.instapaper.com/user), cliquez sur « Download .CSV file » dans la section « Export ». Un fichier CSV sera téléchargé (« instapaper-export.csv »)." how_to: "Choisissez le fichier de votre export Instapaper et cliquez sur le bouton ci-dessous pour l’importer." + pinboard: + page_title: "Import > Pinboard" + description: "Sur la page « Backup » (https://pinboard.in/settings/backup), cliquez sur « JSON » dans la section « Bookmarks ». Un fichier json (sans extension) sera téléchargé (« pinboard_export »)." + how_to: "Choisissez le fichier de votre export Pinboard et cliquez sur le bouton ci-dessous pour l’importer." developer: page_title: "Développeur" @@ -444,7 +504,6 @@ user: plain_password_label: "Mot de passe en clair" email_label: "Adresse courriel" enabled_label: "Activé" - locked_label: "Bloqué" last_login_label: "Dernière connexion" twofactor_label: "Double authentification" save: "Sauvegarder" @@ -465,8 +524,10 @@ flashes: rss_updated: "La configuration des flux RSS a bien été mise à jour" tagging_rules_updated: "Règles mises à jour" tagging_rules_deleted: "Règle supprimée" - user_added: "Utilisateur \"%username%\" ajouté" rss_token_updated: "Jeton RSS mis à jour" + annotations_reset: Annotations supprimées + tags_reset: Tags supprimés + entries_reset: Articles supprimés entry: notice: entry_already_saved: "Article déjà sauvegardé le %date%" @@ -496,3 +557,8 @@ flashes: notice: client_created: "Nouveau client %name% créé" client_deleted: "Client %name% supprimé" + user: + notice: + added: 'Utilisateur "%username%" ajouté' + updated: 'Utilisateur "%username%" mis à jour' + deleted: 'Utilisateur "%username%" supprimé' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml index b7d066ab..bbb526dc 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml @@ -70,7 +70,12 @@ config: 200_word: 'Leggo ~200 parole al minuto' 300_word: 'Leggo ~300 parole al minuto' 400_word: 'Leggo ~400 parole al minuto' + action_mark_as_read: + # label: 'Where do you to be redirected after mark an article as read?' + # redirect_homepage: 'To the homepage' + # redirect_current_page: 'To the current page' pocket_consumer_key_label: Consumer key per Pocket per importare i contenuti + # android_configuration: Configure your Android application # help_theme: "wallabag is customizable. You can choose your prefered theme here." # help_items_per_page: "You can change the number of articles displayed on each page." # help_reading_speed: "wallabag calculates a reading time for each article. You can define here, thanks to this list, if you are a fast or a slow reader. wallabag will recalculate the reading time for each article." @@ -94,6 +99,18 @@ config: email_label: 'E-mail' twoFactorAuthentication_label: 'Two factor authentication' # help_twoFactorAuthentication: "If you enable 2FA, each time you want to login to wallabag, you'll receive a code by email." + delete: + # title: Delete my account (a.k.a danger zone) + # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. + # confirm: Are you really sure? (THIS CAN'T BE UNDONE) + # button: Delete my account + reset: + # title: Reset area (a.k.a danger zone) + # description: By hiting buttons below you'll have ability to remove some informations from your account. Be aware that these actions are IRREVERSIBLE. + # annotations: Remove ALL annotations + # tags: Remove ALL tags + # entries: Remove ALL entries + # confirm: Are you really really sure? (THIS CAN'T BE UNDONE) form_password: # description: "You can change your password here. Your new password should by at least 8 characters long." old_password_label: 'Password corrente' @@ -145,6 +162,7 @@ entry: archived: 'Contenuti archiviati' filtered: 'Contenuti filtrati' # filtered_tags: 'Filtered by tags:' + # filtered_search: 'Filtered by search:' # untagged: 'Untagged entries' list: number_on_the_page: "{0} Non ci sono contenuti.|{1} C'è un contenuto.|]1,Inf[ Ci sono %count% contenuti." @@ -168,6 +186,7 @@ entry: preview_picture_label: "Ha un'immagine di anteprima" preview_picture_help: 'Immagine di anteprima' language_label: 'Lingua' + # http_status_label: 'HTTP status' reading_time: label: 'Tempo di lettura in minuti' from: 'da' @@ -209,6 +228,8 @@ entry: placeholder: 'http://website.com' form_new: url_label: Url + search: + # placeholder: 'What are you looking for?' edit: page_title: 'Modifica voce' title_label: 'Titolo' @@ -252,6 +273,9 @@ about: howto: page_title: 'How to' page_description: 'Ci sono diversi modi per salvare un contenuto:' + tab_menu: + # add_link: "Add a link" + # shortcuts: "Use shortcuts" top_menu: browser_addons: 'tramite addons del Browser' mobile_apps: 'tramite app Mobile' @@ -261,6 +285,7 @@ howto: browser_addons: firefox: 'Add-On di Firefox' chrome: 'Estensione di Chrome' + opera: 'Estensione di Opera' mobile_apps: android: via_f_droid: 'via F-Droid' @@ -269,6 +294,33 @@ howto: windows: 'sullo store di Microsoft' bookmarklet: description: 'Trascinando e rilasciando questo link sulla barra dei bookmark del tuo browser:' + shortcuts: + # page_description: Here are the shortcuts available in wallabag. + # shortcut: Shortcut + # action: Action + # all_pages_title: Shortcuts available in all pages + # go_unread: Go to unread + # go_starred: Go to starred + # go_archive: Go to archive + # go_all: Go to all entries + # go_tags: Go to tags + # go_config: Go to config + # go_import: Go to import + # go_developers: Go to developers + # go_howto: Go to howto (this page!) + # go_logout: Logout + # list_title: Shortcuts available in listing pages + # search: Display the search form + # article_title: Shortcuts available in entry view + # open_original: Open original URL of the entry + # toggle_favorite: Toggle star status for the entry + # toggle_archive: Toggle read status for the entry + # delete: Delete the entry + # material_title: Shortcuts available with Material theme only + # add_link: Add a new link + # hide_form: Hide the current form (search or new link) + # arrows_navigation: Navigate through articles + # open_article: Display the selected entry quickstart: page_title: 'Introduzione' @@ -329,6 +381,9 @@ tag: list: number_on_the_page: "{0} Non ci sono tag.|{1} C'è un tag.|]1,Inf[ ci sono %count% tag." # see_untagged_entries: 'See untagged entries' + new: + # add: 'Add' + # placeholder: 'You can add several tags, separated by a comma.' import: page_title: 'Importa' @@ -362,6 +417,7 @@ import: # how_to: 'Please select your Readability export and click on the below button to upload and import it.' worker: # enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:" + # download_images_warning: "You enabled downloading images for your articles. Combined with classic import it can take ages to proceed (or maybe failed). We strongly recommend to enable asynchronous import to avoid errors." firefox: page_title: 'Importa da > Firefox' # description: "This importer will import all your Firefox bookmarks. Just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file." @@ -374,6 +430,10 @@ import: page_title: 'Importa da > Instapaper' # description: 'This importer will import all your Instapaper articles. On the settings (https://www.instapaper.com/user) page, click on "Download .CSV file" in the "Export" section. A CSV file will be downloaded (like "instapaper-export.csv").' # how_to: 'Please select your Instapaper export and click on the below button to upload and import it.' + pinboard: + page_title: "Importa da > Pinboard" + # description: 'This importer will import all your Instapaper articles. On the backup (https://pinboard.in/settings/backup) page, click on "JSON" in the "Bookmarks" section. A JSON file will be downloaded (like "pinboard_export").' + # how_to: 'Please select your Pinboard export and click on the below button to upload and import it.' developer: page_title: 'Sviluppatori' @@ -444,7 +504,6 @@ user: plain_password_label: '????' email_label: 'E-mail' # enabled_label: 'Enabled' - # locked_label: 'Locked' # last_login_label: 'Last login' # twofactor_label: Two factor authentication # save: Save @@ -465,8 +524,10 @@ flashes: rss_updated: 'Informazioni RSS aggiornate' tagging_rules_updated: 'Regole di tagging aggiornate' tagging_rules_deleted: 'Regola di tagging aggiornate' - user_added: 'Utente "%username%" aggiunto' rss_token_updated: 'RSS token aggiornato' + # annotations_reset: Annotations reset + # tags_reset: Tags reset + # entries_reset: Entries reset entry: notice: entry_already_saved: 'Contenuto già salvato in data %date%' @@ -496,3 +557,8 @@ flashes: notice: client_created: 'Nuovo client creato.' client_deleted: 'Client eliminato' + user: + notice: + # added: 'User "%username%" added' + # updated: 'User "%username%" updated' + # deleted: 'User "%username%" deleted' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index 16ef1e5d..33c1a660 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml @@ -25,13 +25,13 @@ menu: internal_settings: 'Configuracion interna' import: 'Importar' howto: 'Ajuda' - developer: 'Desvolopador' + developer: 'Desvolopaire' logout: 'Desconnexion' about: 'A prepaus' search: 'Cercar' save_link: 'Enregistrar un novèl article' back_to_unread: 'Tornar als articles pas legits' - # users_management: 'Users management' + users_management: 'Gestion dels utilizaires' top: add_new_entry: 'Enregistrar un novèl article' search: 'Cercar' @@ -46,7 +46,7 @@ footer: social: 'Social' powered_by: 'propulsat per' about: 'A prepaus' - # stats: Since %user_creation% you read %nb_archives% articles. That is about %per_day% a day! + stats: "Dempuèi %user_creation% avètz legit %nb_archives% articles. Es a l'entorn de %per_day% per jorn !" config: page_title: 'Configuracion' @@ -70,7 +70,12 @@ config: 200_word: "Legissi a l'entorn de 200 mots per minuta" 300_word: "Legissi a l'entorn de 300 mots per minuta" 400_word: "Legissi a l'entorn de 400 mots per minuta" + action_mark_as_read: + # label: 'Where do you to be redirected after mark an article as read?' + # redirect_homepage: 'To the homepage' + # redirect_current_page: 'To the current page' pocket_consumer_key_label: Clau d'autentificacion Pocket per importar las donadas + android_configuration: Configuratz vòstra aplicacion Android # help_theme: "wallabag is customizable. You can choose your prefered theme here." # help_items_per_page: "You can change the number of articles displayed on each page." # help_reading_speed: "wallabag calculates a reading time for each article. You can define here, thanks to this list, if you are a fast or a slow reader. wallabag will recalculate the reading time for each article." @@ -94,6 +99,18 @@ config: email_label: 'Adreça de corrièl' twoFactorAuthentication_label: 'Dobla autentificacion' # help_twoFactorAuthentication: "If you enable 2FA, each time you want to login to wallabag, you'll receive a code by email." + delete: + title: Suprimir mon compte (Mèfi zòna perilhosa) + description: Se confirmatz la supression de vòstre compte, TOTES vòstres articles, TOTAS vòstras etiquetas, TOTAS vòstras anotacions e vòstre compte seràn suprimits per totjorn. E aquò es IRREVERSIBLE. Puèi seretz desconnectat. + confirm: Sètz vertadièrament segur ? (ES IRREVERSIBLE) + button: Suprimir mon compte + reset: + title: Zòna de reïnicializacion (Mèfi zòna perilhosa) + description: En clicant sul boton çai-jos auretz la possibilitat de levar qualques informacions de vòstre compte. Mèfi que totas aquelas accions son IRREVERSIBLAS. + annotations: Levar TOTAS las anotacions + tags: Levar TOTAS las etiquetas + entries: Levar TOTES los articles + confirm: Sètz vertadièrament segur ? (ES IRREVERSIBLE) form_password: # description: "You can change your password here. Your new password should by at least 8 characters long." old_password_label: 'Senhal actual' @@ -103,7 +120,7 @@ config: if_label: 'se' then_tag_as_label: 'alara atribuir las etiquetas' delete_rule_label: 'suprimir' - # edit_rule_label: 'edit' + edit_rule_label: 'modificar' rule_label: 'Règla' tags_label: 'Etiquetas' faq: @@ -145,6 +162,7 @@ entry: archived: 'Articles legits' filtered: 'Articles filtrats' filtered_tags: 'Filtats per etiquetas:' + # filtered_search: 'Filtered by search:' untagged: 'Articles sens etiqueta' list: number_on_the_page: "{0} I a pas cap d'article.|{1} I a un article.|]1,Inf[ I a %count% articles." @@ -168,6 +186,7 @@ entry: preview_picture_label: 'A una fotò' preview_picture_help: 'Fotò' language_label: 'Lenga' + # http_status_label: 'HTTP status' reading_time: label: 'Durada de lectura en minutas' from: 'de' @@ -209,6 +228,8 @@ entry: placeholder: 'http://website.com' form_new: url_label: Url + search: + # placeholder: 'What are you looking for?' edit: page_title: 'Modificar un article' title_label: 'Títol' @@ -216,7 +237,7 @@ entry: is_public_label: 'Public' save_label: 'Enregistrar' public: - # shared_by_wallabag: "This article has been shared by wallabag" + shared_by_wallabag: "Aqueste article es estat partejat per wallabag" about: page_title: 'A prepaus' @@ -252,6 +273,9 @@ about: howto: page_title: 'Ajuda' page_description: "I a mai d'un biais d'enregistrar un article :" + tab_menu: + # add_link: "Add a link" + # shortcuts: "Use shortcuts" top_menu: browser_addons: 'Extensions de navigator' mobile_apps: 'Aplicacions mobil' @@ -261,6 +285,7 @@ howto: browser_addons: firefox: 'Extension Firefox' chrome: 'Extension Chrome' + opera: 'Extension Opera' mobile_apps: android: via_f_droid: 'via F-Droid' @@ -269,17 +294,44 @@ howto: windows: 'sus Microsoft Store' bookmarklet: description: 'Lisatz-depausatz aqueste ligam dins vòstra barra de favorits :' + shortcuts: + # page_description: Here are the shortcuts available in wallabag. + # shortcut: Shortcut + # action: Action + # all_pages_title: Shortcuts available in all pages + # go_unread: Go to unread + # go_starred: Go to starred + # go_archive: Go to archive + # go_all: Go to all entries + # go_tags: Go to tags + # go_config: Go to config + # go_import: Go to import + # go_developers: Go to developers + # go_howto: Go to howto (this page!) + # go_logout: Logout + # list_title: Shortcuts available in listing pages + # search: Display the search form + # article_title: Shortcuts available in entry view + # open_original: Open original URL of the entry + # toggle_favorite: Toggle star status for the entry + # toggle_archive: Toggle read status for the entry + # delete: Delete the entry + # material_title: Shortcuts available with Material theme only + # add_link: Add a new link + # hide_form: Hide the current form (search or new link) + # arrows_navigation: Navigate through articles + # open_article: Display the selected entry quickstart: page_title: 'Per ben començar' - # more: 'More…' + more: 'Mai…' intro: title: 'Benvenguda sus wallabag !' paragraph_1: "Anem vos guidar per far lo torn de la proprietat e vos presentar unas fonccionalitats que vos poirián interessar per vos apropriar aquesta aisina." paragraph_2: 'Seguètz-nos ' configure: - title: "Configuratz l'aplicacio" - # description: 'In order to have an application which suits you, have a look into the configuration of wallabag.' + title: "Configuratz l'aplicacion" + description: "Per fin d'aver una aplicacion que vos va ben, anatz veire la configuracion de wallabag." language: "Cambiatz la lenga e l'estil de l'aplicacion" rss: 'Activatz los fluxes RSS' tagging_rules: 'Escrivètz de règlas per classar automaticament vòstres articles' @@ -293,7 +345,7 @@ quickstart: import: 'Configurar los impòrt' first_steps: title: 'Primièrs passes' - # description: "Now wallabag is well configured, it's time to archive the web. You can click on the top right sign + to add a link." + description: "Ara wallabag es ben configurat, es lo moment d'archivar lo web. Podètz clicar sul signe + a man drecha amont per ajustar un ligam." new_article: 'Ajustatz vòstre primièr article' unread_articles: 'E racaptatz-lo !' migrate: @@ -305,14 +357,14 @@ quickstart: readability: 'Migrar dempuèi Readability' instapaper: 'Migrar dempuèi Instapaper' developer: - title: 'Pels desvolopadors' - # description: 'We also thought to the developers: Docker, API, translations, etc.' + title: 'Pels desvolopaires' + description: 'Avèm tanben pensat als desvolopaires : Docker, API, traduccions, etc.' create_application: 'Crear vòstra aplicacion tèrça' - # use_docker: 'Use Docker to install wallabag' + use_docker: 'Utilizar Docker per installar wallabag' docs: title: 'Documentacion complèta' - # description: "There are so much features in wallabag. Don't hesitate to read the manual to know them and to learn how to use them." - annotate: 'Anotatar vòstre article' + description: "I a un fum de fonccionalitats dins wallabag. Esitetz pas a legir lo manual per las conéisser e aprendre a las utilizar." + annotate: 'Anotar vòstre article' export: 'Convertissètz vòstres articles en ePub o en PDF' search_filters: "Aprenètz a utilizar lo motor de recèrca e los filtres per retrobar l'article que vos interèssa" fetching_errors: "Qué far se mon article es pas recuperat coma cal ?" @@ -329,6 +381,9 @@ tag: list: number_on_the_page: "{0} I a pas cap d'etiquetas.|{1} I a una etiqueta.|]1,Inf[ I a %count% etiquetas." see_untagged_entries: "Afichar las entradas sens pas cap d'etiquetas" + new: + # add: 'Add' + # placeholder: 'You can add several tags, separated by a comma.' import: page_title: 'Importar' @@ -362,6 +417,7 @@ import: how_to: "Mercés de seleccionar vòstre Readability fichièr e de clicar sul boton dejós per lo telecargar e l'importar." worker: enabled: "L'importacion se fa de manièra asincròna. Un còp l'importacion lançada, una aisina externa s'ocuparà dels messatges un per un. Lo servici actual es : " + download_images_warning: "Avètz activat lo telecargament de los imatges de vòstres articles. Combinat amb l'importacion classica, aquò pòt tardar un long moment (o benlèu fracassar). Recomandem fòrtament l'activacion de l'importacion asincròna per evitar las errors." firefox: page_title: 'Importar > Firefox' description: "Aquesta aisina importarà totas vòstres favorits de Firefox. Just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file." @@ -374,6 +430,10 @@ import: page_title: 'Importar > Instapaper' description: "Aquesta aisina importarà totas vòstres articles d'Instapaper. Sus la pagina de paramètres (https://www.instapaper.com/user), clicatz sus \"Download .CSV file\" dins la seccion \"Export\". Un fichièr CSV serà telecargat (aital \"instapaper-export.csv\")." how_to: "Mercés de causir vòstre fichièr Instapaper e de clicar sul boton dejós per lo telecargar e l'importar" + pinboard: + # page_title: "Import > Pinboard" + # description: 'This importer will import all your Instapaper articles. On the backup (https://pinboard.in/settings/backup) page, click on "JSON" in the "Bookmarks" section. A JSON file will be downloaded (like "pinboard_export").' + # how_to: 'Please select your Pinboard export and click on the below button to upload and import it.' developer: page_title: 'Desvolopaire' @@ -397,7 +457,7 @@ developer: warn_message_2: "Se suprimissètz un client, totas las aplicacions que l'emplegan foncionaràn pas mai amb vòstre compte wallabag." action: 'Suprimir aqueste client' client: - page_title: 'Desvlopador > Novèl client' + page_title: 'Desvolopaire > Novèl client' page_description: "Anatz crear un novèl client. Mercés de cumplir l'url de redireccion cap a vòstra aplicacion." form: name_label: "Nom del client" @@ -405,7 +465,7 @@ developer: save_label: 'Crear un novèl client' action_back: 'Retorn' client_parameter: - page_title: 'Desvolopador > Los paramètres de vòstre client' + page_title: 'Desvolopaire > Los paramètres de vòstre client' page_description: 'Vaquí los paramètres de vòstre client' field_name: 'Nom del client' field_id: 'ID Client' @@ -413,7 +473,7 @@ developer: back: 'Retour' read_howto: 'Legir "cossí crear ma primièra aplicacion"' howto: - page_title: 'Desvolopador > Cossí crear ma primièra aplicacion' + page_title: 'Desvolopaire > Cossí crear ma primièra aplicacion' description: paragraph_1: "Las comandas seguentas utilizan la bibliotèca HTTPie. Asseguratz-vos que siasqueòu installadas abans de l'utilizar." paragraph_2: "Vos cal un geton per escambiar entre vòstra aplicacion e l'API de wallabar." @@ -426,34 +486,33 @@ developer: back: 'Retorn' user: - # page_title: Users management - # new_user: Create a new user - # edit_user: Edit an existing user - # description: "Here you can manage all users (create, edit and delete)" - # list: - # actions: Actions - # edit_action: Edit - # yes: Yes - # no: No - # create_new_one: Create a new user + page_title: 'Gestion dels utilizaires' + new_user: 'Crear un novèl utilizaire' + edit_user: 'Modificar un utilizaire existent' + description: "Aquí podètz gerir totes los utilizaires (crear, modificar e suprimir)" + list: + actions: 'Accions' + edit_action: 'Modificar' + yes: 'Òc' + no: 'Non' + create_new_one: 'Crear un novèl utilizaire' form: username_label: "Nom d'utilizaire" - # name_label: 'Name' + name_label: 'Nom' password_label: 'Senhal' repeat_new_password_label: 'Confirmatz vòstre novèl senhal' plain_password_label: 'Senhal en clar' email_label: 'Adreça de corrièl' - # enabled_label: 'Enabled' - # locked_label: 'Locked' - # last_login_label: 'Last login' - # twofactor_label: Two factor authentication - # save: Save - # delete: Delete - # delete_confirm: Are you sure? - # back_to_list: Back to list + enabled_label: 'Actiu' + last_login_label: 'Darrièra connexion' + twofactor_label: 'Autentificacion doble-factor' + save: 'Enregistrar' + delete: 'Suprimir' + delete_confirm: 'Sètz segur ?' + back_to_list: 'Tornar a la lista' error: - # page_title: An error occurred + page_title: Una error s'es produsida flashes: config: @@ -465,8 +524,10 @@ flashes: rss_updated: 'La configuracion dels fluxes RSS es ben estada mesa a jorn' tagging_rules_updated: 'Règlas misa a jorn' tagging_rules_deleted: 'Règla suprimida' - user_added: 'Utilizaire "%username%" apondut' rss_token_updated: 'Geton RSS mes a jorn' + annotations_reset: Anotacions levadas + tags_reset: Etiquetas levadas + entries_reset: Articles levats entry: notice: entry_already_saved: 'Article ja salvargardat lo %date%' @@ -477,12 +538,12 @@ flashes: entry_reloaded_failed: "L'article es estat cargat de nòu mai la recuperacion del contengut a fracassat" entry_archived: 'Article marcat coma legit' entry_unarchived: 'Article marcat coma pas legit' - entry_starred: 'Article apondut dins los favorits' + entry_starred: 'Article ajustat dins los favorits' entry_unstarred: 'Article quitat dels favorits' entry_deleted: 'Article suprimit' tag: notice: - tag_added: 'Etiqueta aponduda' + tag_added: 'Etiqueta ajustada' import: notice: failed: "L'importacion a fracassat, mercés de tornar ensajar" @@ -496,3 +557,8 @@ flashes: notice: client_created: 'Novèl client creat' client_deleted: 'Client suprimit' + user: + notice: + added: 'Utilizaire "%username%" ajustat' + updated: 'Utilizaire "%username%" mes a jorn' + deleted: 'Utilizaire "%username%" suprimit' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index 73250cc0..1eb83d53 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml @@ -61,7 +61,7 @@ config: save: 'Zapisz' form_settings: theme_label: 'Temat' - items_per_page_label: 'Ilość elementóœ na stronie' + items_per_page_label: 'Ilość elementów na stronie' language_label: 'Język' reading_speed: label: 'Prędkość czytania' @@ -70,12 +70,17 @@ config: 200_word: 'Czytam ~200 słów na minutę' 300_word: 'Czytam ~300 słów na minutę' 400_word: 'Czytam ~400 słów na minutę' + action_mark_as_read: + label: 'Gdzie zostaniesz przekierowany po oznaczeniu artukuły jako przeczytanego' + redirect_homepage: 'do strony głównej' + redirect_current_page: 'do bieżącej strony' pocket_consumer_key_label: 'Klucz klienta Pocket do importu zawartości' - # help_theme: "wallabag is customizable. You can choose your prefered theme here." - # help_items_per_page: "You can change the number of articles displayed on each page." - # help_reading_speed: "wallabag calculates a reading time for each article. You can define here, thanks to this list, if you are a fast or a slow reader. wallabag will recalculate the reading time for each article." - # help_language: "You can change the language of wallabag interface." - # help_pocket_consumer_key: "Required for Pocket import. You can create it in your Pocket account." + android_configuration: Skonfiguruj swoją androidową aplikację + help_theme: "Dopasuj wallabag do swoich potrzeb. Tutaj możesz wybrać preferowany przez ciebie motyw." + help_items_per_page: "Możesz zmienić ilość artykułów wyświetlanych na każdej stronie." + help_reading_speed: "wallabag oblicza czas czytania każdego artykułu. Dzięki tej liście możesz określić swoje tempo. Wallabag przeliczy ponownie czas potrzebny, na przeczytanie każdego z artykułów." + help_language: "Możesz zmienić język interfejsu wallabag." + help_pocket_consumer_key: "Wymagane dla importu z Pocket. Możesz go stworzyć na swoim koncie Pocket." form_rss: description: 'Kanały RSS prowadzone przez wallabag pozwalają Ci na czytanie twoich zapisanych artykułów w twoium ulubionym czytniku RSS. Musisz najpierw wynegenerować tokena.‌' token_label: 'Token RSS' @@ -93,9 +98,21 @@ config: name_label: 'Nazwa' email_label: 'Adres email' twoFactorAuthentication_label: 'Autoryzacja dwuetapowa' - # help_twoFactorAuthentication: "If you enable 2FA, each time you want to login to wallabag, you'll receive a code by email." + help_twoFactorAuthentication: "Jeżeli włączysz autoryzację dwuetapową. Za każdym razem, kiedy będziesz chciał się zalogować, dostaniesz kod na swój e-mail." + delete: + title: Usuń moje konto (niebezpieczna strefa !) + description: Jeżeli usuniesz swoje konto, wszystkie twoje artykuły, tagi, adnotacje, oraz konto zostaną trwale usunięte (operacja jest NIEODWRACALNA). Następnie zostaniesz wylogowany. + confirm: Jesteś pewien? (tej operacji NIE MOŻNA cofnąć) + button: Usuń moje konto + reset: + title: Reset (niebezpieczna strefa) + description: Poniższe przyciski pozwalają usunąć pewne informacje z twojego konta. Uważaj te operacje są NIEODWRACALNE. + annotations: Usuń WSZYSTKIE adnotacje + tags: Usuń WSZYSTKIE tagi + entries: usuń WSZYTSTKIE wpisy + confirm: Jesteś pewien? (tej operacji NIE MOŻNA cofnąć) form_password: - # description: "You can change your password here. Your new password should by at least 8 characters long." + description: "Tutaj możesz zmienić swoje hasło. Twoje nowe hasło powinno mieć conajmniej 8 znaków." old_password_label: 'Stare hasło' new_password_label: 'Nowe hasło' repeat_new_password_label: 'Powtórz nowe hasło' @@ -145,6 +162,7 @@ entry: archived: 'Zarchiwizowane wpisy' filtered: 'Odfiltrowane wpisy' filtered_tags: 'Filtrowane po tagach:' + filtered_search: 'Filtrowanie po wyszukiwaniu:' untagged: 'Odtaguj wpisy' list: number_on_the_page: '{0} Nie ma wpisów.|{1} Jest jeden wpis.|]1,Inf[ Są %count% wpisy.' @@ -168,6 +186,7 @@ entry: preview_picture_label: 'Posiada podgląd obrazu' preview_picture_help: 'Podgląd obrazu' language_label: 'Język' + http_status_label: 'Status HTTP' reading_time: label: 'Czas czytania w minutach' from: 'od' @@ -209,6 +228,8 @@ entry: placeholder: 'http://website.com' form_new: url_label: Url + search: + placeholder: 'Czego szukasz?' edit: page_title: 'Edytuj wpis' title_label: 'Tytuł' @@ -252,6 +273,9 @@ about: howto: page_title: 'Howto' page_description: 'Sposoby zapisania artykułu:' + tab_menu: + add_link: "Dodaj link" + shortcuts: "Użyj skrótów" top_menu: browser_addons: 'Wtyczki dla przeglądarki' mobile_apps: 'Aplikacje mobilne' @@ -261,6 +285,7 @@ howto: browser_addons: firefox: 'Standardowe rozszerzenie dla Firefox' chrome: 'Rozszerzenie dla Chrome' + opera: 'Rozszerzenie dla Opera' mobile_apps: android: via_f_droid: 'w F-Droid' @@ -269,6 +294,33 @@ howto: windows: 'w Microsoft Store' bookmarklet: description: 'Przeciągnij i upuść ten link na swój pasek zakładek' + shortcuts: + page_description: Tutaj znajdują się skróty dostępne w wallabag. + shortcut: Skrót + action: Akcja + all_pages_title: Skróty dostępne na wszystkich stronach + go_unread: Idź do nieprzeczytanych + go_starred: Idź do oznaczonych gwiazdką + go_archive: Idź do archiwum + go_all: Idź do wszystkich wpisów + go_tags: Idź do tagów + go_config: Idź do konfiguracji + go_import: Idź do importu + go_developers: Idź do deweloperów + go_howto: Idź do howto (tej strony!) + go_logout: Wyloguj + list_title: Skróty dostępne w spisie stron + search: Pokaż formularz wyszukiwania + article_title: Skróty dostępne w widoku artykułu + open_original: Otwórz oryginalny adres URL wpisu + toggle_favorite: Oznacz wpis gwiazdką + toggle_archive: Oznacz wpis jako przeczytany + delete: Usuń wpis + material_title: Skróty dostępne wyłącznie w motywie Material + add_link: Dodaj nowy link + hide_form: Ukryj obecny formularz (wyszukiwania lub nowego linku) + arrows_navigation: Nawiguj pomiędzy artykułami + open_article: Wyświetl zaznaczony wpis quickstart: page_title: 'Szybki start' @@ -329,6 +381,9 @@ tag: list: number_on_the_page: '{0} Nie ma tagów.|{1} Jest jeden tag.|]1,Inf[ Są %count% tagi.' see_untagged_entries: 'Zobacz nieotagowane wpisy' + new: + add: 'Dodaj' + placeholder: 'Możesz dodać kilka tagów, oddzielając je przecinkami.' import: page_title: 'Import' @@ -362,6 +417,7 @@ import: how_to: 'Wybierz swój plik eksportu z Readability i kliknij poniższy przycisk, aby go załadować.' worker: enabled: "Import jest wykonywany asynchronicznie. Od momentu rozpoczęcia importu, zewnętrzna usługa może zajmować się na raz tylko jednym zadaniem. Bieżącą usługą jest:" + download_images_warning: "Włączyłeś pobieranie obrazów dla swoich artykułów. W połączeniu z klasycznym importem, może to zająć dużo czasu (lub zakończyć się niepowodzeniem).Zdecydowanie zalecamy włączenie asynchronicznego importu, w celu uniknięcia błędów." firefox: page_title: 'Import > Firefox' description: "Ten importer zaimportuje wszystkie twoje zakładki z Firefoksa. Idź do twoich zakładek (Ctrl+Shift+O), następnie w \"Import i kopie zapasowe\", wybierz \"Utwórz kopię zapasową...\". Uzyskasz plik .json." @@ -374,6 +430,10 @@ import: page_title: 'Import > Instapaper' description: 'Ten importer, zaimportuje wszystkie twoje artykuły z Instapaper. W ustawieniach (https://www.instapaper.com/user), kliknij na "Download .CSV file" w sekcji "Export". Otrzymasz plik CSV.' how_to: 'Wybierz swój plik eksportu z Instapaper i kliknij poniższy przycisk, aby go załadować.' + pinboard: + page_title: "Import > Pinboard" + description: 'Ten importer, zaimportuje wszystkie twoje artykuły z Pinboard. W ustawieniach kopii zapasowej (https://pinboard.in/settings/backup), kliknij na "JSON" w sekcji "Bookmarks". Otrzymasz plik "pinboard_export".' + how_to: 'Wybierz swój plik eksportu z Pinboard i kliknij poniższy przycisk, aby go załadować.' developer: page_title: 'Deweloper' @@ -444,7 +504,6 @@ user: plain_password_label: 'Jawne hasło' email_label: 'Adres email' enabled_label: 'Włączony' - locked_label: 'Zablokowany' last_login_label: 'Ostatnie logowanie' twofactor_label: Autoryzacja dwuetapowa save: Zapisz @@ -453,7 +512,7 @@ user: back_to_list: Powrót do listy error: - # page_title: An error occurred + page_title: Wystąpił błąd flashes: config: @@ -465,8 +524,10 @@ flashes: rss_updated: 'Informacje RSS zaktualizowane' tagging_rules_updated: 'Reguły tagowania zaktualizowane' tagging_rules_deleted: 'Reguła tagowania usunięta' - user_added: 'Użytkownik "%username%" dodany' rss_token_updated: 'Token kanału RSS zaktualizowany' + annotations_reset: Zresetuj adnotacje + tags_reset: Zresetuj tagi + entries_reset: Zresetuj wpisy entry: notice: entry_already_saved: 'Wpis już został dodany %date%' @@ -496,3 +557,8 @@ flashes: notice: client_created: 'Nowy klient utworzony.' client_deleted: 'Klient usunięty' + user: + notice: + added: 'Użytkownik "%username%" dodany' + updated: 'Użytkownik "%username%" zaktualizowany' + deleted: 'Użytkownik "%username%" usunięty' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml index a375ac7b..f58b2115 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml @@ -70,7 +70,12 @@ config: 200_word: 'Posso ler ~200 palavras por minuto' 300_word: 'Posso ler ~300 palavras por minuto' 400_word: 'Posso ler ~400 palavras por minuto' + action_mark_as_read: + # label: 'Where do you to be redirected after mark an article as read?' + # redirect_homepage: 'To the homepage' + # redirect_current_page: 'To the current page' pocket_consumer_key_label: 'Chave do consumidor do Pocket para importar conteúdo' + # android_configuration: Configure your Android application # help_theme: "wallabag is customizable. You can choose your prefered theme here." # help_items_per_page: "You can change the number of articles displayed on each page." # help_reading_speed: "wallabag calculates a reading time for each article. You can define here, thanks to this list, if you are a fast or a slow reader. wallabag will recalculate the reading time for each article." @@ -94,6 +99,18 @@ config: email_label: 'E-mail' twoFactorAuthentication_label: 'Autenticação de dois passos' # help_twoFactorAuthentication: "If you enable 2FA, each time you want to login to wallabag, you'll receive a code by email." + delete: + # title: Delete my account (a.k.a danger zone) + # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. + # confirm: Are you really sure? (THIS CAN'T BE UNDONE) + # button: Delete my account + reset: + # title: Reset area (a.k.a danger zone) + # description: By hiting buttons below you'll have ability to remove some informations from your account. Be aware that these actions are IRREVERSIBLE. + # annotations: Remove ALL annotations + # tags: Remove ALL tags + # entries: Remove ALL entries + # confirm: Are you really really sure? (THIS CAN'T BE UNDONE) form_password: # description: "You can change your password here. Your new password should by at least 8 characters long." old_password_label: 'Senha atual' @@ -145,6 +162,7 @@ entry: archived: 'Entradas arquivadas' filtered: 'Entradas filtradas' filtered_tags: 'Filtrar por tags:' + # filtered_search: 'Filtered by search:' untagged: 'Entradas sem tags' list: number_on_the_page: '{0} Não existem entradas.|{1} Existe uma entrada.|]1,Inf[ Existem %count% entradas.' @@ -168,6 +186,7 @@ entry: preview_picture_label: 'Possui uma imagem de preview' preview_picture_help: 'Imagem de preview' language_label: 'Idioma' + # http_status_label: 'HTTP status' reading_time: label: 'Tempo de leitura em minutos' from: 'de' @@ -209,6 +228,8 @@ entry: placeholder: 'http://website.com' form_new: url_label: Url + search: + # placeholder: 'What are you looking for?' edit: page_title: 'Editar uma entrada' title_label: 'Título' @@ -252,6 +273,9 @@ about: howto: page_title: 'How to' page_description: 'Existem diferentes formas de salvar um artigo:' + tab_menu: + # add_link: "Add a link" + # shortcuts: "Use shortcuts" top_menu: browser_addons: 'Extensões de navegadores' mobile_apps: "App's móveis" @@ -261,6 +285,7 @@ howto: browser_addons: firefox: 'Extensão padrão do Firefox' chrome: 'Extensão do Chrome' + opera: 'Extensão do Opera' mobile_apps: android: via_f_droid: 'via F-Droid' @@ -269,6 +294,33 @@ howto: windows: 'na Microsoft Store' bookmarklet: description: 'Arraste e solve este link na sua barra de favoritos:' + shortcuts: + # page_description: Here are the shortcuts available in wallabag. + # shortcut: Shortcut + # action: Action + # all_pages_title: Shortcuts available in all pages + # go_unread: Go to unread + # go_starred: Go to starred + # go_archive: Go to archive + # go_all: Go to all entries + # go_tags: Go to tags + # go_config: Go to config + # go_import: Go to import + # go_developers: Go to developers + # go_howto: Go to howto (this page!) + # go_logout: Logout + # list_title: Shortcuts available in listing pages + # search: Display the search form + # article_title: Shortcuts available in entry view + # open_original: Open original URL of the entry + # toggle_favorite: Toggle star status for the entry + # toggle_archive: Toggle read status for the entry + # delete: Delete the entry + # material_title: Shortcuts available with Material theme only + # add_link: Add a new link + # hide_form: Hide the current form (search or new link) + # arrows_navigation: Navigate through articles + # open_article: Display the selected entry quickstart: page_title: 'Começo Rápido' @@ -329,6 +381,9 @@ tag: list: number_on_the_page: '{0} Não existem tags.|{1} Uma tag.|]1,Inf[ Existem %count% tags.' see_untagged_entries: 'Ver entradas sem tags' + new: + # add: 'Add' + # placeholder: 'You can add several tags, separated by a comma.' import: page_title: 'Importar' @@ -362,6 +417,7 @@ import: how_to: 'Por favor, selecione sua exportação do Readability e clique no botão abaixo para importá-la.' worker: enabled: "A importação é feita assíncronamente. Uma vez que a tarefa de importação é iniciada, um trabalho externo pode executar tarefas uma por vez. O serviço atual é:" + # download_images_warning: "You enabled downloading images for your articles. Combined with classic import it can take ages to proceed (or maybe failed). We strongly recommend to enable asynchronous import to avoid errors." firefox: page_title: 'Importar > Firefox' description: "Com este importador você importa todos os favoritos de seu Firefox. Somente vá até seus favoritos (Ctrl+Maj+O), e em \"Importar e Backup\" e escolha \"Backup...\". Você terá então um arquivo .json." @@ -374,6 +430,10 @@ import: page_title: 'Importar > Instapaper' description: 'Este importador pode importar todos os artigos do seu Instapaper. Nas página de configurações (https://www.instapaper.com/user), clique em "Download .CSV file" na seção "Export". Um arquivo CSV será baixado (algo como "instapaper-export.csv").' how_to: 'Por favor, selecione sua exportação do seu Instapaper e clique no botão abaixo para importá-la.' + pinboard: + # page_title: "Import > Pinboard" + # description: 'This importer will import all your Instapaper articles. On the backup (https://pinboard.in/settings/backup) page, click on "JSON" in the "Bookmarks" section. A JSON file will be downloaded (like "pinboard_export").' + # how_to: 'Please select your Pinboard export and click on the below button to upload and import it.' developer: page_title: 'Desenvolvedor' @@ -444,7 +504,6 @@ user: plain_password_label: '????' email_label: 'E-mail' enabled_label: 'Habilitado' - locked_label: 'Travado' last_login_label: 'Último login' twofactor_label: 'Autenticação de dois passos' save: 'Salvar' @@ -452,17 +511,23 @@ user: delete_confirm: 'Tem certeza?' back_to_list: 'Voltar para a lista' +error: + # page_title: An error occurred + flashes: config: notice: config_saved: 'Configiração salva.' password_updated: 'Senha atualizada' password_not_updated_demo: 'Em modo de demonstração, você não pode alterar a senha deste usuário.' - user_updated: 'Informação atualizada' + # user_updated: 'Information updated' rss_updated: 'Informação de RSS atualizada' tagging_rules_updated: 'Regras de tags atualizadas' tagging_rules_deleted: 'Regra de tag apagada' rss_token_updated: 'Token RSS atualizado' + # annotations_reset: Annotations reset + # tags_reset: Tags reset + # entries_reset: Entries reset entry: notice: entry_already_saved: 'Entrada já foi salva em %date%' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index 7d8fcea3..b9a57e36 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml @@ -70,7 +70,12 @@ config: # 200_word: 'I read ~200 words per minute' # 300_word: 'I read ~300 words per minute' # 400_word: 'I read ~400 words per minute' + action_mark_as_read: + # label: 'Where do you to be redirected after mark an article as read?' + # redirect_homepage: 'To the homepage' + # redirect_current_page: 'To the current page' pocket_consumer_key_label: Cheie consumator pentru importarea contentului din Pocket + # android_configuration: Configure your Android application # help_theme: "wallabag is customizable. You can choose your prefered theme here." # help_items_per_page: "You can change the number of articles displayed on each page." # help_reading_speed: "wallabag calculates a reading time for each article. You can define here, thanks to this list, if you are a fast or a slow reader. wallabag will recalculate the reading time for each article." @@ -94,6 +99,18 @@ config: email_label: 'E-mail' # twoFactorAuthentication_label: 'Two factor authentication' # help_twoFactorAuthentication: "If you enable 2FA, each time you want to login to wallabag, you'll receive a code by email." + delete: + # title: Delete my account (a.k.a danger zone) + # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. + # confirm: Are you really sure? (THIS CAN'T BE UNDONE) + # button: Delete my account + reset: + # title: Reset area (a.k.a danger zone) + # description: By hiting buttons below you'll have ability to remove some informations from your account. Be aware that these actions are IRREVERSIBLE. + # annotations: Remove ALL annotations + # tags: Remove ALL tags + # entries: Remove ALL entries + # confirm: Are you really really sure? (THIS CAN'T BE UNDONE) form_password: # description: "You can change your password here. Your new password should by at least 8 characters long." old_password_label: 'Parola veche' @@ -145,6 +162,7 @@ entry: # archived: 'Archived entries' # filtered: 'Filtered entries' # filtered_tags: 'Filtered by tags:' + # filtered_search: 'Filtered by search:' # untagged: 'Untagged entries' list: # number_on_the_page: '{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.' @@ -168,6 +186,7 @@ entry: preview_picture_label: 'Are o imagine de previzualizare' preview_picture_help: 'Previzualizare imagine' language_label: 'Limbă' + # http_status_label: 'HTTP status' reading_time: label: 'Timp de citire în minute' from: 'de la' @@ -209,6 +228,8 @@ entry: placeholder: 'http://website.com' form_new: url_label: Url + search: + # placeholder: 'What are you looking for?' edit: # page_title: 'Edit an entry' # title_label: 'Title' @@ -252,6 +273,9 @@ about: howto: page_title: 'Cum să' # page_description: 'There are several ways to save an article:' + tab_menu: + # add_link: "Add a link" + # shortcuts: "Use shortcuts" top_menu: browser_addons: 'Add-On-uri de Browser' mobile_apps: 'Aplicații mobile' @@ -261,6 +285,7 @@ howto: browser_addons: firefox: 'Add-On standard de Firefox' chrome: 'Extensie Chrome' + opera: 'Extensie Opera' mobile_apps: android: via_f_droid: 'prin F-Droid' @@ -269,6 +294,33 @@ howto: windows: 'prin Microsoft Store' bookmarklet: description: 'Drag & drop acest link în bara de bookmark-uri:' + shortcuts: + # page_description: Here are the shortcuts available in wallabag. + # shortcut: Shortcut + # action: Action + # all_pages_title: Shortcuts available in all pages + # go_unread: Go to unread + # go_starred: Go to starred + # go_archive: Go to archive + # go_all: Go to all entries + # go_tags: Go to tags + # go_config: Go to config + # go_import: Go to import + # go_developers: Go to developers + # go_howto: Go to howto (this page!) + # go_logout: Logout + # list_title: Shortcuts available in listing pages + # search: Display the search form + # article_title: Shortcuts available in entry view + # open_original: Open original URL of the entry + # toggle_favorite: Toggle star status for the entry + # toggle_archive: Toggle read status for the entry + # delete: Delete the entry + # material_title: Shortcuts available with Material theme only + # add_link: Add a new link + # hide_form: Hide the current form (search or new link) + # arrows_navigation: Navigate through articles + # open_article: Display the selected entry quickstart: # page_title: 'Quickstart' @@ -329,6 +381,9 @@ tag: list: # number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.' # see_untagged_entries: 'See untagged entries' + new: + # add: 'Add' + # placeholder: 'You can add several tags, separated by a comma.' import: # page_title: 'Import' @@ -362,6 +417,7 @@ import: # how_to: 'Please select your Readability export and click on the below button to upload and import it.' worker: # enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:" + # download_images_warning: "You enabled downloading images for your articles. Combined with classic import it can take ages to proceed (or maybe failed). We strongly recommend to enable asynchronous import to avoid errors." # firefox: # page_title: 'Import > Firefox' # description: "This importer will import all your Firefox bookmarks. Just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file." @@ -374,6 +430,10 @@ import: # page_title: 'Import > Instapaper' # description: 'This importer will import all your Instapaper articles. On the settings (https://www.instapaper.com/user) page, click on "Download .CSV file" in the "Export" section. A CSV file will be downloaded (like "instapaper-export.csv").' # how_to: 'Please select your Instapaper export and click on the below button to upload and import it.' + pinboard: + # page_title: "Import > Pinboard" + # description: 'This importer will import all your Instapaper articles. On the backup (https://pinboard.in/settings/backup) page, click on "JSON" in the "Bookmarks" section. A JSON file will be downloaded (like "pinboard_export").' + # how_to: 'Please select your Pinboard export and click on the below button to upload and import it.' developer: # page_title: 'Developer' @@ -444,7 +504,6 @@ user: plain_password_label: '????' email_label: 'E-mail' # enabled_label: 'Enabled' - # locked_label: 'Locked' # last_login_label: 'Last login' # twofactor_label: Two factor authentication # save: Save @@ -465,8 +524,10 @@ flashes: rss_updated: 'Informație RSS actualizată' # tagging_rules_updated: 'Tagging rules updated' # tagging_rules_deleted: 'Tagging rule deleted' - # user_added: 'User "%username%" added' # rss_token_updated: 'RSS token updated' + # annotations_reset: Annotations reset + # tags_reset: Tags reset + # entries_reset: Entries reset entry: notice: # entry_already_saved: 'Entry already saved on %date%' @@ -496,3 +557,8 @@ flashes: notice: # client_created: 'New client created.' # client_deleted: 'Client deleted' + user: + notice: + # added: 'User "%username%" added' + # updated: 'User "%username%" updated' + # deleted: 'User "%username%" deleted' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml index 357aa2ae..ec21c014 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml @@ -70,7 +70,12 @@ config: # 200_word: 'I read ~200 words per minute' # 300_word: 'I read ~300 words per minute' # 400_word: 'I read ~400 words per minute' + action_mark_as_read: + # label: 'Where do you to be redirected after mark an article as read?' + # redirect_homepage: 'To the homepage' + # redirect_current_page: 'To the current page' # pocket_consumer_key_label: Consumer key for Pocket to import contents + # android_configuration: Configure your Android application # help_theme: "wallabag is customizable. You can choose your prefered theme here." # help_items_per_page: "You can change the number of articles displayed on each page." # help_reading_speed: "wallabag calculates a reading time for each article. You can define here, thanks to this list, if you are a fast or a slow reader. wallabag will recalculate the reading time for each article." @@ -94,6 +99,18 @@ config: email_label: 'E-posta' twoFactorAuthentication_label: 'İki adımlı doğrulama' # help_twoFactorAuthentication: "If you enable 2FA, each time you want to login to wallabag, you'll receive a code by email." + delete: + # title: Delete my account (a.k.a danger zone) + # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. + # confirm: Are you really sure? (THIS CAN'T BE UNDONE) + # button: Delete my account + reset: + # title: Reset area (a.k.a danger zone) + # description: By hiting buttons below you'll have ability to remove some informations from your account. Be aware that these actions are IRREVERSIBLE. + # annotations: Remove ALL annotations + # tags: Remove ALL tags + # entries: Remove ALL entries + # confirm: Are you really really sure? (THIS CAN'T BE UNDONE) form_password: # description: "You can change your password here. Your new password should by at least 8 characters long." old_password_label: 'Eski şifre' @@ -103,6 +120,7 @@ config: # if_label: 'if' # then_tag_as_label: 'then tag as' # delete_rule_label: 'delete' + # edit_rule_label: 'edit' rule_label: 'Kural' tags_label: 'Etiketler' faq: @@ -144,6 +162,7 @@ entry: # archived: 'Archived entries' # filtered: 'Filtered entries' # filtered_tags: 'Filtered by tags:' + # filtered_search: 'Filtered by search:' # untagged: 'Untagged entries' list: number_on_the_page: '{0} Herhangi bir makale yok.|{1} Burada bir adet makale var.|]1,Inf[ Burada %count% adet makale var.' @@ -167,6 +186,7 @@ entry: preview_picture_label: 'Resim önizlemesi varsa' preview_picture_help: 'Resim önizlemesi' language_label: 'Dil' + # http_status_label: 'HTTP status' reading_time: label: 'Dakika cinsinden okuma süresi' from: 'başlangıç' @@ -208,6 +228,8 @@ entry: placeholder: 'http://website.com' form_new: url_label: Url + search: + # placeholder: 'What are you looking for?' edit: page_title: 'Makaleyi düzenle' title_label: 'Başlık' @@ -251,6 +273,9 @@ about: howto: page_title: 'Yardım' # page_description: 'There are several ways to save an article:' + tab_menu: + # add_link: "Add a link" + # shortcuts: "Use shortcuts" top_menu: browser_addons: 'Tarayıcı eklentileri' mobile_apps: 'Mobil uygulamalar' @@ -260,6 +285,7 @@ howto: browser_addons: firefox: 'Standart Firefox Eklentisi' chrome: 'Chrome Eklentisi' + opera: 'Opera Eklentisi' mobile_apps: android: # via_f_droid: 'via F-Droid' @@ -268,6 +294,33 @@ howto: # windows: 'on the Microsoft Store' bookmarklet: description: "Bu bağlantı ile yer imlerinizi sürükleyip bırakarak wallabag'e ekleyebilirsiniz:" + shortcuts: + # page_description: Here are the shortcuts available in wallabag. + # shortcut: Shortcut + # action: Action + # all_pages_title: Shortcuts available in all pages + # go_unread: Go to unread + # go_starred: Go to starred + # go_archive: Go to archive + # go_all: Go to all entries + # go_tags: Go to tags + # go_config: Go to config + # go_import: Go to import + # go_developers: Go to developers + # go_howto: Go to howto (this page!) + # go_logout: Logout + # list_title: Shortcuts available in listing pages + # search: Display the search form + # article_title: Shortcuts available in entry view + # open_original: Open original URL of the entry + # toggle_favorite: Toggle star status for the entry + # toggle_archive: Toggle read status for the entry + # delete: Delete the entry + # material_title: Shortcuts available with Material theme only + # add_link: Add a new link + # hide_form: Hide the current form (search or new link) + # arrows_navigation: Navigate through articles + # open_article: Display the selected entry quickstart: page_title: 'Hızlı başlangıç' @@ -328,6 +381,9 @@ tag: list: number_on_the_page: '{0} Herhangi bir etiket yok.|{1} Burada bir adet etiket var.|]1,Inf[ Burada %count% adet etiket var.' # see_untagged_entries: 'See untagged entries' + new: + # add: 'Add' + # placeholder: 'You can add several tags, separated by a comma.' import: page_title: 'İçe Aktar' @@ -361,6 +417,7 @@ import: # how_to: 'Please select your Readability export and click on the below button to upload and import it.' worker: # enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:" + # download_images_warning: "You enabled downloading images for your articles. Combined with classic import it can take ages to proceed (or maybe failed). We strongly recommend to enable asynchronous import to avoid errors." firefox: page_title: 'İçe Aktar > Firefox' # description: "This importer will import all your Firefox bookmarks. Just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file." @@ -373,6 +430,10 @@ import: page_title: 'İçe Aktar > Instapaper' # description: 'This importer will import all your Instapaper articles. On the settings (https://www.instapaper.com/user) page, click on "Download .CSV file" in the "Export" section. A CSV file will be downloaded (like "instapaper-export.csv").' # how_to: 'Please select your Instapaper export and click on the below button to upload and import it.' + pinboard: + # page_title: "Import > Pinboard" + # description: 'This importer will import all your Instapaper articles. On the backup (https://pinboard.in/settings/backup) page, click on "JSON" in the "Bookmarks" section. A JSON file will be downloaded (like "pinboard_export").' + # how_to: 'Please select your Pinboard export and click on the below button to upload and import it.' developer: # page_title: 'Developer' @@ -443,7 +504,6 @@ user: plain_password_label: '????' email_label: 'E-posta' # enabled_label: 'Enabled' - # locked_label: 'Locked' # last_login_label: 'Last login' # twofactor_label: Two factor authentication # save: Save @@ -464,8 +524,10 @@ flashes: rss_updated: 'RSS bilgiler güncellendi' tagging_rules_updated: 'Tagging rules updated' tagging_rules_deleted: 'Tagging rule deleted' - user_added: 'User "%username%" added' rss_token_updated: 'RSS token updated' + # annotations_reset: Annotations reset + # tags_reset: Tags reset + # entries_reset: Entries reset entry: notice: entry_already_saved: 'Entry already saved on %date%' @@ -495,3 +557,8 @@ flashes: notice: # client_created: 'New client created.' # client_deleted: 'Client deleted' + user: + notice: + # added: 'User "%username%" added' + # updated: 'User "%username%" updated' + # deleted: 'User "%username%" deleted' diff --git a/src/Wallabag/CoreBundle/Resources/views/base.html.twig b/src/Wallabag/CoreBundle/Resources/views/base.html.twig index a1a9a136..289458d4 100644 --- a/src/Wallabag/CoreBundle/Resources/views/base.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/base.html.twig @@ -41,6 +41,8 @@ {% block css %} {% endblock %} {% block scripts %} + + {% endblock %} {% block title %}{% endblock %} – wallabag diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig index 98b0e119..3548f590 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig @@ -45,6 +45,14 @@ +
+
+ {{ form_label(form.config.action_mark_as_read) }} + {{ form_errors(form.config.action_mark_as_read) }} + {{ form_widget(form.config.action_mark_as_read) }} +
+
+
{{ form_label(form.config.language) }} @@ -71,6 +79,19 @@
+
+
+

{{ 'config.form_settings.android_configuration'|trans }}

+ Touch here to prefill your Android application +
+ + +
+
+ {{ form_rest(form.config) }} @@ -164,10 +185,41 @@ {% endif %} +

{{ 'config.reset.title'|trans }}

+
+

{{ 'config.reset.description'|trans }}

+ +
+ {{ form_widget(form.user._token) }} {{ form_widget(form.user.save) }} + {% if enabled_users > 1 %} +

{{ 'config.form_user.delete.title'|trans }}

+ +

{{ 'config.form_user.delete.description'|trans }}

+ + {% endif %} +

{{ 'config.tab_menu.password'|trans }}

{{ form_start(form.pwd) }} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig index 56a0faac..a4a56e46 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig @@ -1,18 +1,23 @@ {% extends "WallabagCoreBundle::layout.html.twig" %} {% block title %} - {% set currentTag = '' %} + {% set filter = '' %} {% if tag is defined %} - {% set currentTag = tag %} + {% set filter = tag %} {% endif %} - {% include "@WallabagCore/themes/common/Entry/_title.html.twig" with {'currentTag': currentTag} %} + {% if searchTerm is defined and searchTerm is not empty %} + {% set filter = searchTerm %} + {% endif %} + {% include "@WallabagCore/themes/common/Entry/_title.html.twig" with {'filter': filter} %} {% endblock %} {% block content %} + {% set listMode = app.user.config.listMode %}
{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}
{% for entry in entries %} -
+

{{ entry.title|raw }}

{% set readingTime = entry.readingTime / app.user.config.readingSpeed %} @@ -47,13 +52,13 @@
  • {{ 'entry.list.delete'|trans }}
  • {{ entry.domainName|removeWww }}
  • - {% if entry.previewPicture is null %} + {% if (entry.previewPicture is null or listMode == 1) %} -

    {{ entry.content|striptags|slice(0, 300) }}…

    +

    {{ entry.content|striptags|slice(0, 300) }}…

    {% else %}
    +
    + {{ form_label(form.httpStatus) }} +
    + {{ form_widget(form.httpStatus) }} +
    +
    +
    {{ form_label(form.readingTime) }} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig index 3689159b..2e9673d5 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig @@ -11,7 +11,7 @@