1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00
This commit is contained in:
gnosygnu
2016-01-03 21:27:38 -05:00
parent 9509363f46
commit 096045614c
647 changed files with 11693 additions and 7648 deletions

View File

@@ -101,14 +101,14 @@ public class Xop_languages_xnde implements Xox_xnde {
;
// "<img src=\"//bits.wikimedia.org/static-1.22wmf9/extensions/Translate/res/images/prog-1.png\" alt=\"~{img_alt}\" title=\"~{img_title}\" width=\"9\" height=\"9\" />&#160;•&#160;"
}
class Xop_languages_fmtr extends gplx.core.brys.Bfr_arg_base {
class Xop_languages_fmtr implements gplx.core.brys.Bfr_arg {
public void Init(List_adp langs, Xowe_wiki wiki, Xoa_ttl root_ttl, byte[] cur_lang) {
this.langs = langs;
this.wiki = wiki;
this.root_ttl = root_ttl;
this.cur_lang = cur_lang;
} private List_adp langs; private Xowe_wiki wiki; private Xoa_ttl root_ttl; private byte[] cur_lang;
@Override public void Bfr_arg__add(Bry_bfr bfr) {
public void Bfr_arg__add(Bry_bfr bfr) {
int len = langs.Count();
Xoh_href_wtr href_wtr = wiki.Appe().Html__href_wtr();
int ns_id = root_ttl.Ns().Id();

View File

@@ -23,7 +23,7 @@ public class Xop_languages_xnde_tst {
fxt.Reset();
fxt.Page_ttl_("Help:A");
fxt.Init_page_create("Help:A", ""); // create for AllPages
} private Xop_fxt fxt = new Xop_fxt();
} private final Xop_fxt fxt = new Xop_fxt();
@Test public void None() {
fxt.Test_parse_page_all_str("<languages/>", ""); // empty
}

View File

@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package gplx.xowa.xtns.translates; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*;
import org.junit.*;
public class Xop_translate_xnde_tst {
@Before public void init() {fxt.Reset();} private Xop_fxt fxt = new Xop_fxt();
@Before public void init() {fxt.Reset();} private final Xop_fxt fxt = new Xop_fxt();
@Test public void Basic() {
fxt.Test_parse_page_all_str("<translate> ''a'' </translate>", "<i>a</i>"); // NOTE: trim ws
}

View File

@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package gplx.xowa.xtns.translates; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*;
import org.junit.*;
public class Xop_tvar_lxr_tst {
@Before public void init() {fxt.Reset();} private Xop_fxt fxt = new Xop_fxt();
@Before public void init() {fxt.Reset();} private final Xop_fxt fxt = new Xop_fxt();
@Test public void Basic() {
fxt.Test_parse_page_all_str("<tvar|1>''a''</>", "<i>a</i>");
}