Index: config/locales/en.yml =================================================================== --- config/locales/en.yml (revision 24239) +++ config/locales/en.yml (working copy) @@ -1462,3 +1462,4 @@ reaction_text_x_other_users: one: "1 other" other: "%{count} others" + label_no_recent_wiki_pages: "No wiki pages updated within the last %{days} days." Index: lib/redmine/wiki_formatting/macros.rb =================================================================== --- lib/redmine/wiki_formatting/macros.rb (revision 24239) +++ lib/redmine/wiki_formatting/macros.rb (working copy) @@ -249,6 +249,8 @@ order("#{WikiContent.table_name}.updated_on desc, id"). limit(limit) + return l(:label_no_recent_wiki_pages, days: days_to_list) if pages.empty? + tag.ul do pages.each do |page| concat( Index: test/unit/lib/redmine/wiki_formatting/macros_test.rb =================================================================== --- test/unit/lib/redmine/wiki_formatting/macros_test.rb (revision 24239) +++ test/unit/lib/redmine/wiki_formatting/macros_test.rb (working copy) @@ -633,4 +633,17 @@ end end end + + def test_recent_pages_macro_with_message_no_pages + @project = Project.find(1) + freeze_time do + with_locale :en do + with_settings :text_formatting => 'textile' do + result = textilizable('{{recent_pages(days=3)}}') + expected = I18n.t(:label_no_recent_wiki_pages, days: 3) + assert_select_in result, 'p:first-of-type', text: expected + end + end + end + end end