1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2025-05-30 14:04:56 +00:00

Xtn.Translate: Add #translation function with no implementation [#445]

This commit is contained in:
gnosygnu 2019-05-26 09:18:11 -04:00
parent ee03d79536
commit b48b6def4e
5 changed files with 53 additions and 1 deletions

View File

@ -274,5 +274,6 @@ kwd_mgr.New(Bool_.N, Xol_kwd_grp_.Id_new_window_link, "#NewWindowLink");
kwd_mgr.New(Bool_.N, Xol_kwd_grp_.Id_categorytree, "#categorytree");
kwd_mgr.New(Bool_.N, Xol_kwd_grp_.Id_assessment, "#assessment");
kwd_mgr.New(Bool_.N, Xol_kwd_grp_.Id_statements, "#statements");
kwd_mgr.New(Bool_.N, Xol_kwd_grp_.Id_translation, "#translation");
}
}

View File

@ -236,8 +236,9 @@ public static final int
, Id_ttl_root_txt = 216
, Id_ttl_root_url = 217
, Id_statements = 218
, Id_translation = 219
;
public static final int Id__max = 219;
public static final int Id__max = 220;
private static byte[] ary_itm_(int id) {
switch (id) {
@ -460,6 +461,7 @@ case Xol_kwd_grp_.Id_new_window_link: return Bry_.new_u8("newwindowlink");
case Xol_kwd_grp_.Id_categorytree: return Bry_.new_u8("categorytree");
case Xol_kwd_grp_.Id_assessment: return Bry_.new_u8("assessment");
case Xol_kwd_grp_.Id_statements: return Bry_.new_u8("statements");
case Xol_kwd_grp_.Id_translation: return Bry_.new_u8("translation");
default: throw Err_.new_unhandled(id);
}
}

View File

@ -257,6 +257,7 @@ public class Pf_func_ {
, Xol_kwd_grp_.Id_categorytree
, Xol_kwd_grp_.Id_assessment
, Xol_kwd_grp_.Id_statements
, Xol_kwd_grp_.Id_translation
};
public static Xot_defn Get_prototype(int id) {
switch (id) {
@ -439,6 +440,7 @@ public class Pf_func_ {
return new Pf_func_noop(id);
case Xol_kwd_grp_.Id_bang: return Pf_func_bang.Instance;
case Xol_kwd_grp_.Id_assessment: return gplx.xowa.xtns.assessments.Assessment_func.Instance;
case Xol_kwd_grp_.Id_translation: return gplx.xowa.xtns.translates.Translation_func.Instance;
default: throw Err_.new_unhandled(id);
}
}

View File

@ -0,0 +1,25 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012-2017 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.
You may use XOWA according to either of these licenses as is most appropriate
for your project on a case-by-case basis.
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.xtns.translates; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*;
import gplx.xowa.xtns.pfuncs.*;
import gplx.xowa.langs.kwds.*;
import gplx.xowa.parsers.*; import gplx.xowa.parsers.tmpls.*;
public class Translation_func extends Pf_func_base {
@Override public void Func_evaluate(Bry_bfr bfr, Xop_ctx ctx, Xot_invk caller, Xot_invk self, byte[] src) {} // NOOP: could not find implementation; ISSUE#:445 DATE:2019-05-26
@Override public int Id() {return Xol_kwd_grp_.Id_translation;}
@Override public Pf_func New(int id, byte[] name) {return new Translation_func().Name_(name);}
public static final Translation_func Instance = new Translation_func(); Translation_func() {}
}

View File

@ -0,0 +1,22 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012-2017 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.
You may use XOWA according to either of these licenses as is most appropriate
for your project on a case-by-case basis.
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.xtns.translates; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*;
import org.junit.*;
public class Translation_func_tst {
private final Xop_fxt fxt = new Xop_fxt();
@Before public void init() {fxt.Reset();}
@Test public void Basic() {fxt.Test__parse__tmpl_to_html("{{#translation}}", "");}
}