/var/www/html_nl/wp-content/plugins/loco-translate/tpl/admin/debug/debug-result.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
/* @var Loco_mvc_View $this */

$this->extend('debug-form');
$this->start('header');

/* @var Loco_mvc_ViewParams $result */
if( $result->translated ):?> 
    <div class="panel panel-success">
        <h3 class="has-icon">Translation result:</h3>
        <p><code class="po"><?php $result->e('msgstr')?></code></p>
        <p>
            This is the translation value returned from the 
            <a href="<?php $result->e('calleeDoc')?>" target="_blank"><code><?php $result->e('callee')?></code></a> function.
        </p>
    </div><?php

else:?> 
    <div class="panel panel-warning">
        <h3 class="has-icon">String found, but no translation returned</h3>
        <p>
            The <a href="<?php $result->e('calleeDoc')?>" target="_blank"><code><?php $result->e('callee')?></code></a> function
            returned the same value as the source string. Either the string isn't translated, or the required translation file wasn't loaded. 
        </p>
        <p>
            See below for the exact string matches we found in your translation files.
        </p>
    </div><?php
endif;


/* @var Loco_mvc_ViewParams[] $matched */
foreach( $result->matches as $g => $matched ):
    
/* @var Loco_mvc_FileParams $group */
    
$group $result->grouped[$g];?> 
    <div class="panel panel-info">
        <h3>
            <?php $group->e('type');?> translations:
        </h3><?php
        
foreach( $matched as $file ):?> 
        <p>
            <span class="icon icon-file"> </span>
            <code class="path"><?php $file->e('relpath'?></code> &rarr; <code class="po"><?php $file->e('msgstr');?></code>
        </p><?php
        
endforeach;
        if( 
$group->has('href') ):?> 
        <p>
            <span class="icon icon-pencil"> </span>
            <a href="<?php $group->e('href')?>">Edit PO</a>
        </p><?php
        
endif;?> 
    </div><?php
endforeach;