From e2f390558f294b4120e547170f39ab87177c1167 Mon Sep 17 00:00:00 2001 From: Gerardo Orellana Date: Tue, 4 Apr 2017 19:12:05 -0500 Subject: [PATCH] Moved string literals to their own labels header file. --- Makefile.am | 1 + po/Makevars | 2 +- po/POTFILES.in | 3 +- po/fr.po | 168 ++++++++++++++++++++++---------------------- po/goaccess.pot | 180 ++++++++++++++++++++++++------------------------ src/labels.h | 150 ++++++++++++++++++++++++++++++++++++++++ src/ui.h | 161 +++++++------------------------------------ 7 files changed, 355 insertions(+), 310 deletions(-) create mode 100644 src/labels.h diff --git a/Makefile.am b/Makefile.am index fab64b9bca..98b2691730 100644 --- a/Makefile.am +++ b/Makefile.am @@ -94,6 +94,7 @@ goaccess_SOURCES = \ src/gwsocket.h \ src/json.c \ src/json.h \ + src/labels.h \ src/opesys.c \ src/opesys.h \ src/options.c \ diff --git a/po/Makevars b/po/Makevars index bb21fe239d..facec212ee 100644 --- a/po/Makevars +++ b/po/Makevars @@ -42,7 +42,7 @@ PACKAGE_GNU = # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. -MSGID_BUGS_ADDRESS = +MSGID_BUGS_ADDRESS = hello@goaccess.io # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. diff --git a/po/POTFILES.in b/po/POTFILES.in index cee278b317..99bde5c285 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,3 +1,2 @@ # List of source files which contain translatable strings. -src/ui.h - +src/labels.h diff --git a/po/fr.po b/po/fr.po index 6e22fc6487..5c3a4bf217 100644 --- a/po/fr.po +++ b/po/fr.po @@ -4,8 +4,8 @@ msgid "" msgstr "" "Project-Id-Version: goaccess 1.2\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-04-03 21:03-0500\n" +"Report-Msgid-Bugs-To: hello@goaccess.io\n" +"POT-Creation-Date: 2017-04-04 18:59-0500\n" "PO-Revision-Date: 2017-04-03 09:43+0200\n" "Last-Translator: Nicolas P \n" "Language-Team: français\n" @@ -16,313 +16,315 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Gtranslator 2.91.7\n" -#. Global UI defaults -#. minimum window height -#. minimum window width -#. height of the footer window -#. height of the header window -#. number of columns on the overall stats win #. Overall Stats Labels -#: ../src/ui.h:59 +#: ../src/labels.h:40 msgid "Dashboard" msgstr "Tableau de bord" -#: ../src/ui.h:60 +#: ../src/labels.h:41 msgid "Overall Analyzed Requests" msgstr "Requètes analysées, vue d'ensemble" -#: ../src/ui.h:61 +#: ../src/labels.h:42 msgid "Dashboard - Overall Analyzed Requests" msgstr "Tableau de bord - Requètes analysées, vue d'ensemble" -#: ../src/ui.h:63 +#: ../src/labels.h:44 msgid "Date/Time" msgstr "Date/Heure" -#: ../src/ui.h:64 +#: ../src/labels.h:45 msgid "Total Requests" msgstr "Temps de calcul" -#: ../src/ui.h:65 +#: ../src/labels.h:46 msgid "Init. Proc. Time" msgstr "Requètes échouées" -#: ../src/ui.h:66 +#: ../src/labels.h:47 msgid "Failed Requests" msgstr "Requètes échouées" -#: ../src/ui.h:67 +#: ../src/labels.h:48 msgid "Valid Requests" msgstr "Requètes valides" -#: ../src/ui.h:68 +#: ../src/labels.h:49 msgid "Unique Visitors" msgstr "Visiteurs uniques" -#: ../src/ui.h:69 +#: ../src/labels.h:50 msgid "Unique Files" msgstr "Fichiers uniques" -#: ../src/ui.h:70 +#: ../src/labels.h:51 msgid "Excl. IP Hits" msgstr "Excl. IP Hits" -#: ../src/ui.h:71 ../src/ui.h:137 +#: ../src/labels.h:52 ../src/labels.h:103 msgid "Referrers" msgstr "Origine" -#: ../src/ui.h:72 +#: ../src/labels.h:53 msgid "Unique 404" msgstr "Unique 404" -#: ../src/ui.h:73 +#: ../src/labels.h:54 msgid "Static Files" msgstr "Fichiers statiques" -#: ../src/ui.h:74 +#: ../src/labels.h:55 msgid "Log Size" msgstr "Taille du log" -#: ../src/ui.h:75 ../src/ui.h:184 +#: ../src/labels.h:56 ../src/labels.h:125 msgid "Bandwidth" msgstr "Bande passante" -#: ../src/ui.h:76 +#: ../src/labels.h:57 msgid "Log Source" msgstr "Fichier de log" -#. max length of the progress spinner #. Module Labels and Descriptions -#: ../src/ui.h:84 +#: ../src/labels.h:60 msgid "Unique visitors per day" msgstr "Visiteurs uniques par jour" -#: ../src/ui.h:85 +#: ../src/labels.h:61 msgid "Unique visitors per day - Including spiders" msgstr "Visiteurs uniques par jour - Y compris bots" -#: ../src/ui.h:86 +#: ../src/labels.h:62 msgid "Hits having the same IP, date and agent are a unique visit." msgstr "" "Les hits depuis la même IP, date et user-agent comptent comme visite unique" -#: ../src/ui.h:87 ../src/ui.h:182 +#: ../src/labels.h:63 ../src/labels.h:123 msgid "Visitors" msgstr "Visiteurs" -#: ../src/ui.h:90 +#: ../src/labels.h:65 msgid "Requested Files (URLs)" msgstr "Fichiers demandés (URLs)" -#: ../src/ui.h:91 +#: ../src/labels.h:66 msgid "Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "Top des requètes triés par hits [, avgts, cumts, maxts, mthd, proto]" -#: ../src/ui.h:92 +#: ../src/labels.h:67 msgid "Requests" msgstr "Requètes" -#: ../src/ui.h:95 ../src/ui.h:97 +#: ../src/labels.h:69 ../src/labels.h:71 msgid "Static Requests" msgstr "Requètes statiques" -#: ../src/ui.h:96 +#: ../src/labels.h:70 msgid "Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "Top des requètes statiques trié par hits [, avgts, cumts, maxts, mthd, proto]" -#: ../src/ui.h:100 +#: ../src/labels.h:73 msgid "Time Distribution" msgstr "Distribution temporelle" -#: ../src/ui.h:101 +#: ../src/labels.h:74 msgid "Data sorted by hour [, avgts, cumts, maxts]" msgstr "Données triée par heure [, avgts, cumts, maxts]" -#: ../src/ui.h:102 +#: ../src/labels.h:75 msgid "Time" msgstr "Temps" -#: ../src/ui.h:105 ../src/ui.h:107 +#: ../src/labels.h:77 ../src/labels.h:79 msgid "Virtual Hosts" msgstr "Hôtes virtuels" -#: ../src/ui.h:106 ../src/ui.h:111 +#: ../src/labels.h:78 ../src/labels.h:82 msgid "Data sorted by hits [, avgts, cumts, maxts]" msgstr "Données triées par hits [, avgts, cumts, maxts]" -#: ../src/ui.h:110 +#: ../src/labels.h:81 msgid "Remote User (HTTP authentication)" msgstr "Utilisateur distant (authentification HTTP)" -#: ../src/ui.h:112 +#: ../src/labels.h:83 msgid "Remote User" msgstr "remote_user" -#: ../src/ui.h:115 +#: ../src/labels.h:85 msgid "Not Found URLs (404s)" msgstr "URLs Non trouvées (404s)" -#: ../src/ui.h:116 +#: ../src/labels.h:86 msgid "Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "Top des URLs non trouvées trié par hits [, avgts, cumts, maxts, mthd, proto]" -#: ../src/ui.h:117 +#: ../src/labels.h:87 msgid "Not Found" msgstr "Non Trouvé" -#: ../src/ui.h:120 +#: ../src/labels.h:89 msgid "Visitor Hostnames and IPs" msgstr "Nom de machine et IPs des visiteurs" -#: ../src/ui.h:121 +#: ../src/labels.h:90 msgid "Top visitor hosts sorted by hits [, avgts, cumts, maxts]" msgstr "Top des visiteurs triés par hits [, avgts, cumts, maxts]" -#: ../src/ui.h:122 +#: ../src/labels.h:91 msgid "Hosts" msgstr "Hôtes" -#: ../src/ui.h:125 +#: ../src/labels.h:93 msgid "Operating Systems" msgstr "Systèmes d'exploitation" -#: ../src/ui.h:126 +#: ../src/labels.h:94 msgid "Top Operating Systems sorted by hits [, avgts, cumts, maxts]" msgstr "Top des SE trié par hits [, avgts, cumts, maxts]" -#: ../src/ui.h:127 +#: ../src/labels.h:95 msgid "OS" msgstr "SE" -#: ../src/ui.h:130 ../src/ui.h:132 +#: ../src/labels.h:97 ../src/labels.h:99 msgid "Browsers" msgstr "Navigateurs" -#: ../src/ui.h:131 +#: ../src/labels.h:98 msgid "Top Browsers sorted by hits [, avgts, cumts, maxts]" msgstr "Top des Navigateurs triés par hits [, avgts, cumts, maxts]" -#: ../src/ui.h:135 +#: ../src/labels.h:101 msgid "Referrers URLs" msgstr "URLs d'origine" -#: ../src/ui.h:136 +#: ../src/labels.h:102 msgid "Top Requested Referrers sorted by hits [, avgts, cumts, maxts]" msgstr "Top des URLs d'origine trié par hits [, avgts, cumts, maxts]" -#: ../src/ui.h:140 ../src/ui.h:142 +#: ../src/labels.h:105 ../src/labels.h:107 msgid "Referring Sites" msgstr "Sites d'origine" -#: ../src/ui.h:141 +#: ../src/labels.h:106 msgid "Top Referring Sites sorted by hits [, avgts, cumts, maxts]" msgstr "Top des sites d'origine trié par hits [, avgts, cumts, maxts]" -#: ../src/ui.h:145 +#: ../src/labels.h:109 msgid "Keyphrases from Google's search engine" msgstr "Mot-clés Google" -#: ../src/ui.h:146 +#: ../src/labels.h:110 msgid "Top Keyphrases sorted by hits [, avgts, cumts, maxts]" msgstr "Top des Mot-clés trié par hits [, avgts, cumts, maxts]" -#: ../src/ui.h:147 +#: ../src/labels.h:111 msgid "Keyphrases" msgstr "Mot-clés" -#: ../src/ui.h:150 ../src/ui.h:152 +#: ../src/labels.h:113 ../src/labels.h:115 msgid "Geo Location" msgstr "Geo Localisation" -#: ../src/ui.h:151 +#: ../src/labels.h:114 msgid "Continent > Country sorted by unique hits [, avgts, cumts, maxts]" msgstr "Continent > Pays trié par hits unique [, avgts, cumts, maxts]" -#: ../src/ui.h:155 +#: ../src/labels.h:117 msgid "HTTP Status Codes" msgstr "Status HTTP" -#: ../src/ui.h:156 +#: ../src/labels.h:118 msgid "Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]" msgstr "Top des status HTTP trié par hits [, avgts, cumts, maxts]" -#: ../src/ui.h:157 +#: ../src/labels.h:119 msgid "Status Codes" msgstr "Status HTTP" #. Metric Labels -#: ../src/ui.h:181 +#: ../src/labels.h:122 msgid "Hits" msgstr "Hits" -#: ../src/ui.h:183 +#: ../src/labels.h:124 msgid "Vis." msgstr "Vis." -#: ../src/ui.h:185 +#: ../src/labels.h:126 msgid "Avg. T.S." msgstr "Avg. T.S." -#: ../src/ui.h:186 +#: ../src/labels.h:127 msgid "Cum. T.S." msgstr "Cum. T.S." -#: ../src/ui.h:187 +#: ../src/labels.h:128 msgid "Max. T.S." msgstr "Max. T.S." -#: ../src/ui.h:188 +#: ../src/labels.h:129 msgid "Method" msgstr "Methode" -#: ../src/ui.h:189 +#: ../src/labels.h:130 msgid "Mtd" msgstr "Mtd" -#: ../src/ui.h:190 +#: ../src/labels.h:131 msgid "Protocol" msgstr "Protocole" -#: ../src/ui.h:191 +#: ../src/labels.h:132 msgid "Proto" msgstr "Proto" -#: ../src/ui.h:192 +#: ../src/labels.h:133 msgid "City" msgstr "Ville" -#: ../src/ui.h:193 +#: ../src/labels.h:134 msgid "Country" msgstr "Pays" -#: ../src/ui.h:194 +#: ../src/labels.h:135 msgid "Hostname" msgstr "Nom d'hôte" -#: ../src/ui.h:195 +#: ../src/labels.h:136 msgid "Data" msgstr "Données" #. Find Labels -#: ../src/ui.h:198 +#: ../src/labels.h:139 msgid "Find pattern in all views" msgstr "Trouver tous les motifs dans toutes les vues" -#: ../src/ui.h:199 +#: ../src/labels.h:140 msgid "Regex allowed - ^g to cancel - TAB switch case" msgstr "Regex OK - ^g pour annuler - TAB pour changer la casse" -#: ../src/ui.h:251 +#. Sort Labels +#: ../src/labels.h:143 +msgid "[x] ASC [ ] DESC" +msgstr "[x] ASC [ ] DESC" + +#: ../src/labels.h:144 +msgid "[ ] ASC [x] DESC" +msgstr "[ ] ASC [x] DESC" + +#: ../src/labels.h:146 msgid "Format Errors - Verify your log/date/time format" msgstr "Erreurs de format - Vérifiez votre format de journal / date / heure" -#: ../src/ui.h:253 +#: ../src/labels.h:147 msgid "[x] case sensitive" msgstr "[x] sensible à la casse" -#: ../src/ui.h:254 +#: ../src/labels.h:148 msgid "[ ] case sensitive" msgstr "[ ] sensible à la casse" diff --git a/po/goaccess.pot b/po/goaccess.pot index 54d8bf938a..a90629596b 100644 --- a/po/goaccess.pot +++ b/po/goaccess.pot @@ -1,322 +1,324 @@ -# This file is distributed under the same license as the GoAccess package. +# This file is distributed under the same license as the goaccess package. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: goaccess 1.2\n" +"Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: hello@goaccess.io\n" -"POT-Creation-Date: 2017-04-03 21:03-0500\n" -"PO-Revision-Date: 2017-04-03 21:03-0500\n" -"Last-Translator: \n" -"Language-Team: English\n" -"Language: en\n" +"POT-Creation-Date: 2017-04-04 18:59-0500\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#. Global UI defaults -#. minimum window height -#. minimum window width -#. height of the footer window -#. height of the header window -#. number of columns on the overall stats win #. Overall Stats Labels -#: ../src/ui.h:59 +#: ../src/labels.h:40 msgid "Dashboard" msgstr "" -#: ../src/ui.h:60 +#: ../src/labels.h:41 msgid "Overall Analyzed Requests" msgstr "" -#: ../src/ui.h:61 +#: ../src/labels.h:42 msgid "Dashboard - Overall Analyzed Requests" msgstr "" -#: ../src/ui.h:63 +#: ../src/labels.h:44 msgid "Date/Time" msgstr "" -#: ../src/ui.h:64 +#: ../src/labels.h:45 msgid "Total Requests" msgstr "" -#: ../src/ui.h:65 +#: ../src/labels.h:46 msgid "Init. Proc. Time" msgstr "" -#: ../src/ui.h:66 +#: ../src/labels.h:47 msgid "Failed Requests" msgstr "" -#: ../src/ui.h:67 +#: ../src/labels.h:48 msgid "Valid Requests" msgstr "" -#: ../src/ui.h:68 +#: ../src/labels.h:49 msgid "Unique Visitors" msgstr "" -#: ../src/ui.h:69 +#: ../src/labels.h:50 msgid "Unique Files" msgstr "" -#: ../src/ui.h:70 +#: ../src/labels.h:51 msgid "Excl. IP Hits" msgstr "" -#: ../src/ui.h:71 ../src/ui.h:137 +#: ../src/labels.h:52 ../src/labels.h:103 msgid "Referrers" msgstr "" -#: ../src/ui.h:72 +#: ../src/labels.h:53 msgid "Unique 404" msgstr "" -#: ../src/ui.h:73 +#: ../src/labels.h:54 msgid "Static Files" msgstr "" -#: ../src/ui.h:74 +#: ../src/labels.h:55 msgid "Log Size" msgstr "" -#: ../src/ui.h:75 ../src/ui.h:184 +#: ../src/labels.h:56 ../src/labels.h:125 msgid "Bandwidth" msgstr "" -#: ../src/ui.h:76 +#: ../src/labels.h:57 msgid "Log Source" msgstr "" -#. max length of the progress spinner #. Module Labels and Descriptions -#: ../src/ui.h:84 +#: ../src/labels.h:60 msgid "Unique visitors per day" msgstr "" -#: ../src/ui.h:85 +#: ../src/labels.h:61 msgid "Unique visitors per day - Including spiders" msgstr "" -#: ../src/ui.h:86 +#: ../src/labels.h:62 msgid "Hits having the same IP, date and agent are a unique visit." msgstr "" -#: ../src/ui.h:87 ../src/ui.h:182 +#: ../src/labels.h:63 ../src/labels.h:123 msgid "Visitors" msgstr "" -#: ../src/ui.h:90 +#: ../src/labels.h:65 msgid "Requested Files (URLs)" msgstr "" -#: ../src/ui.h:91 +#: ../src/labels.h:66 msgid "Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" -#: ../src/ui.h:92 +#: ../src/labels.h:67 msgid "Requests" msgstr "" -#: ../src/ui.h:95 ../src/ui.h:97 +#: ../src/labels.h:69 ../src/labels.h:71 msgid "Static Requests" msgstr "" -#: ../src/ui.h:96 +#: ../src/labels.h:70 msgid "Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" -#: ../src/ui.h:100 +#: ../src/labels.h:73 msgid "Time Distribution" msgstr "" -#: ../src/ui.h:101 +#: ../src/labels.h:74 msgid "Data sorted by hour [, avgts, cumts, maxts]" msgstr "" -#: ../src/ui.h:102 +#: ../src/labels.h:75 msgid "Time" msgstr "" -#: ../src/ui.h:105 ../src/ui.h:107 +#: ../src/labels.h:77 ../src/labels.h:79 msgid "Virtual Hosts" msgstr "" -#: ../src/ui.h:106 ../src/ui.h:111 +#: ../src/labels.h:78 ../src/labels.h:82 msgid "Data sorted by hits [, avgts, cumts, maxts]" msgstr "" -#: ../src/ui.h:110 +#: ../src/labels.h:81 msgid "Remote User (HTTP authentication)" msgstr "" -#: ../src/ui.h:112 +#: ../src/labels.h:83 msgid "Remote User" msgstr "" -#: ../src/ui.h:115 +#: ../src/labels.h:85 msgid "Not Found URLs (404s)" msgstr "" -#: ../src/ui.h:116 +#: ../src/labels.h:86 msgid "Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" -#: ../src/ui.h:117 +#: ../src/labels.h:87 msgid "Not Found" msgstr "" -#: ../src/ui.h:120 +#: ../src/labels.h:89 msgid "Visitor Hostnames and IPs" msgstr "" -#: ../src/ui.h:121 +#: ../src/labels.h:90 msgid "Top visitor hosts sorted by hits [, avgts, cumts, maxts]" msgstr "" -#: ../src/ui.h:122 +#: ../src/labels.h:91 msgid "Hosts" msgstr "" -#: ../src/ui.h:125 +#: ../src/labels.h:93 msgid "Operating Systems" msgstr "" -#: ../src/ui.h:126 +#: ../src/labels.h:94 msgid "Top Operating Systems sorted by hits [, avgts, cumts, maxts]" msgstr "" -#: ../src/ui.h:127 +#: ../src/labels.h:95 msgid "OS" msgstr "" -#: ../src/ui.h:130 ../src/ui.h:132 +#: ../src/labels.h:97 ../src/labels.h:99 msgid "Browsers" msgstr "" -#: ../src/ui.h:131 +#: ../src/labels.h:98 msgid "Top Browsers sorted by hits [, avgts, cumts, maxts]" msgstr "" -#: ../src/ui.h:135 +#: ../src/labels.h:101 msgid "Referrers URLs" msgstr "" -#: ../src/ui.h:136 +#: ../src/labels.h:102 msgid "Top Requested Referrers sorted by hits [, avgts, cumts, maxts]" msgstr "" -#: ../src/ui.h:140 ../src/ui.h:142 +#: ../src/labels.h:105 ../src/labels.h:107 msgid "Referring Sites" msgstr "" -#: ../src/ui.h:141 +#: ../src/labels.h:106 msgid "Top Referring Sites sorted by hits [, avgts, cumts, maxts]" msgstr "" -#: ../src/ui.h:145 +#: ../src/labels.h:109 msgid "Keyphrases from Google's search engine" msgstr "" -#: ../src/ui.h:146 +#: ../src/labels.h:110 msgid "Top Keyphrases sorted by hits [, avgts, cumts, maxts]" msgstr "" -#: ../src/ui.h:147 +#: ../src/labels.h:111 msgid "Keyphrases" msgstr "" -#: ../src/ui.h:150 ../src/ui.h:152 +#: ../src/labels.h:113 ../src/labels.h:115 msgid "Geo Location" msgstr "" -#: ../src/ui.h:151 +#: ../src/labels.h:114 msgid "Continent > Country sorted by unique hits [, avgts, cumts, maxts]" msgstr "" -#: ../src/ui.h:155 +#: ../src/labels.h:117 msgid "HTTP Status Codes" msgstr "" -#: ../src/ui.h:156 +#: ../src/labels.h:118 msgid "Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]" msgstr "" -#: ../src/ui.h:157 +#: ../src/labels.h:119 msgid "Status Codes" msgstr "" #. Metric Labels -#: ../src/ui.h:181 +#: ../src/labels.h:122 msgid "Hits" msgstr "" -#: ../src/ui.h:183 +#: ../src/labels.h:124 msgid "Vis." msgstr "" -#: ../src/ui.h:185 +#: ../src/labels.h:126 msgid "Avg. T.S." msgstr "" -#: ../src/ui.h:186 +#: ../src/labels.h:127 msgid "Cum. T.S." msgstr "" -#: ../src/ui.h:187 +#: ../src/labels.h:128 msgid "Max. T.S." msgstr "" -#: ../src/ui.h:188 +#: ../src/labels.h:129 msgid "Method" msgstr "" -#: ../src/ui.h:189 +#: ../src/labels.h:130 msgid "Mtd" msgstr "" -#: ../src/ui.h:190 +#: ../src/labels.h:131 msgid "Protocol" msgstr "" -#: ../src/ui.h:191 +#: ../src/labels.h:132 msgid "Proto" msgstr "" -#: ../src/ui.h:192 +#: ../src/labels.h:133 msgid "City" msgstr "" -#: ../src/ui.h:193 +#: ../src/labels.h:134 msgid "Country" msgstr "" -#: ../src/ui.h:194 +#: ../src/labels.h:135 msgid "Hostname" msgstr "" -#: ../src/ui.h:195 +#: ../src/labels.h:136 msgid "Data" msgstr "" #. Find Labels -#: ../src/ui.h:198 +#: ../src/labels.h:139 msgid "Find pattern in all views" msgstr "" -#: ../src/ui.h:199 +#: ../src/labels.h:140 msgid "Regex allowed - ^g to cancel - TAB switch case" msgstr "" -#: ../src/ui.h:251 +#. Sort Labels +#: ../src/labels.h:143 +msgid "[x] ASC [ ] DESC" +msgstr "" + +#: ../src/labels.h:144 +msgid "[ ] ASC [x] DESC" +msgstr "" + +#: ../src/labels.h:146 msgid "Format Errors - Verify your log/date/time format" msgstr "" -#: ../src/ui.h:253 +#: ../src/labels.h:147 msgid "[x] case sensitive" msgstr "" -#: ../src/ui.h:254 +#: ../src/labels.h:148 msgid "[ ] case sensitive" msgstr "" diff --git a/src/labels.h b/src/labels.h new file mode 100644 index 0000000000..1fac1af196 --- /dev/null +++ b/src/labels.h @@ -0,0 +1,150 @@ +/** + * ______ ___ + * / ____/___ / | _____________ __________ + * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ + * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) + * \____/\____/_/ |_\___/\___/\___/____/____/ + * + * The MIT License (MIT) + * Copyright (c) 2009-2016 Gerardo Orellana + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#ifndef LABELS_H_INCLUDED +#define LABELS_H_INCLUDED + +#include + +#define _(String) dgettext (PACKAGE , String) +#define gettext_noop(String) String +#define N_(String) gettext_noop (String) + +/* Overall Stats Labels */ +#define T_DASH _("Dashboard") +#define T_HEAD _("Overall Analyzed Requests") +#define T_DASH_HEAD _("Dashboard - Overall Analyzed Requests") + +#define T_DATETIME _("Date/Time") +#define T_REQUESTS _("Total Requests") +#define T_GEN_TIME _("Init. Proc. Time") +#define T_FAILED _("Failed Requests") +#define T_VALID _("Valid Requests") +#define T_UNIQUE_VIS _("Unique Visitors") +#define T_UNIQUE_FIL _("Unique Files") +#define T_EXCLUDE_IP _("Excl. IP Hits") +#define T_REFERRER _("Referrers") +#define T_UNIQUE404 _("Unique 404") +#define T_STATIC_FIL _("Static Files") +#define T_LOG _("Log Size") +#define T_BW _("Bandwidth") +#define T_LOG_PATH _("Log Source") + +/* Module Labels and Descriptions */ +#define VISIT_HEAD N_("Unique visitors per day") +#define VISIT_HBOTS N_("Unique visitors per day - Including spiders") +#define VISIT_DESC N_("Hits having the same IP, date and agent are a unique visit.") +#define VISIT_LABEL N_("Visitors") + +#define REQUE_HEAD N_("Requested Files (URLs)") +#define REQUE_DESC N_("Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]") +#define REQUE_LABEL N_("Requests") + +#define STATI_HEAD N_("Static Requests") +#define STATI_DESC N_("Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]") +#define STATI_LABEL N_("Static Requests") + +#define VTIME_HEAD N_("Time Distribution") +#define VTIME_DESC N_("Data sorted by hour [, avgts, cumts, maxts]") +#define VTIME_LABEL N_("Time") + +#define VHOST_HEAD N_("Virtual Hosts") +#define VHOST_DESC N_("Data sorted by hits [, avgts, cumts, maxts]") +#define VHOST_LABEL N_("Virtual Hosts") + +#define RUSER_HEAD N_("Remote User (HTTP authentication)") +#define RUSER_DESC N_("Data sorted by hits [, avgts, cumts, maxts]") +#define RUSER_LABEL N_("Remote User") + +#define FOUND_HEAD N_("Not Found URLs (404s)") +#define FOUND_DESC N_("Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]") +#define FOUND_LABEL N_("Not Found") + +#define HOSTS_HEAD N_("Visitor Hostnames and IPs") +#define HOSTS_DESC N_("Top visitor hosts sorted by hits [, avgts, cumts, maxts]") +#define HOSTS_LABEL N_("Hosts") + +#define OPERA_HEAD N_("Operating Systems") +#define OPERA_DESC N_("Top Operating Systems sorted by hits [, avgts, cumts, maxts]") +#define OPERA_LABEL N_("OS") + +#define BROWS_HEAD N_("Browsers") +#define BROWS_DESC N_("Top Browsers sorted by hits [, avgts, cumts, maxts]") +#define BROWS_LABEL N_("Browsers") + +#define REFER_HEAD N_("Referrers URLs") +#define REFER_DESC N_("Top Requested Referrers sorted by hits [, avgts, cumts, maxts]") +#define REFER_LABEL N_("Referrers") + +#define SITES_HEAD N_("Referring Sites") +#define SITES_DESC N_("Top Referring Sites sorted by hits [, avgts, cumts, maxts]") +#define SITES_LABEL N_("Referring Sites") + +#define KEYPH_HEAD N_("Keyphrases from Google's search engine") +#define KEYPH_DESC N_("Top Keyphrases sorted by hits [, avgts, cumts, maxts]") +#define KEYPH_LABEL N_("Keyphrases") + +#define GEOLO_HEAD N_("Geo Location") +#define GEOLO_DESC N_("Continent > Country sorted by unique hits [, avgts, cumts, maxts]") +#define GEOLO_LABEL N_("Geo Location") + +#define CODES_HEAD N_("HTTP Status Codes") +#define CODES_DESC N_("Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]") +#define CODES_LABEL N_("Status Codes") + +/* Metric Labels */ +#define MTRC_HITS_LBL _("Hits") +#define MTRC_VISITORS_LBL _("Visitors") +#define MTRC_VISITORS_SHORT_LBL _("Vis.") +#define MTRC_BW_LBL _("Bandwidth") +#define MTRC_AVGTS_LBL _("Avg. T.S.") +#define MTRC_CUMTS_LBL _("Cum. T.S.") +#define MTRC_MAXTS_LBL _("Max. T.S.") +#define MTRC_METHODS_LBL _("Method") +#define MTRC_METHODS_SHORT_LBL _("Mtd") +#define MTRC_PROTOCOLS_LBL _("Protocol") +#define MTRC_PROTOCOLS_SHORT_LBL _("Proto") +#define MTRC_CITY_LBL _("City") +#define MTRC_COUNTRY_LBL _("Country") +#define MTRC_HOSTNAME_LBL _("Hostname") +#define MTRC_DATA_LBL _("Data") + +/* Find Labels */ +#define FIND_HEAD _("Find pattern in all views") +#define FIND_DESC _("Regex allowed - ^g to cancel - TAB switch case") + +/* Sort Labels */ +#define SORT_ASC_SEL _("[x] ASC [ ] DESC") +#define SORT_DESC_SEL _("[ ] ASC [x] DESC") + +#define ERR_HEADER _("Format Errors - Verify your log/date/time format") +#define CSENSITIVE _("[x] case sensitive") +#define CISENSITIVE _("[ ] case sensitive") + +#endif // for #ifndef LABELS_H diff --git a/src/ui.h b/src/ui.h index b8db42e08f..0eed0a0f6c 100644 --- a/src/ui.h +++ b/src/ui.h @@ -26,10 +26,6 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include -#define _(String) dgettext (PACKAGE , String) -#define gettext_noop(String) String -#define N_(String) gettext_noop (String) #ifndef UI_H_INCLUDED #define UI_H_INCLUDED @@ -48,6 +44,9 @@ #include #endif +/* string literals and translations */ +#include "labels.h" + /* Global UI defaults */ #define MIN_HEIGHT 8 /* minimum window height */ #define MIN_WIDTH 0 /* minimum window width */ @@ -55,109 +54,28 @@ #define MAX_HEIGHT_HEADER 7 /* height of the header window */ #define OVERALL_NUM_COLS 4 /* number of columns on the overall stats win */ -/* Overall Stats Labels */ -#define T_DASH _("Dashboard") -#define T_HEAD _("Overall Analyzed Requests") -#define T_DASH_HEAD _("Dashboard - Overall Analyzed Requests") - -#define T_DATETIME _("Date/Time") -#define T_REQUESTS _("Total Requests") -#define T_GEN_TIME _("Init. Proc. Time") -#define T_FAILED _("Failed Requests") -#define T_VALID _("Valid Requests") -#define T_UNIQUE_VIS _("Unique Visitors") -#define T_UNIQUE_FIL _("Unique Files") -#define T_EXCLUDE_IP _("Excl. IP Hits") -#define T_REFERRER _("Referrers") -#define T_UNIQUE404 _("Unique 404") -#define T_STATIC_FIL _("Static Files") -#define T_LOG _("Log Size") -#define T_BW _("Bandwidth") -#define T_LOG_PATH _("Log Source") - /* Spinner Label Format */ #define SPIN_FMT "%s" #define SPIN_FMTM "%s [%'d] [%'lld/s]" #define SPIN_LBL 50 /* max length of the progress spinner */ -/* Module Labels and Descriptions */ -#define VISIT_HEAD N_("Unique visitors per day") -#define VISIT_HBOTS N_("Unique visitors per day - Including spiders") -#define VISIT_DESC N_("Hits having the same IP, date and agent are a unique visit.") -#define VISIT_LABEL N_("Visitors") -#define VISIT_ID "visitors" - -#define REQUE_HEAD N_("Requested Files (URLs)") -#define REQUE_DESC N_("Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]") -#define REQUE_LABEL N_("Requests") -#define REQUE_ID "requests" - -#define STATI_HEAD N_("Static Requests") -#define STATI_DESC N_("Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]") -#define STATI_LABEL N_("Static Requests") -#define STATI_ID "static_requests" - -#define VTIME_HEAD N_("Time Distribution") -#define VTIME_DESC N_("Data sorted by hour [, avgts, cumts, maxts]") -#define VTIME_LABEL N_("Time") -#define VTIME_ID "visit_time" - -#define VHOST_HEAD N_("Virtual Hosts") -#define VHOST_DESC N_("Data sorted by hits [, avgts, cumts, maxts]") -#define VHOST_LABEL N_("Virtual Hosts") -#define VHOST_ID "vhosts" - -#define RUSER_HEAD N_("Remote User (HTTP authentication)") -#define RUSER_DESC N_("Data sorted by hits [, avgts, cumts, maxts]") -#define RUSER_LABEL N_("Remote User") -#define RUSER_ID "remote_user" - -#define FOUND_HEAD N_("Not Found URLs (404s)") -#define FOUND_DESC N_("Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]") -#define FOUND_LABEL N_("Not Found") -#define FOUND_ID "not_found" - -#define HOSTS_HEAD N_("Visitor Hostnames and IPs") -#define HOSTS_DESC N_("Top visitor hosts sorted by hits [, avgts, cumts, maxts]") -#define HOSTS_LABEL N_("Hosts") -#define HOSTS_ID "hosts" - -#define OPERA_HEAD N_("Operating Systems") -#define OPERA_DESC N_("Top Operating Systems sorted by hits [, avgts, cumts, maxts]") -#define OPERA_LABEL N_("OS") -#define OPERA_ID "os" - -#define BROWS_HEAD N_("Browsers") -#define BROWS_DESC N_("Top Browsers sorted by hits [, avgts, cumts, maxts]") -#define BROWS_LABEL N_("Browsers") -#define BROWS_ID "browsers" - -#define REFER_HEAD N_("Referrers URLs") -#define REFER_DESC N_("Top Requested Referrers sorted by hits [, avgts, cumts, maxts]") -#define REFER_LABEL N_("Referrers") -#define REFER_ID "referrers" - -#define SITES_HEAD N_("Referring Sites") -#define SITES_DESC N_("Top Referring Sites sorted by hits [, avgts, cumts, maxts]") -#define SITES_LABEL N_("Referring Sites") -#define SITES_ID "referring_sites" - -#define KEYPH_HEAD N_("Keyphrases from Google's search engine") -#define KEYPH_DESC N_("Top Keyphrases sorted by hits [, avgts, cumts, maxts]") -#define KEYPH_LABEL N_("Keyphrases") -#define KEYPH_ID "keyphrases" - -#define GEOLO_HEAD N_("Geo Location") -#define GEOLO_DESC N_("Continent > Country sorted by unique hits [, avgts, cumts, maxts]") -#define GEOLO_LABEL N_("Geo Location") -#define GEOLO_ID "geolocation" - -#define CODES_HEAD N_("HTTP Status Codes") -#define CODES_DESC N_("Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]") -#define CODES_LABEL N_("Status Codes") -#define CODES_ID "status_codes" - -#define GENER_ID "general" +/* Module JSON keys */ +#define VISIT_ID "visitors" +#define REQUE_ID "requests" +#define STATI_ID "static_requests" +#define VTIME_ID "visit_time" +#define VHOST_ID "vhosts" +#define RUSER_ID "remote_user" +#define FOUND_ID "not_found" +#define HOSTS_ID "hosts" +#define OPERA_ID "os" +#define BROWS_ID "browsers" +#define REFER_ID "referrers" +#define SITES_ID "referring_sites" +#define KEYPH_ID "keyphrases" +#define GEOLO_ID "geolocation" +#define CODES_ID "status_codes" +#define GENER_ID "general" /* Overall Statistics CSV/JSON Keys */ #define OVERALL_STARTDATE "start_date" @@ -177,27 +95,6 @@ #define OVERALL_BANDWIDTH "bandwidth" #define OVERALL_LOG "log_path" -/* Metric Labels */ -#define MTRC_HITS_LBL _("Hits") -#define MTRC_VISITORS_LBL _("Visitors") -#define MTRC_VISITORS_SHORT_LBL _("Vis.") -#define MTRC_BW_LBL _("Bandwidth") -#define MTRC_AVGTS_LBL _("Avg. T.S.") -#define MTRC_CUMTS_LBL _("Cum. T.S.") -#define MTRC_MAXTS_LBL _("Max. T.S.") -#define MTRC_METHODS_LBL _("Method") -#define MTRC_METHODS_SHORT_LBL _("Mtd") -#define MTRC_PROTOCOLS_LBL _("Protocol") -#define MTRC_PROTOCOLS_SHORT_LBL _("Proto") -#define MTRC_CITY_LBL _("City") -#define MTRC_COUNTRY_LBL _("Country") -#define MTRC_HOSTNAME_LBL _("Hostname") -#define MTRC_DATA_LBL _("Data") - -/* Find Labels */ -#define FIND_HEAD _("Find pattern in all views") -#define FIND_DESC _("Regex allowed - ^g to cancel - TAB switch case") - /* CONFIG DIALOG */ #define CONF_MENU_H 6 #define CONF_MENU_W 57 @@ -226,8 +123,6 @@ #define SORT_MENU_Y 4 #define SORT_WIN_H 13 #define SORT_WIN_W 42 -#define SORT_ASC_SEL "[x] ASC [ ] DESC" -#define SORT_DESC_SEL "[ ] ASC [x] DESC" /* AGENTS DIALOG */ #define AGENTS_MENU_X 2 @@ -242,16 +137,12 @@ #define HELP_WIN_WIDTH 64 /* CONF ERROR DIALOG */ -#define ERR_MENU_HEIGHT 10 -#define ERR_MENU_WIDTH 57 -#define ERR_MENU_X 2 -#define ERR_MENU_Y 4 -#define ERR_WIN_HEIGHT 15 -#define ERR_WIN_WIDTH 61 -#define ERR_HEADER _("Format Errors - Verify your log/date/time format") - -#define CSENSITIVE _("[x] case sensitive") -#define CISENSITIVE _("[ ] case sensitive") +#define ERR_MENU_HEIGHT 10 +#define ERR_MENU_WIDTH 57 +#define ERR_MENU_X 2 +#define ERR_MENU_Y 4 +#define ERR_WIN_HEIGHT 15 +#define ERR_WIN_WIDTH 61 /* Convenient macros */ #define MIN(a, b) (((a) < (b)) ? (a) : (b))