mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
Html: Add 'lang' to <h1> [#724]
This commit is contained in:
@@ -138,7 +138,8 @@ public class Xoh_page_wtr_wkr {
|
||||
fmtr.Bld_bfr_many(bfr
|
||||
, root_dir_bry, Xoa_app_.Version, Xoa_app_.Build_date, app.Tcp_server().Running_str()
|
||||
, page.Db().Page().Id(), page.Ttl().Full_db()
|
||||
, pagename_for_tab, page.Html_data().Page_heading().Init(wiki, html_gen_tid == Xopg_view_mode_.Tid__read, page.Html_data(), page.Ttl().Full_db(), pagename_for_h1)
|
||||
, pagename_for_tab
|
||||
, page.Html_data().Page_heading().Init(wiki, html_gen_tid == Xopg_view_mode_.Tid__read, page.Html_data(), page.Ttl().Full_db(), pagename_for_h1, page.Lang().Key_bry())
|
||||
, modified_on_msg
|
||||
, mgr.Css_common_bry(), mgr.Css_wiki_bry()
|
||||
, mgr.Css_night_bry(nightmode_enabled)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
XOWA: the XOWA Offline Wiki Application
|
||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||
Copyright (C) 2012-2020 gnosygnu@gmail.com
|
||||
|
||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||
or alternatively under the terms of the Apache License Version 2.0.
|
||||
@@ -13,9 +13,16 @@ The terms of each license can be found in the source code repository:
|
||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||
*/
|
||||
package gplx.xowa.wikis.pages; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import gplx.core.brys.*; import gplx.core.brys.fmtrs.*;
|
||||
import gplx.xowa.wikis.pages.htmls.*;
|
||||
package gplx.xowa.wikis.pages;
|
||||
|
||||
import gplx.Bry_;
|
||||
import gplx.Bry_bfr;
|
||||
import gplx.Bry_bfr_;
|
||||
import gplx.Bry_fmt;
|
||||
import gplx.core.brys.Bfr_arg;
|
||||
import gplx.xowa.Xowe_wiki;
|
||||
import gplx.xowa.wikis.pages.htmls.Xopg_html_data;
|
||||
|
||||
// TODO: move pagename_for_h1 here; also test; WHEN: next major change; NOTE: may go away for XOMW
|
||||
public class Xopg_page_heading implements Bfr_arg {
|
||||
private Xowe_wiki wiki;
|
||||
@@ -23,12 +30,14 @@ public class Xopg_page_heading implements Bfr_arg {
|
||||
private byte[] ttl_full_db;
|
||||
private byte[] display_title;
|
||||
private boolean mode_is_read;
|
||||
public Xopg_page_heading Init(Xowe_wiki wiki, boolean mode_is_read, Xopg_html_data html_data, byte[] ttl_full_db, byte[] display_title) {
|
||||
private byte[] lang_code;
|
||||
public Xopg_page_heading Init(Xowe_wiki wiki, boolean mode_is_read, Xopg_html_data html_data, byte[] ttl_full_db, byte[] display_title, byte[] lang_code) {
|
||||
this.wiki = wiki;
|
||||
this.mode_is_read = mode_is_read;
|
||||
this.ttl_full_db = ttl_full_db;
|
||||
this.html_data = html_data;
|
||||
this.display_title = display_title;
|
||||
this.lang_code = lang_code;
|
||||
return this;
|
||||
}
|
||||
public void Bfr_arg__add(Bry_bfr bfr) {
|
||||
@@ -41,8 +50,8 @@ public class Xopg_page_heading implements Bfr_arg {
|
||||
edit_lead_section = tmp_bfr.To_bry_and_clear();
|
||||
}
|
||||
|
||||
fmtr.Bld_many(bfr, display_title, edit_lead_section);
|
||||
fmtr.Bld_many(bfr, lang_code, display_title, edit_lead_section);
|
||||
}
|
||||
private static final byte[] Bry__lead_section_hint = Bry_.new_u8("(Lead)");
|
||||
private final Bry_fmt fmtr = Bry_fmt.Auto_nl_apos("<h1 id='firstHeading' class='firstHeading'>~{page_title}~{edit_lead_section}</h1>"); // <span>~{page_title}</span>
|
||||
private static final byte[] Bry__lead_section_hint = Bry_.new_u8("(Lead)");
|
||||
private final Bry_fmt fmtr = Bry_fmt.Auto_nl_apos("<h1 id='firstHeading' class='firstHeading' lang='~{lang}'>~{page_title}~{edit_lead_section}</h1>");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user