OSDN Git Service

BugTrack/2435 Improve search result messages
authorumorigu <umorigu@gmail.com>
Wed, 18 Oct 2017 16:05:07 +0000 (01:05 +0900)
committerumorigu <umorigu@gmail.com>
Wed, 18 Oct 2017 16:05:07 +0000 (01:05 +0900)
en.lng.php
ja.lng.php
lib/func.php
plugin/search2.inc.php

index feb8e1e..35ed906 100644 (file)
@@ -44,9 +44,9 @@ $_msg_notfound    = 'The page was not found.';
 $_msg_addline     = 'The added line is <span class="diff_added">THIS COLOR</span>.';
 $_msg_delline     = 'The deleted line is <span class="diff_removed">THIS COLOR</span>.';
 $_msg_goto        = 'Go to $1.';
-$_msg_andresult   = 'In the page <strong> $2</strong>, <strong> $3</strong> pages that contain all the terms $1 were found.';
-$_msg_orresult    = 'In the page <strong> $2</strong>, <strong> $3</strong> pages that contain at least one of the terms $1 were found.';
-$_msg_notfoundresult = 'No page which contains $1 has been found.';
+$_msg_andresult   = '$1 was found on <strong>$2</strong> pages out of <strong>$3</strong> pages.';
+$_msg_orresult    = 'At least one of the terms $1 was found on <strong>$2</strong> pages out of <strong>$3</strong> pages.';
+$_msg_notfoundresult = 'There are no pages containing $1 in <strong>$3</strong> pages.';
 $_msg_prev_results = '&lt;&lt; Previous $1 pages';
 $_msg_more_results = 'Next $1 pages &gt;&gt;';
 $_msg_symbol      = 'Symbols';
index 0264ab0..4f587af 100644 (file)
@@ -46,9 +46,9 @@ $_msg_notfound       = '指定されたページは見つかりませんでし
 $_msg_addline        = '追加された行は<span class="diff_added">この色</span>です。';
 $_msg_delline        = '削除された行は<span class="diff_removed">この色</span>です。';
 $_msg_goto           = '$1 へ行く。';
-$_msg_andresult      = '$1 ã\81®ã\81\99ã\81¹ã\81¦ã\82\92å\90«ã\82\80ã\83\9aã\83¼ã\82¸ã\81¯ <strong>$3</strong> ã\83\9aã\83¼ã\82¸ä¸­ã\80\81 <strong>$2</strong> ページ見つかりました。';
-$_msg_orresult       = '$1 のいずれかを含むページは <strong>$3</strong> ページ中、 <strong>$2</strong> ページ見つかりました。';
-$_msg_notfoundresult = '$1 を含むページは見つかりませんでした。';
+$_msg_andresult      = '$1 ã\82\92å\90«ã\82\80ã\83\9aã\83¼ã\82¸ã\81¯ <strong>$3</strong> ã\83\9aã\83¼ã\82¸ä¸­ã\80\81<strong>$2</strong> ページ見つかりました。';
+$_msg_orresult       = '$1 のいずれかを含むページは <strong>$3</strong> ページ中、<strong>$2</strong> ページ見つかりました。';
+$_msg_notfoundresult = '<strong>$3</strong> ページ中、$1 を含むページは見つかりませんでした。';
 $_msg_prev_results   = '&lt;&lt; 前の $1 ページ';
 $_msg_more_results   = '次の $1 ページ &gt;&gt;';
 $_msg_symbol         = '記号';
index 9536393..a4dbc78 100644 (file)
@@ -359,7 +359,7 @@ function do_search($word, $type = 'AND', $non_format = FALSE, $base = '')
        $r_word = rawurlencode($word);
        $s_word = htmlsc($word);
        if (empty($pages))
-               return str_replace('$1', $s_word, $_msg_notfoundresult);
+               return str_replace('$1', $s_word, str_replace('$3', $count, $_msg_notfoundresult));
 
        ksort($pages, SORT_STRING);
 
index cbbadad..ce72ae2 100644 (file)
@@ -96,7 +96,7 @@ function plugin_search2_do_search($query_text, $base, $start_index,
        $search_start_time, $modified_since)
 {
        global $whatsnew, $non_list, $search_non_list;
-       global $_msg_andresult, $_msg_orresult, $_msg_notfoundresult;
+       global $_msg_andresult, $_msg_orresult;
        global $search_auth, $auth_user;
 
        $result_record_limit = $start_index === 0 ?