Browse Source

Pagination is now translatable

i18n: Page x of y.
typos.
pull/504/head
sb0001 4 years ago
parent
commit
e66aa7ba60
18 changed files with 77 additions and 43 deletions
  1. +3
    -1
      lang/ar_AR.ini
  2. +3
    -1
      lang/de_DE.ini
  3. +5
    -3
      lang/en_US.ini
  4. +3
    -1
      lang/es_ES.ini
  5. +2
    -0
      lang/fr_FR.ini
  6. +3
    -1
      lang/hu_HU.ini
  7. +2
    -0
      lang/id_ID.ini
  8. +3
    -1
      lang/it_IT.ini
  9. +2
    -0
      lang/ko_KO.ini
  10. +2
    -0
      lang/ms_MY.ini
  11. +4
    -2
      lang/nl_NL.ini
  12. +3
    -1
      lang/pl_PL.ini
  13. +3
    -1
      lang/pt_BR.ini
  14. +3
    -1
      lang/ru_RU.ini
  15. +3
    -1
      lang/sv_SE.ini
  16. +3
    -1
      lang/tr_TR.ini
  17. +3
    -1
      lang/zh_TW.ini
  18. +27
    -27
      system/includes/functions.php

+ 3
- 1
lang/ar_AR.ini View File

@ -249,4 +249,6 @@ Page_generation_time = "وقت إنشاء الصفحة"
Github_pre_release = "الإصدار التجريبي من Github"
Pre_release = "الإصدار التجريبي"
Yes_Im_in = "نعم أنا موجود"
Nope = "لا"
Nope = "لا"
Page="Page"
of="of"

+ 3
- 1
lang/de_DE.ini View File

@ -209,7 +209,7 @@ Breadcrumb_home_text="Bezeichnung für die Startseite im Breadcrumb-Menü"
Sitemap="Sitemap"
Valid_values_range_from_0_to_1.0._See="Valid values range from 0.0 to 1.0. See"
hint_Use_CtrlCMDF_to_search_for_your_config_key_or_value="<u>hint:</u> Use <code>Ctrl</code>/<code>CMD</code> + <code>F</code> to search for your config key or value."
pro_tips_You_can_creating_custom_config_key_and_print_out_your_config_key_value_anywhere_in_your_template="<u>pro tips:</u> You can creating custom config key and print out your config key value anywhere in your template."
pro_tips_You_can_creating_custom_config_key_and_print_out_your_config_key_value_anywhere_in_your_template="<u>pro tips:</u> You can create custom config key and print out your config key value anywhere in your template."
your_key="your.key"
Your_New_Config_Key="Your New Config Key"
Your_New_Value="Your New Value"
@ -248,3 +248,5 @@ Github_pre_release="Github pre-release"
Pre_release="Pre-release"
Yes_Im_in="Ja, ich bin dabei!"
Nope="Nein, danke."
Page="Seite"
of="von"

+ 5
- 3
lang/en_US.ini View File

@ -209,7 +209,7 @@ Breadcrumb_home_text="Breadcrumb home text"
Sitemap="Sitemap"
Valid_values_range_from_0_to_1.0._See="Valid values range from 0.0 to 1.0. See"
hint_Use_CtrlCMDF_to_search_for_your_config_key_or_value="<u>hint:</u> Use <code>Ctrl</code>/<code>CMD</code> + <code>F</code> to search for your config key or value."
pro_tips_You_can_creating_custom_config_key_and_print_out_your_config_key_value_anywhere_in_your_template="<u>pro tips:</u> You can creating custom config key and print out your config key value anywhere in your template."
pro_tips_You_can_creating_custom_config_key_and_print_out_your_config_key_value_anywhere_in_your_template="<u>pro tips:</u> You can create custom config keys and print out your config key value anywhere in your template."
your_key="your.key"
Your_New_Config_Key="Your New Config Key"
Your_New_Value="Your New Value"
@ -218,7 +218,7 @@ Recent_posts_widget_at_most="Recent posts widget at most"
Popular_posts_widget="Popular posts widget"
Popular_posts_widget_at_most="Popular posts widget at most"
Comments="Comments"
To_using_Disqus_or_Facebook_comment_you_need_to_provide_Disqus_shortname_or_Facebook_App_ID="To using Disqus or Facebook comment you need to provide Disqus shortname or Facebook App ID."
To_using_Disqus_or_Facebook_comment_you_need_to_provide_Disqus_shortname_or_Facebook_App_ID="To use Disqus or Facebook comments you need to provide your Disqus shortname or your Facebook App ID."
Comment_system="Comment system"
Disabled="Disabled"
Disqus_shortname="Disqus shortname"
@ -247,4 +247,6 @@ Page_generation_time="Page generation time"
Github_pre_release="Github pre-release"
Pre_release="Pre-release"
Yes_Im_in="Yes I'm in"
Nope="Nope"
Nope="Nope"
Page="Page"
of="of"

+ 3
- 1
lang/es_ES.ini View File

@ -246,4 +246,6 @@ Page_generation_time="Page generation time"
Github_pre_release="Github pre-release"
Pre_release="Pre-release"
Yes_Im_in="Yes I'm in"
Nope="Nope"
Nope="Nope"
Page="Page"
of="of"

+ 2
- 0
lang/fr_FR.ini View File

@ -248,3 +248,5 @@ Github_pre_release="Pré-release Github"
Pre_release="Pré-release"
Yes_Im_in="Oui, je suis prêt"
Nope="Non !"
Page="Page"
of="de"

+ 3
- 1
lang/hu_HU.ini View File

@ -247,4 +247,6 @@ Page_generation_time="Page generation time"
Github_pre_release="Github pre-release"
Pre_release="Pre-release"
Yes_Im_in="Yes I'm in"
Nope="Nope"
Nope="Nope"
Page="Page"
of="of"

+ 2
- 0
lang/id_ID.ini View File

@ -248,3 +248,5 @@ Github_pre_release="Pra-rilis Github"
Pre_release="Pra-rilis"
Yes_Im_in="Ya, saya ikut"
Nope="Nggak"
Page="Page"
of="of"

+ 3
- 1
lang/it_IT.ini View File

@ -247,4 +247,6 @@ Page_generation_time="Page generation time"
Github_pre_release="Github pre-release"
Pre_release="Pre-release"
Yes_Im_in="Yes I'm in"
Nope="Nope"
Nope="Nope"
Page="Page"
of="of"

+ 2
- 0
lang/ko_KO.ini View File

@ -248,3 +248,5 @@ Github_pre_release = "Github에서의 시험판"
Pre_release = "사전 출시"
Yes_Im_in = "그래, 난에있어"
Nope = "아니"
Page="Page"
of="of"

+ 2
- 0
lang/ms_MY.ini View File

@ -248,3 +248,5 @@ Github_pre_release = "Github pra keluaran"
Pre_release = "Pra-release"
Yes_Im_in = "Ya saya setuju"
Nope = "Nope"
Page="Page"
of="of"

+ 4
- 2
lang/nl_NL.ini View File

@ -207,7 +207,7 @@ post_your_post_slug="/bericht/uw-bericht-slug"
Meta_description_character="Meta beschrijving"
Breadcrumb_home_text="Breadcrumb home tekst"
Sitemap="Sitemap"
Valid_values_range_from_0_to_1.0._See="Geldige waarden variëren van 0,0 tot 1,0. Zie"
Valid_values_range_from_0_to_1.0._See="Geldige waarden vari�ren van 0,0 tot 1,0. Zie"
hint_Use_CtrlCMDF_to_search_for_your_config_key_or_value="<u>hint:</u> Use <code>Ctrl</code>/<code>CMD</code> + <code>F</code> to search for your config key or value."
pro_tips_You_can_creating_custom_config_key_and_print_out_your_config_key_value_anywhere_in_your_template="<u>pro tips:</u> You can creating custom config key and print out your config key value anywhere in your template."
your_key="your.key"
@ -247,4 +247,6 @@ Page_generation_time="Generatietijd pagina"
Github_pre_release="Github pre-release"
Pre_release="Pre-release"
Yes_Im_in="Ja, ik doe mee"
Nope="Nietes"
Nope="Nietes"
Page="Page"
of="of"

+ 3
- 1
lang/pl_PL.ini View File

@ -248,4 +248,6 @@ Page_generation_time="Page generation time"
Github_pre_release="Github pre-release"
Pre_release="Pre-release"
Yes_Im_in="Yes I'm in"
Nope="Nope"
Nope="Nope"
Page="Page"
of="of"

+ 3
- 1
lang/pt_BR.ini View File

@ -247,4 +247,6 @@ Page_generation_time="Tempo de geração da página"
Github_pre_release="Pré-lançamento do Github"
Pre_release="Pré-lançamento"
Yes_Im_in="Sim, estou dentro"
Nope="Não"
Nope="Não"
Page="Page"
of="of"

+ 3
- 1
lang/ru_RU.ini View File

@ -248,4 +248,6 @@ Page_generation_time="Page generation time"
Github_pre_release="Github pre-release"
Pre_release="Pre-release"
Yes_Im_in="Yes I'm in"
Nope="Nope"
Nope="Nope"
Page="Page"
of="of"

+ 3
- 1
lang/sv_SE.ini View File

@ -265,4 +265,6 @@ Page_generation_time="Page generation time"
Github_pre_release="Github pre-release"
Pre_release="Pre-release"
Yes_Im_in="Yes I'm in"
Nope="Nope"
Nope="Nope"
Page="Page"
of="of"

+ 3
- 1
lang/tr_TR.ini View File

@ -247,4 +247,6 @@ Page_generation_time="Page generation time"
Github_pre_release="Github pre-release"
Pre_release="Pre-release"
Yes_Im_in="Yes I'm in"
Nope="Nope"
Nope="Nope"
Page="Page"
of="of"

+ 3
- 1
lang/zh_TW.ini View File

@ -247,4 +247,6 @@ Page_generation_time="Page generation time"
Github_pre_release="Github pre-release"
Pre_release="Pre-release"
Yes_Im_in="Yes I'm in"
Nope="Nope"
Nope="Nope"
Page="Page"
of="of"

+ 27
- 27
system/includes/functions.php View File

@ -288,7 +288,7 @@ function get_posts($posts, $page = 1, $perpage = 0)
// The post author + author url
$post->author = $author;
$post->authorUrl = site_url() . 'author/' . $author;
$profile = get_author($author);
if (isset($profile[0])) {
$post->authorName = $profile[0]->name;
@ -384,7 +384,7 @@ function get_posts($posts, $page = 1, $perpage = 0)
}
$post->description = get_content_tag("d", $content, get_description($post->body));
$word_count = str_word_count(strip_tags($post->body));
$post->readTime = ceil($word_count / 200);
@ -866,7 +866,7 @@ function get_static_post($static)
}
$post->description = get_content_tag("d", $content, get_description($post->body));
$word_count = str_word_count(strip_tags($post->body));
$post->readTime = ceil($word_count / 200);
@ -913,7 +913,7 @@ function get_static_sub_post($static, $sub_static)
$post->views = get_views($post->file);
$post->description = get_content_tag("d", $content, get_description($post->body));
$word_count = str_word_count(strip_tags($post->body));
$post->readTime = ceil($word_count / 200);
@ -962,7 +962,7 @@ function get_keyword($keyword, $page, $perpage)
foreach ($words as $word) {
if (stripos($filter, $word) !== false) {
if (!in_array($v, $tmp)) {
$tmp[] = $v;
$tmp[] = $v;
}
}
}
@ -1500,7 +1500,7 @@ function tag_cloud($custom = null)
foreach ($tag_collection as $tag => $count) {
$size = $min_size + (($count - $min_qty) * $step);
echo ' <a class="tag-cloud-link" href="'. site_url(). 'tag/'. $tag .'" style="font-size:'. $size .'pt;">'.tag_i18n($tag).'</a> ';
}
}
} else {
return $tag_collection;
@ -1583,7 +1583,7 @@ function has_pagination($total, $perpage, $page = 1)
$total = count(get_post_unsorted());
}
$totalPage = ceil($total / $perpage);
$number = 'Page '. $page . ' of ' . $totalPage;
$number = i18n('Page') . ' ' . $page . ' ' . i18n('of') . ' ' . $totalPage;
$pager = get_pagination($page, $total, $perpage, 2);
return array(
'prev' => $page > 1,
@ -1992,7 +1992,7 @@ function publisher()
function analytics()
{
$analytics = config('google.analytics.id');
$gtag = config('google.gtag.id');
$gtag = config('google.gtag.id');
$script = <<<EOF
<script>
(function (i,s,o,g,r,a,m) {i['GoogleAnalyticsObject']=r;i[r]=i[r]||function () {
@ -2029,7 +2029,7 @@ function parseNodes($nodes, $child = null, $class = null) {
if (empty($child)) {
$ul = '<ul class="nav navbar-nav '.$class.'">';
foreach ($nodes as $node) {
if (isset($node->children)) {
if (isset($node->children)) {
$ul .= parseNode($node, true);
} else {
$ul .= parseNode($node);
@ -2040,7 +2040,7 @@ function parseNodes($nodes, $child = null, $class = null) {
} else {
$ul = '<ul class="subnav dropdown-menu" role="menu">';
foreach ($nodes as $node) {
if (isset($node->children)) {
if (isset($node->children)) {
$ul .= parseNode($node, true);
} else {
$ul .= parseNode($node);
@ -2061,7 +2061,7 @@ function parseNode($node, $child = null) {
if ($url['host'] == $su['host']) {
if (slashUrl($url['path']) == slashUrl($req)) {
$li = '<li class="item nav-item active '.$node->class.'">';
} else {
} else {
$li = '<li class="item nav-item '.$node->class.'">';
}
} else {
@ -2074,20 +2074,20 @@ function parseNode($node, $child = null) {
$li = '<li class="item nav-item '.$node->class.'">';
}
}
$li .= '<a class="nav-link" href="'.htmlspecialchars(slashUrl($node->slug), FILTER_SANITIZE_URL).'">'.$node->name.'</a>';
if (isset($node->children)) {
if (isset($node->children)) {
$li .= parseNodes($node->children, true, null);
}
$li .= '</li>';
return $li;
} else {
if (isset($url['host']) && isset($su['host'])) {
if ($url['host'] == $su['host']) {
if (slashUrl($url['path']) == slashUrl($req)) {
$li = '<li class="item nav-item dropdown active '.$node->class.'">';
} else {
} else {
$li = '<li class="item nav-item dropdown '.$node->class.'">';
}
} else {
@ -2100,13 +2100,13 @@ function parseNode($node, $child = null) {
$li = '<li class="item nav-item dropdown '.$node->class.'">';
}
}
$li .= '<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="'.htmlspecialchars(slashUrl($node->slug), FILTER_SANITIZE_URL).'">'.$node->name.'<b class="caret"></b></a>';
if (isset($node->children)) {
if (isset($node->children)) {
$li .= parseNodes($node->children, true, null);
}
$li .= '</li>';
return $li;
return $li;
}
}
@ -2136,15 +2136,15 @@ function menu($class = null)
if (stripos($class, 'active')) {
$parentClass = $element->parentNode->getAttribute('class') . ' active';
$element->parentNode->setAttribute('class', $parentClass);
}
}
}
}
return preg_replace('~<(?:!DOCTYPE|/?(?:html|head|body))[^>]*>\s*~i', '', utf8_decode($doc->saveHTML($doc->documentElement)));
}
} else {
get_menu($class);
get_menu($class);
}
}
@ -2295,13 +2295,13 @@ EOF;
function not_found()
{
$vroot = rtrim(config('views.root'), '/');
$lt = $vroot . '/layout--404.html.php';
$lt = $vroot . '/layout--404.html.php';
if (file_exists($lt)) {
$layout = 'layout--404';
} else {
$layout = '';
}
header($_SERVER["SERVER_PROTOCOL"] . " 404 Not Found");
render('404', array(
'title' => 'This page doesn\'t exist! - ' . blog_title(),
@ -3055,12 +3055,12 @@ function get_video_id($url)
}
$link = parse_url($url);
if(!isset($link['host'])) {
return $url;
}
if (stripos($link['host'], 'youtube.com') !== false || stripos($link['host'], 'youtu.be') !== false) {
if (stripos($link['host'], 'youtube.com') !== false || stripos($link['host'], 'youtu.be') !== false) {
preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $url, $match);
return $match[1];
} elseif (stripos($link['host'], 'vimeo.com') !== false) {
@ -3265,4 +3265,4 @@ function valueMaker($value)
if ($value == false)
return "0";
return (string)$value;
}
}

Loading…
Cancel
Save