mirror of https://github.com/kiwix/libkiwix.git
Internationalized "Go to the main page" button
This commit is contained in:
parent
ed7717c1e7
commit
3da81a3d0f
|
@ -60,6 +60,11 @@ public:
|
|||
return getTranslatedString(m_lang, key);
|
||||
}
|
||||
|
||||
std::string operator()(const std::string& key, const Parameters& params) const
|
||||
{
|
||||
return expandParameterizedString(m_lang, key, params);
|
||||
}
|
||||
|
||||
private:
|
||||
const std::string m_lang;
|
||||
};
|
||||
|
|
|
@ -290,6 +290,7 @@ void ContentResponse::introduce_taskbar(const std::string& lang)
|
|||
{"title", m_bookTitle},
|
||||
{"withlibrarybutton", m_withLibraryButton},
|
||||
{"LIBRARY_BUTTON_TEXT", t("library-button-text")},
|
||||
{"HOME_BUTTON_TEXT", t("home-button-text", {{"BOOK_TITLE", m_bookTitle}}) },
|
||||
};
|
||||
auto head_content = render_template(RESOURCE::templates::head_taskbar_html, data);
|
||||
m_content = prependToFirstOccurence(
|
||||
|
|
|
@ -20,4 +20,5 @@
|
|||
, "fulltext-search-unavailable" : "Fulltext search unavailable"
|
||||
, "no-search-results": "The fulltext search engine is not available for this content."
|
||||
, "library-button-text": "Go to welcome page"
|
||||
, "home-button-text": "Go to the main page of '{{BOOK_TITLE}}'"
|
||||
}
|
||||
|
|
|
@ -10,4 +10,5 @@
|
|||
, "404-page-title" : "Սխալ հասցե"
|
||||
, "404-page-heading" : "Սխալ հասցե"
|
||||
, "library-button-text": "Գրադարանի էջ"
|
||||
, "home-button-text": "Դեպի '{{BOOK_TITLE}}'֊ի գլխավոր էջը"
|
||||
}
|
||||
|
|
|
@ -21,4 +21,5 @@
|
|||
, "fulltext-search-unavailable" : "Title of the error page returned when search is attempted in a book without fulltext search database"
|
||||
, "no-search-results": "Text of the error page returned when search is attempted in a book without fulltext search database"
|
||||
, "library-button-text": "Tooltip of the button leading to the welcome page"
|
||||
, "home-button-text": "Tooltip of the button leading to the main page of a book"
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<a id="kiwix_serve_taskbar_library_button" title="{{{LIBRARY_BUTTON_TEXT}}}" aria-label="{{{LIBRARY_BUTTON_TEXT}}}" href="{{root}}/"><button>🏠</button></a>
|
||||
{{/withlibrarybutton}}
|
||||
{{#hascontent}}
|
||||
<a id="kiwix_serve_taskbar_home_button" title="Go to the main page of '{{title}}'" aria-label="Go to the main page of '{{title}}'" href="{{root}}/{{content}}/"><button>{{title}}</button></a>
|
||||
<a id="kiwix_serve_taskbar_home_button" title="{{{HOME_BUTTON_TEXT}}}" aria-label="{{{HOME_BUTTON_TEXT}}}" href="{{root}}/{{content}}/"><button>{{title}}</button></a>
|
||||
<a id="kiwix_serve_taskbar_random_button" title="Go to a randomly selected page" aria-label="Go to a randomly selected page"
|
||||
href="{{root}}/random?content={{#urlencoded}}{{{content}}}{{/urlencoded}}"><button>🎲</button></a>
|
||||
{{/hascontent}}
|
||||
|
|
Loading…
Reference in New Issue