Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
fce100a
Constructed the template of TranslateText Use case
903Edan Nov 7, 2024
18105b4
Added instance variables into User
903Edan Nov 7, 2024
488f14c
Modify parts of execute method in TranslateTextInteractor
903Edan Nov 8, 2024
774c030
completed DBTranslateTextDataAccessObject with a test, and TranslateT…
HChristinaH Nov 9, 2024
edfb31c
updated DAO to get detected language and get a list of input and outp…
HChristinaH Nov 10, 2024
3fcee49
presenter
julia-zaki Nov 10, 2024
3621ad4
readme and two sketches
julia-zaki Nov 10, 2024
6c2fec1
readme and two sketches
julia-zaki Nov 10, 2024
d3115d9
presenter julia
julia-zaki Nov 10, 2024
4ca931c
Merge pull request #3 from SonM12/cchristina.huang
SonM12 Nov 10, 2024
d9d7f7a
Merge pull request #6 from SonM12/julia.zaki
SonM12 Nov 10, 2024
dab6234
julia v2
julia-zaki Nov 10, 2024
c14ee09
Merge pull request #7 from SonM12/julia.zaki
SonM12 Nov 10, 2024
a11106c
julia updates translate
julia-zaki Nov 10, 2024
d5d6888
Added entity TextTranslator
HChristinaH Nov 10, 2024
16cbdda
Added Constants
HChristinaH Nov 10, 2024
2222773
fix execute variables and instruction
Karrrrmen Nov 10, 2024
a6f462f
fix execute variables and instruction
Karrrrmen Nov 10, 2024
13f6eb4
julia v3
julia-zaki Nov 10, 2024
4df68e6
Merge pull request #11 from SonM12/julia.zaki
SonM12 Nov 10, 2024
229d6bf
julia v4
julia-zaki Nov 10, 2024
ab85db9
Created TranslateTextViewModel and TranslateTextView files. Each repr…
Nov 10, 2024
3057191
Merge pull request #10 from SonM12/karrmen.zhu
HChristinaH Nov 11, 2024
7af9141
julia v5
julia-zaki Nov 11, 2024
dfe8d53
Merge pull request #13 from SonM12/cchristina.huang
julia-zaki Nov 11, 2024
d851ac4
julia v6
julia-zaki Nov 11, 2024
7f5291f
Merge pull request #14 from SonM12/julia.zaki
HChristinaH Nov 11, 2024
8ac8b35
finished TranslateTextInteractor
903Edan Nov 11, 2024
1a53192
Merge remote-tracking branch 'origin/edan.wong' into edan.wong
903Edan Nov 11, 2024
45cb36f
julia v7
julia-zaki Nov 11, 2024
11acef7
Modified style convention in TranslateTextInteractor
903Edan Nov 11, 2024
06ba9a6
Merge pull request #16 from SonM12/julia.zaki
HChristinaH Nov 11, 2024
1d3f5f0
Delete src/main/java/entity/User.java
HChristinaH Nov 11, 2024
2ffea20
Delete src/main/java/use_case/note/TranslateText/TranslateTextInputBo…
HChristinaH Nov 11, 2024
f08521e
Delete src/main/java/use_case/note/TranslateText/TranslateTextInputDa…
HChristinaH Nov 11, 2024
e308e53
Delete src/main/java/use_case/note/TranslateText/TranslateTextInterac…
HChristinaH Nov 11, 2024
40b041a
Delete src/main/java/use_case/note/TranslateText/TranslateTextOutputB…
HChristinaH Nov 11, 2024
564665c
Delete src/main/java/use_case/note/TranslateText/TranslateTextOutputD…
HChristinaH Nov 11, 2024
b1151f1
Delete src/main/java/use_case/note/TranslateText/TranslateTextUserDat…
HChristinaH Nov 11, 2024
9f1eb6d
Merge pull request #15 from SonM12/edan.wong
HChristinaH Nov 11, 2024
844b08b
Added Christina's user story
HChristinaH Nov 11, 2024
443736c
created the interface TranslateTextInputBoundary and let TranslateTex…
903Edan Nov 11, 2024
ed453d8
updated ReadMe image
HChristinaH Nov 11, 2024
aaa7a22
added User entity
HChristinaH Nov 11, 2024
be1495b
Merge pull request #17 from SonM12/cchristina.huang
julia-zaki Nov 11, 2024
0d4c79c
Updated the javadoc and parameters of execute method in TranslateText…
903Edan Nov 11, 2024
d86dcb6
Merge pull request #18 from SonM12/edan.wong
HChristinaH Nov 11, 2024
9ac7145
Merge pull request #19 from SonM12/cchristina.huang
julia-zaki Nov 11, 2024
0a40fbc
Merge pull request #20 from SonM12/cchristina.huang
julia-zaki Nov 11, 2024
972aec5
Updated the User story for translate file in README.md and included t…
903Edan Nov 11, 2024
64ef4d6
Merge pull request #21 from SonM12/edan.wong
HChristinaH Nov 11, 2024
f9437c0
Adding Edan's name and its GitHub username
903Edan Nov 11, 2024
5d90ae4
Implement TranslateTextInputData and modify the execute method in Tra…
903Edan Nov 11, 2024
68c6f3e
add user story 'translate video'
Karrrrmen Nov 11, 2024
1f1fbdb
add user story 'translate video'
Karrrrmen Nov 11, 2024
4fd7531
add user story 'translate video'
Karrrrmen Nov 11, 2024
09a27a5
add user story 'translate video'
Karrrrmen Nov 11, 2024
d10e2d9
Merge pull request #22 from SonM12/edan.wong
HChristinaH Nov 11, 2024
1966a56
add user story 'translate video'
Karrrrmen Nov 11, 2024
7267711
add user story 'translate video'
Karrrrmen Nov 11, 2024
b6f3b2e
Merge pull request #23 from SonM12/karmen.zhu
HChristinaH Nov 11, 2024
d364ff2
add user story 'translate video'
Karrrrmen Nov 12, 2024
1413cb4
got working test app
HChristinaH Nov 12, 2024
4efa486
added view test
HChristinaH Nov 12, 2024
39e5aff
Merge pull request #26 from SonM12/karmen.zhu
HChristinaH Nov 12, 2024
9a16b57
Merge pull request #27 from SonM12/cchristina.huang
julia-zaki Nov 12, 2024
b144e63
updated Interactor empty input text case
HChristinaH Nov 12, 2024
e7d766b
julia - added interactor test and output data class
julia-zaki Nov 12, 2024
5e8aa9f
Merge pull request #28 from SonM12/cchristina.huang
julia-zaki Nov 12, 2024
20185b4
Merge pull request #29 from SonM12/julia.zaki
HChristinaH Nov 12, 2024
d9cafe2
updated TranslateTextView
HChristinaH Nov 13, 2024
0e83e00
Added roy's user story to readme file and added image.
Nov 15, 2024
a4e10f9
Merge pull request #31 from SonM12/roy.son
HChristinaH Nov 15, 2024
b41c35e
Merge pull request #30 from SonM12/cchristina.huang
SonM12 Nov 15, 2024
349ea13
test commit
Nov 15, 2024
8933e76
changed alignments of the JPanels to make it more usable and resized …
SonM12 Nov 18, 2024
e99aa87
Merge pull request #32 from SonM12/roy.windows
HChristinaH Nov 18, 2024
26c8485
Merge branch 'main' of https://github.com/SonM12/TeamTranslator into …
Nov 18, 2024
e9d4f67
created ImageUploadDAO
HChristinaH Nov 18, 2024
8d29b63
Merge remote-tracking branch 'origin/main' into cchristina.huang
HChristinaH Nov 18, 2024
cba2489
Added upload image button on the bottom row and edited text area to w…
Nov 18, 2024
11c4489
Merge pull request #33 from SonM12/roy.son
HChristinaH Nov 18, 2024
78f50fb
finished ImageUpload use case
HChristinaH Nov 19, 2024
52462f0
fixed some CheckStyle errors
HChristinaH Nov 19, 2024
8ba6659
added tests for image upload use case
HChristinaH Nov 22, 2024
cdebb09
added scroll panes
HChristinaH Nov 22, 2024
a9f7d68
removed ImageToText view prototype
HChristinaH Nov 22, 2024
e46bd21
added ImageUpload test case for image with no text
HChristinaH Nov 22, 2024
1a7822c
fixed bug where input text disappears upon Image Upload fail view
HChristinaH Nov 22, 2024
c8cdc6c
prevent image upload from clearing previous input text
HChristinaH Nov 22, 2024
e2e1fea
Merge pull request #34 from SonM12/cchristina.huang
julia-zaki Nov 22, 2024
f2c2744
Merge pull request #35 from SonM12/cchristina.huang
julia-zaki Nov 24, 2024
5e263b2
fixed translate text bug
HChristinaH Nov 24, 2024
2942d38
Merge pull request #37 from SonM12/cchristina.huang
julia-zaki Nov 24, 2024
a14ef1d
Implemented switch use case and tests
julia-zaki Nov 25, 2024
813498b
changed private methods to protected
HChristinaH Nov 25, 2024
654febb
Added speaker button to the Translate Text view panel and added its i…
Nov 25, 2024
d7f6cd1
Merge pull request #40 from SonM12/roy.son
HChristinaH Nov 25, 2024
e63244a
Merge pull request #39 from SonM12/cchristina.huang
HChristinaH Nov 25, 2024
146dc6d
Added more tests and modified the interacctor + fixed java doc
julia-zaki Nov 25, 2024
40120fc
Merge branch 'main' into julia.zaki
julia-zaki Nov 25, 2024
d7ceaa1
Merge pull request #38 from SonM12/julia.zaki
HChristinaH Nov 25, 2024
604cba4
Added more tests and modified the interacctor + fixed java doc
julia-zaki Nov 25, 2024
f7a5368
Merge remote-tracking branch 'origin/julia.zaki' into julia.zaki
julia-zaki Nov 25, 2024
21a4d0a
Added more tests and modified the interactor + fixed java doc
julia-zaki Nov 25, 2024
92ff567
Merge pull request #42 from SonM12/julia.zaki
HChristinaH Nov 25, 2024
25e6855
implemented text to speech use case using freeTTS
SonM12 Nov 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

153 changes: 153 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Images/Main View.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/TextToSpeech.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/TranslateFile View.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/TranslateVideo View.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/Vocabulary View.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/imageInFrench.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/imageNoText.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/speaker_resized.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
95 changes: 59 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,59 @@
# Note Application

This is a minimal example demonstrating usage of the
password-protected user part of the API used in lab 5.

You can find more information about the API endpoints in
[the documentation](https://www.postman.com/cloudy-astronaut-813156/csc207-grade-apis-demo/documentation/fg3zkjm/5-password-protected-user).

If your team is considering an application for which it would be convenient to
store data in something like a database, you may find that the API calls demonstrated
here will be useful in your project, as this will allow you to store
an arbitrary JSON object associated with a username and password.

In this application, a single note has a name (the "username" in terms of the API) and the note
can be read by anyone who knows the name — but only edited by someone who
knows the password for it.

You can see the documentation in the various files for more information.

## Testing

The repo also includes an example of a use case interactor test, as well as
an example of an end-to-end test which automates button clicks and inspects
the contents of the actual views. This is something we discussed in the lectures
about testing in CA but had not provided a code example of before. Note, one
could also inspect the contents of the ViewModel objects instead when testing
CA to make a similar test which would be less dependent on the details of the
specific UI implementation.

## Project Starter Code

Your team may choose to use this repo as starter code for your project. You could
also use the lab 5 code — or start from an empty repo if your team prefers.

If you choose to use one of the repositories we have provided, you can either make
a fork of it or copy the subset of code you want into a completely new repository.
# The Translator
# Team Names and GitHub Usernames:
Julia Zaki / julia-zaki

Christina Huang / HChristinaH

Edan Wong / 903Edan
.
Manjun Zhu / Karrrrmen
.

# Main View Sketch
![Main View](Images/Main%20View.jpg)

# User Stories
# 1.
Julia is learning French and is using the translator to help her translate words from English to French or vice versa.
She uses the vocabulary feature where she can choose to store a certain word and its translation in a page called
“Vocabulary”. She can access the page at any time allowing her to revise or recall the words to advance her learning
process. The process is: Julia will click on the vocabulary page and manually input in both languages (view shown below)
[Julia Zaki’s User Story]
Potential API: Filebase

![Vocabulary View](Images/Vocabulary%20View.jpg)

# 2.
Christina is studying abroad in Japan and sees a sign at a subway. She is not very familiar with Japanese.
She is in a rush and cannot easily type in the characters into her translation app so she uses the convert image
to text feature to take a picture and translate the sign.
[Christina Huang’s User Story]
API: OCR Space

# 3.
Edan is currently enrolled in a Korean learning course and several course materials are distributed in different
format of files. He wants those text in the files to be translated directly into his mother language so that he
does not have to copy and paste the text from the file into the translator. Therefore, he uses the
translate-file feature to translate the materials in an efficient way.
[Edan’s story]
Potential API: document translation API

![TranslateFile View](Images/TranslateFile%20View.jpg)

# 4.
Karmen is taking a history class and needs to watch a documentary in a foreign language.
To fully understand the documentary, she wants to translate its script into a language she’s comfortable with.
Using the "Translate Video" feature, Karmen gains a deeper understanding of the documentary.
[Karmen Zhu’s User Story]
Potential API: YouTube

![TranslateVideo View.jpg](Images/TranslateVideo%20View.jpg)

# 5.
Roy is studying French in order to prepare for his French proficiency test.
However, while studying the subject, he came across some words or sentences he does not know how to pronounce.
Using the speaker button located at the bottom right side of text boxes, Roy can listen to the inputted pronounciation.
[Roy Son's User Story]
Potential API: Google Translate

![TextToSpeech.jpg](Images/TextToSpeech.jpg)
12 changes: 12 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.deepl.api</groupId>
<artifactId>deepl-java</artifactId>
<version>1.6.0</version>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.15.1</version>
</dependency>

</dependencies>


Expand Down
41 changes: 41 additions & 0 deletions src/main/java/app/MainTranslatorApplication.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package app;

import data_access.DBImageUploadDataAccessObject;
import data_access.DBTranslateTextDataAccessObject;
import use_case.imageUpload.ImageUploadDataAccessInterface;
import use_case.switchTranslation.SwitchTranslationDataAccessInterface;
import use_case.translateText.TranslateTextDataAccessInterface;
import use_case.textToSpeech.TextToSpeechDataAccessInterface;

/**
* An application where we can translate text.
*/
public class MainTranslatorApplication {

/**
* The main entry point of the application.
* The program will show you the input and output language drop-down box and will allow you
* to type text in a textbox. You can then click Translate Text and your text will be translated.
* This uses the DeepL API.
* @param args commandline arguments are ignored
*/
public static void main(String[] args) {

// create the data access and inject it into our builder!
final TranslateTextDataAccessInterface translateTextDataAccess = new DBTranslateTextDataAccessObject();
final ImageUploadDataAccessInterface imageUploadDataAccess = new DBImageUploadDataAccessObject();
final SwitchTranslationDataAccessInterface switchTranslationDataAccess = new DBTranslateTextDataAccessObject();
final TextToSpeechDataAccessInterface textToSpeechDataAccess = new DBTranslateTextDataAccessObject();

final app.TranslateTextAppBuilder builder = new app.TranslateTextAppBuilder();
builder.addTranslateTextDAO(translateTextDataAccess)
.addImageUploadDAO(imageUploadDataAccess)
.addSwitchTranslationDAO(switchTranslationDataAccess)
.addTextToSpeechDAO(textToSpeechDataAccess)
.addTranslateTextView()
.addTranslateTextUseCase()
.addSwitchTranslationUseCase()
.addImageUploadUseCase()
.addTextToSpeechUseCase().build().setVisible(true);
}
}
Loading