mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.8.5.1
This commit is contained in:
@@ -25,7 +25,7 @@ public class Xol_cnv_mgr_tst {
|
||||
fxt.Parser_fxt().Init_page_create("Template:Test_x1", "val");
|
||||
fxt.Parser_fxt().Test_parse_tmpl_str_test("{{Test_x0}}", "{{test}}", "val");
|
||||
}
|
||||
@Test public void Upper_1st() { // PURPOSE: convert should call Xoa_ttl.parse_(), which will upper 1st letter; EX:{{jez-eng|sense}} -> Jez-eng; PAGE:sr.w:ДНК DATE:2014-07-06
|
||||
@Test public void Upper_1st() { // PURPOSE: convert should call Xoa_ttl.parse(), which will upper 1st letter; EX:{{jez-eng|sense}} -> Jez-eng; PAGE:sr.w:ДНК DATE:2014-07-06
|
||||
fxt.Parser_fxt().Init_page_create("Template:X1", "val");
|
||||
fxt.Parser_fxt().Test_parse_tmpl_str_test("{{x0}}", "{{test}}", "val");
|
||||
}
|
||||
@@ -79,7 +79,7 @@ class Xol_cnv_mgr_fxt {
|
||||
}
|
||||
public void Test_convert_by_ttl(String lang_key, String raw, boolean expd) {
|
||||
Xol_lang lang = app.Lang_mgr().Get_by_key_or_new(Bry_.new_a7(lang_key));
|
||||
Xoa_ttl ttl = Xoa_ttl.parse_(wiki, Bry_.new_u8(raw));
|
||||
Xoa_ttl ttl = Xoa_ttl.parse(wiki, Bry_.new_u8(raw));
|
||||
Xowd_page_itm page = lang.Vnt_mgr().Convert_ttl(wiki, ttl);
|
||||
if (expd)
|
||||
Tfds.Eq_true(page.Exists());
|
||||
|
||||
@@ -101,14 +101,14 @@ public class Xol_msg_mgr_ {
|
||||
}
|
||||
private static Xoae_page Get_msg_itm_from_db(Xowe_wiki wiki, Xol_lang lang, byte[] msg_key, byte[] msg_key_sub_root) {
|
||||
byte[] ns_bry = wiki.Ns_mgr().Ns_mediawiki().Name_db_w_colon();
|
||||
Xoa_ttl ttl = Xoa_ttl.parse_(wiki, Bry_.Add(ns_bry, msg_key)); // ttl="MediaWiki:msg_key"; note that there may be "/lang"; EX:pl.d:Wikislownik:Bar/Archiwum_6 and newarticletext/pl
|
||||
Xoa_ttl ttl = Xoa_ttl.parse(wiki, Bry_.Add(ns_bry, msg_key)); // ttl="MediaWiki:msg_key"; note that there may be "/lang"; EX:pl.d:Wikislownik:Bar/Archiwum_6 and newarticletext/pl
|
||||
Xoae_page rv = ttl == null ? Xoae_page.Empty : wiki.Data_mgr().Get_page_from_msg(ttl);
|
||||
if (rv.Missing()) { // [[MediaWiki:key]] not found; search for [[MediaWiki:key/fallback]]
|
||||
byte[][] fallback_ary = lang.Fallback_bry_ary();
|
||||
int fallback_ary_len = fallback_ary.length;
|
||||
for (int i = 0; i < fallback_ary_len; i++) {
|
||||
byte[] fallback = fallback_ary[i];
|
||||
ttl = Xoa_ttl.parse_(wiki, Bry_.Add(ns_bry, msg_key_sub_root, Slash_bry, fallback)); // ttl="MediaWiki:msg_key/fallback"
|
||||
ttl = Xoa_ttl.parse(wiki, Bry_.Add(ns_bry, msg_key_sub_root, Slash_bry, fallback)); // ttl="MediaWiki:msg_key/fallback"
|
||||
rv = ttl == null ? Xoae_page.Empty : wiki.Data_mgr().Get_page_from_msg(ttl);
|
||||
if (!rv.Missing()) break;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ public class Xol_vnt_mgr implements GfoInvkAble {
|
||||
Xol_vnt_converter converter = converter_ary[i];
|
||||
tmp_bfr.Clear();
|
||||
if (!converter.Convert_text(tmp_bfr, ttl_bry)) continue; // ttl is not converted for variant; ignore
|
||||
Xoa_ttl ttl = Xoa_ttl.parse_(wiki, ns.Id(), tmp_bfr.Xto_bry_and_clear()); // NOTE: must convert to ttl in order to upper 1st letter; EX:{{jez-eng|sense}} -> Jez-eng; PAGE:sr.w:ДНК DATE:2014-07-06
|
||||
Xoa_ttl ttl = Xoa_ttl.parse(wiki, ns.Id(), tmp_bfr.Xto_bry_and_clear()); // NOTE: must convert to ttl in order to upper 1st letter; EX:{{jez-eng|sense}} -> Jez-eng; PAGE:sr.w:ДНК DATE:2014-07-06
|
||||
if (ttl == null) continue;
|
||||
Xowd_page_itm page = new Xowd_page_itm();
|
||||
page.Ttl_(ns, ttl.Page_db());
|
||||
|
||||
Reference in New Issue
Block a user