Increase translatable strings

This commit is contained in:
Trevor Slocum 2021-08-05 11:20:51 -07:00
parent c09278028d
commit 970dd7b47a
3 changed files with 355 additions and 328 deletions

View File

@ -401,12 +401,18 @@ if (!isset($_GET['delete']) && !isset($_GET['manage']) && (isset($_POST['name'])
$ban = array(); $ban = array();
$ban['ip'] = $post['ip']; $ban['ip'] = $post['ip'];
$ban['expire'] = $expire > 0 ? (time() + $expire) : 0; $ban['expire'] = $expire > 0 ? (time() + $expire) : 0;
$ban['reason'] = 'Keyword: ' . $keyword['text']; $ban['reason'] = __('Keyword') . ': ' . $keyword['text'];
insertBan($ban); insertBan($ban);
$expire_txt = ($ban['expire'] > 0) ? ('<br>This ban will expire ' . strftime(TINYIB_DATEFMT, $ban['expire'])) : '<br>This ban is permanent and will not expire.'; if ($ban['expire'] > 0) {
$reason_txt = ($ban['reason'] == '') ? '' : ('<br>Reason: ' . $ban['reason']); $bannedText = sprintf(__('Your IP address (%1$s) is banned until %2$s.'), remoteAddress(), strftime(TINYIB_DATEFMT, $ban['expire']));
fancyDie('Your IP address ' . remoteAddress() . ' has been banned from posting on this image board. ' . $expire_txt . $reason_txt); } else {
$bannedText = sprintf(__('Your IP address (%s) is permanently banned.'), remoteAddress());
}
if ($ban['reason'] != '') {
$bannedText .= '<br>' . __('Reason') . ': ' . $ban['reason'];
}
fancyDie($bannedText);
} }
break; break;
} }
@ -874,7 +880,7 @@ EOF;
continue; // The post has been deleted continue; // The post has been deleted
} }
updatePostMessage($post['id'], $post['message'] . '<br>' . "\n" . '<span class="banmessage">(' . htmlentities($_POST['message']) . ')</span><br>'); updatePostMessage($post['id'], $post['message'] . '<br>' . "\n" . '<span class="banmessage">(' . htmlentities($_POST['message']) . ')</span><br>');
manageLogAction('Added ban message to ' . postLink('&gt;&gt;' . $post['id'])); manageLogAction(sprintf(__('Added ban message to %s'), postLink('&gt;&gt;' . $post['id'])));
} }
clearPostCache(); clearPostCache();
foreach ($post_ids as $post_id) { foreach ($post_ids as $post_id) {
@ -1134,8 +1140,9 @@ EOF;
stickyThreadByID($post['id'], intval($_GET['setsticky'])); stickyThreadByID($post['id'], intval($_GET['setsticky']));
threadUpdated($post['id']); threadUpdated($post['id']);
manageLogAction(intval($_GET['setsticky']) == 1 ? __('Stickied') : __('Unstickied') . ' ' . postLink('&gt;&gt;' . $post['id'])); $actionMessage = intval($_GET['setsticky']) == 1 ? __('Stickied') : __('Unstickied') . ' ' . postLink('&gt;&gt;' . $post['id']);
$text .= manageInfo('Thread No.' . $post['id'] . ' ' . (intval($_GET['setsticky']) == 1 ? 'stickied' : 'un-stickied') . '.'); manageLogAction($actionMessage);
$text .= manageInfo($actionMessage);
} else { } else {
fancyDie(__("Sorry, there doesn't appear to be a post with that ID.")); fancyDie(__("Sorry, there doesn't appear to be a post with that ID."));
} }
@ -1149,8 +1156,9 @@ EOF;
lockThreadByID($post['id'], intval($_GET['setlock'])); lockThreadByID($post['id'], intval($_GET['setlock']));
threadUpdated($post['id']); threadUpdated($post['id']);
manageLogAction(intval($_GET['setlock']) == 1 ? __('Locked') : __('Unlocked') . ' ' . postLink('&gt;&gt;' . $post['id'])); $actionMessage = intval($_GET['setlock']) == 1 ? __('Locked') : __('Unlocked') . ' ' . postLink('&gt;&gt;' . $post['id']);
$text .= manageInfo('Thread No.' . $post['id'] . ' ' . (intval($_GET['setlock']) == 1 ? 'locked' : 'unlocked') . '.'); manageLogAction($actionMessage);
$text .= manageInfo($actionMessage);
} else { } else {
fancyDie(__("Sorry, there doesn't appear to be a post with that ID.")); fancyDie(__("Sorry, there doesn't appear to be a post with that ID."));
} }

View File

@ -481,7 +481,7 @@ function buildPost($post, $res, $compact=false) {
$direct_link = isEmbed($post["file_hex"]) ? "#" : (($res == TINYIB_RESPAGE ? "../" : "") . "src/" . $post["file"]); $direct_link = isEmbed($post["file_hex"]) ? "#" : (($res == TINYIB_RESPAGE ? "../" : "") . "src/" . $post["file"]);
if ($post['parent'] == TINYIB_NEWTHREAD && $post["file"] != '') { if ($post['parent'] == TINYIB_NEWTHREAD && $post["file"] != '') {
$filesize .= (isEmbed($post['file_hex']) ? __('Embed:') : __('File:')) . ' '; $filesize .= (isEmbed($post['file_hex']) ? __('Embed') : __('File')) . ': ';
} }
$w = TINYIB_EXPANDWIDTH; $w = TINYIB_EXPANDWIDTH;
@ -1259,7 +1259,7 @@ function manageModeratePostForm() {
$txt_moderate = __('Moderate a post'); $txt_moderate = __('Moderate a post');
$txt_postid = __('Post ID'); $txt_postid = __('Post ID');
$txt_submit = __('Submit'); $txt_submit = __('Submit');
$txt_tip = __('Tip:'); $txt_tip = __('Tip');
$txt_tiptext1 = __('While browsing the image board, you can easily moderate a post if you are logged in.'); $txt_tiptext1 = __('While browsing the image board, you can easily moderate a post if you are logged in.');
$txt_tiptext2 = __('Tick the box next to a post and click "Delete" at the bottom of the page with a blank password.'); $txt_tiptext2 = __('Tick the box next to a post and click "Delete" at the bottom of the page with a blank password.');
return <<<EOF return <<<EOF
@ -1268,7 +1268,7 @@ function manageModeratePostForm() {
<fieldset> <fieldset>
<legend>$txt_moderate</legend> <legend>$txt_moderate</legend>
<div valign="top"><label for="moderate">$txt_postid</label> <input type="text" name="moderate" id="moderate"> <input type="submit" value="$txt_submit" class="managebutton"></div><br> <div valign="top"><label for="moderate">$txt_postid</label> <input type="text" name="moderate" id="moderate"> <input type="submit" value="$txt_submit" class="managebutton"></div><br>
<b>$txt_tip</b> $txt_tiptext1<br> <b>$txt_tip:</b> $txt_tiptext1<br>
$txt_tiptext2<br> $txt_tiptext2<br>
</fieldset> </fieldset>
</form><br> </form><br>
@ -1508,7 +1508,7 @@ function manageEditKeyword($id) {
$txt_keyword = __('Keyword'); $txt_keyword = __('Keyword');
$txt_keywords = __('Keywords'); $txt_keywords = __('Keywords');
$txt_action = __('Action:'); $txt_action = __('Action');
$txt_submit = $id > 0 ? __('Update') : __('Add'); $txt_submit = $id > 0 ? __('Update') : __('Add');
$return = <<<EOF $return = <<<EOF

File diff suppressed because it is too large Load Diff