Issue 9743: Added translatable texts
This commit is contained in:
parent
f6873cc912
commit
972c9f7bc0
10 changed files with 148 additions and 124 deletions
|
@ -54,11 +54,23 @@ class Source extends BaseAdmin
|
||||||
|
|
||||||
$tpl = Renderer::getMarkupTemplate('admin/item/source.tpl');
|
$tpl = Renderer::getMarkupTemplate('admin/item/source.tpl');
|
||||||
$o = Renderer::replaceMacros($tpl, [
|
$o = Renderer::replaceMacros($tpl, [
|
||||||
|
'$title' => DI::l10n()->t('Item Source'),
|
||||||
'$guid' => ['guid', DI::l10n()->t('Item Guid'), $guid, ''],
|
'$guid' => ['guid', DI::l10n()->t('Item Guid'), $guid, ''],
|
||||||
'$source' => $source,
|
'$source' => $source,
|
||||||
'$item_uri' => $item_uri,
|
'$item_uri' => $item_uri,
|
||||||
'$item_id' => $item_id,
|
'$item_id' => $item_id,
|
||||||
'$terms' => $terms,
|
'$terms' => $terms,
|
||||||
|
'$itemidlbl' => DI::l10n()->t('Item Id'),
|
||||||
|
'$itemurilbl' => DI::l10n()->t('Item URI'),
|
||||||
|
'$submit' => DI::l10n()->t('Submit'),
|
||||||
|
'$termslbl' => DI::l10n()->t('Terms'),
|
||||||
|
'$taglbl' => DI::l10n()->t('Tag'),
|
||||||
|
'$typelbl' => DI::l10n()->t('Type'),
|
||||||
|
'$termlbl' => DI::l10n()->t('Term'),
|
||||||
|
'$urllbl' => DI::l10n()->t('URL'),
|
||||||
|
'$mentionlbl' => DI::l10n()->t('Mention'),
|
||||||
|
'$implicitlbl' => DI::l10n()->t('Implicit Mention'),
|
||||||
|
'$sourcelbl' => DI::l10n()->t('Source'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
|
|
|
@ -135,8 +135,10 @@ class ActivityPubConversion extends BaseModule
|
||||||
|
|
||||||
$tpl = Renderer::getMarkupTemplate('debug/activitypubconversion.tpl');
|
$tpl = Renderer::getMarkupTemplate('debug/activitypubconversion.tpl');
|
||||||
$o = Renderer::replaceMacros($tpl, [
|
$o = Renderer::replaceMacros($tpl, [
|
||||||
|
'$title' => DI::l10n()->t('ActivityPub Conversion'),
|
||||||
'$source' => ['source', DI::l10n()->t('Source activity'), $_REQUEST['source'] ?? '', ''],
|
'$source' => ['source', DI::l10n()->t('Source activity'), $_REQUEST['source'] ?? '', ''],
|
||||||
'$results' => $results
|
'$results' => $results,
|
||||||
|
'$submit' => DI::l10n()->t('Submit'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
|
|
|
@ -24,13 +24,10 @@ namespace Friendica\Module\Debug;
|
||||||
use Friendica\BaseModule;
|
use Friendica\BaseModule;
|
||||||
use Friendica\Content\PageInfo;
|
use Friendica\Content\PageInfo;
|
||||||
use Friendica\Content\Text;
|
use Friendica\Content\Text;
|
||||||
use Friendica\Core\Protocol;
|
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
use Friendica\Model\Conversation;
|
|
||||||
use Friendica\Model\Item;
|
use Friendica\Model\Item;
|
||||||
use Friendica\Protocol\Activity;
|
use Friendica\Protocol\Activity;
|
||||||
use Friendica\Model\Tag;
|
|
||||||
use Friendica\Util\XML;
|
use Friendica\Util\XML;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -306,6 +303,7 @@ class Babel extends BaseModule
|
||||||
|
|
||||||
$tpl = Renderer::getMarkupTemplate('babel.tpl');
|
$tpl = Renderer::getMarkupTemplate('babel.tpl');
|
||||||
$o = Renderer::replaceMacros($tpl, [
|
$o = Renderer::replaceMacros($tpl, [
|
||||||
|
'$title' => DI::l10n()->t('Babel Diagnostic'),
|
||||||
'$text' => ['text', DI::l10n()->t('Source text'), $_REQUEST['text'] ?? '', ''],
|
'$text' => ['text', DI::l10n()->t('Source text'), $_REQUEST['text'] ?? '', ''],
|
||||||
'$type_bbcode' => ['type', DI::l10n()->t('BBCode'), 'bbcode', '', (($_REQUEST['type'] ?? '') ?: 'bbcode') == 'bbcode'],
|
'$type_bbcode' => ['type', DI::l10n()->t('BBCode'), 'bbcode', '', (($_REQUEST['type'] ?? '') ?: 'bbcode') == 'bbcode'],
|
||||||
'$type_diaspora' => ['type', DI::l10n()->t('Diaspora'), 'diaspora', '', (($_REQUEST['type'] ?? '') ?: 'bbcode') == 'diaspora'],
|
'$type_diaspora' => ['type', DI::l10n()->t('Diaspora'), 'diaspora', '', (($_REQUEST['type'] ?? '') ?: 'bbcode') == 'diaspora'],
|
||||||
|
@ -313,7 +311,8 @@ class Babel extends BaseModule
|
||||||
'$type_html' => ['type', DI::l10n()->t('HTML'), 'html', '', (($_REQUEST['type'] ?? '') ?: 'bbcode') == 'html'],
|
'$type_html' => ['type', DI::l10n()->t('HTML'), 'html', '', (($_REQUEST['type'] ?? '') ?: 'bbcode') == 'html'],
|
||||||
'$flag_twitter' => file_exists('addon/twitter/twitter.php'),
|
'$flag_twitter' => file_exists('addon/twitter/twitter.php'),
|
||||||
'$type_twitter' => ['type', DI::l10n()->t('Twitter Source / Tweet URL (requires API key)'), 'twitter', '', (($_REQUEST['type'] ?? '') ?: 'bbcode') == 'twitter'],
|
'$type_twitter' => ['type', DI::l10n()->t('Twitter Source / Tweet URL (requires API key)'), 'twitter', '', (($_REQUEST['type'] ?? '') ?: 'bbcode') == 'twitter'],
|
||||||
'$results' => $results
|
'$results' => $results,
|
||||||
|
'$submit' => DI::l10n()->t('Submit'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
|
|
|
@ -50,6 +50,9 @@ class Probe extends BaseModule
|
||||||
|
|
||||||
$tpl = Renderer::getMarkupTemplate('probe.tpl');
|
$tpl = Renderer::getMarkupTemplate('probe.tpl');
|
||||||
return Renderer::replaceMacros($tpl, [
|
return Renderer::replaceMacros($tpl, [
|
||||||
|
'$title' => DI::l10n()->t('Probe Diagnostic'),
|
||||||
|
'$output' => DI::l10n()->t('Output'),
|
||||||
|
'$submit' => DI::l10n()->t('Submit'),
|
||||||
'$addr' => ['addr',
|
'$addr' => ['addr',
|
||||||
DI::l10n()->t('Lookup address'),
|
DI::l10n()->t('Lookup address'),
|
||||||
$addr,
|
$addr,
|
||||||
|
|
|
@ -49,6 +49,9 @@ class WebFinger extends BaseModule
|
||||||
|
|
||||||
$tpl = Renderer::getMarkupTemplate('webfinger.tpl');
|
$tpl = Renderer::getMarkupTemplate('webfinger.tpl');
|
||||||
return Renderer::replaceMacros($tpl, [
|
return Renderer::replaceMacros($tpl, [
|
||||||
|
'$title' => DI::l10n()->t('Webfinger Diagnostic'),
|
||||||
|
'$submit' => DI::l10n()->t('Submit'),
|
||||||
|
'$lookup' => DI::l10n()->t('Lookup address:'),
|
||||||
'$addr' => $addr,
|
'$addr' => $addr,
|
||||||
'$res' => $res,
|
'$res' => $res,
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -1,18 +1,19 @@
|
||||||
<h2>Item Source</h2>
|
<div id="source" class="generic-page-wrapper">
|
||||||
<form action="admin/item/source" method="get" class="panel panel-default">
|
<h2>{{$title}}</h2>
|
||||||
|
<form action="admin/item/source" method="get" class="panel panel-default">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
{{include file="field_input.tpl" field=$guid}}
|
{{include file="field_input.tpl" field=$guid}}
|
||||||
</div>
|
</div>
|
||||||
<p><button type="submit" class="btn btn-primary">Submit</button></p>
|
<p><button type="submit" class="btn btn-primary">{{$submit}}</button></p>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{{if $source}}
|
{{if $source}}
|
||||||
<div class="itemsource-results">
|
<div class="itemsource-results">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h3 class="panel-title">Item Id</h3>
|
<h3 class="panel-title">{{$itemidlbl}}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
{{$item_id}}
|
{{$item_id}}
|
||||||
|
@ -20,7 +21,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h3 class="panel-title">Item URI</h3>
|
<h3 class="panel-title">{{$itemurilbl}}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
{{$item_uri}}
|
{{$item_uri}}
|
||||||
|
@ -28,21 +29,21 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h3 class="panel-title">Terms</h3>
|
<h3 class="panel-title">{{$termslbl}}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<table class="table table-condensed table-striped">
|
<table class="table table-condensed table-striped">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Type</th>
|
<th>{{$typelbl}}</th>
|
||||||
<th>Term</th>
|
<th>{{$termlbl}}</th>
|
||||||
<th>URL</th>
|
<th>{{$urllbl}}</th>
|
||||||
</tr>
|
</tr>
|
||||||
{{foreach $terms as $term}}
|
{{foreach $terms as $term}}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
{{if $term.type == 1}}Tag{{/if}}
|
{{if $term.type == 1}}{{$tag}}{{/if}}
|
||||||
{{if $term.type == 2}}Mention{{/if}}
|
{{if $term.type == 2}}{{$mentionlbl}}{{/if}}
|
||||||
{{if $term.type == 8}}Implicit Mention{{/if}}
|
{{if $term.type == 8}}{{$implicitlbl}}{{/if}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{$term.name}}
|
{{$term.name}}
|
||||||
|
@ -57,9 +58,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h3 class="panel-title">Source</h3>
|
<h3 class="panel-title">{{$sourcelbl}}</h3>
|
||||||
</div>
|
</div>
|
||||||
<pre><code class="language-php">{{$source}}</code></pre>
|
<pre><code class="language-php">{{$source}}</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<h2>Babel Diagnostic</h2>
|
<div id="babel" class="generic-page-wrapper">
|
||||||
<form action="babel" method="post" class="panel panel-default">
|
<h2>{{$title}}</h2>
|
||||||
|
<form action="babel" method="post" class="panel panel-default">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
{{include file="field_textarea.tpl" field=$text}}
|
{{include file="field_textarea.tpl" field=$text}}
|
||||||
|
@ -13,12 +14,12 @@
|
||||||
{{include file="field_radio.tpl" field=$type_twitter}}
|
{{include file="field_radio.tpl" field=$type_twitter}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<p><button type="submit" class="btn btn-primary">Submit</button></p>
|
<p><button type="submit" class="btn btn-primary">{{$submit}}</button></p>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{{if $results}}
|
{{if $results}}
|
||||||
<div class="babel-results">
|
<div class="babel-results">
|
||||||
{{foreach $results as $result}}
|
{{foreach $results as $result}}
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
|
@ -27,5 +28,6 @@
|
||||||
<div class="panel-body">{{$result.content nofilter}}</div>
|
<div class="panel-body">{{$result.content nofilter}}</div>
|
||||||
</div>
|
</div>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
|
@ -1,15 +1,16 @@
|
||||||
<h2>ActivityPub Conversion</h2>
|
<div id="apconversion" class="generic-page-wrapper">
|
||||||
<form action="debug/ap" method="post" class="panel panel-default">
|
<h2>{{$title}}</h2>
|
||||||
|
<form action="debug/ap" method="post" class="panel panel-default">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
{{include file="field_textarea.tpl" field=$source}}
|
{{include file="field_textarea.tpl" field=$source}}
|
||||||
</div>
|
</div>
|
||||||
<p><button type="submit" class="btn btn-primary">Submit</button></p>
|
<p><button type="submit" class="btn btn-primary">{{$submit}}</button></p>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{{if $results}}
|
{{if $results}}
|
||||||
<div class="babel-results">
|
<div class="babel-results">
|
||||||
{{foreach $results as $result}}
|
{{foreach $results as $result}}
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
|
@ -20,5 +21,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
|
|
@ -1,11 +1,11 @@
|
||||||
<div id="probe" class="generic-page-wrapper">
|
<div id="probe" class="generic-page-wrapper">
|
||||||
<h2>Probe Diagnostic</h2>
|
<h2>{{$title}}</h2>
|
||||||
<form action="probe" method="get" class="panel panel-default">
|
<form action="probe" method="get" class="panel panel-default">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
{{include file="field_input.tpl" field=$addr}}
|
{{include file="field_input.tpl" field=$addr}}
|
||||||
</div>
|
</div>
|
||||||
<p><button type="submit" class="btn btn-primary">Submit</button></p>
|
<p><button type="submit" class="btn btn-primary">{{$submit}}</button></p>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
<div class="probe-result">
|
<div class="probe-result">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h3 class="panel-title">Output</h3>
|
<h3 class="panel-title">{{$output}}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<pre>{{$res}}</pre>
|
<pre>{{$res}}</pre>
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
<div class="generic-page-wrapper">
|
<div class="generic-page-wrapper">
|
||||||
<h3>Webfinger Diagnostic</h3>
|
<h2>{{$title}}</h2>
|
||||||
|
|
||||||
<form action="webfinger" method="get">
|
<form action="webfinger" method="get">
|
||||||
Lookup address: <input type="text" style="width: 250px;" name="addr" value="{{$addr}}" />
|
{{$lookup}} <input type="text" style="width: 250px;" name="addr" value="{{$addr}}" />
|
||||||
<input type="submit" name="submit" value="Submit" />
|
<input type="submit" name="submit" value="{{$submit}}" />
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<br /><br />
|
<br /><br />
|
||||||
|
|
Loading…
Reference in a new issue