mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
DownloadCentral: Fix archive.org url and task name for wikidata
This commit is contained in:
@@ -29,4 +29,6 @@ public class Xobc_task_regy_itm {
|
||||
public byte[] Key() {return key;} private final byte[] key;
|
||||
public byte[] Name() {return name;} private final byte[] name;
|
||||
public int Step_count() {return step_count;} private final int step_count;
|
||||
|
||||
public static final String Type__text = "text", Type__html = "html", Type__file = "file";
|
||||
}
|
||||
|
||||
@@ -27,10 +27,16 @@ public class Host_eval_wkr implements Bry_eval_wkr {
|
||||
int type = hash.Get_as_byte_or(src, args_bgn, args_end, Byte_.Max_value_127);
|
||||
switch (type) {
|
||||
case Type__wiki_abrv:
|
||||
byte[] lang_key = domain_itm.Lang_orig_key();
|
||||
if (lang_key == Bry_.Empty) lang_key = Bry_.new_a7("en"); // handle species
|
||||
rv.Add(lang_key);
|
||||
rv.Add_str_a7("wiki");
|
||||
// handle wikidata separately; DATE:2016-10-19
|
||||
if (String_.Eq(domain_itm.Domain_str(), "www.wikidata.org"))
|
||||
rv.Add_str_a7("wikidatawiki");
|
||||
// do not use Abrv_mw(); all other wikis will be "generalized" to their language url; EX:"en.wiktionary.org" -> "enwiki" x> "enwiktionary"
|
||||
else {
|
||||
byte[] lang_key = domain_itm.Lang_orig_key();
|
||||
if (lang_key == Bry_.Empty) lang_key = Bry_.new_a7("en"); // handle species
|
||||
rv.Add(lang_key);
|
||||
rv.Add_str_a7("wiki");
|
||||
}
|
||||
break;
|
||||
default: throw Err_.new_unhandled_default(type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user