From 007e7d35a2e228595e2131e311b1a8d95230bfc7 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sun, 11 Aug 2024 17:57:04 +0200 Subject: [PATCH] distroquery.php: show provided files list in package details view --- distroquery.php | 24 +++++-- languages/it_IT.mo | Bin 4027 -> 3666 bytes languages/it_IT.po | 138 +++++++++++++++++++++------------------- languages/responsive.po | 110 +++++++++++++++++--------------- style.css | 13 ++++ 5 files changed, 160 insertions(+), 125 deletions(-) diff --git a/distroquery.php b/distroquery.php index 15b8207..81a14d9 100644 --- a/distroquery.php +++ b/distroquery.php @@ -52,7 +52,7 @@ $url_prefix = home_url() . "/rpms/"; echo "

" . _r("Available repositories") . ":

"; $request = wp_remote_get($api_url . "repositories"); if (is_wp_error($request)) { - echo "ERROR: " . $request->get_error_message(); + echo "

ERROR: " . $request->get_error_message() . "

"; goto finish; } @@ -77,7 +77,7 @@ $url_prefix = home_url() . "/rpms/"; $request = wp_remote_get($api_url . "repository/" . $repo . $query_append); if (is_wp_error($request)) { - echo "ERROR: " . $request->get_error_message(); + echo "

ERROR: " . $request->get_error_message() . "

"; goto finish; } @@ -163,7 +163,7 @@ $url_prefix = home_url() . "/rpms/"; $request = wp_remote_get($api_url . "package/" . $repo . "/" . $package); if (is_wp_error($request)) { - echo "ERROR: " . $request->get_error_message(); + echo "

ERROR: " . $request->get_error_message() . "

"; goto finish; } @@ -263,9 +263,10 @@ $url_prefix = home_url() . "/rpms/"; // echo " > " . _r("Repositories") . ""; - $request = wp_remote_get($api_url . "package/" . $repo . "/" . $package . "/" . $arch); + $request = wp_remote_get($api_url . "package/" . $repo . "/" . $package . "/" . $arch, + array('timeout' => 15)); if (is_wp_error($request)) { - echo "ERROR: " . $request->get_error_message(); + echo "
ERROR: " . $request->get_error_message() . "
"; goto finish; } @@ -353,6 +354,19 @@ $url_prefix = home_url() . "/rpms/"; } } echo ""; + + // Package files list + echo "" . _r("Provided files") . ""; + + echo "
"; + if (isset($j["files"])) { + foreach ($j["files"] as $file) { + echo $file["path"] . "
"; + } + } + echo "
"; + } } ?> diff --git a/languages/it_IT.mo b/languages/it_IT.mo index 7fd740ba99ecc31b604e59ed1519328082500a75..03be96c2399c049ee95f61e4456d3fecf5bdb871 100644 GIT binary patch delta 1591 zcmXw(Sx8i27>56G*Ku+!%Uq6aW~ptHW?EUcKuJ(wAb6qRmDJ{l4#C&UsY&rYQ0uH)+&hO{fU@ z6O3tv%}Knld&$PEhxcI$oP}9%4r<6E%!Dzx1};Gd`WT!Bt6?szg&FXqWeZF-CSuwt z_~__{a(EGX;bkZXS0O&l4ck9v+sC0CPTKyvP=ThQ=D&hUYz}6_1;}H*^HTpGm`Z$; zOd1;Cg9WezDqs!Nga)WUO)v+ZhDx*@ro#YKq9Lg915g1Xa1|W3{kNg!PuTi2OeMZ~ zLP43nw0vs^e1r-Rv+X~i94nfRAQNg{5mZ7Iunks2B|L2V$6!A735W|bW80s>h#bt? zj(M0!{S)LGm@iN(h(QJX4dpnEtZF^R^pOO;sLG3^>l)q{? z0P7$_%>&3|B2Rhi`<{hbNepVhFDSpIaH!t@cCBKMuJXWOrZTRDXTwxXkwtwo2CKHI%Wrle&$_YJ5T z)gpc3+Bxlt;xFGw-Qqe_g|vP86Y6|fjMkkJyE;ub`o6WgExX%p*N2b!tqYLRrJtLLg*667BtH;X(rz;c=y8Ui+ m$k**DV7SxiI-#(8-VFxgGXo>NSyh?AP|yjxeW9NIkogZ>rH#P= delta 1939 zcmYk6O>9(E7>3V4heGMJ78PwRaH@qOEv1TM)q)BZ!AeXKYooB}Fmq{-Oy>^w&cHA+ zPK+@uSh$#U*Czfz!a^fhcH%}8qsGKP5=~4@SlA5)-LNyp=bau6C-=M0`Tf54eCOQz zWA~?(nlqFGST}Zbg)td8-^7bzR~f@&dU)LjxBB)dY^VJ^)YK!e6;8o6I1AUq z*P(@VxEfx8>)>aw#h9A;ez{_Ph0P2s!4$j+<@j&77A6>!gA`1{^-$y8zP|_J&}{SL zX{bOWQ0rfS68I{-15U$L#5WZ`p$2)(IbNDjhxfqqPyw$(w3yGK0(}iT;58^AOK=Um z0VVVn)ck*-1SIKHe+MtE>r$KeW`GKFOd3kzZqG4IpgqY;j;DP8YfuhPLmk0ezP}D7 zr!aHfd19{8`yjH@GAlJlPhC1sj zP(r?dI=Y{r0$+#231j|%%0w@!dtpCRdwebVSAa=66!?T^1%W2$@&i!dd96E?E zbJF*}0VUup)Xo=t|3%-v3?=lc@Bb3Y&v#J%fA-_GB`Ol|7u3!*Du*4g0=uCC&q1b` z_o4m+m!Nj=tsnmdPSE}x@|Y2vY6D|XM|>Dc&@|K?ItjT$HB+Xd@3aE-S)B7+fC}(2 zU<2ee^WVZPBeox^+OuJJV!S*$3#ysq~2|n%Xy3m9A{@GnmD6R7$UIxr&Zt7q(FiihfuF*fwk{){E&P_h7e|ol3FFz1Txo8sl94 zFFLaw|FyPc!{V8d`laOlRFs`@rviICjO^xk@m6vnvG`u|Kw{>l85i5r!Litt0$YxQ z*k;45(7YT(u?q`k(tFVwmkVvu&W2IsY=(ud;BaFKVZlZ&4)dkZ{0l&q B=O+LF diff --git a/languages/it_IT.po b/languages/it_IT.po index 55e6a61..023eefa 100644 --- a/languages/it_IT.po +++ b/languages/it_IT.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Responsive Theme\n" "Report-Msgid-Bugs-To: bugs@openmamba.org\n" -"POT-Creation-Date: 2024-07-07 14:59+0200\n" +"POT-Creation-Date: 2024-08-11 17:54+0200\n" "PO-Revision-Date: 2014-12-08 16:25+0100\n" "Last-Translator: Silvan Calarco \n" "Language-Team: Italian, Italy\n" @@ -26,174 +26,178 @@ msgstr "Leggi di più ›" msgid "Pages:" msgstr "Pagine:" -#: ../distroquery.php:47 ../distroquery.php:149 ../distroquery.php:244 +#: ../distroquery.php:50 ../distroquery.php:162 ../distroquery.php:264 msgid "Repositories" msgstr "Repository" -#: ../distroquery.php:49 +#: ../distroquery.php:52 msgid "Available repositories" msgstr "Repository disponibili" -#: ../distroquery.php:78 +#: ../distroquery.php:91 msgid "List of packages" msgstr "Elenco dei pacchetti" -#: ../distroquery.php:81 +#: ../distroquery.php:94 msgid "Search packages" msgstr "Cerca pacchetti" -#: ../distroquery.php:82 +#: ../distroquery.php:95 msgid "Search here" msgstr "Cerca qui" -#: ../distroquery.php:83 +#: ../distroquery.php:96 msgid "Results for:" msgstr "Risultati per:" -#: ../distroquery.php:99 ../distroquery.php:121 +#: ../distroquery.php:112 ../distroquery.php:134 msgid "result(s) found" msgstr "risultati trovati" -#: ../distroquery.php:100 +#: ../distroquery.php:113 msgid "Showing page" msgstr "Mostro la pagina" -#: ../distroquery.php:100 +#: ../distroquery.php:113 msgid "of" msgstr "di" -#: ../distroquery.php:125 +#: ../distroquery.php:138 msgid "Arch" msgstr "Architettura" -#: ../distroquery.php:126 ../distroquery.php:176 ../distroquery.php:270 +#: ../distroquery.php:139 ../distroquery.php:194 ../distroquery.php:296 msgid "Name" msgstr "Nome" -#: ../distroquery.php:127 +#: ../distroquery.php:140 msgid "Version" msgstr "Versione" -#: ../distroquery.php:128 +#: ../distroquery.php:141 msgid "Summary" msgstr "Descrizione" -#: ../distroquery.php:129 +#: ../distroquery.php:142 msgid "Last update" msgstr "Ultimo aggiornamento" -#: ../distroquery.php:155 ../distroquery.php:249 +#: ../distroquery.php:173 ../distroquery.php:275 msgid "ERROR" msgstr "ERRORE" -#: ../distroquery.php:162 ../distroquery.php:256 +#: ../distroquery.php:180 ../distroquery.php:282 msgid "Resources" msgstr "Risorse" -#: ../distroquery.php:163 ../distroquery.php:257 +#: ../distroquery.php:181 ../distroquery.php:283 msgid "Source files" msgstr "File sorgenti" -#: ../distroquery.php:164 ../distroquery.php:258 +#: ../distroquery.php:182 ../distroquery.php:284 msgid "Changes" msgstr "Modifiche" -#: ../distroquery.php:165 ../distroquery.php:259 +#: ../distroquery.php:183 ../distroquery.php:285 msgid "Issues" msgstr "Problemi" -#: ../distroquery.php:166 ../distroquery.php:260 +#: ../distroquery.php:184 ../distroquery.php:286 msgid "Add a new issue" msgstr "Segnala un problema" -#: ../distroquery.php:167 ../distroquery.php:261 +#: ../distroquery.php:185 ../distroquery.php:287 msgid "Download" msgstr "Scarica" -#: ../distroquery.php:177 ../distroquery.php:227 ../distroquery.php:271 +#: ../distroquery.php:195 ../distroquery.php:247 ../distroquery.php:297 msgid "Release" msgstr "Versione" -#: ../distroquery.php:180 ../distroquery.php:275 +#: ../distroquery.php:198 ../distroquery.php:301 msgid "Group" msgstr "Gruppo" -#: ../distroquery.php:181 +#: ../distroquery.php:199 msgid "Maintainer" msgstr "Manutentore" -#: ../distroquery.php:182 +#: ../distroquery.php:200 msgid "License" msgstr "Licenza" -#: ../distroquery.php:183 ../distroquery.php:276 +#: ../distroquery.php:201 ../distroquery.php:302 msgid "Size" msgstr "Dimensione" -#: ../distroquery.php:184 ../distroquery.php:277 +#: ../distroquery.php:202 ../distroquery.php:303 msgid "Upstream URL" msgstr "URL di origine" -#: ../distroquery.php:185 +#: ../distroquery.php:203 msgid "Build time" msgstr "Data di compilazione" -#: ../distroquery.php:190 +#: ../distroquery.php:208 msgid "Binary packages and requirements" msgstr "Pacchetti binari e dipendenze" -#: ../distroquery.php:196 +#: ../distroquery.php:214 msgid "Built RPMS" msgstr "RPM creati" -#: ../distroquery.php:205 +#: ../distroquery.php:223 msgid "Build requirements" msgstr "Dipendenze di compilazione" -#: ../distroquery.php:217 ../distroquery.php:317 +#: ../distroquery.php:237 ../distroquery.php:352 msgid "unresolved" msgstr "non risolto" -#: ../distroquery.php:225 +#: ../distroquery.php:245 msgid "History of changes" msgstr "Cronologia delle modifiche" -#: ../distroquery.php:226 ../functions.php:129 +#: ../distroquery.php:246 ../functions.php:129 msgid "Date" msgstr "Data" -#: ../distroquery.php:227 +#: ../distroquery.php:247 msgid "Packager" msgstr "Packager" -#: ../distroquery.php:228 +#: ../distroquery.php:248 msgid "Description" msgstr "Descrizione" -#: ../distroquery.php:274 +#: ../distroquery.php:300 msgid "Architecture" msgstr "Architettura" -#: ../distroquery.php:278 +#: ../distroquery.php:304 msgid "Source RPM" msgstr "RPM sorgente" -#: ../distroquery.php:287 +#: ../distroquery.php:313 msgid "Brothers" msgstr "Collegati" -#: ../distroquery.php:287 +#: ../distroquery.php:313 msgid "Provides" msgstr "Fornisce" -#: ../distroquery.php:288 +#: ../distroquery.php:314 msgid "Obsoletes" msgstr "Rende obsoleti" -#: ../distroquery.php:288 +#: ../distroquery.php:314 msgid "Requires" msgstr "Richiede" +#: ../distroquery.php:360 +msgid "Provided files" +msgstr "File forniti" + #: ../footer.php:68 msgid "↑" msgstr "↑" @@ -214,43 +218,43 @@ msgstr "" "Il download non è temporaneamente disponibile. Se il problema persiste ti " "ringraziamo se ci puoi segnalare il problema." -#: ../functions.php:220 +#: ../functions.php:221 msgid "More languages..." msgstr "Altre lingue..." -#: ../functions.php:223 +#: ../functions.php:224 msgid "Features" msgstr "Caratteristiche" -#: ../functions.php:227 +#: ../functions.php:228 msgid "Requirements" msgstr "Requisiti" -#: ../functions.php:231 +#: ../functions.php:232 msgid "Preparation" msgstr "Preparazione" -#: ../functions.php:271 ../functions.php:316 +#: ../functions.php:272 ../functions.php:317 msgid "Loading, please wait..." msgstr "Caricamento in corso, attendi..." -#: ../functions.php:295 ../functions.php:319 ../functions.php:337 +#: ../functions.php:296 ../functions.php:320 ../functions.php:338 msgid "Invalid request." msgstr "Richiesta non valida." -#: ../functions.php:351 +#: ../functions.php:352 msgid "Starting download of" msgstr "Avvio dello scaricamento di" -#: ../functions.php:351 +#: ../functions.php:352 msgid "please wait..." msgstr "attendere prego..." -#: ../functions.php:384 +#: ../functions.php:385 msgid "I Understand" msgstr "Ho capito" -#: ../functions.php:385 +#: ../functions.php:386 msgid "Cookie policy" msgstr "Informativa sui cookie" @@ -283,22 +287,22 @@ msgstr "Salve, %1$s" msgid "Logout" msgstr "Esci" -msgid "©" -msgstr "©" +#~ msgid "©" +#~ msgstr "©" -msgid "scroll to top" -msgstr "scorri all'inizio" +#~ msgid "scroll to top" +#~ msgstr "scorri all'inizio" -msgid "Website provided by" -msgstr "Sito web fornito da" +#~ msgid "Website provided by" +#~ msgstr "Sito web fornito da" -msgid "WordPress" -msgstr "WordPress" +#~ msgid "WordPress" +#~ msgstr "WordPress" -msgid "This website uses cookies to improve user experience." -msgstr "" -"Questo sito utilizza i cookie per migliorare l'esperienza di navigazione " -"dell'utente." +#~ msgid "This website uses cookies to improve user experience." +#~ msgstr "" +#~ "Questo sito utilizza i cookie per migliorare l'esperienza di navigazione " +#~ "dell'utente." -msgid "Archive for %s" -msgstr "Archivio per %s" +#~ msgid "Archive for %s" +#~ msgstr "Archivio per %s" diff --git a/languages/responsive.po b/languages/responsive.po index 298158c..a4de57c 100644 --- a/languages/responsive.po +++ b/languages/responsive.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: openmamba 1.0\n" "Report-Msgid-Bugs-To: bugs@openmamba.org\n" -"POT-Creation-Date: 2024-07-07 14:59+0200\n" +"POT-Creation-Date: 2024-08-11 17:54+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -27,174 +27,178 @@ msgstr "" msgid "Pages:" msgstr "" -#: ../distroquery.php:47 ../distroquery.php:149 ../distroquery.php:244 +#: ../distroquery.php:50 ../distroquery.php:162 ../distroquery.php:264 msgid "Repositories" msgstr "" -#: ../distroquery.php:49 +#: ../distroquery.php:52 msgid "Available repositories" msgstr "" -#: ../distroquery.php:78 +#: ../distroquery.php:91 msgid "List of packages" msgstr "" -#: ../distroquery.php:81 +#: ../distroquery.php:94 msgid "Search packages" msgstr "" -#: ../distroquery.php:82 +#: ../distroquery.php:95 msgid "Search here" msgstr "" -#: ../distroquery.php:83 +#: ../distroquery.php:96 msgid "Results for:" msgstr "" -#: ../distroquery.php:99 ../distroquery.php:121 +#: ../distroquery.php:112 ../distroquery.php:134 msgid "result(s) found" msgstr "" -#: ../distroquery.php:100 +#: ../distroquery.php:113 msgid "Showing page" msgstr "" -#: ../distroquery.php:100 +#: ../distroquery.php:113 msgid "of" msgstr "" -#: ../distroquery.php:125 +#: ../distroquery.php:138 msgid "Arch" msgstr "" -#: ../distroquery.php:126 ../distroquery.php:176 ../distroquery.php:270 +#: ../distroquery.php:139 ../distroquery.php:194 ../distroquery.php:296 msgid "Name" msgstr "" -#: ../distroquery.php:127 +#: ../distroquery.php:140 msgid "Version" msgstr "" -#: ../distroquery.php:128 +#: ../distroquery.php:141 msgid "Summary" msgstr "" -#: ../distroquery.php:129 +#: ../distroquery.php:142 msgid "Last update" msgstr "" -#: ../distroquery.php:155 ../distroquery.php:249 +#: ../distroquery.php:173 ../distroquery.php:275 msgid "ERROR" msgstr "" -#: ../distroquery.php:162 ../distroquery.php:256 +#: ../distroquery.php:180 ../distroquery.php:282 msgid "Resources" msgstr "" -#: ../distroquery.php:163 ../distroquery.php:257 +#: ../distroquery.php:181 ../distroquery.php:283 msgid "Source files" msgstr "" -#: ../distroquery.php:164 ../distroquery.php:258 +#: ../distroquery.php:182 ../distroquery.php:284 msgid "Changes" msgstr "" -#: ../distroquery.php:165 ../distroquery.php:259 +#: ../distroquery.php:183 ../distroquery.php:285 msgid "Issues" msgstr "" -#: ../distroquery.php:166 ../distroquery.php:260 +#: ../distroquery.php:184 ../distroquery.php:286 msgid "Add a new issue" msgstr "" -#: ../distroquery.php:167 ../distroquery.php:261 +#: ../distroquery.php:185 ../distroquery.php:287 msgid "Download" msgstr "" -#: ../distroquery.php:177 ../distroquery.php:227 ../distroquery.php:271 +#: ../distroquery.php:195 ../distroquery.php:247 ../distroquery.php:297 msgid "Release" msgstr "" -#: ../distroquery.php:180 ../distroquery.php:275 +#: ../distroquery.php:198 ../distroquery.php:301 msgid "Group" msgstr "" -#: ../distroquery.php:181 +#: ../distroquery.php:199 msgid "Maintainer" msgstr "" -#: ../distroquery.php:182 +#: ../distroquery.php:200 msgid "License" msgstr "" -#: ../distroquery.php:183 ../distroquery.php:276 +#: ../distroquery.php:201 ../distroquery.php:302 msgid "Size" msgstr "" -#: ../distroquery.php:184 ../distroquery.php:277 +#: ../distroquery.php:202 ../distroquery.php:303 msgid "Upstream URL" msgstr "" -#: ../distroquery.php:185 +#: ../distroquery.php:203 msgid "Build time" msgstr "" -#: ../distroquery.php:190 +#: ../distroquery.php:208 msgid "Binary packages and requirements" msgstr "" -#: ../distroquery.php:196 +#: ../distroquery.php:214 msgid "Built RPMS" msgstr "" -#: ../distroquery.php:205 +#: ../distroquery.php:223 msgid "Build requirements" msgstr "" -#: ../distroquery.php:217 ../distroquery.php:317 +#: ../distroquery.php:237 ../distroquery.php:352 msgid "unresolved" msgstr "" -#: ../distroquery.php:225 +#: ../distroquery.php:245 msgid "History of changes" msgstr "" -#: ../distroquery.php:226 ../functions.php:129 +#: ../distroquery.php:246 ../functions.php:129 msgid "Date" msgstr "" -#: ../distroquery.php:227 +#: ../distroquery.php:247 msgid "Packager" msgstr "" -#: ../distroquery.php:228 +#: ../distroquery.php:248 msgid "Description" msgstr "" -#: ../distroquery.php:274 +#: ../distroquery.php:300 msgid "Architecture" msgstr "" -#: ../distroquery.php:278 +#: ../distroquery.php:304 msgid "Source RPM" msgstr "" -#: ../distroquery.php:287 +#: ../distroquery.php:313 msgid "Brothers" msgstr "" -#: ../distroquery.php:287 +#: ../distroquery.php:313 msgid "Provides" msgstr "" -#: ../distroquery.php:288 +#: ../distroquery.php:314 msgid "Obsoletes" msgstr "" -#: ../distroquery.php:288 +#: ../distroquery.php:314 msgid "Requires" msgstr "" +#: ../distroquery.php:360 +msgid "Provided files" +msgstr "" + #: ../footer.php:68 msgid "↑" msgstr "" @@ -213,43 +217,43 @@ msgid "" "report the problem." msgstr "" -#: ../functions.php:220 +#: ../functions.php:221 msgid "More languages..." msgstr "" -#: ../functions.php:223 +#: ../functions.php:224 msgid "Features" msgstr "" -#: ../functions.php:227 +#: ../functions.php:228 msgid "Requirements" msgstr "" -#: ../functions.php:231 +#: ../functions.php:232 msgid "Preparation" msgstr "" -#: ../functions.php:271 ../functions.php:316 +#: ../functions.php:272 ../functions.php:317 msgid "Loading, please wait..." msgstr "" -#: ../functions.php:295 ../functions.php:319 ../functions.php:337 +#: ../functions.php:296 ../functions.php:320 ../functions.php:338 msgid "Invalid request." msgstr "" -#: ../functions.php:351 +#: ../functions.php:352 msgid "Starting download of" msgstr "" -#: ../functions.php:351 +#: ../functions.php:352 msgid "please wait..." msgstr "" -#: ../functions.php:384 +#: ../functions.php:385 msgid "I Understand" msgstr "" -#: ../functions.php:385 +#: ../functions.php:386 msgid "Cookie policy" msgstr "" diff --git a/style.css b/style.css index 6bade8c..bf81a9f 100644 --- a/style.css +++ b/style.css @@ -294,6 +294,17 @@ span#distromatic table td hr { margin:5px; } +div.errorbox { + display:block; + background-color:#f0f0f0; + color:red; + border:1px; + border-radius:5px; + margin-top:10px; + margin-bottom:5px; + padding:5px; +} + .querytag { display:inline; color:white; @@ -337,3 +348,5 @@ table.pkgpage tr:nth-child(even) td { padding:2px; background-color: #F2F2F2; } table.pkgpage th { padding:4px; font-weight: 800; border: 0; text-align: left; vertical-align: top; } table.pkgpage td { padding:4px; vertical-align: top; } +div.bggray { background-color: #F2F2F2; } +