代码整风:移除全部的 _e 函数

This commit is contained in:
Skywt2003 2021-12-02 21:32:37 +08:00
parent 776d5f43ec
commit 2048fb5723
3 changed files with 27 additions and 39 deletions

View File

@ -33,12 +33,12 @@
<div class="d-inline-block ml-2">
<span class="font-weight-900"><?php $comments->author(); ?></span>
<?php if ($comments->authorId == $comments->ownerId): ?>
<span class="badge badge-secondary ml-1 mr-1"><?php _e('博主') ?></span>
<span class="badge badge-secondary ml-1 mr-1">博主</span>
<?php endif; ?>
<?php if ($comments->status == 'waiting'): ?>
<span class="badge badge-warning ml-1 mr-1">
<i class="fas fa-ellipsis-h"></i>
<?php _e('等待审核') ?>
等待审核
</span>
<?php endif; ?>
<?php showUserAgent($comments->agent); ?>
@ -77,11 +77,11 @@
<div>
<?php $comments->cancelReply('<i class="fa fa-window-close"></i> 取消回复'); ?>
</div>
<h2 id="response"><?php _e('添加新评论'); ?></h2>
<h2 id="response">添加新评论</h2>
<form method="post" action="<?php $this->commentUrl(); ?>" id="comment-form" role="form">
<?php if ($this->user->hasLogin()): ?>
<p><?php _e('登录身份: '); ?>
<a href="<?php $this->options->profileUrl(); ?>"><?php $this->user->screenName(); ?></a> | <a href="<?php $this->options->logoutUrl(); ?>" title="Logout"><?php _e('退出'); ?> &raquo;</a>
<p>登录身份:?>
<a href="<?php $this->options->profileUrl(); ?>"><?php $this->user->screenName(); ?></a> | <a href="<?php $this->options->logoutUrl(); ?>" title="Logout">退出 &raquo;</a>
</p>
<?php else: ?>
<div class="form-group">
@ -101,7 +101,7 @@
<input type="checkbox" name="receiveMail" id="receiveMail" value="yes" checked />
<span class="custom-toggle-slider rounded-circle"></span>
</label>
<label for="receiveMail" class="mb-0 ml-2"><?php _e('接收邮件通知'); ?></label>
<label for="receiveMail" class="mb-0 ml-2">接收邮件通知</label>
</div>
</div>
</div>

View File

@ -53,7 +53,7 @@
<?php $this->header(); ?>
</head>
<!--[if lt IE 8]>
<?php _e('当前网页不支持你正在使用的浏览器。为了正常访问, 请升级你的浏览器!'); ?>
当前网页不支持你正在使用的浏览器。为了正常访问, 请升级你的浏览器!
<![endif]-->
<body>
@ -63,35 +63,28 @@
欢迎,<a href="<?php $this->options->profileUrl(); ?>"><?php $this->user->screenName(); ?></a>
<?php if ($this->is('post')): ?>
<a class="badge badge-primary ml-1 mr-1" href="<?php $this->options->siteUrl();?>admin/write-post.php?cid=<?php $this->cid();?>" title="Edit">
<i class="far fa-edit"></i>
<?php _e('编辑此文'); ?>
<i class="far fa-edit"></i>编辑此文
</a>
<?php endif; ?>
<?php if ($this->is('page')): ?>
<a class="badge badge-primary ml-1 mr-1" href="<?php $this->options->siteUrl();?>admin/write-page.php?cid=<?php $this->cid();?>" title="Edit">
<i class="far fa-edit"></i>
<?php _e('编辑此页'); ?>
<i class="far fa-edit"></i>编辑此页
</a>
<?php endif; ?>
<a class="badge badge-default ml-1 mr-1" href="<?php $this->options->siteUrl('admin/manage-posts.php?status=draft'); ?>" title="Drafts">
<i class="far fa-edit"></i>
<?php _e('草稿箱'); ?>
<i class="far fa-edit"></i>草稿箱
</a>
<a class="badge badge-default ml-1 mr-1" href="<?php $this->options->siteUrl('admin'); ?>" title="Backstage">
<i class="fas fa-user-cog"></i>
<?php _e('网站后台'); ?>
<i class="fas fa-user-cog"></i>网站后台
</a>
<a class="badge badge-default ml-1 mr-1" href="<?php $this->options->siteUrl('admin/options-theme.php'); ?>" title="Settings">
<i class="far fa-cog"></i>
<?php _e('主题设置'); ?>
<i class="far fa-cog"></i>主题设置
</a>
<a class="badge badge-secondary ml-1 mr-1" href="#" onclick="javascript:location.reload();" title="Refresh">
<i class="fas fa-redo"></i>
<?php _e('刷新'); ?>
<i class="fas fa-redo"></i>刷新
</a>
<a class="badge badge-secondary ml-1 mr-1" href="<?php $this->options->logoutUrl(); ?>" title="Logout">
<i class="fas fa-sign-out-alt"></i>
<?php _e('退出'); ?>
<i class="fas fa-sign-out-alt"></i>退出
</a>
</div>
</nav>
@ -131,13 +124,13 @@
<ul class="col navbar-nav justify-content-center pr-0">
<li class="nav-item">
<a class="nav-link nav-link-icon <?php if ($this->is('index')){echo 'text-default';}else{echo 'text-gray';}?>" href="<?php $this->options->siteUrl();?>">
<i class="fa fa-home"></i> <?php _e('首页') ?>
<i class="fa fa-home"></i> 首页
</a>
</li>
<?php if (strpos($this->options->frontPage, 'file') !== FALSE) {?>
<li class="nav-item">
<a class="nav-link nav-link-icon <?php if ($this->is('archive')){echo 'text-default';}else{echo 'text-gray';}?>" href="<?php echo $this->options->siteUrl.$this->options->routingTable['archive']['url'] ?>">
<i class="fa fa-book"></i> <?php _e('文章') ?>
<i class="fa fa-book"></i> 文章
</a>
</li>
<?php } ?>

View File

@ -57,33 +57,28 @@ $this->need('functions.php'); // 不知道为啥,似乎模版页面不会自
<?php $this->header(); ?>
</head>
<!--[if lt IE 8]>
<?php _e('当前网页不支持你正在使用的浏览器。为了正常访问, 请升级你的浏览器!'); ?>
当前网页不支持你正在使用的浏览器。为了正常访问, 请升级你的浏览器!
<![endif]-->
<body>
<?php if ($this->user->hasLogin()): ?>
<nav class="container fixed-bottom p-2 navbar navbar-light">
<nav class="container fixed-bottom p-2 navbar navbar-light">
<div>
欢迎,<a href="<?php $this->options->profileUrl(); ?>"><?php $this->user->screenName(); ?></a>
<a class="badge badge-default ml-1 mr-1" href="<?php $this->options->siteUrl('admin'); ?>" title="Backstage">
<i class="fas fa-user-cog"></i>
<?php _e('网站后台'); ?>
</a>
<a class="badge badge-default ml-1 mr-1" href="<?php $this->options->siteUrl('admin/manage-posts.php?status=draft'); ?>" title="Drafts">
<i class="far fa-edit"></i>
<?php _e('草稿箱'); ?>
<i class="far fa-edit"></i>草稿箱
</a>
<a class="badge badge-default ml-1 mr-1" href="<?php $this->options->siteUrl('admin'); ?>" title="Backstage">
<i class="fas fa-user-cog"></i>网站后台
</a>
<a class="badge badge-default ml-1 mr-1" href="<?php $this->options->siteUrl('admin/options-theme.php'); ?>" title="Settings">
<i class="far fa-cog"></i>
<?php _e('主题设置'); ?>
<i class="far fa-cog"></i>主题设置
</a>
<a class="badge badge-secondary ml-1 mr-1" href="#" onclick="javascript:location.reload();" title="Refresh">
<i class="fas fa-redo"></i>
<?php _e('刷新'); ?>
<i class="fas fa-redo"></i>刷新
</a>
<a class="badge badge-secondary ml-1 mr-1" href="<?php $this->options->logoutUrl(); ?>" title="Logout">
<i class="fas fa-sign-out-alt"></i>
<?php _e('退出'); ?>
<i class="fas fa-sign-out-alt"></i>退出
</a>
</div>
</nav>
@ -125,13 +120,13 @@ $this->need('functions.php'); // 不知道为啥,似乎模版页面不会自
<ul class="col navbar-nav justify-content-center pr-0">
<li class="nav-item">
<a class="nav-link nav-link-icon text-gray" href="<?php $this->options->siteUrl();?>">
<i class="fa fa-home"></i> <?php _e('首页') ?>
<i class="fa fa-home"></i> 首页
</a>
</li>
<?php if (strpos($this->options->frontPage, 'file') !== FALSE) {?>
<li class="nav-item">
<a class="nav-link nav-link-icon text-gray" href="<?php echo $this->options->siteUrl.$this->options->routingTable['archive']['url'] ?>">
<i class="fa fa-book"></i> <?php _e('文章') ?>
<i class="fa fa-book"></i> 文章
</a>
</li>
<?php } ?>