Add lang key

This commit is contained in:
Dan 2025-02-15 10:28:38 +07:00
commit 0eeeec058c
33 changed files with 186 additions and 19 deletions

View file

@ -324,3 +324,9 @@ rss_description_meta = "Post Meta Description"
admin_theme = "Admin theme" admin_theme = "Admin theme"
admin_theme_light = "Light" admin_theme_light = "Light"
admin_theme_dark = "Dark" admin_theme_dark = "Dark"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -335,3 +335,9 @@ rss_description_meta = "Post Meta Description"
admin_theme = "Admin theme" admin_theme = "Admin theme"
admin_theme_light = "Light" admin_theme_light = "Light"
admin_theme_dark = "Dark" admin_theme_dark = "Dark"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -324,3 +324,9 @@ rss_description_meta = "Post Meta Description"
admin_theme = "Admin theme" admin_theme = "Admin theme"
admin_theme_light = "Light" admin_theme_light = "Light"
admin_theme_dark = "Dark" admin_theme_dark = "Dark"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -324,3 +324,9 @@ rss_description_meta = "Post Meta Description"
admin_theme = "Admin theme" admin_theme = "Admin theme"
admin_theme_light = "Light" admin_theme_light = "Light"
admin_theme_dark = "Dark" admin_theme_dark = "Dark"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -324,3 +324,9 @@ rss_description_meta = "Post Meta Description"
admin_theme = "Admin theme" admin_theme = "Admin theme"
admin_theme_light = "Light" admin_theme_light = "Light"
admin_theme_dark = "Dark" admin_theme_dark = "Dark"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -326,3 +326,9 @@ rss_description_meta = "Post Meta Description"
admin_theme = "Admin theme" admin_theme = "Admin theme"
admin_theme_light = "Light" admin_theme_light = "Light"
admin_theme_dark = "Dark" admin_theme_dark = "Dark"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -324,3 +324,9 @@ rss_description_meta = "Post Meta Description"
admin_theme = "Admin theme" admin_theme = "Admin theme"
admin_theme_light = "Light" admin_theme_light = "Light"
admin_theme_dark = "Dark" admin_theme_dark = "Dark"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -324,4 +324,9 @@ rss_description_meta = "Metapriskribo de afiŝo"
admin_theme = "Admin-etoso" admin_theme = "Admin-etoso"
admin_theme_light = "Hela" admin_theme_light = "Hela"
admin_theme_dark = "Malhela" admin_theme_dark = "Malhela"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -324,3 +324,9 @@ rss_description_meta = "Post Meta Description"
admin_theme = "Admin theme" admin_theme = "Admin theme"
admin_theme_light = "Light" admin_theme_light = "Light"
admin_theme_dark = "Dark" admin_theme_dark = "Dark"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -324,3 +324,9 @@ rss_description_meta = "Post Meta Description"
admin_theme = "Admin theme" admin_theme = "Admin theme"
admin_theme_light = "Light" admin_theme_light = "Light"
admin_theme_dark = "Dark" admin_theme_dark = "Dark"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -324,3 +324,9 @@ rss_description_meta = "Post Meta Description"
admin_theme = "Admin theme" admin_theme = "Admin theme"
admin_theme_light = "Light" admin_theme_light = "Light"
admin_theme_dark = "Dark" admin_theme_dark = "Dark"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -324,3 +324,9 @@ rss_description_meta = "Post Meta Description"
admin_theme = "Admin theme" admin_theme = "Admin theme"
admin_theme_light = "Light" admin_theme_light = "Light"
admin_theme_dark = "Dark" admin_theme_dark = "Dark"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -324,3 +324,9 @@ rss_description_meta = "Post Meta Description"
admin_theme = "Admin theme" admin_theme = "Admin theme"
admin_theme_light = "Light" admin_theme_light = "Light"
admin_theme_dark = "Dark" admin_theme_dark = "Dark"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -324,3 +324,9 @@ rss_description_meta = "Post Meta Description"
admin_theme = "Admin theme" admin_theme = "Admin theme"
admin_theme_light = "Light" admin_theme_light = "Light"
admin_theme_dark = "Dark" admin_theme_dark = "Dark"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -324,3 +324,9 @@ rss_description_meta = "Post Meta Description"
admin_theme = "Admin theme" admin_theme = "Admin theme"
admin_theme_light = "Light" admin_theme_light = "Light"
admin_theme_dark = "Dark" admin_theme_dark = "Dark"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -324,3 +324,9 @@ rss_description_meta = "Deskripsi Meta Postingan"
admin_theme = "Tema admin" admin_theme = "Tema admin"
admin_theme_light = "Terang" admin_theme_light = "Terang"
admin_theme_dark = "Gelap" admin_theme_dark = "Gelap"
search_index = "Indeks Pencarian"
fulltext_search = "Pencarian Lengkap"
add_search_index = "Tambahkan postingan ke Indeks"
clear_search_index = "Hapus Indeks Pencarian"
unindexed_posts = "Postingan berikut belum masuk ke Indeks Pencarian"
indexed_posts = "Postingan sudah terindeks"

View file

@ -324,3 +324,9 @@ rss_description_meta = "Meta descrizione dell'articolo"
admin_theme = "Tema Pannello Amministratore" admin_theme = "Tema Pannello Amministratore"
admin_theme_light = "Chiaro" admin_theme_light = "Chiaro"
admin_theme_dark = "Scuro" admin_theme_dark = "Scuro"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -324,3 +324,9 @@ rss_description_meta = "Post Meta Description"
admin_theme = "Admin theme" admin_theme = "Admin theme"
admin_theme_light = "Light" admin_theme_light = "Light"
admin_theme_dark = "Dark" admin_theme_dark = "Dark"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -324,3 +324,9 @@ rss_description_meta = "Post Meta Description"
admin_theme = "Admin theme" admin_theme = "Admin theme"
admin_theme_light = "Light" admin_theme_light = "Light"
admin_theme_dark = "Dark" admin_theme_dark = "Dark"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -324,3 +324,9 @@ rss_description_meta = "Post Meta Description"
admin_theme = "Admin theme" admin_theme = "Admin theme"
admin_theme_light = "Light" admin_theme_light = "Light"
admin_theme_dark = "Dark" admin_theme_dark = "Dark"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -325,3 +325,9 @@ rss_description_meta = "Post Meta Description"
admin_theme = "Admin theme" admin_theme = "Admin theme"
admin_theme_light = "Light" admin_theme_light = "Light"
admin_theme_dark = "Dark" admin_theme_dark = "Dark"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -324,3 +324,9 @@ rss_description_meta = "Post Meta Description"
admin_theme = "Admin theme" admin_theme = "Admin theme"
admin_theme_light = "Light" admin_theme_light = "Light"
admin_theme_dark = "Dark" admin_theme_dark = "Dark"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -325,3 +325,9 @@ rss_description_meta = "Post Meta Description"
admin_theme = "Admin theme" admin_theme = "Admin theme"
admin_theme_light = "Light" admin_theme_light = "Light"
admin_theme_dark = "Dark" admin_theme_dark = "Dark"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -336,3 +336,9 @@ rss_description_meta = "Post Meta Description"
admin_theme = "Admin theme" admin_theme = "Admin theme"
admin_theme_light = "Light" admin_theme_light = "Light"
admin_theme_dark = "Dark" admin_theme_dark = "Dark"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -324,3 +324,9 @@ rss_description_meta = "Gönderi Meta Açıklaması"
admin_theme = "Admin theme" admin_theme = "Admin theme"
admin_theme_light = "Light" admin_theme_light = "Light"
admin_theme_dark = "Dark" admin_theme_dark = "Dark"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -324,3 +324,9 @@ rss_description_meta = "Post Meta Description"
admin_theme = "Admin theme" admin_theme = "Admin theme"
admin_theme_light = "Light" admin_theme_light = "Light"
admin_theme_dark = "Dark" admin_theme_dark = "Dark"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -324,3 +324,9 @@ rss_description_meta = "Post Meta Description"
admin_theme = "Admin theme" admin_theme = "Admin theme"
admin_theme_light = "Light" admin_theme_light = "Light"
admin_theme_dark = "Dark" admin_theme_dark = "Dark"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -324,3 +324,9 @@ rss_description_meta = "Post Meta 描述"
admin_theme = "後台界面風格" admin_theme = "後台界面風格"
admin_theme_light = "明亮" admin_theme_light = "明亮"
admin_theme_dark = "暗沉" admin_theme_dark = "暗沉"
search_index = "Search Index"
fulltext_search = "Fulltext Search"
add_search_index = "Add posts to Search Index"
clear_search_index = "Clear Search Index"
unindexed_posts = "Here are the posts that have not been indexed"
indexed_posts = "Posts has been indexed"

View file

@ -189,7 +189,7 @@ Please install and enable the INTL extension to format the date format to your l
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-2 col-form-label">Fulltext search</label> <label class="col-sm-2 col-form-label"><?php echo i18n('fulltext_search');?></label>
<div class="col-sm-10"> <div class="col-sm-10">
<div class="col-sm-10"> <div class="col-sm-10">
<div class="form-check"> <div class="form-check">

View file

@ -202,7 +202,7 @@ if (isset($author[0])) {
<li class="nav-item"> <li class="nav-item">
<a href="<?php echo site_url();?>admin/search" class="nav-link"> <a href="<?php echo site_url();?>admin/search" class="nav-link">
<p> <p>
<?php echo i18n('Search');?> Index <?php echo i18n('search_index');?>
</p> </p>
</a> </a>
</li> </li>

View file

@ -51,7 +51,7 @@ echo '<script language="javascript">
document.getElementById("information").innerHTML="Process completed"; document.getElementById("information").innerHTML="Process completed";
</script>'; </script>';
echo '<a href="' . site_url() .'admin/search">Back to search index</a>'; echo '<a href="' . site_url() .'admin/search">'. i18n('back_to') . ' ' . i18n('search_index') .'</a>';
// Redir // Redir
echo '<script language="javascript">window.location.href = "' .site_url() . 'admin/search"</script>'; echo '<script language="javascript">window.location.href = "' .site_url() . 'admin/search"</script>';

View file

@ -3,8 +3,8 @@
<br> <br>
<?php $search_index = array(); if (!empty($posts)) { ?> <?php $search_index = array(); if (!empty($posts)) { ?>
<form method="POST" action="<?php echo site_url();?>admin/search/reindex"> <form method="POST" action="<?php echo site_url();?>admin/search/reindex">
<p>The following are posts on the website that have not yet been included in the website search index.</p> <p><?php echo i18n('unindexed_posts');?></p>
<input type="submit" class="btn btn-primary" value="Add below posts to Index"> <input type="submit" class="btn btn-primary" value="<?php echo i18n('add_search_index');?>">
<br><br> <br><br>
<table class="table post-list"> <table class="table post-list">
<thead> <thead>
@ -32,7 +32,7 @@
<?php endforeach; ?> <?php endforeach; ?>
</tbody> </tbody>
</table> </table>
<input type="submit" class="btn btn-primary" value="Add above posts to Index"> <input type="submit" class="btn btn-primary" value="<?php echo i18n('add_search_index');?>">
<br><br> <br><br>
<?php if (!empty($pagination['prev']) || !empty($pagination['next'])): ?> <?php if (!empty($pagination['prev']) || !empty($pagination['next'])): ?>
<br> <br>
@ -74,6 +74,6 @@ $(function() {
}); });
</script> </script>
<p><?php echo count(get_blog_posts()); ?> published posts has been indexed!</p> <p><?php echo count(get_blog_posts()); ?> <?php echo i18n('indexed_posts');?></p>
<p><button class="btn btn-primary" id="clearButton">Clear Search Index</button></p> <p><button class="btn btn-primary" id="clearButton"><?php echo i18n('clear_search_index');?></button></p>
<?php } ?> <?php } ?>

View file

@ -1741,42 +1741,42 @@ get('/admin/search', function () {
if (empty($tmp) || $page < 1) { if (empty($tmp) || $page < 1) {
render('search', array( render('search', array(
'title' => generate_title('is_default', i18n('Search')), 'title' => generate_title('is_default', i18n('search_index')),
'heading' => i18n('Search') . ' Index', 'heading' => i18n('search_index'),
'description' => safe_html(strip_tags(blog_description())), 'description' => safe_html(strip_tags(blog_description())),
'canonical' => site_url(), 'canonical' => site_url(),
'metatags' => generate_meta(null, null), 'metatags' => generate_meta(null, null),
'bodyclass' => 'no-posts', 'bodyclass' => 'no-posts',
'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> &#187; ' . i18n('Search') 'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> &#187; ' . i18n('search_index')
)); ));
die; die;
} }
render('search', array( render('search', array(
'title' => generate_title('is_default', i18n('Search')), 'title' => generate_title('is_default', i18n('search_index')),
'description' => safe_html(strip_tags(blog_description())), 'description' => safe_html(strip_tags(blog_description())),
'canonical' => site_url(), 'canonical' => site_url(),
'metatags' => generate_meta(null, null), 'metatags' => generate_meta(null, null),
'heading' => i18n('Search') . ' Index', 'heading' => i18n('search_index'),
'page' => $page, 'page' => $page,
'posts' => $posts, 'posts' => $posts,
'bodyclass' => 'all-index-posts', 'bodyclass' => 'all-index-posts',
'type' => 'is_admin-index-posts', 'type' => 'is_admin-index-posts',
'is_admin' => true, 'is_admin' => true,
'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> &#187; ' . i18n('Search'), 'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> &#187; ' . i18n('search_index'),
'pagination' => has_pagination($total, $perpage, $page) 'pagination' => has_pagination($total, $perpage, $page)
)); ));
} else { } else {
render('denied', array( render('denied', array(
'title' => generate_title('is_default', i18n('Search')), 'title' => generate_title('is_default', i18n('search_index')),
'description' => safe_html(strip_tags(blog_description())), 'description' => safe_html(strip_tags(blog_description())),
'canonical' => site_url(), 'canonical' => site_url(),
'metatags' => generate_meta(null, null), 'metatags' => generate_meta(null, null),
'type' => 'is_admin-index-posts', 'type' => 'is_admin-index-posts',
'is_admin' => true, 'is_admin' => true,
'bodyclass' => 'denied', 'bodyclass' => 'denied',
'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> &#187; ' . i18n('Search') 'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> &#187; ' . i18n('search_index')
)); ));
} }
} else { } else {
@ -1811,7 +1811,7 @@ post('/admin/search/reindex', function () {
config('views.root', 'system/admin/views'); config('views.root', 'system/admin/views');
if ($role === 'editor' || $role === 'admin' && config('fulltext.search') == "true") { if ($role === 'editor' || $role === 'admin' && config('fulltext.search') == "true") {
render('search-reindex', array( render('search-reindex', array(
'title' => generate_title('is_default', i18n('Search')), 'title' => generate_title('is_default', i18n('search_index')),
'description' => safe_html(strip_tags(blog_description())), 'description' => safe_html(strip_tags(blog_description())),
'canonical' => site_url(), 'canonical' => site_url(),
'metatags' => generate_meta(null, null), 'metatags' => generate_meta(null, null),
@ -1819,7 +1819,7 @@ post('/admin/search/reindex', function () {
'search' => $search, 'search' => $search,
'is_admin' => true, 'is_admin' => true,
'bodyclass' => 'admin-search', 'bodyclass' => 'admin-search',
'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> &#187; ' . i18n('Search') 'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> &#187; ' . i18n('search_index')
)); ));
} }