diff options
| author | BigCoke233 <hi@guhub.cn> | 2020-07-15 00:18:04 +0800 |
|---|---|---|
| committer | BigCoke233 <hi@guhub.cn> | 2020-07-15 00:18:04 +0800 |
| commit | 08e6e289626620abd5dea49c0485fa80dc011e79 (patch) | |
| tree | 1bfb0f7746ca207bded81616f18782d5eb9871c9 /includes/comments.php | |
| parent | 0615f62964b26f5d2f54da3c9262a1ea17df41ce (diff) | |
:poop: Add: 初步实现多语言功能,并使用 hint.css 添加 tooltip
Diffstat (limited to 'includes/comments.php')
| -rw-r--r-- | includes/comments.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/includes/comments.php b/includes/comments.php index 7439c90..74cea9c 100644 --- a/includes/comments.php +++ b/includes/comments.php @@ -34,7 +34,7 @@ echo $commentClass; <span class="comment-author"><a href="<?php echo $comments->url; ?>" target="_blank"><?php echo $comments->author; ?></a></span>
<span class="comment-date">
<?php if ('waiting' == $comments->status) { ?>
- <em class="comment-waiting">您的评论正在等待审核!</em>
+ <em class="comment-waiting"><?php gtecho('commentListTexts','commentWaiting'); ?></em>
<?php } else { ?>
<?php $comments->date('Y-m-d H:i'); ?>
<?php } ?>
@@ -55,7 +55,7 @@ echo $commentClass; <?php if($this->fields->commentShow == 0)://如果显示评论列表 ?>
<?php if ($comments->have())://如果有评论 则显示 ?>
<div class="comment-container" id="comments">
- <h3 class="comment-title" id="response"><?php $this->commentsNum(_t('暂无评论'), _t('已有 1 条评论'), _t('已有 %d 条评论')); ?></h3>
+ <h3 class="comment-title" id="response"><?php $this->commentsNum(_t(gt('commentListTexts','commentNumNone')), _t(gta('commentListTexts','commentNum','1')), _t(gta('commentListTexts','commentNum','%d'))); ?></h3>
<?php $comments->listComments(array(
'before' => '<div class="comment-list" role="list">',
'after' => '</div>',
@@ -69,7 +69,7 @@ echo $commentClass; <?php endif;//有无评论判断结束?>
<?php else: //如果不显示评论列表 ?>
- <?php if($this->allow('comment')): ?><div class="comment-hidden">博主已关闭本页面的评论显示,您评论后将不会看到您的评论内容</div><?php endif; ?>
+ <?php if($this->allow('comment')): ?><div class="comment-hidden"><?php gtecho('commentListTexts','commentHidden'); ?></div><?php endif; ?>
<?php endif;//是否显示判断结束 ?>
<div class="comment-form">
@@ -81,14 +81,14 @@ echo $commentClass; <!-- 如果当前用户已经登录 -->
<?php if($this->user->hasLogin()): ?>
<!-- 显示当前登录用户的用户名以及登出连接 -->
- <p class="col-md-12 comment-logined-sign"><?php _e('登录身份: '); ?><a href="<?php $this->options->profileUrl(); ?>"><?php $this->user->screenName(); ?></a>. <a href="<?php $this->options->logoutUrl(); ?>" title="Logout"><?php _e('退出'); ?> »</a></p>
+ <p class="col-md-12 comment-logined-sign"><?php gtecho('commentListTexts','commentStatus'); ?><a href="<?php $this->options->profileUrl(); ?>"><?php $this->user->screenName(); ?></a>. <a href="<?php $this->options->logoutUrl(); ?>" title="Logout"><?php gtecho('commentListTexts','commentLogout'); ?></a></p>
<!-- 若当前用户未登录 -->
<?php else: ?>
<!-- 要求输入名字、邮箱、网址 -->
<div class="comment-input">
- <input type="text" name="author" id="author" class="text" placeholder="称呼*" value="<?php $this->remember('author'); ?>" required />
- <input type="email" name="mail" id="mail" class="text" placeholder="邮箱*" value="<?php $this->remember('mail'); ?>"<?php if ($this->options->commentsRequireMail): ?> required<?php endif; ?> />
- <input type="url" name="url" id="url" class="text" placeholder="<?php _e('http(s)://'); ?>" value="<?php $this->remember('url'); ?>"<?php if ($this->options->commentsRequireURL): ?> required<?php endif; ?> />
+ <input type="text" name="author" id="author" class="text" placeholder="<?php gtecho('commentFormTexts','nameInput'); ?>" value="<?php $this->remember('author'); ?>" required />
+ <input type="email" name="mail" id="mail" class="text" placeholder="<?php gtecho('commentFormTexts','emailInput'); ?>" value="<?php $this->remember('mail'); ?>"<?php if ($this->options->commentsRequireMail): ?> required<?php endif; ?> />
+ <input type="url" name="url" id="url" class="text" placeholder="<?php gtecho('commentFormTexts','urlInput'); ?>" value="<?php $this->remember('url'); ?>"<?php if ($this->options->commentsRequireURL): ?> required<?php endif; ?> />
</div>
<?php endif; ?>
<!-- 输入要回复的内容 -->
@@ -98,13 +98,13 @@ echo $commentClass; <p class="comment-submit-box">
<div title="OwO" class="OwO"></div>
<div class="cancel-comment-reply"><?php $comments->cancelReply(); ?></div>
- <button type="submit" onclick="return MiraclesComment.submitComment();" class="comment-submit submit"><?php _e('评论'); ?></button>
+ <button type="submit" onclick="return MiraclesComment.submitComment();" class="comment-submit submit"><?php gtecho('commentFormTexts','submit'); ?></button>
</p>
</form>
</div>
<!-- 若当前文章不允许进行评论 -->
<?php else: ?>
- <div class="comment-hidden"><?php _e('博主已关闭本页面的评论功能'); ?></div>
+ <div class="comment-hidden"><?php gtecho('commentListTexts','commentClosed'); ?></div>
<?php endif; ?>
</div>
</div>
|
