MCPcopy Create free account
hub / github.com/M66B/FairEmail / translate

Method translate

app/src/main/java/eu/faircode/email/DeepL.java:191–196  ·  view source on GitHub ↗
(CharSequence text, boolean html, String target, Context context)

Source from the content-addressed store, hash-verified

189 }
190
191 public static Translation translate(CharSequence text, boolean html, String target, Context context) throws IOException, JSONException {
192 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
193 boolean deepl_formal = prefs.getBoolean("deepl_formal", true);
194 boolean deepl_html = prefs.getBoolean("deepl_html", false);
195 return translate(text, html && deepl_html, target, deepl_formal, context);
196 }
197
198 public static Translation translate(CharSequence text, boolean html, String target, boolean formality, Context context) throws IOException, JSONException {
199 if ("transliterate".equals(target)) {

Callers 13

onExecuteMethod · 0.95
onExecuteMethod · 0.95
onDrawMethod · 0.45
onDrawMethod · 0.45
onDrawMethod · 0.45
onDrawMethod · 0.45
onDrawMethod · 0.45
onDrawMethod · 0.45
onDrawMethod · 0.45
onDrawMethod · 0.45
drawVerticalScrollbarMethod · 0.45

Calls 15

detectLanguageMethod · 0.95
transliterateMethod · 0.95
getNetworkStateMethod · 0.95
getSpansMethod · 0.95
toHtmlMethod · 0.95
parseMethod · 0.95
iMethod · 0.95
getBaseUriMethod · 0.95
setUserAgentMethod · 0.95
readStreamMethod · 0.95
wMethod · 0.95
fromDocumentMethod · 0.95

Tested by

no test coverage detected