由于LAC一直同時(shí)支持中文和英文的,這個(gè)跟LingosHook一樣(要吐槽E文版翻譯,隨便...反正俺自己不用E文的...),所以在LAC實(shí)現(xiàn)遠(yuǎn)程導(dǎo)入時(shí),也是有相應(yīng)的英文頁(yè)面的,如下圖所示;
LingosHook Android Client Release 1.1.x卻忘記支持這些E文網(wǎng)頁(yè)了...所以今天乘著在家看寶寶,搞定了這個(gè)...以為要再寫(xiě)一套跟支持中文一樣的函數(shù)來(lái),結(jié)果發(fā)現(xiàn)一個(gè)好方法,簡(jiǎn)單了許多,簡(jiǎn)單到一個(gè)函數(shù)也沒(méi)有添加...
@Override
public Response serve(String uri, String method, Properties header, Properties parms, Properties files) {
displayDebugInfo(uri, method, header, parms, files);
if(uri.length() > 0 && uri.startsWith("/")) {
uri = uri.substring(1);
}
try {
if(method.equals("GET")) {
if(uri.equals(""))
{
uri = "index.html";
}
if(uri.equals("index.html") || uri.equals("index_eng.html")) {
return requestRoot(uri, method, header, parms, files);
}
}
else if(method.equals("POST")) {
if(uri.equals("import_file.html") || uri.equals("import_file_eng.html")) {
return requestImportFile(uri, method, header, parms, files);
}
else if(uri.equals("import_file_done.html") || uri.equals("import_file_done_eng.html")) {
return requestImportFileDone(uri, method, header, parms, files);
}
else if(uri.equals("input_data.html") || uri.equals("input_data_eng.html")) {
return requestInputData(uri, method, header, parms, files);
}
else if(uri.equals("input_data_done.html") || uri.equals("input_data_done_eng.html")) {
return requestInputDataDone(uri, method, header, parms, files);
}
}
} catch (IOException ex) {
return badRequest();
}
return unsupportedRequest(uri, method, header, parms, files);
}
想來(lái)真的要用E文的應(yīng)該不多(我還是怕這些E文頁(yè)面大家也看不明白...),所以就不更新了,留到下個(gè)版本一起release吧...