mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v1.7.3.1
This commit is contained in:
25
400_xowa/src_400_parser/gplx/xowa/Pfunc_titleparts_log.java
Normal file
25
400_xowa/src_400_parser/gplx/xowa/Pfunc_titleparts_log.java
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
XOWA: the XOWA Offline Wiki Application
|
||||
Copyright (C) 2012 gnosygnu@gmail.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa; import gplx.*;
|
||||
public class Pfunc_titleparts_log {
|
||||
private static final Gfo_msg_grp owner = Gfo_msg_grp_.new_(Xoa_app_.Nde, "tmpl_func_titleparts");
|
||||
public static final Gfo_msg_itm
|
||||
Len_is_invalid = Gfo_msg_itm_.new_warn_(owner, "Len_is_invalid")
|
||||
, Bgn_is_invalid = Gfo_msg_itm_.new_warn_(owner, "Bgn_is_invalid")
|
||||
;
|
||||
}
|
||||
@@ -166,7 +166,7 @@ public class TstObj_tst {
|
||||
TstRslt rslt = new TstRslt().Expd_(expd).Actl_(actl)
|
||||
.Id_(id).Key_(key)
|
||||
.EvalType_(evalType).EvalPass_(evalPass).EvalStr_(evalStr)
|
||||
.ExpdStr_(Object_.XtoStr_OrNullStr(expd.Val())).ActlStr_(Object_.XtoStr_OrNullStr(actl.Val()))
|
||||
.ExpdStr_(Object_.Xto_str_strict_or_null_mark(expd.Val())).ActlStr_(Object_.Xto_str_strict_or_null_mark(actl.Val()))
|
||||
;
|
||||
rslts.Add(rslt);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa; import gplx.*;
|
||||
import gplx.core.btries.*; import gplx.xowa.parsers.amps.*;
|
||||
public class Xoa_ttl { // EX.WP: http://en.wikipedia.org/wiki/Help:Link; REF.MW: Ttl.php|secureAndSplit;
|
||||
public class Xoa_ttl { // PAGE:en.w:http://en.wikipedia.org/wiki/Help:Link; REF.MW: Ttl.php|secureAndSplit;
|
||||
public Xow_ns Ns() {return ns;} private Xow_ns ns;
|
||||
public boolean ForceLiteralLink() {return forceLiteralLink;} private boolean forceLiteralLink;
|
||||
// NOTE: in procs below, all -1 are used to skip previous delimiters; they will only occur for end_pos arguments
|
||||
|
||||
@@ -78,6 +78,10 @@ public class Xop_ctx {
|
||||
tmpl_args_parsing = false;
|
||||
return this;
|
||||
}
|
||||
public String Page_url_str() {
|
||||
try {return cur_page.Url().Xto_full_str_safe();}
|
||||
catch (Exception e) {Err_.Noop(e); return "page_url shouldn't fail";}
|
||||
}
|
||||
public void Page_bgn(Xop_root_tkn root, byte[] src) {
|
||||
this.Msg_log().Clear(); cur_tkn_tid = Xop_tkn_itm_.Tid_null;
|
||||
empty_ignored = false;
|
||||
|
||||
@@ -18,5 +18,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
package gplx.xowa; import gplx.*;
|
||||
public class Xop_lnke_log {
|
||||
private static final Gfo_msg_grp owner = Gfo_msg_grp_.new_(Xoa_app_.Nde, "lnke");
|
||||
public static final Gfo_msg_itm Dangling = Gfo_msg_itm_.new_note_(owner, "dangling"); // NOTE: WP.BOT:YOBOT;EX.WP: Pan_flute
|
||||
public static final Gfo_msg_itm Dangling = Gfo_msg_itm_.new_note_(owner, "dangling"); // NOTE: WP.BOT:YOBOT;PAGE:en.w:Pan_flute
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public class Xop_redirect_mgr_tst {
|
||||
@Test public void First() {fxt.Test_redirect("#REDIRECT [[a]] [[b]]", "A");}
|
||||
@Test public void Exc_false_match() {fxt.Test_redirect("#REDIRECTA [[a]]", "");}
|
||||
@Test public void Exc_lnki_not_found() {fxt.Test_redirect("#REDIRECT test", "");}
|
||||
@Test public void Ws() {fxt.Test_redirect("\n#REDIRECT [[a]]", "A");} // EX.WP:Germany; {{Template group}} -> \n#REDIRECT [[Template:Navboxes]]
|
||||
@Test public void Ws() {fxt.Test_redirect("\n#REDIRECT [[a]]", "A");} // PAGE:en.w:Germany; {{Template group}} -> \n#REDIRECT [[Template:Navboxes]]
|
||||
@Test public void Utf8() {
|
||||
fxt.Init_utf8();
|
||||
fxt.Init_kwds(Bool_.N, "#REDIRECT", "#перенаправление");
|
||||
|
||||
@@ -116,13 +116,6 @@ class Xop_tag_log {
|
||||
Invalid = Gfo_msg_itm_.new_warn_(owner, "Invalid")
|
||||
;
|
||||
}
|
||||
class Pf_xtn_titleparts_log {
|
||||
private static final Gfo_msg_grp owner = Gfo_msg_grp_.new_(Xoa_app_.Nde, "tmpl_func_titleparts");
|
||||
public static final Gfo_msg_itm
|
||||
Len_is_invalid = Gfo_msg_itm_.new_warn_(owner, "Len_is_invalid")
|
||||
, Bgn_is_invalid = Gfo_msg_itm_.new_warn_(owner, "Bgn_is_invalid")
|
||||
;
|
||||
}
|
||||
// class Pf_func_lang_log {
|
||||
// private static final Gfo_msg_grp owner = Gfo_msg_grp_.new_(Xoa_app_.Nde, "tmpl_func_lang");
|
||||
// public static final Gfo_msg_itm
|
||||
|
||||
Reference in New Issue
Block a user