Make WordPress Core


Ignore:
Timestamp:
04/25/2004 11:57:43 PM (22 years ago)
Author:
rboren
Message:

Mark strings for translation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/templates.php

    r1126 r1176  
    11<?php
    2 $title = "Template &amp; file editing";
     2require_once('../wp-includes/wp-l10n.php');
     3
     4$title = __("Template &amp; file editing");
    35
    46function add_magic_quotes($array) {
     
    1517function validate_file($file) {
    1618        if ('..' == substr($file,0,2))
    17                 die ('Sorry, can&#8217;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.');
     19                die (__('Sorry, can&#8217;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.'));
    1820       
    1921        if (':' == substr($file,1,1))
    20                 die ('Sorry, can&#8217;t call files with their real path.');
     22                die (__('Sorry, can&#8217;t call files with their real path.'));
    2123
    2224        if ('/' == substr($file,0,1))
     
    5961
    6062        if ($user_level < 5) {
    61                 die('<p>You have do not have sufficient permissions to edit templates for this blog.</p>');
     63                die(__('<p>You have do not have sufficient permissions to edit templates for this blog.</p>'));
    6264        }
    6365
     
    8486
    8587        if ($user_level <= 5) {
    86                 die('<p>You have do not have sufficient permissions to edit templates for this blog.</p>');
     88                die(__('<p>You have do not have sufficient permissions to edit templates for this blog.</p>'));
    8789        }
    8890
     
    102104
    103105        if ((substr($file,0,2) == 'wp') and (substr($file,-4,4) == '.php') and ($file != 'wp.php'))
    104                 $warning = ' &#8212; this is a WordPress file, be careful when editing it!';
     106                $warning = __(' &#8212; this is a WordPress file, be careful when editing it!');
    105107       
    106108        if (!$error) {
     
    113115        ?>
    114116<?php if ('te' == $_GET['a']) : ?>
    115 <div class="updated"><p>File edited successfully.</p></div>
     117 <div class="updated"><p><?php _e('File edited successfully.') ?></p></div>
    116118<?php endif; ?>
    117119 <div class="wrap">
    118120  <?php
    119         echo "<p>Editing <strong>$file</strong> $warning</p>";
     121        echo "<p>" . sprintf(__('Editing <strong>%s</strong>'), $file) . " $warning</p>";
    120122       
    121123        if (!$error) {
     
    130132                        echo "<input type='submit' name='submit' value='Update File &raquo;' tabindex='2' />";
    131133                } else {
    132                         echo "<input type='button' name='oops' value='(You cannot update that file/template: must make it writable, e.g. CHMOD 666)' tabindex='2' />";
     134                        echo "<input type='button' name='oops' value='" . __('(You cannot update that file/template: must make it writable, e.g. CHMOD 666)') ."' tabindex='2' />";
    133135                }
    134136                ?>
     
    137139  <?php
    138140        } else {
    139                 echo '<div class="error"><p>Oops, no such file exists! Double check the name and try again, merci.</p></div>';
     141                echo '<div class="error"><p>' . __('Oops, no such file exists! Double check the name and try again, merci.') . '</p></div>';
    140142        }
    141143        ?>
    142144</div>
    143145<div class="wrap">
    144   <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>
     146  <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>
    145147  <form name="file" action="templates.php" method="get">
    146148    <input type="text" name="file" />
    147     <input type="submit" name="submit"  value="Edit file &raquo;" />
     149    <input type="submit" name="submit"  value="<?php _e('Edit file &raquo;') ?>" />
    148150  </form>
    149   <p>Common files: (click to edit)</p>
     151  <p><?php _e('Common files: (click to edit)') ?></p>
    150152  <ul>
    151     <li><a href="templates.php?file=index.php">Main Index </a></li>
     153    <li><a href="templates.php?file=index.php"><?php _e('Main Index') ?> </a></li>
    152154    <li><a href="templates.php?file=wp-comments.php">Comments</a></li>
    153     <li><a href="templates.php?file=wp-comments-popup.php">Popup comments </a></li>
    154     <li><a href="templates.php?file=.htaccess">.htaccess (for rewrite rules)</a></li>
    155     <li><a href="templates.php?file=my-hacks.php">my-hacks.php</a></li>
     155    <li><a href="templates.php?file=wp-comments-popup.php"><?php _e('Popup comments') ?> </a></li>
     156    <li><a href="templates.php?file=.htaccess"><?php _e('.htaccess (for rewrite rules)') ?></a></li>
     157    <li><a href="templates.php?file=my-hacks.php"><?php _e('my-hacks.php (legacy hacks support)') ?></a></li>
    156158    </ul>
    157159<?php
     
    172174  </ul>
    173175<?php endif; ?>
    174   <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&#8217;t have access to a text editor or FTP client.</p>
     176  <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&#8217;t have access to a text editor or FTP client.') ?></p>
    175177</div>
    176178<?php
Note: See TracChangeset for help on using the changeset viewer.