mirror of
git://develop.git.wordpress.org/
synced 2025-02-24 08:33:35 +01:00
Mark strings for translation.
git-svn-id: https://develop.svn.wordpress.org/trunk@1176 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e33f8cd0f5
commit
40d0872459
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
$title = "Template & file editing";
|
require_once('../wp-includes/wp-l10n.php');
|
||||||
|
|
||||||
|
$title = __("Template & file editing");
|
||||||
|
|
||||||
function add_magic_quotes($array) {
|
function add_magic_quotes($array) {
|
||||||
foreach ($array as $k => $v) {
|
foreach ($array as $k => $v) {
|
||||||
@ -14,10 +16,10 @@ function add_magic_quotes($array) {
|
|||||||
|
|
||||||
function validate_file($file) {
|
function validate_file($file) {
|
||||||
if ('..' == substr($file,0,2))
|
if ('..' == substr($file,0,2))
|
||||||
die ('Sorry, can’t edit files with ".." in the name. If you are trying to edit a file in your WordPress home directory, you can just type the name of the file in.');
|
die (__('Sorry, can’t edit files with ".." in the name. If you are trying to edit a file in your WordPress home directory, you can just type the name of the file in.'));
|
||||||
|
|
||||||
if (':' == substr($file,1,1))
|
if (':' == substr($file,1,1))
|
||||||
die ('Sorry, can’t call files with their real path.');
|
die (__('Sorry, can’t call files with their real path.'));
|
||||||
|
|
||||||
if ('/' == substr($file,0,1))
|
if ('/' == substr($file,0,1))
|
||||||
$file = '.' . $file;
|
$file = '.' . $file;
|
||||||
@ -58,7 +60,7 @@ case 'update':
|
|||||||
require_once("admin-header.php");
|
require_once("admin-header.php");
|
||||||
|
|
||||||
if ($user_level < 5) {
|
if ($user_level < 5) {
|
||||||
die('<p>You have do not have sufficient permissions to edit templates for this blog.</p>');
|
die(__('<p>You have do not have sufficient permissions to edit templates for this blog.</p>'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$newcontent = stripslashes($_POST['newcontent']);
|
$newcontent = stripslashes($_POST['newcontent']);
|
||||||
@ -83,7 +85,7 @@ default:
|
|||||||
require_once('admin-header.php');
|
require_once('admin-header.php');
|
||||||
|
|
||||||
if ($user_level <= 5) {
|
if ($user_level <= 5) {
|
||||||
die('<p>You have do not have sufficient permissions to edit templates for this blog.</p>');
|
die(__('<p>You have do not have sufficient permissions to edit templates for this blog.</p>'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('' == $file) {
|
if ('' == $file) {
|
||||||
@ -101,7 +103,7 @@ default:
|
|||||||
$error = 1;
|
$error = 1;
|
||||||
|
|
||||||
if ((substr($file,0,2) == 'wp') and (substr($file,-4,4) == '.php') and ($file != 'wp.php'))
|
if ((substr($file,0,2) == 'wp') and (substr($file,-4,4) == '.php') and ($file != 'wp.php'))
|
||||||
$warning = ' — this is a WordPress file, be careful when editing it!';
|
$warning = __(' — this is a WordPress file, be careful when editing it!');
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$f = fopen($real_file, 'r');
|
$f = fopen($real_file, 'r');
|
||||||
@ -112,11 +114,11 @@ default:
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<?php if ('te' == $_GET['a']) : ?>
|
<?php if ('te' == $_GET['a']) : ?>
|
||||||
<div class="updated"><p>File edited successfully.</p></div>
|
<div class="updated"><p><?php _e('File edited successfully.') ?></p></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<?php
|
<?php
|
||||||
echo "<p>Editing <strong>$file</strong> $warning</p>";
|
echo "<p>" . sprintf(__('Editing <strong>%s</strong>'), $file) . " $warning</p>";
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
?>
|
?>
|
||||||
@ -129,30 +131,30 @@ default:
|
|||||||
if (is_writeable($real_file)) {
|
if (is_writeable($real_file)) {
|
||||||
echo "<input type='submit' name='submit' value='Update File »' tabindex='2' />";
|
echo "<input type='submit' name='submit' value='Update File »' tabindex='2' />";
|
||||||
} else {
|
} else {
|
||||||
echo "<input type='button' name='oops' value='(You cannot update that file/template: must make it writable, e.g. CHMOD 666)' tabindex='2' />";
|
echo "<input type='button' name='oops' value='" . __('(You cannot update that file/template: must make it writable, e.g. CHMOD 666)') ."' tabindex='2' />";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
echo '<div class="error"><p>Oops, no such file exists! Double check the name and try again, merci.</p></div>';
|
echo '<div class="error"><p>' . __('Oops, no such file exists! Double check the name and try again, merci.') . '</p></div>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<p>To edit a file, type its name here. You can edit any file <a href="http://wiki.wordpress.org/index.php/MakeWritable" title="Read more about making files writable">writable by the server</a>, e.g. CHMOD 666.</p>
|
<p><?php _e('To edit a file, type its name here. You can edit any file <a href="http://wiki.wordpress.org/index.php/MakeWritable" title="Read more about making files writable">writable by the server</a>, e.g. CHMOD 666.') ?></p>
|
||||||
<form name="file" action="templates.php" method="get">
|
<form name="file" action="templates.php" method="get">
|
||||||
<input type="text" name="file" />
|
<input type="text" name="file" />
|
||||||
<input type="submit" name="submit" value="Edit file »" />
|
<input type="submit" name="submit" value="<?php _e('Edit file »') ?>" />
|
||||||
</form>
|
</form>
|
||||||
<p>Common files: (click to edit)</p>
|
<p><?php _e('Common files: (click to edit)') ?></p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="templates.php?file=index.php">Main Index </a></li>
|
<li><a href="templates.php?file=index.php"><?php _e('Main Index') ?> </a></li>
|
||||||
<li><a href="templates.php?file=wp-comments.php">Comments</a></li>
|
<li><a href="templates.php?file=wp-comments.php">Comments</a></li>
|
||||||
<li><a href="templates.php?file=wp-comments-popup.php">Popup comments </a></li>
|
<li><a href="templates.php?file=wp-comments-popup.php"><?php _e('Popup comments') ?> </a></li>
|
||||||
<li><a href="templates.php?file=.htaccess">.htaccess (for rewrite rules)</a></li>
|
<li><a href="templates.php?file=.htaccess"><?php _e('.htaccess (for rewrite rules)') ?></a></li>
|
||||||
<li><a href="templates.php?file=my-hacks.php">my-hacks.php</a></li>
|
<li><a href="templates.php?file=my-hacks.php"><?php _e('my-hacks.php (legacy hacks support)') ?></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<?php
|
<?php
|
||||||
$plugins_dir = @ dir(ABSPATH . 'wp-content/plugins');
|
$plugins_dir = @ dir(ABSPATH . 'wp-content/plugins');
|
||||||
@ -171,11 +173,11 @@ if ($plugins_dir || $plugin_files) :
|
|||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</ul>
|
</ul>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<p>Note: of course, you can also edit the files/templates in your text editor of choice and upload them. This online editor is only meant to be used when you don’t have access to a text editor or FTP client.</p>
|
<p><?php _e('Note: of course, you can also edit the files/templates in your text editor of choice and upload them. This online editor is only meant to be used when you don’t have access to a text editor or FTP client.') ?></p>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
include("admin-footer.php") ?>
|
include("admin-footer.php") ?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user