From 8698084ffe07b21bbbd17da48f5bd1a2ec26c527 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Fri, 4 Aug 2023 11:06:04 +0200 Subject: [PATCH] lang sync + syntax highlighting for article filters --- localization/rssguard_de.ts | 52 +++---- localization/rssguard_en_GB.ts | 104 +++++++------- localization/rssguard_fr.ts | 112 ++++++++------- localization/rssguard_nl.ts | 46 +++--- .../gui/reusable/jssyntaxhighlighter.cpp | 132 ++++++++++-------- .../gui/reusable/jssyntaxhighlighter.h | 26 ++-- 6 files changed, 253 insertions(+), 219 deletions(-) diff --git a/localization/rssguard_de.ts b/localization/rssguard_de.ts index e2ecf2f5f..6bcea5d15 100644 --- a/localization/rssguard_de.ts +++ b/localization/rssguard_de.ts @@ -139,7 +139,7 @@ Error: %1 Go to survey - + Gehe zur Umfrage @@ -969,7 +969,7 @@ Item ID: %5 Do you really want to clean all articles from selected item? - + Möchtest du wirklich alle Artikel des ausgewählten Elementes löschen? @@ -1102,7 +1102,7 @@ or this functionality is not implemented yet. Context menu for probe - + Kontextmenü für Probe @@ -1326,12 +1326,12 @@ or this functionality is not implemented yet. Name for your probe - + Name deiner Probe Regular expression - + Regular Expression @@ -1347,17 +1347,17 @@ or this functionality is not implemented yet. Probe name cannot be empty. - + Name der Probe kann nicht leer sein. Regular expression is not well-formed. - + Regular Expression ist nicht gut aufgebaut. Create new probe - + Erstelle neue Probe @@ -1367,7 +1367,7 @@ or this functionality is not implemented yet. Edit probe '%1' - + Bearbeite Probe '%1' @@ -1803,12 +1803,12 @@ or this functionality is not implemented yet. Add articles with any date into the database - + Füge Artikel mit allen Daten zur Datenbank hinzu Avoid adding articles before this date into the database - + Meide es, Artikel vor diesem Datum in die Datenbank hinzuzufügen. @@ -1823,12 +1823,12 @@ or this functionality is not implemented yet. Right-to-left layout - + Rechts-nach-Links Layout Ignore notifications for this feed - + Ignoriere Benachrichtigungen dieses Feedes @@ -1836,7 +1836,7 @@ or this functionality is not implemented yet. Application log - + Anwendungsprotokoll @@ -1859,12 +1859,12 @@ or this functionality is not implemented yet. Open main menu - + Öffne Hauptmenü Open &main menu - + Öffne &Hauptmenü @@ -1894,22 +1894,22 @@ or this functionality is not implemented yet. F&eeds - + F&eeds &Add item - + &Füge Element hinzu &Move - + &Verschiebe Art&icles - + Art&ikel @@ -1924,7 +1924,7 @@ or this functionality is not implemented yet. &Web browser && tabs - + &Webbrowser && tabs @@ -1979,12 +1979,12 @@ or this functionality is not implemented yet. Fetch &selected - + Hole @ausgewählte Fetch selected feeds - + Hole ausgewählte Feeds @@ -4423,7 +4423,7 @@ Ablauf des Login tokens: %2 Is article important? - + Ist Artikel wichtig? @@ -5764,7 +5764,7 @@ Ablauf des Login tokens: %2 Regular expression - + Regular expression @@ -6313,7 +6313,7 @@ Authors of this application are NOT responsible for lost data. Avoid adding articles before this date into the database - + Meide es, Artikel vor diesem Datum in die Datenbank hinzuzufügen. diff --git a/localization/rssguard_en_GB.ts b/localization/rssguard_en_GB.ts index 928968cc2..c36938042 100644 --- a/localization/rssguard_en_GB.ts +++ b/localization/rssguard_en_GB.ts @@ -22,12 +22,12 @@ Cannot enable AdBlock - + Can't enable AdBlock There is some error in AdBlock component and it cannot be enabled. Check error message below (or application debug log) for more information. - + There is an error in the AdBlock component and can't be enabled. Check the error message below (or application debug log) for more information. @@ -37,14 +37,16 @@ There is error, check application log for more details and head to online documentation. - + There is an error, check the application log for more details and head over to the online documentation. There is error, check application log for more details and head to online documentation. Also make sure that Node.js is installed. Error: %1 - + There is an error, check the application log for more details and head over to the online documentation. Also make sure that Node.js is installed. + +Error: %1 @@ -142,17 +144,17 @@ Error: %1 Settings file not copied to output directory successfully. - + Failed to copy settings file to output directory. Database restoration was not initiated. Make sure that output directory is writable. - + Database restoration was not initiated. Make sure that the output directory is writable. Settings restoration was not initiated. Make sure that output directory is writable. - + Settings restoration was not initiated. Make sure that the output directory is writable. @@ -291,7 +293,7 @@ version by clicking this popup notification. Password is ok or it is not needed. - + Password is ok or is not needed. @@ -750,7 +752,7 @@ Item ID: %5 You cannot fetch new articles now because another critical operation is ongoing. - + You cannot fetch new articles right now because another critical operation is ongoing. @@ -2749,7 +2751,7 @@ or this functionality is not implemented yet. Database and/or settings were not copied to restoration directory successully. - Database and/or settings were not successully copied to the restoration directory. + Failed to copy database and/or settings to restoration directory. @@ -3585,7 +3587,7 @@ Login tokens expiration: %2 Some feeds might contain tens of thousands of articles and downloading all of them could take great amount of time, so sometimes it is good to download only certain amount of newest messages. - + Some feeds might contain tens of thousands of articles and downloading all of them could take a long time, so sometimes it is good to download only a certain amount of new messages. @@ -4419,12 +4421,12 @@ Login tokens expiration: %2 Is article permanently deleted from recycle bin? - + Is the article permanently deleted from the recycle bin? ID of feed which this article belongs to. - + ID of the feed which this article belongs to. @@ -4617,12 +4619,12 @@ Login tokens expiration: %2 Show articles in last 24 hours - + Show articles from the last 24 hours Show articles in last 48 hours - + Show articles from the last 48 hours @@ -4790,7 +4792,7 @@ Login tokens expiration: %2 access to content was denied - + access to the content was denied @@ -4943,7 +4945,7 @@ Login tokens expiration: %2 Some feeds might contain tens of thousands of articles and downloading all of them could take great amount of time, so sometimes it is good to download only certain amount of newest messages. - + Some feeds might contain tens of thousands of articles and downloading all of them could take a long time, so sometimes it is good to download only a certain amount of new messages. @@ -6943,7 +6945,7 @@ Also, there are some built-in sounds. Just start typing ":" and they w Database file not copied to output directory successfully. - + Failed to copy database file to output directory. @@ -6951,12 +6953,12 @@ Also, there are some built-in sounds. Just start typing ":" and they w Cannot save data for category, detailed information was logged via debug log. - + Can't save data for category, detailed information was logged via debug log. Cannot save category data - + Can't save category data @@ -6989,7 +6991,7 @@ Also, there are some built-in sounds. Just start typing ":" and they w XML is not well-formed, %1 - + XML is not well-formatted, %1 @@ -6999,7 +7001,7 @@ Also, there are some built-in sounds. Just start typing ":" and they w Cannot move feed, detailed information was logged via debug log. - + Can't move the feed, detailed information was logged via the debug log. @@ -7011,12 +7013,12 @@ Type: %3 Cannot save feed data - + Can't save feed data Cannot move feed - + Can't move feed @@ -7029,7 +7031,7 @@ Type: %3 Set title for your feed. - + Set the title for your feed. @@ -7039,7 +7041,7 @@ Type: %3 Set description for your feed. - + Set the description for your feed. @@ -7129,7 +7131,7 @@ Type: %3 The URL does not meet standard pattern. Does your URL start with "http://" or "https://" prefix. - + The URL does not meet the standard pattern. Does your URL start with "http://" or "https://" prefix. @@ -7139,7 +7141,7 @@ Type: %3 Select icon file for the feed - + Select the icon file for the feed @@ -7266,7 +7268,7 @@ Also, you can post-process generated feed data with yet another script if you wi Select type of the standard feed. - + Select the type of the standard feed. @@ -7311,7 +7313,7 @@ Also, you can post-process generated feed data with yet another script if you wi Select icon for your feed. - + Select the icon for your feed. @@ -7324,7 +7326,7 @@ Also, you can post-process generated feed data with yet another script if you wi Do you want to load initial set of feeds? - + Do you want to load the initial set of feeds? @@ -7675,7 +7677,7 @@ Unread news: %2 Other error occurred, contact developers. - + An other error occurred, contact the developers. @@ -7742,7 +7744,7 @@ Unread news: %2 Password is ok or it is not needed. - + Password is ok or is not needed. @@ -7841,7 +7843,7 @@ Unread news: %2 Provide URL for your feed. - + Provide the URL for your feed. @@ -7851,7 +7853,7 @@ Unread news: %2 The URL does not meet standard pattern. Does your URL start with "http://" or "https://" prefix. - + The URL does not meet the standard pattern. Does your URL start with "http://" or "https://" prefix. @@ -7944,7 +7946,7 @@ Last login on: %4 Reader mode cannot be applied to current page. - + Reader mode cannot be applied to the current page. @@ -8000,12 +8002,12 @@ Last login on: %4 Auto-load images - + Enable auto-image loading JS enabled - + Enable JavaScript @@ -8025,7 +8027,7 @@ Last login on: %4 Local storage enabled - + Enable local storage @@ -8035,12 +8037,12 @@ Last login on: %4 XSS auditing enabled - + Enable XSS auditing Spatial navigation enabled - + Enable spatial navigation @@ -8050,7 +8052,7 @@ Last login on: %4 Hyperlink auditing enabled - + Enable hyperlink auditing @@ -8060,27 +8062,27 @@ Last login on: %4 Error pages enabled - + Enable error pages Plugins enabled - + Enable plugins Fullscreen enabled - + Enable fullscreen Screen capture enabled - + Enable screen capture WebGL enabled - + Enable WebGL @@ -8110,7 +8112,7 @@ Last login on: %4 Do you really want to clear web cache? - + Do you really want to clear the web cache? @@ -8145,17 +8147,17 @@ Last login on: %4 JS can paste from clipboard - + Allow JS to paste from clipboard DNS prefetch enabled - + Enable DNS prefetching PDF viewer enabled - + Enable PDF viewer \ No newline at end of file diff --git a/localization/rssguard_fr.ts b/localization/rssguard_fr.ts index 66840fcda..6e1297e94 100644 --- a/localization/rssguard_fr.ts +++ b/localization/rssguard_fr.ts @@ -139,7 +139,7 @@ Erreur : %1 Go to survey - + Aller au sondage @@ -824,7 +824,7 @@ Identifiant d'élément: %5 If you select intelligent synchronization, then only not-yet-fetched or updated articles are downloaded. Network usage is greatly reduced and overall synchronization speed is greatly improved, but first feed fetching could be slow anyway if your feed contains huge number of articles. - Si vous sélectionnez la synchronisation intelligente, alors seulement les articles non obtenus ou mis à jour seront téléchargés. La consommation de données est fortement réduite et la vitesse de synchronisation générale est fortement améliorée, mais la première obtention de flux peut être lente de toute façon si votre flux contient un nombre d'articles immense. + Si vous sélectionnez la synchronisation intelligente, alors seulement les articles pas encore obtenus ou mis à jour seront téléchargés. La consommation de données est fortement réduite et la vitesse de synchronisation générale est fortement améliorée, mais la première obtention de flux peut être lente de toute façon si votre flux contient un nombre d'articles très important. @@ -970,7 +970,7 @@ Identifiant d'élément: %5 Do you really want to clean all articles from selected item? - + Voulez-vous vraiment nettoyer tous les articles de l'élément sélectionné? @@ -1104,7 +1104,7 @@ ou cette fonctionnalité n'est pas encore implémentée. Context menu for probe - + Menu contextuel de votre sonde @@ -1328,7 +1328,7 @@ ou cette fonctionnalité n'est pas encore implémentée. Name for your probe - + Nom de votre sonde @@ -1349,17 +1349,17 @@ ou cette fonctionnalité n'est pas encore implémentée. Probe name cannot be empty. - + Le nom de votre sonde ne peut pas être vide. Regular expression is not well-formed. - + L'expression régulière n'est pas bien formattée. Create new probe - + Créer une nouvelle sonde @@ -1369,7 +1369,7 @@ ou cette fonctionnalité n'est pas encore implémentée. Edit probe '%1' - + Modifier sonde '%1' @@ -1805,12 +1805,12 @@ ou cette fonctionnalité n'est pas encore implémentée. Add articles with any date into the database - + Ajouter des articles avec une date quelconque dans la base de données Avoid adding articles before this date into the database - + Éviter d'ajouter des articles qui datent d'avant la date spécifiée dans la base de données @@ -1825,7 +1825,7 @@ ou cette fonctionnalité n'est pas encore implémentée. Right-to-left layout - + Mise en page de droite à gauche @@ -2121,7 +2121,7 @@ ou cette fonctionnalité n'est pas encore implémentée. Hides main window if it is visible and shows it if it is hidden. - Cacher la fenêtre principale si il est visible et la montrer si il est cacher. + Cacher la fenêtre principale si elle est visible et la montrer si elle est cachée. @@ -2206,7 +2206,7 @@ ou cette fonctionnalité n'est pas encore implémentée. &Donate... - &Faire un don... + &Faire un don ♥ @@ -2357,7 +2357,7 @@ ou cette fonctionnalité n'est pas encore implémentée. &Show tree expanders - + &Montrer les agrandisseurs de catégories @@ -2382,7 +2382,7 @@ ou cette fonctionnalité n'est pas encore implémentée. Expand/collapse selected item &recursively - + &Étendre/rétracter l'élément selectionné d'une manière &récursive @@ -2965,7 +2965,7 @@ Vous devez redémarrer manuellement. You can enter full command including interpreter here. - + Vous pouvez entrer votre commande complète (interprète inclus) ici. @@ -3045,7 +3045,7 @@ Vous devez redémarrer manuellement. Do not fetch icons - + Ne pas obtenir les icônes @@ -3365,7 +3365,7 @@ Vous pouvez désormais l'installer. There are some preconfigured OAuth tokens so you do not have to fill in your client ID/secret, but it is strongly recommended to obtain your own as it preconfigured tokens have limited global usage quota. If you wish to use preconfigured tokens, simply leave those fields empty and make sure to leave default value of redirect URL. - + Il y a certains jetons OAuth pré-configurés où vous n'avez pas besoin d'entrer votre ID/secret client, mais il est fortement recommandé d'obtenir le votre à vous vu que les jetons pré-configurés ont un quota global d'utilisation limité. Si vous souhaitez tout de même utiliser des jetons pré-configurés, alors laissez tout simplement ces champs vides et soyez sûrs de laisser la valeur du lien de redirection à celle par défaut. @@ -3453,7 +3453,7 @@ Vous pouvez désormais l'installer. failed to download list of labels - + le téléchargement de la liste d'étiquettes a echoué @@ -3618,12 +3618,12 @@ Expiration de jetons d'authentification: %2 If you select intelligent synchronization, then only not-yet-fetched or updated articles are downloaded. Network usage is greatly reduced and overall synchronization speed is greatly improved, but first feed fetching could be slow anyway if your feed contains huge number of articles. - Si vous selectionnez la synchronisation intelligente, alors seulement les articles non obtenus ou mis à jour seront téléchargés. La consommation de données est fortement réduite et la vitesse de synchronisation générale est fortement améliorée, mais la première obtention de flux peut être lente de toute façon si votre flux contient un nombre d'articles immense. + Si vous sélectionnez la synchronisation intelligente, alors seulement les articles pas encore obtenus ou mis à jour seront téléchargés. La consommation de données est fortement réduite et la vitesse de synchronisation générale est fortement améliorée, mais la première obtention de flux peut être lente de toute façon si votre flux contient un nombre d'articles très important. There are some preconfigured OAuth tokens so you do not have to fill in your client ID/secret, but it is strongly recommended to obtain your own as preconfigured tokens have limited global usage quota. If you wish to use preconfigured tokens, simply leave all above fields to their default values even if they are empty. - + Il y a certains jetons OAuth pré-configurés où vous n'avez pas besoin d'entrer votre ID/secret client, mais il est fortement recommandé d'obtenir le votre à vous vu que les jetons pré-configurés ont un quota global d'utilisation limité. Si vous souhaitez tout de même utiliser des jetons pré-configurés, alors laissez tout simplement les champs ci-dessus à leurs valeurs par défaut. @@ -3797,7 +3797,7 @@ Expiration de jetons d'authentification: %2 View more information on this - Voir plus d'infos sur ceci + Voir plus d'infos @@ -4081,7 +4081,7 @@ Expiration de jetons d'authentification: %2 Remove character formatting - Retirer le formattage de charactère + Retirer le formattage de caractère @@ -4412,7 +4412,7 @@ Expiration de jetons d'authentification: %2 RTL - + DAG @@ -4512,7 +4512,7 @@ Expiration de jetons d'authentification: %2 Layout direction of the article - + La direction de mise-en-page de l'article @@ -5091,7 +5091,7 @@ Expiration de jetons d'authentification: %2 Failed to start OAuth redirection listener. Maybe your rights are not high enough. - + Le lancement de l'écouteur de redirection OAuth a échoué. Peut-être que vous n'avez pas les droits suffisants. @@ -5377,7 +5377,7 @@ Feedly est un éspace sécurisé où vous pouvez organiser et rechercher les suj Node.js - package(s) failed to update - + Node.js - la mise à jour paquet(s) a échoué @@ -5416,7 +5416,7 @@ Liste d'agrégateurs compatibles: This service offers integration with standard online RSS/RDF/ATOM/JSON feeds and podcasts. - + Ce service offre une integration de flux & podcasts RSS/RDF/ATOM/JSON standards. @@ -5538,7 +5538,7 @@ Liste d'agrégateurs compatibles: Do you really want to empty your recycle bin? - + Voulez-vous vraiment vider votre corbeille? @@ -5772,7 +5772,7 @@ Expiration de jetons d'authentification: %2 Case-sensitive - + Les cases sont prises en compte @@ -5782,7 +5782,7 @@ Expiration de jetons d'authentification: %2 Wildcard - + Caractère de remplacement @@ -5813,17 +5813,17 @@ Expiration de jetons d'authentification: %2 Article probes - + Sondes d'article You can see all your permanent article probes here. - + Vous pouvez voir toutes vos sondes d'articles permanentes ici. New article probe - + Nouvelle sonde d'article @@ -5928,7 +5928,7 @@ File filter for external e-mail selection dialog. Custom "QTWEBENGINE_CHROMIUM_FLAGS" flags - + Drapeaux "QTWEBENGINE_CHROMIUM_FLAGS" personnalisés @@ -6086,7 +6086,7 @@ File filter for external e-mail selection dialog. Note that speed of used MySQL server and latency of used connection medium HEAVILY influences the final performance of this application. Using slow database connections leads to bad performance when browsing feeds or messages. - + Notez que la vitesse du serveur MySQL et la latence du medium de connection influence LOURDEMENT la performance définitive de l'appli. Avoir des connections de base de données lentes a comme conséquence une mauvaise performance lors de la navigation de flux ou messages. @@ -6171,7 +6171,17 @@ Disadvantages: • application startup and shutdown can take little longer (max. 2 seconds). Authors of this application are NOT responsible for lost data. - + L'usage de bases de données fonctionnelles intra-memoire a un nombre d'avantages et inconvéniants. Soyez-sûr que vous êtes à l'aise avec elles avant que vous activiez cette fonctionnalité. + +Avantages: +•Vitesse supérieur pour la manipulation de flux/messages (surtout si des milliers de messages sont affichés), +•L'intégralité de la base de données est stocké dans la mémoire vive, donnant l'opportunité à votre disque dur de se reposer d'avantage. + +Inconvéniants: +•Si l'appli plante, vos changements de la dernière session ne seront pas pris en compte, +•Le démarrage et la fermeture de l'appli peuvent prendre plus longtemps (2 secondes max.). + +Les auteurs de cette appli NE SONT PAS responsables de pertes de donnees éventuelles. @@ -6337,7 +6347,7 @@ Authors of this application are NOT responsible for lost data. Avoid adding articles before this date into the database - + Éviter d'ajouter des articles qui datent d'avant la date spécifiée dans la base de données @@ -6661,7 +6671,7 @@ Déscription: %3 Hide main window when it is minimized - Cacher la fenêtre principale quand il est minimisé + Cacher la fenêtre principale quand elle est minimisée @@ -6783,7 +6793,13 @@ Déscription: %3 Note that usually all required Node.js tools should be available via your "PATH" environment variable, so you do not have to specify full paths. Also, relaunch "Settings" dialog after you install Node.js. - + Node.js est un runtime JavaScript asynchrone qui fonctionne par évènements, fait pour construire des applications web évolutifs. + +%1 intègre Node.js pour apporter des fonctionnalités modernes comme AdBlock. + +Notez qu'en général c'est mieux que tous les outils Node.js requis soient disponsibles via votre variable d'environment "PATH", pour ne pas avoir à specifier les chemins complets. + +Et aussi, redémarrez la fenêtre "Paramètres" après avoir installé Node.js. @@ -6903,7 +6919,7 @@ Aussi, il y a des sons pre-ajoutés. Si vous tapez ":", ils se présen Click and hit new shortcut. - + Cliquez et appuyer sur une touche pour l'attribuer à ce raccourci. @@ -7176,7 +7192,7 @@ Type: %3 The URL does not meet standard pattern. Does your URL start with "http://" or "https://" prefix. - + Le lien n'est pas conforme au pattern standard. Êtes-vous sûr que votre lien commence bien avec le préfixe "http://" ou "https://"? @@ -7237,7 +7253,7 @@ Type: %3 You can enter full command including interpreter here. - + Vous pouvez entrer votre commande complète (interprète inclus) ici. @@ -7368,7 +7384,7 @@ Vous pouvez aussi post-traiter la data de flux avec encore un autre script si vo This is obligatory service account for standard RSS/RDF/ATOM feeds. - + Ceci est un compte de service obligatoire pour les flux RSS/RDF/ATOM standards. @@ -7667,7 +7683,7 @@ Actualités non-lus: %2 If you select intelligent synchronization, then only not-yet-fetched or updated articles are downloaded. Network usage is greatly reduced and overall synchronization speed is greatly improved, but first feed fetching could be slow anyway if your feed contains huge number of articles.<br/><br/>Also, make sure to install <a href="https://www.google.com">api_newsplus</a> TT-RSS plugin to your server instance. - + Si vous sélectionnez la synchronisation intelligente, alors seulement les articles pas encore obtenus ou mis à jour seront téléchargés. La consommation de données est fortement réduite et la vitesse de synchronisation générale est fortement améliorée, mais la première obtention de flux peut être lente de toute façon si votre flux contient un nombre d'articles très important.<br/><br/>Et aussi, soyez-sûr d'installer le plugin TT-RSS<a href="https://www.google.com">api_newsplus</a> à votre instance de serveur. @@ -7878,7 +7894,7 @@ Actualités non-lus: %2 Share to published - + Partager à "publié" @@ -7901,7 +7917,7 @@ Actualités non-lus: %2 The URL does not meet standard pattern. Does your URL start with "http://" or "https://" prefix. - + Le lien n'est pas conforme au pattern standard. Êtes-vous sûr que votre lien commence bien avec le préfixe "http://" ou "https://"? diff --git a/localization/rssguard_nl.ts b/localization/rssguard_nl.ts index 7a8a46a6d..0c4383eb7 100644 --- a/localization/rssguard_nl.ts +++ b/localization/rssguard_nl.ts @@ -139,7 +139,7 @@ Fout: %1 Go to survey - + Enquête invullen @@ -969,7 +969,7 @@ Onderdeel ID: %5 Do you really want to clean all articles from selected item? - + Weet je zeker dat je alle artikelen van het geselecteerde item wilt verwijderen? @@ -1103,7 +1103,7 @@ of omdat deze functie nog niet is geïmplementeerd. Context menu for probe - + Context menu voor tester @@ -1327,7 +1327,7 @@ of omdat deze functie nog niet is geïmplementeerd. Name for your probe - + Naam voor de tester @@ -1348,17 +1348,17 @@ of omdat deze functie nog niet is geïmplementeerd. Probe name cannot be empty. - + Tester naam mag niet leeg zijn Regular expression is not well-formed. - + Reguliere expressie is niet correct geformuleerd. Create new probe - + Maak nieuwe tester @@ -1368,7 +1368,7 @@ of omdat deze functie nog niet is geïmplementeerd. Edit probe '%1' - + Bewerk test '%1' @@ -1804,12 +1804,12 @@ of omdat deze functie nog niet is geïmplementeerd. Add articles with any date into the database - + Voeg artikelen toe met elke datum aan de database Avoid adding articles before this date into the database - + Voorkom toevoegen van artikelen met een datum voor deze @@ -1824,7 +1824,7 @@ of omdat deze functie nog niet is geïmplementeerd. Right-to-left layout - + Rechts-naar-links layout @@ -3044,7 +3044,7 @@ Je moet handmatig herstarten. Do not fetch icons - + Pictogrammen niet ophalen @@ -3452,7 +3452,7 @@ Installeer het nu. failed to download list of labels - + Download van lijst met labels mislukt @@ -4411,7 +4411,7 @@ Logintoken verloopt: %2 RTL - + RTL @@ -4511,7 +4511,7 @@ Logintoken verloopt: %2 Layout direction of the article - + Layout richting van het artikel @@ -5374,7 +5374,7 @@ Feedly is een beveiligde ruimte waar u de onderwerpen en trends die voor u van b Node.js - package(s) failed to update - + Node.js - update van pakket(ten) mislukt @@ -5535,7 +5535,7 @@ Lijst met ondersteunde lezers: Do you really want to empty your recycle bin? - + Weet je zeker dat je de prullenbak wilt legen? @@ -5810,17 +5810,17 @@ Logintoken verloopt: %2 Article probes - + Artikel testen You can see all your permanent article probes here. - + Je kunt alle permanente artikel testen hier zien. New article probe - + Nieuwe artikeltest @@ -6344,7 +6344,7 @@ Makers van de applicatie zijn niet verantwoordelijk voor dataverlies. Avoid adding articles before this date into the database - + Voorkom toevoegen van artikelen met een datum voor deze @@ -7381,7 +7381,7 @@ Je kunt ook gegenereerde feedgegevens nabewerken met nog een ander script als je This is obligatory service account for standard RSS/RDF/ATOM feeds. - Dit is verplichte service account voor standaard RSS/RDF/ATOM feeds. + Dit is het verplichte service account voor standaard RSS/RDF/ATOM feeds. @@ -7411,7 +7411,7 @@ Je kunt ook gegenereerde feedgegevens nabewerken met nog een ander script als je This new account does not include any feeds. You can now add default set of feeds. - Deze nieuwe account bevat geen feeds. De standaard feeds kunnen toegevoegd worden. + Dit nieuwe account bevat geen feeds. De standaard feeds kunnen toegevoegd worden. diff --git a/src/librssguard/gui/reusable/jssyntaxhighlighter.cpp b/src/librssguard/gui/reusable/jssyntaxhighlighter.cpp index d7a352b84..b30edc3e1 100755 --- a/src/librssguard/gui/reusable/jssyntaxhighlighter.cpp +++ b/src/librssguard/gui/reusable/jssyntaxhighlighter.cpp @@ -2,93 +2,107 @@ #include "gui/reusable/jssyntaxhighlighter.h" +#include "3rd-party/boolinq/boolinq.h" #include "definitions/definitions.h" JsSyntaxHighlighter::JsSyntaxHighlighter(QTextDocument* parent) : QSyntaxHighlighter(parent) { HighlightingRule rule; - keywordFormat.setForeground(Qt::GlobalColor::magenta); - keywordFormat.setFontWeight(QFont::Weight::Bold); + m_keywordFormat.setForeground(Qt::GlobalColor::magenta); + m_keywordFormat.setFontWeight(QFont::Weight::Bold); - const QString keywordPatterns[] = { - QSL("\\babstract\\b"), QSL("\\barguments\\b"), QSL("\\bawait\\*\\b"), QSL("\\bboolean\\b"), - QSL("\\bbreak\\b"), QSL("\\bbyte\\b"), QSL("\\bcase\\b"), QSL("\\bcatch\\b"), - QSL("\\bchar\\b"), QSL("\\bclass\\*\\b"), QSL("\\bconst\\b"), QSL("\\bcontinue\\b"), - QSL("\\bdebugger\\b"), QSL("\\bdefault\\b"), QSL("\\bdelete\\b"), QSL("\\bdo\\b"), - QSL("\\bdouble\\b"), QSL("\\belse\\b"), QSL("\\benum\\*\\b"), QSL("\\beval\\b"), - QSL("\\bexport\\*\\b"), QSL("\\bextends\\*\\b"), QSL("\\bfalse\\b"), QSL("\\bfinal\\b"), - QSL("\\bfinally\\b"), QSL("\\bfloat\\b"), QSL("\\bfor\\b"), QSL("\\bfunction\\b"), - QSL("\\bgoto\\b"), QSL("\\bif\\b"), QSL("\\bimplements\\b"), QSL("\\bimport\\*\\b"), - QSL("\\bin\\b"), QSL("\\binstanceof\\b"), QSL("\\bint\\b"), QSL("\\binterface\\b"), - QSL("\\blet\\*\\b"), QSL("\\blong\\b"), QSL("\\bnative\\b"), QSL("\\bnew\\b"), - QSL("\\bnull\\b"), QSL("\\bpackage\\b"), QSL("\\bprivate\\b"), QSL("\\bprotected\\b"), - QSL("\\bpublic\\b"), QSL("\\breturn\\b"), QSL("\\bshort\\b"), QSL("\\bstatic\\b"), - QSL("\\bsuper\\*\\b"), QSL("\\bswitch\\b"), QSL("\\bsynchronized\\b"), QSL("\\bthis\\b"), - QSL("\\bthrow\\b"), QSL("\\bthrows\\b"), QSL("\\btransient\\b"), QSL("\\btrue\\b"), - QSL("\\btry\\b"), QSL("\\btypeof\\b"), QSL("\\bvar\\b"), QSL("\\bvoid\\b"), - QSL("\\bvolatile\\b"), QSL("\\bwhile\\b"), QSL("\\bwith\\b"), QSL("\\byield\\b")}; + QStringList keywords = jsKeywords(); + auto std_keywords = boolinq::from(keywords) + .select([](const QString& kw) { + return QSL("\\b%1\\b").arg(kw); + }) + .toStdList(); - for (const QString& pattern : keywordPatterns) { - rule.pattern = QRegularExpression(pattern); - rule.format = keywordFormat; - highlightingRules.append(rule); + keywords = FROM_STD_LIST(QStringList, std_keywords); + + for (const QString& pattern : keywords) { + rule.m_pattern = QRegularExpression(pattern); + rule.m_format = m_keywordFormat; + + m_highlightingRules.append(rule); } - classFormat.setFontWeight(QFont::Bold); - classFormat.setForeground(Qt::darkMagenta); - rule.pattern = QRegularExpression(QStringLiteral("\\bQ[A-Za-z]+\\b")); - rule.format = classFormat; - highlightingRules.append(rule); + m_classFormat.setFontWeight(QFont::Weight::Bold); + m_classFormat.setForeground(Qt::GlobalColor::darkMagenta); + rule.m_pattern = QRegularExpression(QStringLiteral("\\bQ[A-Za-z]+\\b")); + rule.m_format = m_classFormat; - singleLineCommentFormat.setForeground(Qt::red); - rule.pattern = QRegularExpression(QStringLiteral("//[^\n]*")); - rule.format = singleLineCommentFormat; - highlightingRules.append(rule); + m_highlightingRules.append(rule); - multiLineCommentFormat.setForeground(Qt::red); + m_singleLineCommentFormat.setForeground(Qt::GlobalColor::red); + rule.m_pattern = QRegularExpression(QStringLiteral("//[^\n]*")); + rule.m_format = m_singleLineCommentFormat; - quotationFormat.setForeground(Qt::darkGreen); - rule.pattern = QRegularExpression(QStringLiteral("\".*\"")); - rule.format = quotationFormat; - highlightingRules.append(rule); + m_highlightingRules.append(rule); - functionFormat.setFontItalic(true); - functionFormat.setForeground(Qt::GlobalColor::green); - rule.pattern = QRegularExpression(QStringLiteral("\\b[A-Za-z0-9_]+(?=\\()")); - rule.format = functionFormat; - highlightingRules.append(rule); + m_multiLineCommentFormat.setForeground(Qt::GlobalColor::red); - commentStartExpression = QRegularExpression(QStringLiteral("/\\*")); - commentEndExpression = QRegularExpression(QStringLiteral("\\*/")); + m_quotationFormat.setForeground(Qt::GlobalColor::darkGreen); + rule.m_pattern = QRegularExpression(QStringLiteral("\".*\"")); + rule.m_format = m_quotationFormat; + + m_highlightingRules.append(rule); + + m_functionFormat.setFontItalic(true); + m_functionFormat.setForeground(Qt::GlobalColor::green); + rule.m_pattern = QRegularExpression(QStringLiteral("\\b[A-Za-z0-9_]+(?=\\()")); + rule.m_format = m_functionFormat; + + m_highlightingRules.append(rule); + + m_commentStartExpression = QRegularExpression(QStringLiteral("/\\*")); + m_commentEndExpression = QRegularExpression(QStringLiteral("\\*/")); +} + +QStringList JsSyntaxHighlighter::jsKeywords() const { + return {QSL("abstract"), QSL("arguments"), QSL("await\\*"), QSL("boolean"), QSL("break"), QSL("byte"), + QSL("case"), QSL("catch"), QSL("char"), QSL("class\\*"), QSL("const"), QSL("continue"), + QSL("debugger"), QSL("default"), QSL("delete"), QSL("do"), QSL("double"), QSL("else"), + QSL("enum\\*"), QSL("eval"), QSL("export\\*"), QSL("extends\\*"), QSL("false"), QSL("final"), + QSL("finally"), QSL("float"), QSL("for"), QSL("function"), QSL("goto"), QSL("if"), + QSL("implements"), QSL("import\\*"), QSL("in"), QSL("instanceof"), QSL("int"), QSL("interface"), + QSL("let\\*"), QSL("long"), QSL("native"), QSL("new"), QSL("null"), QSL("package"), + QSL("private"), QSL("protected"), QSL("public"), QSL("return"), QSL("short"), QSL("static"), + QSL("super\\*"), QSL("switch"), QSL("synchronized"), QSL("this"), QSL("throw"), QSL("throws"), + QSL("transient"), QSL("true"), QSL("try"), QSL("typeof"), QSL("var"), QSL("void"), + QSL("volatile"), QSL("while"), QSL("with"), QSL("yield")}; } void JsSyntaxHighlighter::highlightBlock(const QString& text) { - for (const HighlightingRule& rule : std::as_const(highlightingRules)) { - QRegularExpressionMatchIterator matchIterator = rule.pattern.globalMatch(text); + for (const HighlightingRule& rule : std::as_const(m_highlightingRules)) { + QRegularExpressionMatchIterator matchIterator = rule.m_pattern.globalMatch(text); while (matchIterator.hasNext()) { QRegularExpressionMatch match = matchIterator.next(); - setFormat(match.capturedStart(), match.capturedLength(), rule.format); + setFormat(match.capturedStart(), match.capturedLength(), rule.m_format); } } setCurrentBlockState(0); - int startIndex = 0; - if (previousBlockState() != 1) - startIndex = text.indexOf(commentStartExpression); + int start_index = 0; + if (previousBlockState() != 1) { + start_index = text.indexOf(m_commentStartExpression); + } - while (startIndex >= 0) { - QRegularExpressionMatch match = commentEndExpression.match(text, startIndex); - int endIndex = match.capturedStart(); - int commentLength = 0; - if (endIndex == -1) { + while (start_index >= 0) { + QRegularExpressionMatch match = m_commentEndExpression.match(text, start_index); + int end_index = match.capturedStart(); + int comment_length = 0; + + if (end_index == -1) { setCurrentBlockState(1); - commentLength = text.length() - startIndex; + comment_length = text.length() - start_index; } else { - commentLength = endIndex - startIndex + match.capturedLength(); + comment_length = end_index - start_index + match.capturedLength(); } - setFormat(startIndex, commentLength, multiLineCommentFormat); - startIndex = text.indexOf(commentStartExpression, startIndex + commentLength); + + setFormat(start_index, comment_length, m_multiLineCommentFormat); + start_index = text.indexOf(m_commentStartExpression, start_index + comment_length); } } diff --git a/src/librssguard/gui/reusable/jssyntaxhighlighter.h b/src/librssguard/gui/reusable/jssyntaxhighlighter.h index 5b7507b8f..00a5918d1 100755 --- a/src/librssguard/gui/reusable/jssyntaxhighlighter.h +++ b/src/librssguard/gui/reusable/jssyntaxhighlighter.h @@ -11,28 +11,30 @@ class JsSyntaxHighlighter : public QSyntaxHighlighter { Q_OBJECT public: - JsSyntaxHighlighter(QTextDocument *parent); + JsSyntaxHighlighter(QTextDocument* parent); + + QStringList jsKeywords() const; protected: virtual void highlightBlock(const QString& text) override; private: struct HighlightingRule { - QRegularExpression pattern; - QTextCharFormat format; + QRegularExpression m_pattern; + QTextCharFormat m_format; }; - QList highlightingRules; + QList m_highlightingRules; - QRegularExpression commentStartExpression; - QRegularExpression commentEndExpression; + QRegularExpression m_commentStartExpression; + QRegularExpression m_commentEndExpression; - QTextCharFormat keywordFormat; - QTextCharFormat classFormat; - QTextCharFormat singleLineCommentFormat; - QTextCharFormat multiLineCommentFormat; - QTextCharFormat quotationFormat; - QTextCharFormat functionFormat; + QTextCharFormat m_keywordFormat; + QTextCharFormat m_classFormat; + QTextCharFormat m_singleLineCommentFormat; + QTextCharFormat m_multiLineCommentFormat; + QTextCharFormat m_quotationFormat; + QTextCharFormat m_functionFormat; }; #endif // JSSYNTAXHIGHLIGHTER_H