diff options
Diffstat (limited to 'src/Wallabag')
19 files changed, 397 insertions, 39 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index 3c98d4f4..073dee28 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml | |||
@@ -292,6 +292,7 @@ quickstart: | |||
292 | # pocket: 'Migrate from Pocket' | 292 | # pocket: 'Migrate from Pocket' |
293 | # wallabag_v1: 'Migrate from wallabag v1' | 293 | # wallabag_v1: 'Migrate from wallabag v1' |
294 | # wallabag_v2: 'Migrate from wallabag v2' | 294 | # wallabag_v2: 'Migrate from wallabag v2' |
295 | # readability: 'Migrate from Readability' | ||
295 | # developer: | 296 | # developer: |
296 | # title: 'Developers' | 297 | # title: 'Developers' |
297 | # create_application: 'Create your third application' | 298 | # create_application: 'Create your third application' |
@@ -341,6 +342,10 @@ import: | |||
341 | # wallabag_v2: | 342 | # wallabag_v2: |
342 | # page_title: 'Import > Wallabag v2' | 343 | # page_title: 'Import > Wallabag v2' |
343 | # description: 'This importer will import all your wallabag v2 articles. Go to All articles, then, on the export sidebar, click on "JSON". You will have a "All articles.json" file.' | 344 | # description: 'This importer will import all your wallabag v2 articles. Go to All articles, then, on the export sidebar, click on "JSON". You will have a "All articles.json" file.' |
345 | # readability: | ||
346 | # page_title: 'Import > Readability' | ||
347 | # description: 'This importer will import all your Readability articles. On the tools (https://www.readability.com/tools/) page, click on "Export your data" in the "Data Export" section. You will received an email to download a json (which does not end with .json in fact).' | ||
348 | # how_to: 'Please select your Readability export and click on the below button to upload and import it.' | ||
344 | 349 | ||
345 | developer: | 350 | developer: |
346 | # page_title: 'Developer' | 351 | # page_title: 'Developer' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index b3f6719b..4cfd240f 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml | |||
@@ -292,6 +292,7 @@ quickstart: | |||
292 | pocket: 'von Pocket migrieren' | 292 | pocket: 'von Pocket migrieren' |
293 | wallabag_v1: 'von wallabag v1 migrieren' | 293 | wallabag_v1: 'von wallabag v1 migrieren' |
294 | wallabag_v2: 'von wallabag v2 migrieren' | 294 | wallabag_v2: 'von wallabag v2 migrieren' |
295 | readability: 'von Readability migrieren' | ||
295 | developer: | 296 | developer: |
296 | title: 'Entwickler' | 297 | title: 'Entwickler' |
297 | create_application: 'Erstelle eine Anwendung und nutze die wallabag API' | 298 | create_application: 'Erstelle eine Anwendung und nutze die wallabag API' |
@@ -341,6 +342,10 @@ import: | |||
341 | wallabag_v2: | 342 | wallabag_v2: |
342 | page_title: 'Aus wallabag v2 importieren' | 343 | page_title: 'Aus wallabag v2 importieren' |
343 | description: 'Dieser Import wird all deine Artikel aus wallabag v2 importieren. Gehe auf "Alle Artikel" und dann, in der Exportieren-Seitenleiste auf "JSON". Dabei erhältst du eine "All articles.json"-Datei.' | 344 | description: 'Dieser Import wird all deine Artikel aus wallabag v2 importieren. Gehe auf "Alle Artikel" und dann, in der Exportieren-Seitenleiste auf "JSON". Dabei erhältst du eine "All articles.json"-Datei.' |
345 | readability: | ||
346 | page_title: 'Aus Readability importieren' | ||
347 | # description: 'This importer will import all your Readability articles. On the tools (https://www.readability.com/tools/) page, click on "Export your data" in the "Data Export" section. You will received an email to download a json (which does not end with .json in fact).' | ||
348 | # how_to: 'Please select your Readability export and click on the below button to upload and import it.' | ||
344 | 349 | ||
345 | developer: | 350 | developer: |
346 | page_title: 'Entwickler' | 351 | page_title: 'Entwickler' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index 220c4d9c..42374b40 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml | |||
@@ -292,6 +292,7 @@ quickstart: | |||
292 | pocket: 'Migrate from Pocket' | 292 | pocket: 'Migrate from Pocket' |
293 | wallabag_v1: 'Migrate from wallabag v1' | 293 | wallabag_v1: 'Migrate from wallabag v1' |
294 | wallabag_v2: 'Migrate from wallabag v2' | 294 | wallabag_v2: 'Migrate from wallabag v2' |
295 | readability: 'Migrate from Readability' | ||
295 | developer: | 296 | developer: |
296 | title: 'Developers' | 297 | title: 'Developers' |
297 | create_application: 'Create your third application' | 298 | create_application: 'Create your third application' |
@@ -341,6 +342,10 @@ import: | |||
341 | wallabag_v2: | 342 | wallabag_v2: |
342 | page_title: 'Import > Wallabag v2' | 343 | page_title: 'Import > Wallabag v2' |
343 | description: 'This importer will import all your wallabag v2 articles. Go to All articles, then, on the export sidebar, click on "JSON". You will have a "All articles.json" file.' | 344 | description: 'This importer will import all your wallabag v2 articles. Go to All articles, then, on the export sidebar, click on "JSON". You will have a "All articles.json" file.' |
345 | readability: | ||
346 | page_title: 'Import > Readability' | ||
347 | description: 'This importer will import all your Readability articles. On the tools (https://www.readability.com/tools/) page, click on "Export your data" in the "Data Export" section. You will received an email to download a json (which does not end with .json in fact).' | ||
348 | how_to: 'Please select your Readability export and click on the below button to upload and import it.' | ||
344 | 349 | ||
345 | developer: | 350 | developer: |
346 | page_title: 'Developer' | 351 | page_title: 'Developer' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index cae07cf2..ee84cc62 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml | |||
@@ -292,6 +292,7 @@ quickstart: | |||
292 | pocket: 'Migrar desde Pocket' | 292 | pocket: 'Migrar desde Pocket' |
293 | wallabag_v1: 'Migrar desde wallabag v1' | 293 | wallabag_v1: 'Migrar desde wallabag v1' |
294 | wallabag_v2: 'Migrar desde wallabag v2' | 294 | wallabag_v2: 'Migrar desde wallabag v2' |
295 | readability: 'Migrar desde Readability' | ||
295 | developer: | 296 | developer: |
296 | title: 'Promotores' | 297 | title: 'Promotores' |
297 | create_application: 'Cree su tercera aplicación' | 298 | create_application: 'Cree su tercera aplicación' |
@@ -341,6 +342,10 @@ import: | |||
341 | wallabag_v2: | 342 | wallabag_v2: |
342 | page_title: 'Importar > Wallabag v2' | 343 | page_title: 'Importar > Wallabag v2' |
343 | description: 'Va a importar sus artículos de otra instancia de wallabag v2. Vaya a Todos los artículos, entonces, en la barra lateral, oprima en "JSON". Usted tendrá un fichero "All articles.json"' | 344 | description: 'Va a importar sus artículos de otra instancia de wallabag v2. Vaya a Todos los artículos, entonces, en la barra lateral, oprima en "JSON". Usted tendrá un fichero "All articles.json"' |
345 | readability: | ||
346 | page_title: 'Importar > Readability' | ||
347 | # description: 'This importer will import all your Readability articles. On the tools (https://www.readability.com/tools/) page, click on "Export your data" in the "Data Export" section. You will received an email to download a json (which does not end with .json in fact).' | ||
348 | # how_to: 'Please select your Readability export and click on the below button to upload and import it.' | ||
344 | 349 | ||
345 | developer: | 350 | developer: |
346 | page_title: 'Promotor' | 351 | page_title: 'Promotor' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index fa34c307..e9af1e8d 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml | |||
@@ -292,6 +292,7 @@ quickstart: | |||
292 | pocket: 'مهاجرت از Pocket' | 292 | pocket: 'مهاجرت از Pocket' |
293 | wallabag_v1: 'مهاجرت از نسخهٔ یکم wallabag' | 293 | wallabag_v1: 'مهاجرت از نسخهٔ یکم wallabag' |
294 | wallabag_v2: 'مهاجرت از نسخهٔ دوم wallabag' | 294 | wallabag_v2: 'مهاجرت از نسخهٔ دوم wallabag' |
295 | readability: 'مهاجرت از نسخهٔ دوم Readability' | ||
295 | developer: | 296 | developer: |
296 | title: 'برنامهنویسان' | 297 | title: 'برنامهنویسان' |
297 | create_application: 'برنامهٔ wallabag خود را بسازید' | 298 | create_application: 'برنامهٔ wallabag خود را بسازید' |
@@ -316,16 +317,16 @@ tag: | |||
316 | # see_untagged_entries: 'See untagged entries' | 317 | # see_untagged_entries: 'See untagged entries' |
317 | 318 | ||
318 | import: | 319 | import: |
319 | page_title: 'درونریزی' | 320 | page_title: 'درونریزی' |
320 | page_description: 'به درونریز wallabag خوش آمدید. لطفاً سرویس قبلی خود را که میخواهید از آن مهاجرت کنید انتخاب کنید.' | 321 | page_description: 'به درونریز wallabag خوش آمدید. لطفاً سرویس قبلی خود را که میخواهید از آن مهاجرت کنید انتخاب کنید.' |
321 | action: | 322 | action: |
322 | import_contents: 'درونریزی مقالهها' | 323 | import_contents: 'درونریزی مقالهها' |
323 | form: | 324 | form: |
324 | mark_as_read_title: 'علامتزدن همه به عنوان خواندهشده؟' | 325 | mark_as_read_title: 'علامتزدن همه به عنوان خواندهشده؟' |
325 | mark_as_read_label: 'همهٔ مقالههای درونریزی شده را به عنوان خواندهشده علامت بزن' | 326 | mark_as_read_label: 'همهٔ مقالههای درونریزی شده را به عنوان خواندهشده علامت بزن' |
326 | file_label: 'پرونده' | 327 | file_label: 'پرونده' |
327 | save_label: 'بارگذاری پرونده' | 328 | save_label: 'بارگذاری پرونده' |
328 | pocket: | 329 | pocket: |
329 | page_title: 'درونریزی > Pocket' | 330 | page_title: 'درونریزی > Pocket' |
330 | description: "این برنامه همهٔ دادههای Pocket شما را درونریزی میکند. سرویس Pocket اجازه نمیدهد که متن مقالهها را درونریزی کنیم، بنابراین wallabag متن مقالهها را دوباره از اینترنت دریافت میکند." | 331 | description: "این برنامه همهٔ دادههای Pocket شما را درونریزی میکند. سرویس Pocket اجازه نمیدهد که متن مقالهها را درونریزی کنیم، بنابراین wallabag متن مقالهها را دوباره از اینترنت دریافت میکند." |
331 | config_missing: | 332 | config_missing: |
@@ -334,13 +335,17 @@ import: | |||
334 | user_message: 'مدیر سرور شما باید یک API Key برای Pocket تعریف کند.' | 335 | user_message: 'مدیر سرور شما باید یک API Key برای Pocket تعریف کند.' |
335 | authorize_message: 'شما میتوانید دادههایتان را از حساب Pocket خود درونریزی کنید. روی دکمهٔ زیر کلیک کنید و به برنامه اجازه دهید تا به getpocket.com وصل شود.' | 336 | authorize_message: 'شما میتوانید دادههایتان را از حساب Pocket خود درونریزی کنید. روی دکمهٔ زیر کلیک کنید و به برنامه اجازه دهید تا به getpocket.com وصل شود.' |
336 | connect_to_pocket: 'به Pocket وصل شو و دادهها را دریافت کن' | 337 | connect_to_pocket: 'به Pocket وصل شو و دادهها را دریافت کن' |
337 | wallabag_v1: | 338 | wallabag_v1: |
338 | page_title: 'درونریزی > Wallabag v1' | 339 | page_title: 'درونریزی > Wallabag v1' |
339 | description: 'این برنامه همهٔ دادههای شما را در نسخهٔ ۱ wallabag درونریزی میکند. در صفحهٔ تنظیمات، روی "JSON export" در بخش "Export your wallabag data" کلیک کنید. با این کار شما پروندهای به شکل "wallabag-export-1-xxxx-xx-xx.json" دریافت خواهید کرد.' | 340 | description: 'این برنامه همهٔ دادههای شما را در نسخهٔ ۱ wallabag درونریزی میکند. در صفحهٔ تنظیمات، روی "JSON export" در بخش "Export your wallabag data" کلیک کنید. با این کار شما پروندهای به شکل "wallabag-export-1-xxxx-xx-xx.json" دریافت خواهید کرد.' |
340 | how_to: 'لطفاً پرونده را انتخاب کنید و روی دکمهٔ زیر کلیک کنید تا بارگذاری و درونریزی شود.' | 341 | how_to: 'لطفاً پرونده را انتخاب کنید و روی دکمهٔ زیر کلیک کنید تا بارگذاری و درونریزی شود.' |
341 | wallabag_v2: | 342 | wallabag_v2: |
342 | page_title: 'درونریزی > Wallabag v2' | 343 | page_title: 'درونریزی > Wallabag v2' |
343 | description: 'این برنامه همهٔ دادههای شما را در نسخهٔ ۲ wallabag درونریزی میکند. به بخش «همهٔ مقالهها» بروید و در بخش «برونریزی» روی "JSON" کلیک کنید. با این کار شما پروندهای به شکل "All articles.json" دریافت خواهید کرد.' | 344 | description: 'این برنامه همهٔ دادههای شما را در نسخهٔ ۲ wallabag درونریزی میکند. به بخش «همهٔ مقالهها» بروید و در بخش «برونریزی» روی "JSON" کلیک کنید. با این کار شما پروندهای به شکل "All articles.json" دریافت خواهید کرد.' |
345 | readability: | ||
346 | page_title: 'درونریزی > Readability' | ||
347 | # description: 'This importer will import all your Readability articles. On the tools (https://www.readability.com/tools/) page, click on "Export your data" in the "Data Export" section. You will received an email to download a json (which does not end with .json in fact).' | ||
348 | # how_to: 'Please select your Readability export and click on the below button to upload and import it.' | ||
344 | 349 | ||
345 | developer: | 350 | developer: |
346 | # page_title: 'Developer' | 351 | # page_title: 'Developer' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index b8547fef..402cdf4a 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml | |||
@@ -292,6 +292,7 @@ quickstart: | |||
292 | pocket: 'Migrer depuis Pocket' | 292 | pocket: 'Migrer depuis Pocket' |
293 | wallabag_v1: 'Migrer depuis wallabag v1' | 293 | wallabag_v1: 'Migrer depuis wallabag v1' |
294 | wallabag_v2: 'Migrer depuis wallabag v2' | 294 | wallabag_v2: 'Migrer depuis wallabag v2' |
295 | readability: 'Migrer depuis Readability' | ||
295 | developer: | 296 | developer: |
296 | title: 'Pour les développeurs' | 297 | title: 'Pour les développeurs' |
297 | create_application: 'Créer votre application tierce' | 298 | create_application: 'Créer votre application tierce' |
@@ -341,6 +342,10 @@ import: | |||
341 | wallabag_v2: | 342 | wallabag_v2: |
342 | page_title: 'Importer > Wallabag v2' | 343 | page_title: 'Importer > Wallabag v2' |
343 | description: "Cet outil va importer tous vos articles d'une autre instance de wallabag v2. Allez dans tous vos articles, puis, sur la barre latérale, cliquez sur \"JSON\". Vous allez récupérer un fichier \"All articles.json\"" | 344 | description: "Cet outil va importer tous vos articles d'une autre instance de wallabag v2. Allez dans tous vos articles, puis, sur la barre latérale, cliquez sur \"JSON\". Vous allez récupérer un fichier \"All articles.json\"" |
345 | readability: | ||
346 | page_title: 'Importer > Readability' | ||
347 | description: 'Cet outil va importer toutes vos données de Readability. Sur la page des outils (https://www.readability.com/tools/), cliquez sur "Export your data" dans la section "Data Export". Vous allez recevoir un email avec un lien pour télécharger le json.' | ||
348 | how_to: "Choisissez le fichier de votre export Readability et cliquez sur le bouton ci-dessous pour l'importer." | ||
344 | 349 | ||
345 | developer: | 350 | developer: |
346 | page_title: 'Développeur' | 351 | page_title: 'Développeur' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml index d3c9ca4b..3aee4816 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml | |||
@@ -291,6 +291,7 @@ quickstart: | |||
291 | pocket: 'Trasferisci da Pocket' | 291 | pocket: 'Trasferisci da Pocket' |
292 | wallabag_v1: 'Trasferisci da wallabag v1' | 292 | wallabag_v1: 'Trasferisci da wallabag v1' |
293 | wallabag_v2: 'Trasferisci da wallabag v2' | 293 | wallabag_v2: 'Trasferisci da wallabag v2' |
294 | readability: 'Trasferisci da Readability' | ||
294 | developer: | 295 | developer: |
295 | title: 'Sviluppatori' | 296 | title: 'Sviluppatori' |
296 | create_application: 'Crea la tua applicazione' | 297 | create_application: 'Crea la tua applicazione' |
@@ -340,6 +341,10 @@ import: | |||
340 | wallabag_v2: | 341 | wallabag_v2: |
341 | page_title: 'Importa da > Wallabag v2' | 342 | page_title: 'Importa da > Wallabag v2' |
342 | description: 'Questo importatore copierà tutti i tuoi dati da un wallabag v2. Vai in "Tutti i contenuti", e, nella sidebar di esportazione, clicca su "JSON". Otterrai un file "Tutti i contenuti.json".' | 343 | description: 'Questo importatore copierà tutti i tuoi dati da un wallabag v2. Vai in "Tutti i contenuti", e, nella sidebar di esportazione, clicca su "JSON". Otterrai un file "Tutti i contenuti.json".' |
344 | readability: | ||
345 | page_title: 'Importa da > Readability' | ||
346 | # description: 'This importer will import all your Readability articles. On the tools (https://www.readability.com/tools/) page, click on "Export your data" in the "Data Export" section. You will received an email to download a json (which does not end with .json in fact).' | ||
347 | # how_to: 'Please select your Readability export and click on the below button to upload and import it.' | ||
343 | 348 | ||
344 | developer: | 349 | developer: |
345 | page_title: 'Sviluppatori' | 350 | page_title: 'Sviluppatori' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index c98b1220..855f2361 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml | |||
@@ -292,6 +292,7 @@ quickstart: | |||
292 | pocket: 'Migrar dempuèi Pocket' | 292 | pocket: 'Migrar dempuèi Pocket' |
293 | wallabag_v1: 'Migrar dempuèi wallabag v1' | 293 | wallabag_v1: 'Migrar dempuèi wallabag v1' |
294 | wallabag_v2: 'Migrar dempuèi wallabag v2' | 294 | wallabag_v2: 'Migrar dempuèi wallabag v2' |
295 | readability: 'Migrar dempuèi Readability' | ||
295 | developer: | 296 | developer: |
296 | title: 'Pels desvolopadors' | 297 | title: 'Pels desvolopadors' |
297 | create_application: 'Crear vòstra aplicacion tèrça' | 298 | create_application: 'Crear vòstra aplicacion tèrça' |
@@ -341,6 +342,10 @@ import: | |||
341 | wallabag_v2: | 342 | wallabag_v2: |
342 | page_title: 'Importer > Wallabag v2' | 343 | page_title: 'Importer > Wallabag v2' |
343 | description: "Aquesta aisina importarà totas vòstras donadas d'una instància mai de wallabag v2. Anatz dins totes vòstres articles, puèi, sus la barra laterala, clicatz sus \"JSON\". Traparatz un fichièr \"All articles.json\"" | 344 | description: "Aquesta aisina importarà totas vòstras donadas d'una instància mai de wallabag v2. Anatz dins totes vòstres articles, puèi, sus la barra laterala, clicatz sus \"JSON\". Traparatz un fichièr \"All articles.json\"" |
345 | readability: | ||
346 | page_title: 'Importer > Readability' | ||
347 | # description: 'This importer will import all your Readability articles. On the tools (https://www.readability.com/tools/) page, click on "Export your data" in the "Data Export" section. You will received an email to download a json (which does not end with .json in fact).' | ||
348 | # how_to: 'Please select your Readability export and click on the below button to upload and import it.' | ||
344 | 349 | ||
345 | developer: | 350 | developer: |
346 | page_title: 'Desvolopador' | 351 | page_title: 'Desvolopador' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index af2ab24f..da50cd4c 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml | |||
@@ -139,14 +139,14 @@ entry: | |||
139 | starred: 'Wpisy oznaczone gwiazdką' | 139 | starred: 'Wpisy oznaczone gwiazdką' |
140 | archived: 'Zarchiwizowane wpisy' | 140 | archived: 'Zarchiwizowane wpisy' |
141 | filtered: 'Odfiltrowane wpisy' | 141 | filtered: 'Odfiltrowane wpisy' |
142 | # filtered_tags: 'Filtered by tags' | 142 | filtered_tags: 'Filtrowane po tagach' |
143 | # untagged: 'Untagged entries' | 143 | untagged: 'Odtaguj wpisy' |
144 | list: | 144 | list: |
145 | number_on_the_page: '{0} Nie ma wpisów.|{1} Jest jeden wpis.|]1,Inf[ Są %count% wpisy.' | 145 | number_on_the_page: '{0} Nie ma wpisów.|{1} Jest jeden wpis.|]1,Inf[ Są %count% wpisy.' |
146 | reading_time: 'szacunkowy czas czytania' | 146 | reading_time: 'szacunkowy czas czytania' |
147 | reading_time_minutes: 'szacunkowy czas czytania: %readingTime% min' | 147 | reading_time_minutes: 'szacunkowy czas czytania: %readingTime% min' |
148 | reading_time_less_one_minute: 'szacunkowy czas czytania: <small class="inferieur"><</small> 1 min' | 148 | reading_time_less_one_minute: 'szacunkowy czas czytania: <small class="inferieur"><</small> 1 min' |
149 | # number_of_tags: '{1}and one other tag|]1,Inf[and %count% other tags' | 149 | number_of_tags: '{1} i inny tag|]1,Inf[i %count% innych tagów' |
150 | reading_time_minutes_short: '%readingTime% min' | 150 | reading_time_minutes_short: '%readingTime% min' |
151 | reading_time_less_one_minute_short: '<small class="inferieur"><</small> 1 min' | 151 | reading_time_less_one_minute_short: '<small class="inferieur"><</small> 1 min' |
152 | original_article: 'oryginał' | 152 | original_article: 'oryginał' |
@@ -188,8 +188,8 @@ entry: | |||
188 | add_a_tag: 'Dodaj tag' | 188 | add_a_tag: 'Dodaj tag' |
189 | share_content: 'Udostępnij' | 189 | share_content: 'Udostępnij' |
190 | share_email_label: 'Adres email' | 190 | share_email_label: 'Adres email' |
191 | # public_link: 'public link' | 191 | public_link: 'Publiczny link' |
192 | # delete_public_link: 'delete public link' | 192 | delete_public_link: 'Usuń publiczny link' |
193 | download: 'Pobierz' | 193 | download: 'Pobierz' |
194 | print: 'Drukuj' | 194 | print: 'Drukuj' |
195 | problem: | 195 | problem: |
@@ -292,6 +292,7 @@ quickstart: | |||
292 | pocket: 'Migruj z Pocket' | 292 | pocket: 'Migruj z Pocket' |
293 | wallabag_v1: 'Migruj z wallabag v1' | 293 | wallabag_v1: 'Migruj z wallabag v1' |
294 | wallabag_v2: 'Migruj z wallabag v2' | 294 | wallabag_v2: 'Migruj z wallabag v2' |
295 | readability: 'Migruj z Readability' | ||
295 | developer: | 296 | developer: |
296 | title: 'Deweloperzy' | 297 | title: 'Deweloperzy' |
297 | create_application: 'Stwórz swoją aplikację' | 298 | create_application: 'Stwórz swoją aplikację' |
@@ -313,7 +314,7 @@ tag: | |||
313 | page_title: 'Tagi' | 314 | page_title: 'Tagi' |
314 | list: | 315 | list: |
315 | number_on_the_page: '{0} Nie ma tagów.|{1} Jest jeden tag.|]1,Inf[ Są %count% tagi.' | 316 | number_on_the_page: '{0} Nie ma tagów.|{1} Jest jeden tag.|]1,Inf[ Są %count% tagi.' |
316 | # see_untagged_entries: 'See untagged entries' | 317 | see_untagged_entries: 'Zobacz nieotagowane wpisy' |
317 | 318 | ||
318 | import: | 319 | import: |
319 | page_title: 'Import' | 320 | page_title: 'Import' |
@@ -341,6 +342,10 @@ import: | |||
341 | wallabag_v2: | 342 | wallabag_v2: |
342 | page_title: 'Import > Wallabag v2' | 343 | page_title: 'Import > Wallabag v2' |
343 | description: 'Ten importer, zaimportuje wszystkie twoje artykułu z wallabag v2. Idź do wszystkich artykułów, a następnie na panelu exportu kliknij na "JSON". Otrzymasz plik "All articles.json".' | 344 | description: 'Ten importer, zaimportuje wszystkie twoje artykułu z wallabag v2. Idź do wszystkich artykułów, a następnie na panelu exportu kliknij na "JSON". Otrzymasz plik "All articles.json".' |
345 | readability: | ||
346 | page_title: 'Import > Readability' | ||
347 | description: 'Ten importer, zaimportuje wszystkie twoje artykuły z Readability. Na stronie narzędzi (https://www.readability.com/tools/), kliknij na "Export your data" w sekcji "Data Export". Otrzymach email z plikiem JSON (plik nie będzie zawierał rozszerzenia .json).' | ||
348 | how_to: 'Wybierz swój plik eksportu z Readability i kliknij poniższy przycisk, aby go załadować.' | ||
344 | 349 | ||
345 | developer: | 350 | developer: |
346 | page_title: 'Deweloper' | 351 | page_title: 'Deweloper' |
@@ -348,7 +353,7 @@ developer: | |||
348 | documentation: 'Dokumentacja' | 353 | documentation: 'Dokumentacja' |
349 | how_to_first_app: 'Jak stworzyć moją pierwszą aplikację' | 354 | how_to_first_app: 'Jak stworzyć moją pierwszą aplikację' |
350 | full_documentation: 'Pokaż pełne API' | 355 | full_documentation: 'Pokaż pełne API' |
351 | # list_methods: 'List API methods' | 356 | list_methods: 'Lista metod API' |
352 | clients: | 357 | clients: |
353 | title: 'Klienci' | 358 | title: 'Klienci' |
354 | create_new: 'Utwórz nowego klienta' | 359 | create_new: 'Utwórz nowego klienta' |
@@ -406,7 +411,7 @@ flashes: | |||
406 | notice: | 411 | notice: |
407 | entry_already_saved: 'Wpis już został dodany %date%' | 412 | entry_already_saved: 'Wpis już został dodany %date%' |
408 | entry_saved: 'Wpis zapisany' | 413 | entry_saved: 'Wpis zapisany' |
409 | # entry_saved_failed: 'Failed to save entry' | 414 | entry_saved_failed: 'Zapis artykułu się nie powiódł' |
410 | entry_updated: 'Wpis zaktualizowany' | 415 | entry_updated: 'Wpis zaktualizowany' |
411 | entry_reloaded: 'Wpis ponownie załadowany' | 416 | entry_reloaded: 'Wpis ponownie załadowany' |
412 | entry_reload_failed: 'Błąd ponownego załadowania' | 417 | entry_reload_failed: 'Błąd ponownego załadowania' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index d4ee5cbd..f41609d0 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml | |||
@@ -292,6 +292,7 @@ quickstart: | |||
292 | # pocket: 'Migrate from Pocket' | 292 | # pocket: 'Migrate from Pocket' |
293 | # wallabag_v1: 'Migrate from wallabag v1' | 293 | # wallabag_v1: 'Migrate from wallabag v1' |
294 | # wallabag_v2: 'Migrate from wallabag v2' | 294 | # wallabag_v2: 'Migrate from wallabag v2' |
295 | # readability: 'Migrate from Readability' | ||
295 | # developer: | 296 | # developer: |
296 | # title: 'Developers' | 297 | # title: 'Developers' |
297 | # create_application: 'Create your third application' | 298 | # create_application: 'Create your third application' |
@@ -341,6 +342,10 @@ import: | |||
341 | # wallabag_v2: | 342 | # wallabag_v2: |
342 | # page_title: 'Import > Wallabag v2' | 343 | # page_title: 'Import > Wallabag v2' |
343 | # description: 'This importer will import all your wallabag v2 articles. Go to All articles, then, on the export sidebar, click on "JSON". You will have a "All articles.json" file.' | 344 | # description: 'This importer will import all your wallabag v2 articles. Go to All articles, then, on the export sidebar, click on "JSON". You will have a "All articles.json" file.' |
345 | # readability: | ||
346 | # page_title: 'Import > Readability' | ||
347 | # description: 'This importer will import all your Readability articles. On the tools (https://www.readability.com/tools/) page, click on "Export your data" in the "Data Export" section. You will received an email to download a json (which does not end with .json in fact).' | ||
348 | # how_to: 'Please select your Readability export and click on the below button to upload and import it.' | ||
344 | 349 | ||
345 | developer: | 350 | developer: |
346 | # page_title: 'Developer' | 351 | # page_title: 'Developer' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml index 78a72d86..6dfbfa89 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml | |||
@@ -292,6 +292,7 @@ quickstart: | |||
292 | pocket: "Pocket üzerindeki verilerinizi wallabag'e aktarın" | 292 | pocket: "Pocket üzerindeki verilerinizi wallabag'e aktarın" |
293 | wallabag_v1: "wallabag v1 üzerindeki verilerinizi wallabag'in yeni sürümüne aktarın" | 293 | wallabag_v1: "wallabag v1 üzerindeki verilerinizi wallabag'in yeni sürümüne aktarın" |
294 | wallabag_v2: "wallabag v2 üzerindeki verilerinizi wallabag'in yeni sürümüne aktarın" | 294 | wallabag_v2: "wallabag v2 üzerindeki verilerinizi wallabag'in yeni sürümüne aktarın" |
295 | readability: "Readability üzerindeki verilerinizi wallabag'e aktarın'" | ||
295 | developer: | 296 | developer: |
296 | # title: 'Developers' | 297 | # title: 'Developers' |
297 | # create_application: 'Create your third application' | 298 | # create_application: 'Create your third application' |
@@ -341,6 +342,10 @@ import: | |||
341 | wallabag_v2: | 342 | wallabag_v2: |
342 | page_title: 'İçe Aktar > Wallabag v2' | 343 | page_title: 'İçe Aktar > Wallabag v2' |
343 | # description: 'This importer will import all your wallabag v2 articles. Go to All articles, then, on the export sidebar, click on "JSON". You will have a "All articles.json" file.' | 344 | # description: 'This importer will import all your wallabag v2 articles. Go to All articles, then, on the export sidebar, click on "JSON". You will have a "All articles.json" file.' |
345 | readability: | ||
346 | page_title: 'İçe Aktar > Readability' | ||
347 | # description: 'This importer will import all your Readability articles. On the tools (https://www.readability.com/tools/) page, click on "Export your data" in the "Data Export" section. You will received an email to download a json (which does not end with .json in fact).' | ||
348 | # how_to: 'Please select your Readability export and click on the below button to upload and import it.' | ||
344 | 349 | ||
345 | developer: | 350 | developer: |
346 | # page_title: 'Developer' | 351 | # page_title: 'Developer' |
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 6c46f91f..675168bb 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 | |||
@@ -30,29 +30,32 @@ | |||
30 | <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&body={{ entry.url|url_encode }}" title="{{ 'entry.view.left_menu.problem.label'|trans }}" class="tool bad-display icon icon-delete"><span>{{ 'entry.view.left_menu.problem.label'|trans }}</span></a></li> | 30 | <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&body={{ entry.url|url_encode }}" title="{{ 'entry.view.left_menu.problem.label'|trans }}" class="tool bad-display icon icon-delete"><span>{{ 'entry.view.left_menu.problem.label'|trans }}</span></a></li> |
31 | </ul> | 31 | </ul> |
32 | </div> | 32 | </div> |
33 | <div class="link mdi-action-today"> | ||
34 | {{ 'entry.view.created_at'|trans }}: {{ entry.createdAt|date('Y-m-d') }} | ||
35 | </div> | ||
36 | 33 | ||
37 | <div class="link mdi-action-query-builder"> | 34 | <div id="article-informations"> |
38 | {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} | 35 | <div class="link mdi-action-today"> |
39 | {% if readingTime > 0 %} | 36 | {{ 'entry.view.created_at'|trans }}: {{ entry.createdAt|date('Y-m-d') }} |
40 | {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round})|capitalize }} | 37 | </div> |
41 | {% else %} | ||
42 | {{ 'entry.list.reading_time_less_one_minute'|trans|raw }} | ||
43 | {% endif %} | ||
44 | </div> | ||
45 | 38 | ||
46 | {% set nbAnnotations = entry.annotations | length %} | 39 | <div class="link mdi-action-query-builder"> |
47 | <span class="tool link"><i class="material-icons link">comment</i> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span> | 40 | {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} |
48 | <aside class="tags"> | 41 | {% if readingTime > 0 %} |
49 | {% for tag in entry.tags %} | 42 | {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round})|capitalize }} |
50 | <span class="label-outline"><i class="material-icons">label_outline</i> {{ tag.label }}</span> <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}"class="nostyle"><i>✘</i></a> | 43 | {% else %} |
51 | {% endfor %} | 44 | {{ 'entry.list.reading_time_less_one_minute'|trans|raw }} |
52 | <div class="input-field nav-panel-add-tag" style="display: none"> | 45 | {% endif %} |
53 | {{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }} | ||
54 | </div> | 46 | </div> |
55 | </aside> | 47 | |
48 | {% set nbAnnotations = entry.annotations | length %} | ||
49 | <span class="tool link"><i class="material-icons link">comment</i> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span> | ||
50 | <aside class="tags"> | ||
51 | {% for tag in entry.tags %} | ||
52 | <span class="label-outline"><i class="material-icons">label_outline</i> {{ tag.label }}</span> <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}"class="nostyle"><i>✘</i></a> | ||
53 | {% endfor %} | ||
54 | <div class="input-field nav-panel-add-tag" style="display: none"> | ||
55 | {{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }} | ||
56 | </div> | ||
57 | </aside> | ||
58 | </div> | ||
56 | {% if entry.previewPicture is not null %} | 59 | {% if entry.previewPicture is not null %} |
57 | <div><img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|raw }}" /></div> | 60 | <div><img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|raw }}" /></div> |
58 | {% endif %} | 61 | {% endif %} |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/quickstart.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/quickstart.html.twig index b3d3d5a0..ea1c1cbe 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/quickstart.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/quickstart.html.twig | |||
@@ -39,6 +39,7 @@ | |||
39 | <li><a href="{{ path('import_pocket') }}">{{ 'quickstart.migrate.pocket'|trans }}</a></li> | 39 | <li><a href="{{ path('import_pocket') }}">{{ 'quickstart.migrate.pocket'|trans }}</a></li> |
40 | <li><a href="{{ path('import_wallabag_v1') }}">{{ 'quickstart.migrate.wallabag_v1'|trans }}</a></li> | 40 | <li><a href="{{ path('import_wallabag_v1') }}">{{ 'quickstart.migrate.wallabag_v1'|trans }}</a></li> |
41 | <li><a href="{{ path('import_wallabag_v2') }}">{{ 'quickstart.migrate.wallabag_v2'|trans }}</a></li> | 41 | <li><a href="{{ path('import_wallabag_v2') }}">{{ 'quickstart.migrate.wallabag_v2'|trans }}</a></li> |
42 | <li><a href="{{ path('import_readability') }}">{{ 'quickstart.migrate.readability'|trans }}</a></li> | ||
42 | </ul> | 43 | </ul> |
43 | 44 | ||
44 | <h4>{{ 'quickstart.developer.title'|trans }}</h4> | 45 | <h4>{{ 'quickstart.developer.title'|trans }}</h4> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig index eb5d88e3..9b587c34 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig | |||
@@ -206,17 +206,18 @@ | |||
206 | </header> | 206 | </header> |
207 | <aside> | 207 | <aside> |
208 | {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} | 208 | {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} |
209 | <span class="link mdi-action-query-builder"> | 209 | <span class="mdi-action-query-builder"></span> |
210 | <span class="link"> | ||
210 | {% if readingTime > 0 %} | 211 | {% if readingTime > 0 %} |
211 | {{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': readingTime|round}) }} | 212 | {{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': readingTime|round}) }} |
212 | {% else %} | 213 | {% else %} |
213 | {{ 'entry.list.reading_time_less_one_minute_short'|trans|raw }} | 214 | {{ 'entry.list.reading_time_less_one_minute_short'|trans|raw }} |
214 | {% endif %} | 215 | {% endif %} |
215 | </span> | 216 | </span> |
216 | <span class="link mdi-action-today" title="{{ 'entry.view.created_at'|trans }}"> {{ entry.createdAt|date('Y-m-d') }}</span> | 217 | <span class="mdi-action-today" title="{{ 'entry.view.created_at'|trans }}"> </span> <span class="link">{{ entry.createdAt|date('Y-m-d') }}</span> |
217 | <a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool"> | 218 | <a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool"> |
218 | <span class="link"><i class="material-icons link">link</i> {{ entry.domainName|removeWww }}</span></a> | 219 | <i class="material-icons link">link</i> <span class="link">{{ entry.domainName|removeWww }}</span></a> |
219 | <span class="tool link"><i class="material-icons link">comment</i> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span> | 220 | <span class="tool"><i class="material-icons link">comment</i> <span class="link">{{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span> |
220 | <div id="list"> | 221 | <div id="list"> |
221 | {% for tag in entry.tags %} | 222 | {% for tag in entry.tags %} |
222 | <div class="chip"> | 223 | <div class="chip"> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/quickstart.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/quickstart.html.twig index 59dd037b..8cbf4ab4 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/quickstart.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/quickstart.html.twig | |||
@@ -44,6 +44,7 @@ | |||
44 | <li><a href="{{ path('import_pocket') }}">{{ 'quickstart.migrate.pocket'|trans }}</a></li> | 44 | <li><a href="{{ path('import_pocket') }}">{{ 'quickstart.migrate.pocket'|trans }}</a></li> |
45 | <li><a href="{{ path('import_wallabag_v1') }}">{{ 'quickstart.migrate.wallabag_v1'|trans }}</a></li> | 45 | <li><a href="{{ path('import_wallabag_v1') }}">{{ 'quickstart.migrate.wallabag_v1'|trans }}</a></li> |
46 | <li><a href="{{ path('import_wallabag_v2') }}">{{ 'quickstart.migrate.wallabag_v2'|trans }}</a></li> | 46 | <li><a href="{{ path('import_wallabag_v2') }}">{{ 'quickstart.migrate.wallabag_v2'|trans }}</a></li> |
47 | <li><a href="{{ path('import_readability') }}">{{ 'quickstart.migrate.readability'|trans }}</a></li> | ||
47 | </ul> | 48 | </ul> |
48 | 49 | ||
49 | <h4>{{ 'quickstart.developer.title'|trans }}</h4> | 50 | <h4>{{ 'quickstart.developer.title'|trans }}</h4> |
diff --git a/src/Wallabag/ImportBundle/Controller/ReadabilityController.php b/src/Wallabag/ImportBundle/Controller/ReadabilityController.php new file mode 100644 index 00000000..b61aa99c --- /dev/null +++ b/src/Wallabag/ImportBundle/Controller/ReadabilityController.php | |||
@@ -0,0 +1,65 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\ImportBundle\Controller; | ||
4 | |||
5 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | ||
6 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
7 | use Symfony\Component\HttpFoundation\Request; | ||
8 | use Wallabag\ImportBundle\Form\Type\UploadImportType; | ||
9 | |||
10 | class ReadabilityController extends Controller | ||
11 | { | ||
12 | /** | ||
13 | * @Route("/readability", name="import_readability") | ||
14 | */ | ||
15 | public function indexAction(Request $request) | ||
16 | { | ||
17 | $form = $this->createForm(UploadImportType::class); | ||
18 | $form->handleRequest($request); | ||
19 | |||
20 | $readability = $this->get('wallabag_import.readability.import'); | ||
21 | |||
22 | if ($form->isValid()) { | ||
23 | $file = $form->get('file')->getData(); | ||
24 | $markAsRead = $form->get('mark_as_read')->getData(); | ||
25 | $name = 'readability_'.$this->getUser()->getId().'.json'; | ||
26 | |||
27 | if (in_array($file->getClientMimeType(), $this->getParameter('wallabag_import.allow_mimetypes')) && $file->move($this->getParameter('wallabag_import.resource_dir'), $name)) { | ||
28 | $res = $readability | ||
29 | ->setUser($this->getUser()) | ||
30 | ->setFilepath($this->getParameter('wallabag_import.resource_dir').'/'.$name) | ||
31 | ->setMarkAsRead($markAsRead) | ||
32 | ->import(); | ||
33 | |||
34 | $message = 'flashes.import.notice.failed'; | ||
35 | |||
36 | if (true === $res) { | ||
37 | $summary = $readability->getSummary(); | ||
38 | $message = $this->get('translator')->trans('flashes.import.notice.summary', [ | ||
39 | '%imported%' => $summary['imported'], | ||
40 | '%skipped%' => $summary['skipped'], | ||
41 | ]); | ||
42 | |||
43 | unlink($this->getParameter('wallabag_import.resource_dir').'/'.$name); | ||
44 | } | ||
45 | |||
46 | $this->get('session')->getFlashBag()->add( | ||
47 | 'notice', | ||
48 | $message | ||
49 | ); | ||
50 | |||
51 | return $this->redirect($this->generateUrl('homepage')); | ||
52 | } else { | ||
53 | $this->get('session')->getFlashBag()->add( | ||
54 | 'notice', | ||
55 | 'flashes.import.notice.failed_on_file' | ||
56 | ); | ||
57 | } | ||
58 | } | ||
59 | |||
60 | return $this->render('WallabagImportBundle:Readability:index.html.twig', [ | ||
61 | 'form' => $form->createView(), | ||
62 | 'import' => $readability, | ||
63 | ]); | ||
64 | } | ||
65 | } | ||
diff --git a/src/Wallabag/ImportBundle/Import/ReadabilityImport.php b/src/Wallabag/ImportBundle/Import/ReadabilityImport.php new file mode 100644 index 00000000..37b160c5 --- /dev/null +++ b/src/Wallabag/ImportBundle/Import/ReadabilityImport.php | |||
@@ -0,0 +1,179 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\ImportBundle\Import; | ||
4 | |||
5 | use Wallabag\CoreBundle\Entity\Entry; | ||
6 | use Wallabag\UserBundle\Entity\User; | ||
7 | |||
8 | class ReadabilityImport extends AbstractImport | ||
9 | { | ||
10 | private $user; | ||
11 | private $skippedEntries = 0; | ||
12 | private $importedEntries = 0; | ||
13 | private $filepath; | ||
14 | private $markAsRead; | ||
15 | |||
16 | /** | ||
17 | * We define the user in a custom call because on the import command there is no logged in user. | ||
18 | * So we can't retrieve user from the `security.token_storage` service. | ||
19 | * | ||
20 | * @param User $user | ||
21 | */ | ||
22 | public function setUser(User $user) | ||
23 | { | ||
24 | $this->user = $user; | ||
25 | |||
26 | return $this; | ||
27 | } | ||
28 | |||
29 | /** | ||
30 | * {@inheritdoc} | ||
31 | */ | ||
32 | public function getName() | ||
33 | { | ||
34 | return 'Readability'; | ||
35 | } | ||
36 | |||
37 | /** | ||
38 | * {@inheritdoc} | ||
39 | */ | ||
40 | public function getUrl() | ||
41 | { | ||
42 | return 'import_readability'; | ||
43 | } | ||
44 | |||
45 | /** | ||
46 | * {@inheritdoc} | ||
47 | */ | ||
48 | public function getDescription() | ||
49 | { | ||
50 | return 'import.readability.description'; | ||
51 | } | ||
52 | |||
53 | /** | ||
54 | * Set file path to the json file. | ||
55 | * | ||
56 | * @param string $filepath | ||
57 | */ | ||
58 | public function setFilepath($filepath) | ||
59 | { | ||
60 | $this->filepath = $filepath; | ||
61 | |||
62 | return $this; | ||
63 | } | ||
64 | |||
65 | /** | ||
66 | * Set whether articles must be all marked as read. | ||
67 | * | ||
68 | * @param bool $markAsRead | ||
69 | */ | ||
70 | public function setMarkAsRead($markAsRead) | ||
71 | { | ||
72 | $this->markAsRead = $markAsRead; | ||
73 | |||
74 | return $this; | ||
75 | } | ||
76 | |||
77 | /** | ||
78 | * Get whether articles must be all marked as read. | ||
79 | */ | ||
80 | public function getMarkAsRead() | ||
81 | { | ||
82 | return $this->markAsRead; | ||
83 | } | ||
84 | |||
85 | /** | ||
86 | * {@inheritdoc} | ||
87 | */ | ||
88 | public function getSummary() | ||
89 | { | ||
90 | return [ | ||
91 | 'skipped' => $this->skippedEntries, | ||
92 | 'imported' => $this->importedEntries, | ||
93 | ]; | ||
94 | } | ||
95 | |||
96 | /** | ||
97 | * {@inheritdoc} | ||
98 | */ | ||
99 | public function import() | ||
100 | { | ||
101 | if (!$this->user) { | ||
102 | $this->logger->error('ReadabilityImport: user is not defined'); | ||
103 | |||
104 | return false; | ||
105 | } | ||
106 | |||
107 | if (!file_exists($this->filepath) || !is_readable($this->filepath)) { | ||
108 | $this->logger->error('ReadabilityImport: unable to read file', ['filepath' => $this->filepath]); | ||
109 | |||
110 | return false; | ||
111 | } | ||
112 | |||
113 | $data = json_decode(file_get_contents($this->filepath), true); | ||
114 | |||
115 | if (empty($data) || empty($data['bookmarks'])) { | ||
116 | return false; | ||
117 | } | ||
118 | |||
119 | $this->parseEntries($data['bookmarks']); | ||
120 | |||
121 | return true; | ||
122 | } | ||
123 | |||
124 | /** | ||
125 | * Parse and insert all given entries. | ||
126 | * | ||
127 | * @param $entries | ||
128 | */ | ||
129 | protected function parseEntries($entries) | ||
130 | { | ||
131 | $i = 1; | ||
132 | |||
133 | foreach ($entries as $importedEntry) { | ||
134 | $existingEntry = $this->em | ||
135 | ->getRepository('WallabagCoreBundle:Entry') | ||
136 | ->findByUrlAndUserId($importedEntry['article__url'], $this->user->getId()); | ||
137 | |||
138 | if (false !== $existingEntry) { | ||
139 | ++$this->skippedEntries; | ||
140 | continue; | ||
141 | } | ||
142 | |||
143 | $data = [ | ||
144 | 'title' => $importedEntry['article__title'], | ||
145 | 'url' => $importedEntry['article__url'], | ||
146 | 'content_type' => '', | ||
147 | 'language' => '', | ||
148 | 'is_archived' => $importedEntry['archive'] || $this->markAsRead, | ||
149 | 'is_starred' => $importedEntry['favorite'], | ||
150 | ]; | ||
151 | |||
152 | $entry = $this->fetchContent( | ||
153 | new Entry($this->user), | ||
154 | $data['url'], | ||
155 | $data | ||
156 | ); | ||
157 | |||
158 | // jump to next entry in case of problem while getting content | ||
159 | if (false === $entry) { | ||
160 | ++$this->skippedEntries; | ||
161 | continue; | ||
162 | } | ||
163 | $entry->setArchived($data['is_archived']); | ||
164 | $entry->setStarred($data['is_starred']); | ||
165 | |||
166 | $this->em->persist($entry); | ||
167 | ++$this->importedEntries; | ||
168 | |||
169 | // flush every 20 entries | ||
170 | if (($i % 20) === 0) { | ||
171 | $this->em->flush(); | ||
172 | $this->em->clear($entry); | ||
173 | } | ||
174 | ++$i; | ||
175 | } | ||
176 | |||
177 | $this->em->flush(); | ||
178 | } | ||
179 | } | ||
diff --git a/src/Wallabag/ImportBundle/Resources/config/services.yml b/src/Wallabag/ImportBundle/Resources/config/services.yml index 86b44cb3..520d43af 100644 --- a/src/Wallabag/ImportBundle/Resources/config/services.yml +++ b/src/Wallabag/ImportBundle/Resources/config/services.yml | |||
@@ -43,3 +43,13 @@ services: | |||
43 | - [ setLogger, [ "@logger" ]] | 43 | - [ setLogger, [ "@logger" ]] |
44 | tags: | 44 | tags: |
45 | - { name: wallabag_import.import, alias: wallabag_v2 } | 45 | - { name: wallabag_import.import, alias: wallabag_v2 } |
46 | |||
47 | wallabag_import.readability.import: | ||
48 | class: Wallabag\ImportBundle\Import\ReadabilityImport | ||
49 | arguments: | ||
50 | - "@doctrine.orm.entity_manager" | ||
51 | - "@wallabag_core.content_proxy" | ||
52 | calls: | ||
53 | - [ setLogger, [ "@logger" ]] | ||
54 | tags: | ||
55 | - { name: wallabag_import.import, alias: readability } | ||
diff --git a/src/Wallabag/ImportBundle/Resources/views/Readability/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Readability/index.html.twig new file mode 100644 index 00000000..f527d309 --- /dev/null +++ b/src/Wallabag/ImportBundle/Resources/views/Readability/index.html.twig | |||
@@ -0,0 +1,43 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | ||
2 | |||
3 | {% block title %}{{ 'import.readability.page_title'|trans }}{% endblock %} | ||
4 | |||
5 | {% block content %} | ||
6 | <div class="row"> | ||
7 | <div class="col s12"> | ||
8 | <div class="card-panel settings"> | ||
9 | <div class="row"> | ||
10 | <blockquote>{{ import.description|trans }}</blockquote> | ||
11 | <p>{{ 'import.readability.how_to'|trans }}</p> | ||
12 | |||
13 | <div class="col s12"> | ||
14 | {{ form_start(form, {'method': 'POST'}) }} | ||
15 | {{ form_errors(form) }} | ||
16 | <div class="row"> | ||
17 | <div class="file-field input-field col s12"> | ||
18 | {{ form_errors(form.file) }} | ||
19 | <div class="btn"> | ||
20 | <span>{{ form.file.vars.label|trans }}</span> | ||
21 | {{ form_widget(form.file) }} | ||
22 | </div> | ||
23 | <div class="file-path-wrapper"> | ||
24 | <input class="file-path validate" type="text"> | ||
25 | </div> | ||
26 | </div> | ||
27 | <div class="input-field col s6 with-checkbox"> | ||
28 | <h6>{{ 'import.form.mark_as_read_title'|trans }}</h6> | ||
29 | {{ form_widget(form.mark_as_read) }} | ||
30 | {{ form_label(form.mark_as_read) }} | ||
31 | </div> | ||
32 | </div> | ||
33 | |||
34 | {{ form_widget(form.save, { 'attr': {'class': 'btn waves-effect waves-light'} }) }} | ||
35 | |||
36 | {{ form_rest(form) }} | ||
37 | </form> | ||
38 | </div> | ||
39 | </div> | ||
40 | </div> | ||
41 | </div> | ||
42 | </div> | ||
43 | {% endblock %} | ||