-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
62 lines (59 loc) · 2.8 KB
/
index.html
File metadata and controls
62 lines (59 loc) · 2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<html>
<head>
<link href="css/style.css" rel="stylesheet">
<script src="js/fileHandler.js" type="text/javascript"></script>
<script src="js/documentConversionHandler.js" type="text/javascript"></script>
<script src="js/languageTranslator.js" type="text/javascript"></script>
<script src="js/browserCompatibilityCheck.js" type="text/javascript"></script>
<script type="text/javascript">
window.onload = checkBrowser;
</script>
</head>
<body>
<div class="container">
<h2 class="big-title">Document Translator</h2>
<div class="help-box">
<p>
This document translator takes PDF, .doc, .docx or HTML document and uses IBM's Watson Document Conversion service to fetch the plain text representation of it.
Then it takes the plain text and translates (only from English to Portuguese) it by using IBM's Watson Language Translator service. After doing that, it outputs the result of both services on the HTML.
</p>
</div>
<div style="display: none;" id="errorMessage">
<div class="error-message">Your browser is not officially supported.
The application may not work correctly.</div>
</div>
<h1>Choose your file:</h1>
<form id="fileupload" method='POST' encType='multipart/form-data' action='/upload'>
<div>
<div>
<input id="fileInput" type="file"
accept="application/pdf, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, .html"
title="Choose an file to upload" name="document" onChange="handleFile(this.form);" />
<div class="small-help">
Upload a pdf, Microsoft Word(.doc, .docx) or HTML document.
(The max file size is 1 MB.)
</div>
</div>
</div>
</form>
<div class="output-container" id="conversionResultContainer" style="display: none;">
<div class="output-box-title">Your document:</div>
<div class="overflow-with-scroll code" >
<pre>
<code id="conversionResult" >
</code>
</pre>
</div>
</div>
<div class="output-container" id="translationResultContainer" style="display: none;">
<div class="output-box-title">Translated content:</div>
<div class="overflow-with-scroll code">
<pre>
<code id="translationResult">
</code>
</pre>
</div>
</div>
</div>
</body>
</html>