[TikiWiki-commits] [Git][tikiwiki/tiki][master] [TRA][ENH] Added translation support to debug template for PluginList output

"luci \(@luciash\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6981e10d7fb2d_3b18436847567@gitlab-sidekiq-low-urgency-cpu-bound-v2-7bb94876c5-mdmrq.mail>

luci pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
8040bb4e by Joseph Ushindi at 2026-02-03T11:19:34+00:00
[TRA][ENH] Added translation support to debug template for PluginList output
---
* Added translation support to debug template for Plugin List output

See merge request tikiwiki/tiki!9225

- - - - -


3 changed files:

- lang/fr/language.php
- templates/search/list/debug.tpl
- tiki-pluginlist_experiment.php


Changes:

=====================================
lang/fr/language.php
=====================================
@@ -21220,10 +21220,22 @@ $lang_current = array(
 "Details:" => "Détails:",
 "This plugin does not contain any arguments" => "Ce plugiciel ne contient aucun argument",
 "This plugin's body is empty." => "Le corps de ce plugiciel est vide.",
-// "Experiment with plugin LIST" => "Experiment with plugin LIST",
-// "Plugin LIST content" => "Plugin LIST content",
-// "Use the following output block to see all the returned values" => "Use the following output block to see all the returned values",
-// "Test Plugin LIST" => "Test Plugin LIST",
+"Experiment with plugin LIST" => "Expérimentez avec le plugiciel LIST",
+"Plugin LIST content" => "Contenu du plugiciel LIST",
+"Use the following output block to see all the returned values" => "Use the following output block to see all the returned values",
+"Test Plugin LIST" => "Tester le plugiciel LIST",
+"List of returned objects" => "Liste des objets retournés",
+"Various variables" => "Variables diverses",
+"Meaning" => "Signification",
+"See below" => "Voir ci-dessous",
+"Contains the result set. Each result contains all values provided by the search query along with those requested manually." => "Contient l'ensemble des résultats. Chaque résultat contient toutes les valeurs fournies par la requête de recherche ainsi que celles demandées manuellement.",
+"The total result count" => "Le nombre total de résultats",
+"The number of results returned per page" => "Le nombre de résultats retournés par page",
+"The result offset" => "Le décalage des résultats",
+"Offset plus one, useful for messages like “Showing results 1 to …”" => "Décalage plus un, utile pour des messages comme “Montrer les résultats 1 à …”",
+"Maximum record count plus offset, e.g. “Showing results 1 to 25”" => "Nombre maximum d'enregistrements plus décalage, par exemple “Montrer les résultats 1 à 25”",
+"Estimated total number of results, which may exceed the displayed count due to Lucene limits" => "Nombre total estimé de résultats, qui peut dépasser le nombre affiché en raison des limites de Lucene",
+"Loop on contents of %0"=> "Boucle sur le contenu de %0",
 "For security, grant the <strong>tiki_p_plugin_approve</strong> permission only to trusted user groups" => "Pour la sécurité, accordez le droit <strong>tiki_p_plugin_approve</strong> seulement à des groupes d'utilisateurs de confiance",
 // "Use the <a href=\"tiki-admin.php?page=textarea\" class=\"alert-link\">Admin: Text Area page</a> to deactivate potentially risky plugins" => "Use the <a href=\"tiki-admin.php?page=textarea\" class=\"alert-link\">Admin: Text Area page</a> to deactivate potentially risky plugins",
 "This page lists the plugins that require validation, the first time they are encountered" => "Cette page liste les plugiciels qui requièrent une validation, la première fois qu'ils sont rencontrés",


=====================================
templates/search/list/debug.tpl
=====================================
@@ -1,4 +1,4 @@
-<b>List of returned objects</b>
+<b>{tr}List of returned objects{/tr}</b>
 <ol>
     {foreach from=$results item=result}
         <li>
@@ -14,7 +14,7 @@
                     {if ! empty($result.title)}
                         {$result.title|escape}
                     {else}
-                        Item #{$result.object_id}
+                        {tr}Item{/tr} #{$result.object_id}
                     {/if}
                 </a>
 
@@ -23,30 +23,71 @@
                 {if ! empty($result.title)}
                     {$result.title|escape}
                 {elseif ! empty($result.object_id)}
-                    Item #{$result.object_id}
+                    {tr}Item{/tr} #{$result.object_id}
                 {else}
-                    Unknown Item
+                    {tr}Unknown Item{/tr}
                 {/if}
             {/if}
         </li>
     {/foreach}
 </ol>
 
-{wiki}
-__Various variables__ (see [https://doc.tiki.org/PluginList-advanced-output-control-block#Accessible_variables:])
-||
-__variable__ | __value__ | __meaning__
-$results | ''see below'' | containing the result set. Each results contain all values provided by the search query along with those requested manually.
-$count | {$count} | the total result count
-$maxRecords | {$maxRecords} | the amount of results per page
-$offset | {$offset} | the result offset
-$offsetplusone | {$offsetplusone} | basically $offset + 1 , so that you can say "Showing results 1 to ...."
-$offsetplusmaxRecords | {$offsetplusmaxRecords} | basically $maxRecords + $offset , so you can say "Showing results 1 to 25"
-$results-&gt;getEstimate() | {$results->getEstimate()} | which is the estimate of the total number of results possible, which could exceed $count , which is limited by the max Lucene search results to return set in Admin...Search
-||
-{/wiki}
+<b>{tr}Various variables{/tr}</b>
+<p>
+    {tr}See{/tr}
+    <a href="https://doc.tiki.org/PluginList-advanced-output-control-block#Accessible_variables" target="_blank" rel="noopener">
+        https://doc.tiki.org/PluginList-advanced-output-control-block#Accessible_variables
+    </a>
+</p>
+</br>
+<table class="table table-striped table-sm">
+    <thead>
+        <tr>
+            <th>{tr}Variable{/tr}</th>
+            <th>{tr}Value{/tr}</th>
+            <th>{tr}Meaning{/tr}</th>
+        </tr>
+    </thead>
+    <tbody>
+        <tr>
+            <td><code>$results</code></td>
+            <td><em>{tr}see below{/tr}</em></td>
+            <td>{tr}Contains the result set. Each result contains all values provided by the search query along with those requested manually.{/tr}</td>
+        </tr>
+        <tr>
+            <td><code>$count</code></td>
+            <td>{$count}</td>
+            <td>{tr}The total result count{/tr}</td>
+        </tr>
+        <tr>
+            <td><code>$maxRecords</code></td>
+            <td>{$maxRecords}</td>
+            <td>{tr}The number of results per page{/tr}</td>
+        </tr>
+        <tr>
+            <td><code>$offset</code></td>
+            <td>{$offset}</td>
+            <td>{tr}The result offset{/tr}</td>
+        </tr>
+        <tr>
+            <td><code>$offsetplusone</code></td>
+            <td>{$offsetplusone}</td>
+            <td>{tr}Offset plus one, useful for messages like “Showing results 1 to …”{/tr}</td>
+        </tr>
+        <tr>
+            <td><code>$offsetplusmaxRecords</code></td>
+            <td>{$offsetplusmaxRecords}</td>
+            <td>{tr}Maximum record count plus offset, e.g. “Showing results 1 to 25”{/tr}</td>
+        </tr>
+        <tr>
+            <td><code>$results-&gt;getEstimate()</code></td>
+            <td>{$results->getEstimate()}</td>
+            <td>{tr}Estimated total number of results, which may exceed the displayed count due to Lucene limits{/tr}</td>
+        </tr>
+    </tbody>
+</table>
 
-<b>Loop on contents</b> of <code>$results</code>:
+<b>{tr _0='<code>$results</code>'}Loop on contents of %0{/tr}</b>
 <br><code>{literal}{foreach from=$results item=result}&lt;pre&gt;{$result|@debug_print_var}&lt;/pre&gt;&lt;hr&gt;{/foreach}{/literal}</code>
 {foreach from=$results item=result}
 <pre>


=====================================
tiki-pluginlist_experiment.php
=====================================
@@ -42,7 +42,7 @@ $listparsed = TikiLib::lib('parser')->parse_data(
 $smarty->assign_by_ref('listparsed', $listparsed);
 $smarty->assign_by_ref('listtext', $editwiki);
 
-$page = 'Experiment with plugin LIST';
+$page = tr('Experiment with plugin LIST');
 
 $smarty->assign('page', $page);
 



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/8040bb4e4d2344fa78dd839b804309e7dfefcd7c

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/8040bb4e4d2344fa78dd839b804309e7dfefcd7c
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.