From 6062c4ab7d5069a7325e0bf996c6d61a5d2830cf Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 29 Jun 2024 14:04:42 +0200 Subject: [PATCH] distroquery API: add resource box and translations --- distroquery.php | 82 ++++++++++-------- functions.php | 5 ++ languages/README | 2 +- languages/it_IT.mo | Bin 2031 -> 3138 bytes languages/it_IT.po | 179 +++++++++++++++++++++++++++++++++------- languages/responsive.po | 164 +++++++++++++++++++++++++++++++----- style.css | 9 ++ 7 files changed, 358 insertions(+), 83 deletions(-) diff --git a/distroquery.php b/distroquery.php index caaaad7..5bd646f 100644 --- a/distroquery.php +++ b/distroquery.php @@ -32,13 +32,14 @@ $url_prefix = home_url() . "/rpms/"; $package=get_query_var('package'); $arch=get_query_var('arch'); + if ($repo == "") { // // Repositories // - echo " > Repositories"; + echo " > " . _r("Repositories"); - echo "

Available repositories:

"; + echo "

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

"; $request = wp_remote_get('https://push.openmamba.org/openmamba/distroquery/api/v1/repositories'); $j = json_decode($request["body"], true); foreach ($j as $repository) { @@ -60,7 +61,7 @@ $url_prefix = home_url() . "/rpms/"; } else { echo " > " . $repo; - echo "

List of packages:

"; + echo "

" . _r("List of packages") . ":

"; foreach ($j as $package) { $package_url = $url_prefix . $repo . "/" . $package["name"]; @@ -73,42 +74,49 @@ $url_prefix = home_url() . "/rpms/"; // // Source package // - echo " > Repositories"; + echo " > " . _r("Repositories") . ""; $request = wp_remote_get('https://push.openmamba.org/openmamba/distroquery/api/v1/package/'. $repo . "/" . $package); $j = json_decode($request["body"], true); if ($j["error"] != "") { - echo "

ERROR: " . $j["error"] . "

"; + echo "

" . _r("ERROR") . ": " . $j["error"] . "

"; } else { echo " > $repo > " . $package; ?> +
+:
+" target=_blank> | +/commits/branch/main" target=_blank>
+/issues" target=_blank> | +/issues/new" target=_blank>
+" target=_blank> +
+

" width="24" height="24"> :

- - + - - - - - - - - - - + + + + + + + -
Name:
Release: +
:
:
Group:
Maintainer:
Description:
License:
Size:
URL:" target=_blank>
Download:" target=_blank>
Sources repository:" target=_blank>
Build time:
Built RPMS::
:
:
:
:
:" target=_blank>
:
:" . $child["name"] . "(" . $child["arch"] . ") "; } ?>
Build requirements:: Repositories"; + echo " > " . _r("Repositories") . ""; $request = wp_remote_get('https://push.openmamba.org/openmamba/distroquery/api/v1/package/'. $repo . "/" . $package . "/" . $arch); $j = json_decode($request["body"],true); if ($j["error"] != "") { - echo "

ERROR: " . $j["error"] . "

"; + echo "

" . _r("ERROR") . ": " . $j["error"] . "

"; } else { echo " > $repo > " . $package . " (" . $arch . ")"; ?> + +

" width="24" height="24"> :

- - + - - - - - - - + + + + + - - -
Name:
Release: +
:
:
Architecture:
Group:
Description:
Size:
URL:" target=_blank>
Download:" target=_blank>
Source RPM::
:
:
:
:" target=_blank>
:". $j["source"]["name"] . " "; ?> -
Brothers::". $brother . " "; } ?>
Provides::
Obsoletes::
Requires::uO|t%p$@wSIoR;RYr)Fnvc9YAkb5ZYdyJuE*-DPIa5D~GayLPs` zo~}++^=xKeL=gq?;Sd4}!hs~1m%IoDC6Jdxg!te~hzeqS5kvxc5+4-t_s#U&F4s); zudBN2`@Z`A&0p`m{W-<8%6NeBmv<<&4S#kUH?BY3uGG8XpW(;g-M@8l(qN<;Z>k(t_A~DEh8JvF9fZUufR{5{kT6pveC%{5pIMivH7VmVGPmgYb*Z ze7B*2Cs;3`$oVdmQ2hwLA6|pv*X!^cv3v<4TKyekPrGe!xXJg|p`7DoD1LbbqEh`1ik?3}@zWbn^5sn^@p-#>FG6MC z9grn;0)7adgtG4uDDobMV#gZP@M$RW525J)4iq`xhoa}l&HB%w_~jQ+J`vy6wDwPh&rk+Yv>Jj{@Dh|gLK ziMiC9TypODB|hS))9Vx5#YaoCsrpRArWL7^%q8cJUz&-;PhzsdkQ~2{p%yb=P0p*u z+=Osm_piE2C$G1REA=H`CR--8Sj#(gG0(Npr9IFt#@ecjA=`J!W~mNL#>N$9P*@#o z<)ceJI2+Xy!KZy2c&J^G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TJ262iqKMBvkX-FA9gp}bc*bdhq zRq_j@uSk379F?6~FFNg~s?qy{%_JShXW3|!EoDfJBB!!ZMW|80C`6Ds%_&3rAL>T$ zK}XC%G9V~BVhNI<#8}1_T95L{d1Zby^(J(2PAy74>uR1hZgZ!(+uUQGp~oVbNTV`=j<)}I^; z(pE0V8+h6?cjCLuhxoqEN#QKY{X9L;=dq(MFN&)2U30F*N{u-_6+@vIGOUEE$c<9e zQ3~_EB^3{HMsCVjt#$LVb?@@2n)Hww)?8lmm80r)!Bv=b5I|X#9OY_3FUU%7J!@>T y6|aazRT6Z&j7!ESwV}mVmRaMK9Ygxuhbo>X%@YfLl diff --git a/languages/it_IT.po b/languages/it_IT.po index 1cc7fcb..3a410e9 100644 --- a/languages/it_IT.po +++ b/languages/it_IT.po @@ -7,13 +7,13 @@ msgid "" msgstr "" "Project-Id-Version: Responsive Theme\n" "Report-Msgid-Bugs-To: bugs@openmamba.org\n" -"POT-Creation-Date: 2020-06-27 13:56+0200\n" +"POT-Creation-Date: 2024-06-29 14:01+0200\n" "PO-Revision-Date: 2014-12-08 16:25+0100\n" "Last-Translator: Silvan Calarco \n" "Language-Team: Italian, Italy\n" "Language: \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../bbpress.php:41 ../search-page.php:42 ../webbuild-page.php:47 @@ -26,23 +26,147 @@ msgstr "Leggi di più ›" msgid "Pages:" msgstr "Pagine:" +#: ../distroquery.php:40 ../distroquery.php:77 ../distroquery.php:135 +msgid "Repositories" +msgstr "Repository" + +#: ../distroquery.php:42 +msgid "Available repositories" +msgstr "Repository disponibili" + +#: ../distroquery.php:64 +msgid "List of packages" +msgstr "Elenco dei pacchetti" + +#: ../distroquery.php:83 ../distroquery.php:140 +msgid "ERROR" +msgstr "ERRORE" + +#: ../distroquery.php:90 ../distroquery.php:147 +msgid "Resources" +msgstr "Risorse" + +#: ../distroquery.php:91 ../distroquery.php:148 +msgid "Source files" +msgstr "File sorgenti" + +#: ../distroquery.php:92 ../distroquery.php:149 +msgid "Changes" +msgstr "Modifiche" + +#: ../distroquery.php:93 ../distroquery.php:150 +msgid "Issues" +msgstr "Problemi" + +#: ../distroquery.php:94 ../distroquery.php:151 +msgid "Add a new issue" +msgstr "Segnala un problema" + +#: ../distroquery.php:95 ../distroquery.php:152 +msgid "Download" +msgstr "Scarica" + +#: ../distroquery.php:102 ../distroquery.php:159 +msgid "Name" +msgstr "Nome" + +#: ../distroquery.php:103 ../distroquery.php:160 +msgid "Release" +msgstr "Versione" + +#: ../distroquery.php:106 ../distroquery.php:164 +msgid "Group" +msgstr "Gruppo" + +#: ../distroquery.php:107 +msgid "Maintainer" +msgstr "Manutentore" + +#: ../distroquery.php:108 ../distroquery.php:165 +msgid "Description" +msgstr "Descrizione" + +#: ../distroquery.php:109 +msgid "License" +msgstr "Licenza" + +#: ../distroquery.php:110 ../distroquery.php:166 +msgid "Size" +msgstr "Dimensione" + +#: ../distroquery.php:111 ../distroquery.php:167 +msgid "Upstream URL" +msgstr "URL di origine" + +#: ../distroquery.php:112 +msgid "Build time" +msgstr "Data di compilazione" + +#: ../distroquery.php:113 +msgid "Built RPMS" +msgstr "RPM creati" + +#: ../distroquery.php:119 +msgid "Build requirements" +msgstr "Dipendenze di compilazione" + +#: ../distroquery.php:163 +msgid "Architecture" +msgstr "Architettura" + +#: ../distroquery.php:168 +msgid "Source RPM" +msgstr "RPM sorgente" + +#: ../distroquery.php:171 +msgid "Brothers" +msgstr "Collegati" + +#: ../distroquery.php:177 +msgid "Provides" +msgstr "Fornisce" + +#: ../distroquery.php:184 +msgid "Obsoletes" +msgstr "Rende obsoleti" + +#: ../distroquery.php:191 +msgid "Requires" +msgstr "Richiede" + +#: ../footer.php:63 +msgid "©" +msgstr "©" + #: ../footer.php:68 msgid "↑" msgstr "↑" -#: ../functions.php:107 ../functions.php:118 +#: ../footer.php:68 +msgid "scroll to top" +msgstr "scorri all'inizio" + +#: ../footer.php:70 +msgid "Website provided by" +msgstr "Sito web fornito da" + +#: ../footer.php:71 +msgid "WordPress" +msgstr "WordPress" + +#: ../functions.php:126 ../functions.php:137 msgid "for" msgstr "per" -#: ../functions.php:109 +#: ../functions.php:128 msgid "File size:" msgstr "Dimensione file:" -#: ../functions.php:110 +#: ../functions.php:129 msgid "Date" msgstr "Data" -#: ../functions.php:120 +#: ../functions.php:139 msgid "" "Sorry, download is temporary unavailable. If the problem persists please " "report the problem." @@ -50,49 +174,47 @@ msgstr "" "Il download non è temporaneamente disponibile. Se il problema persiste ti " "ringraziamo se ci puoi segnalare il problema." -#: ../functions.php:201 +#: ../functions.php:220 msgid "More languages..." msgstr "Altre lingue..." -#: ../functions.php:204 +#: ../functions.php:223 msgid "Features" msgstr "Caratteristiche" -#: ../functions.php:208 +#: ../functions.php:227 msgid "Requirements" msgstr "Requisiti" -#: ../functions.php:212 +#: ../functions.php:231 msgid "Preparation" msgstr "Preparazione" -#: ../functions.php:251 ../functions.php:290 +#: ../functions.php:271 ../functions.php:316 msgid "Loading, please wait..." msgstr "Caricamento in corso, attendi..." -#: ../functions.php:318 +#: ../functions.php:295 ../functions.php:319 ../functions.php:337 +msgid "Invalid request." +msgstr "Richiesta non valida." + +#: ../functions.php:351 msgid "Starting download of" msgstr "Avvio dello scaricamento di" -#: ../functions.php:318 +#: ../functions.php:351 msgid "please wait..." msgstr "attendere prego..." -#: ../functions.php:342 -msgid "This website uses cookies to improve user experience." -msgstr "" -"Questo sito utilizza i cookie per migliorare l'esperienza di navigazione " -"dell'utente." - -#: ../functions.php:343 +#: ../functions.php:384 msgid "I Understand" msgstr "Ho capito" -#: ../functions.php:344 +#: ../functions.php:385 msgid "Cookie policy" msgstr "Informativa sui cookie" -#: ../header-webbuild-status.php:77 ../header-webbuild.php:108 +#: ../header-webbuild-status.php:74 ../header-webbuild.php:104 msgid "↓ Skip to Main Content" msgstr "↓ Salta al contenuto principale" @@ -121,11 +243,10 @@ msgstr "Salve, %1$s" msgid "Logout" msgstr "Esci" -msgid "scroll to top" -msgstr "scorri all'inizio" +#~ msgid "This website uses cookies to improve user experience." +#~ msgstr "" +#~ "Questo sito utilizza i cookie per migliorare l'esperienza di navigazione " +#~ "dell'utente." -msgid "Website provided by" -msgstr "Sito web fornito da" - -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 5e08b4e..e2ed73d 100644 --- a/languages/responsive.po +++ b/languages/responsive.po @@ -8,13 +8,13 @@ msgid "" msgstr "" "Project-Id-Version: openmamba 1.0\n" "Report-Msgid-Bugs-To: bugs@openmamba.org\n" -"POT-Creation-Date: 2020-06-27 13:56+0200\n" +"POT-Creation-Date: 2024-06-29 14:01+0200\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=CHARSET\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../bbpress.php:41 ../search-page.php:42 ../webbuild-page.php:47 @@ -27,69 +27,193 @@ msgstr "" msgid "Pages:" msgstr "" +#: ../distroquery.php:40 ../distroquery.php:77 ../distroquery.php:135 +msgid "Repositories" +msgstr "" + +#: ../distroquery.php:42 +msgid "Available repositories" +msgstr "" + +#: ../distroquery.php:64 +msgid "List of packages" +msgstr "" + +#: ../distroquery.php:83 ../distroquery.php:140 +msgid "ERROR" +msgstr "" + +#: ../distroquery.php:90 ../distroquery.php:147 +msgid "Resources" +msgstr "" + +#: ../distroquery.php:91 ../distroquery.php:148 +msgid "Source files" +msgstr "" + +#: ../distroquery.php:92 ../distroquery.php:149 +msgid "Changes" +msgstr "" + +#: ../distroquery.php:93 ../distroquery.php:150 +msgid "Issues" +msgstr "" + +#: ../distroquery.php:94 ../distroquery.php:151 +msgid "Add a new issue" +msgstr "" + +#: ../distroquery.php:95 ../distroquery.php:152 +msgid "Download" +msgstr "" + +#: ../distroquery.php:102 ../distroquery.php:159 +msgid "Name" +msgstr "" + +#: ../distroquery.php:103 ../distroquery.php:160 +msgid "Release" +msgstr "" + +#: ../distroquery.php:106 ../distroquery.php:164 +msgid "Group" +msgstr "" + +#: ../distroquery.php:107 +msgid "Maintainer" +msgstr "" + +#: ../distroquery.php:108 ../distroquery.php:165 +msgid "Description" +msgstr "" + +#: ../distroquery.php:109 +msgid "License" +msgstr "" + +#: ../distroquery.php:110 ../distroquery.php:166 +msgid "Size" +msgstr "" + +#: ../distroquery.php:111 ../distroquery.php:167 +msgid "Upstream URL" +msgstr "" + +#: ../distroquery.php:112 +msgid "Build time" +msgstr "" + +#: ../distroquery.php:113 +msgid "Built RPMS" +msgstr "" + +#: ../distroquery.php:119 +msgid "Build requirements" +msgstr "" + +#: ../distroquery.php:163 +msgid "Architecture" +msgstr "" + +#: ../distroquery.php:168 +msgid "Source RPM" +msgstr "" + +#: ../distroquery.php:171 +msgid "Brothers" +msgstr "" + +#: ../distroquery.php:177 +msgid "Provides" +msgstr "" + +#: ../distroquery.php:184 +msgid "Obsoletes" +msgstr "" + +#: ../distroquery.php:191 +msgid "Requires" +msgstr "" + +#: ../footer.php:63 +msgid "©" +msgstr "" + #: ../footer.php:68 msgid "↑" msgstr "" -#: ../functions.php:107 ../functions.php:118 +#: ../footer.php:68 +msgid "scroll to top" +msgstr "" + +#: ../footer.php:70 +msgid "Website provided by" +msgstr "" + +#: ../footer.php:71 +msgid "WordPress" +msgstr "" + +#: ../functions.php:126 ../functions.php:137 msgid "for" msgstr "" -#: ../functions.php:109 +#: ../functions.php:128 msgid "File size:" msgstr "" -#: ../functions.php:110 +#: ../functions.php:129 msgid "Date" msgstr "" -#: ../functions.php:120 +#: ../functions.php:139 msgid "" "Sorry, download is temporary unavailable. If the problem persists please " "report the problem." msgstr "" -#: ../functions.php:201 +#: ../functions.php:220 msgid "More languages..." msgstr "" -#: ../functions.php:204 +#: ../functions.php:223 msgid "Features" msgstr "" -#: ../functions.php:208 +#: ../functions.php:227 msgid "Requirements" msgstr "" -#: ../functions.php:212 +#: ../functions.php:231 msgid "Preparation" msgstr "" -#: ../functions.php:251 ../functions.php:290 +#: ../functions.php:271 ../functions.php:316 msgid "Loading, please wait..." msgstr "" -#: ../functions.php:318 +#: ../functions.php:295 ../functions.php:319 ../functions.php:337 +msgid "Invalid request." +msgstr "" + +#: ../functions.php:351 msgid "Starting download of" msgstr "" -#: ../functions.php:318 +#: ../functions.php:351 msgid "please wait..." msgstr "" -#: ../functions.php:342 -msgid "This website uses cookies to improve user experience." -msgstr "" - -#: ../functions.php:343 +#: ../functions.php:384 msgid "I Understand" msgstr "" -#: ../functions.php:344 +#: ../functions.php:385 msgid "Cookie policy" msgstr "" -#: ../header-webbuild-status.php:77 ../header-webbuild.php:108 +#: ../header-webbuild-status.php:74 ../header-webbuild.php:104 msgid "↓ Skip to Main Content" msgstr "" diff --git a/style.css b/style.css index 9de7859..1fa5a34 100644 --- a/style.css +++ b/style.css @@ -279,6 +279,15 @@ span#distromatic table td hr { } /* Distroquery */ +.box { + display:inline; + background-color:#f0f0f0; + border:1px; + border-radius:5px; + padding:5px; + margin:5px; +} + .querytag { display:inline; color:white;