diff --git a/jceGrade.pro b/jceGrade.pro index b047781..bcf8eb9 100644 --- a/jceGrade.pro +++ b/jceGrade.pro @@ -9,8 +9,10 @@ TARGET = jceGrade TEMPLATE = app RC_FILE = appConfigure.rc CONFIG += qt c++11 -CONFIG += console +CONFIG += console static +TRANSLATIONS = jce_en.ts \ + jce_he.ts FORMS += \ main/mainscreen.ui diff --git a/jce_en.qm b/jce_en.qm index fed56a9..78fec6e 100644 Binary files a/jce_en.qm and b/jce_en.qm differ diff --git a/jce_en.ts b/jce_en.ts index 4db1d16..a60083e 100644 --- a/jce_en.ts +++ b/jce_en.ts @@ -6,248 +6,380 @@ JCE Avg Calculator - JCE Manager + JCE Avg Calculator - + Login Login - + Keep login Keep login - <color=#000000>Username - Usernameasdfasdg - - - - + Username Username - + Password Password - - Courses - Grade Table + + GPA + GPA - + <html><head/><body><p><span style=" font-weight:600;">Get your grades</span></p></body></html> - Get Your Grades + <html><head/><body><p><span style=" font-weight:600;">Get your grades</span></p></body></html> - + Add Add - + <html><head/><body><p><span style=" font-weight:600;">Clear table</span></p></body></html> - Clear Table + <html><head/><body><p><span style=" font-weight:600;">Clear table</span></p></body></html> - + Clear Clear - + Average: Average: - - Settings - Sattings + + Only Main Courses + Only Main Courses - - Semester - Senester - - - - Year - Year - - - + From - From + <b>From</b> - + + + Year: + Year: + + + + Semester: + Semester: + + + To - To + <b>To</b> - - Only influence Courses - Only influence Courses + + Semester + Semester - - &About - &About + + Calendar + Calendar - + + Get Calendar + Get Calendar + + + + Export to CSV + Export to .CSV + + + + &File + &File + + + + Language + Language + + + Credits Credits - + Exit Exit - - How-To - How-To + + Hebrew + עברית - + + English + English + + + + OS Default + OS Default + + + + How To + How To + + + + Connecting + Connecting + + + + Connected + Connected + + + + Disconnected + Disconnected + + + + &Login + &Login + + + + &Logout + Log&out + + + + + Error Error - + + Not Connected Not Connected - - -CREDITS-ROOL-UP1 -A tiny Application to calculate your grades average. - - - -CREDITS-ROOL-UP2 -This software is licensed under Qt5's - - - - -CREDITS-ROOL-UP3 -The source code is available at github: - - - - -CREDITS-ROOL-UP4 -This front end is Powered by - - - - -DevBy -Developed By - - - - -Liran -Liran Ben Gida - - - - -Sagi -Sagi Dayan - - - - -Nadav -Nadav Luzzato - - - - -Tnks -Thanks to - - - - - -Code -Code - - - -Name -Course - - - -Type -Type - - - -Points -Points - - - -Hours -Weekly Hours - - - -Grade -Grade - - - -Additions -Additions - - - - - -HELP1 -Insert your username and password correctly - - - -HELP2 -Login and wait for the ball in the status (buttom) bar to become Green - - - -HELP3 -Check the Settings to select your date Interval - - - -HELP4 -Press Courses tab and then press the Add button and wait until courses will be loaded into the table - - - -HELP5 -Change the once of the grade cell and see your average is changing. - - - -HELP6 -Tip: Need to change Date interval? in Courses tab click Clean, then change the date interval then hit the Add button again! :-) - - - + + Missmatching data + Missmatching Data + + + + CREDITS-ROOL-UP1 + + + + + CREDITS-ROOL-UP2 + + + + + CREDITS-ROOL-UP3 + + + + + CREDITS-ROOL-UP4 + + + + + DevBy + Developed By + + + + Liran + Liran Ben Gida + + + + Sagi + Sagi Dayan + + + + HELP1 + + + + + HELP2 + + + + + HELP3 + + + + + HELP4 + + + + + HELP5 + + + + + HELP6 + + + + + + Settings + Settings + + + + + + Your settings will take effect next time you start the program + Your settings will take effect next time you start the program + + + + QObject + + + Exported Successfuly! + Exported Successfuly! + + + + <center>Something went wrong...<br></center>Maybe: <ul><li>You Canceled</li><li>Unable to save the File - try again</li></ul><br><br><b><center>In case of a serious problem, please file a bug report.<br>thank you. OpenJCE teem + + + + + Code + Code + + + + Name + Name + + + + Type + Type + + + + Points + Points + + + + Hours + Hours + + + + Grade + Grade + + + + Additions + Additions + + + + Please Check Your Username & Password + Please Check Your Username & Password + + + + You have been blocked by JCE, please try in a couple of minutes. + You have been <b>blocked</b> by JCE, please try in a couple of minutes. + + + + Please Check Your Internet Connection. + Please Check Your Internet Connection. + + + + Receive Request Timeout. + Receive Request Timeout. + + + + Send Request Timeout. + Send Request Timeout. + + + + +If this message appear without reason, please contact me at liranbg@gmail.com + +If this message appear without reason, please contact me at liranbg@gmail.com + + + + Error + Error + + + + Sunday + Sunday + + + + Monday + Monday + + + + Tuesday + Thesday + + + + Wednesday + Wednesday + + + + Thursday + Thursday + + + + Friday + Friday + - diff --git a/jce_he.qm b/jce_he.qm index e0f821f..952a5ca 100644 Binary files a/jce_he.qm and b/jce_he.qm differ diff --git a/jce_he.ts b/jce_he.ts index e28c3bd..0842582 100644 --- a/jce_he.ts +++ b/jce_he.ts @@ -2,261 +2,384 @@ -MainScreen - - -JCE Avg Calculator -JCE Manager - - - - -Login -התחבר - - - -Keep login -שמור פרטים - - - - -Username -שם משתמש - - - -Password -סיסמה - - - -Courses -גיליון ציונים - - - -<html><head/><body><p><span style=" font-weight:600;">Get your grades</span></p></body></html> -קבל את הציונים שלך - - - -Add -הוספה - - - -<html><head/><body><p><span style=" font-weight:600;">Clear table</span></p></body></html> -נקה טבלה - - - -Clear -נקה - - - -Average: -ממוצע: - - - -Settings -הגדרות - - - -Semester -סמסטר - - - -Year -שנה - - - -From -מסמסטר - - - -To -לסמסטר - - - -Only influence Courses -רק קורסים בעלי השפעה - - - -&About -&אודות - - - -Credits -אודות - - - -Exit -יציאה - - - -How-To -עזרה - - - -Error -שגיאה - - - -Not Connected -לא התחבר - - - -Connecting -מנסה להתחבר - - - -Connected -מחובר - - - -Disconnected -מנותק - - - -CREDITS-ROOL-UP1 -אפליקציה קטנה לחישוב ציונים - - - -CREDITS-ROOL-UP2 -רישיון השימוש בתוכנה ובקוד הפתוח רשום תחת - - - - -CREDITS-ROOL-UP3 -כל קוד המקור של התוכנה נמצא בגיטהאב: - - - - -CREDITS-ROOL-UP4 -התוכנה פועלת בעזרת המנוע - - - - -DevBy -פותח ע"י - - - - -Liran -לירן בן גידה - - - - -Sagi -שגיא דיין - - - - -Nadav -נדב לוצטו - - - - -Tnks -תודה רבה ל - - - - - -Code -קוד קורס - - - -Name -קורס - - - -Type -סוג - - - -Points -נקודות זכות - - - -Hours -שעות שבועיות - - - -Grade -ציון - - - -Additions -הערות - - - - -HELP1 -הכנס את שם המשתמש והסיסמה כמו שצריך - - - -HELP2 -לחץ התחבר והמתן על שהתוכנה תתחבר, עיגול ירוק למטה - - - -HELP3 -הכנס להגדרות כדי לבחור את טווח הגיליון - - - -HELP4 -לחץ על העמוד של גיליון הציונים ולחץ הוספהת המתן עד שהציונים יופיעו בטבלה - - - -HELP5 -שנה ושחק עם הציונים כדי לראות את הממוצע משתנה - - - -HELP6 -טיפ: רוצה לשנות את תקופת הזמן? לחץ על נקה, ולאחר מכן שנה את תקופת הזמן ולחץ על הוספה שוב! :-) - - - - + MainScreen + + + JCE Avg Calculator + JCE Avg Calculator + + + + + Login + כניסה + + + + Keep login + שמור פרטים + + + + Username + שם משתמש + + + + Password + סיסמה + + + + GPA + גליון ציונים + + + + <html><head/><body><p><span style=" font-weight:600;">Get your grades</span></p></body></html> + <html><head/><body><p><span style=" font-weight:600;">ציונים הצג</span></p></body></html> + + + + Add + הוסף + + + + <html><head/><body><p><span style=" font-weight:600;">Clear table</span></p></body></html> + <html><head/><body><p><span style=" font-weight:600;">טבלה נקהe</span></p></body></html> + + + + Clear + נקה + + + + Average: + ממוצע: + + + + Only Main Courses + הצג קורסים משמעותיים בלבד + + + + From + <b>מסמסטר</b> + + + + + Year: + שנה: + + + + Semester: + סמסטר: + + + + To + <b>עד סמסטר</b> + + + + Semester + סמסטר + + + + Calendar + מערכת שעות + + + + Get Calendar + הצג מערכת + + + + Export to CSV + CSV ייצא אל קובץ + + + + &File + &קובץ + + + + Language + שפה + + + + Credits + קרדיט + + + + Exit + יציאה + + + + Hebrew + עברית + + + + English + English + + + + OS Default + ברירת מחדל + + + + How To + עזרה + + + + Connecting + מתחבר + + + + Connected + מחובר + + + + Disconnected + מנותק + + + + &Login + &התחברות + + + + &Logout + &התנתקות + + + + + + Error + שגיאה + + + + + Not Connected + לא מחובר + + + + Missmatching data + שגיאה בהכנסת נתונים + + + + CREDITS-ROOL-UP1 + + + + + CREDITS-ROOL-UP2 + + + + + CREDITS-ROOL-UP3 + + + + + CREDITS-ROOL-UP4 + + + + + DevBy + פותח על ידי + + + + Liran + לירן בן גידה + + + + Sagi + שגיא דיין + + + + HELP1 + + + + + HELP2 + + + + + HELP3 + + + + + HELP4 + + + + + HELP5 + + + + + HELP6 + + + + + + Settings + הגדרות + + + + + + Your settings will take effect next time you start the program + ההגדרות שלך ייכנסו לתוקפן בפעם הבאה שתפעיל את התוכנה + + + + QObject + + + Exported Successfuly! + הייצוא הושלם! + + + + <center>Something went wrong...<br></center>Maybe: <ul><li>You Canceled</li><li>Unable to save the File - try again</li></ul><br><br><b><center>In case of a serious problem, please file a bug report.<br>thank you. OpenJCE teem + + + + + Code + קוד קורס + + + + Name + שם קורס + + + + Type + סוג + + + + Points + נק' זכות + + + + Hours + שעות + + + + Grade + ציון + + + + Additions + תוספת + + + + Please Check Your Username & Password + אנא בדוק את שם המשתמש והסיסמה שלך + + + + You have been blocked by JCE, please try in a couple of minutes. + נחסמת ע"י האתר, אנא נסה מאוחר יותר. + + + + Please Check Your Internet Connection. + בדוק את החיבור שלך לאינטרנט. + + + + Receive Request Timeout. + בקשת קבלה נכשלה. + + + + Send Request Timeout. + בקשת שליחה נכשלה. + + + + +If this message appear without reason, please contact me at liranbg@gmail.com + +אם הודעה זו חוזרת על עצמה ללא סיבה. אנא פנה אל המפתח במייל liranbg@gmail.com + + + + Error + שגיאה + + + + Sunday + ראשון + + + + Monday + שני + + + + Tuesday + שלישי + + + + Wednesday + רביעי + + + + Thursday + חמישי + + + + Friday + שישי + diff --git a/main/CalendarTab/CalendarManager.cpp b/main/CalendarTab/CalendarManager.cpp index 4f41dbf..07b0501 100644 --- a/main/CalendarTab/CalendarManager.cpp +++ b/main/CalendarTab/CalendarManager.cpp @@ -14,14 +14,14 @@ void CalendarManager::exportCalendarCSV() if(CSV_Exporter::exportCalendar(this->caliSchedPtr)) { QMessageBox msgBox; - msgBox.setText("
Exported Successfuly!
HaazZaA!!"); + msgBox.setText(QObject::tr("Exported Successfuly!")); msgBox.exec(); }else { QMessageBox msgBox; msgBox.setIcon(QMessageBox::Critical); - msgBox.setText("
Something went wrong...
Maybe:
  • You Canceled
  • Unable to save the File - try again


" - "
In case of a serious problem, please file a bug report.
thank you. OpenJCE teem"); + msgBox.setText(QObject::tr("
Something went wrong...
Maybe:
  • You Canceled
  • Unable to save the File - try again


" + "
In case of a serious problem, please file a bug report.
thank you. OpenJCE teem")); msgBox.exec(); } diff --git a/main/LoginTab/loginhandler.cpp b/main/LoginTab/loginhandler.cpp index b0b2334..57b172e 100644 --- a/main/LoginTab/loginhandler.cpp +++ b/main/LoginTab/loginhandler.cpp @@ -6,7 +6,6 @@ loginHandler::loginHandler(user *ptr): logggedInFlag(false) } void loginHandler::setPointers(QLabel *statusLabelPtr,QLineEdit *pswdEditPtr,QLineEdit *usrnmEditPtr) { - this->statusLabelPtr = statusLabelPtr; this->pswdEditPtr = pswdEditPtr; this->usrnmEditPtr = usrnmEditPtr; @@ -34,7 +33,7 @@ bool loginHandler::makeConnection() } case jceLogin::ERROR_ON_VALIDATION: { - popMessage("Please Check Your Username & Password",false); + popMessage(QObject::tr("Please Check Your Username & Password"),false); usrnmEditPtr->setDisabled(false); pswdEditPtr->setDisabled(false); @@ -45,13 +44,13 @@ bool loginHandler::makeConnection() } case jceLogin::ERROR_ON_VALIDATION_USER_BLOCKED: { - popMessage("You have been blocked by JCE, please try in a couple of minutes."); + popMessage(QObject::tr("You have been blocked by JCE, please try in a couple of minutes.")); jceLog->closeAll(); return false; } case jceLogin::ERROR_ON_OPEN_SOCKET: { - popMessage("Please Check Your Internet Connection."); + popMessage(QObject::tr("Please Check Your Internet Connection.")); jceLog->closeAll(); return false; } @@ -65,14 +64,14 @@ bool loginHandler::makeConnection() } case jceLogin::ERROR_ON_GETTING_INFO: { - popMessage("Recieve Request Time Out."); + popMessage(QObject::tr("Receive Request Timeout.")); jceLog->closeAll(); return false; break; } case jceLogin::ERROR_ON_SEND_REQUEST: { - popMessage("Send Request Time Out."); + popMessage(QObject::tr("Send Request Timeout.")); jceLog->closeAll(); return false; break; @@ -132,10 +131,10 @@ int loginHandler::makeCalendarRequest(int year, int semester) void loginHandler::popMessage(QString message,bool addInfo) { if (addInfo) - message.append("\nIf this message appear without reason, please contact me at liranbg@gmail.com"); + message.append(QObject::tr("\nIf this message appear without reason, please contact me at liranbg@gmail.com")); QMessageBox msgBox; - msgBox.setWindowTitle("Error"); + msgBox.setWindowTitle(QObject::tr("Error")); msgBox.setText(message); msgBox.exec(); msgBox.setFocus(); diff --git a/main/LoginTab/loginhandler.h b/main/LoginTab/loginhandler.h index 5576883..b855dad 100644 --- a/main/LoginTab/loginhandler.h +++ b/main/LoginTab/loginhandler.h @@ -1,5 +1,6 @@ #ifndef LOGINHANDLER_H #define LOGINHANDLER_H +#include #include #include #include diff --git a/main/mainscreen.cpp b/main/mainscreen.cpp index d3bead1..8d9fb36 100644 --- a/main/mainscreen.cpp +++ b/main/mainscreen.cpp @@ -116,7 +116,7 @@ void MainScreen::uiSetDisconnectMode() ui->pswdLineEdit->setEnabled(true); loginHandel->makeDisconnectionRequest(); - ui->loginButton->setText("&Login"); + ui->loginButton->setText(tr("&Login")); ui->getCalendarBtn->setDisabled(true); ui->exportToCVSBtn->setDisabled(true); ui->ratesButton->setDisabled(true); @@ -164,7 +164,7 @@ void MainScreen::uiSetConnectMode() if (loginHandel->makeConnection() == true) { setLabelConnectionStatus(jceLogin::jceStatus::JCE_YOU_ARE_IN); - ui->loginButton->setText("&Logout"); + ui->loginButton->setText(tr("&Logout")); ui->ratesButton->setEnabled(true); ui->CoursesTab->setEnabled(true); ui->exportToCVSBtn->setEnabled(true); @@ -245,7 +245,7 @@ void MainScreen::on_coursesTable_itemChanged(QTableWidgetItem *item) if (this->courseTableMgr->changes(item->text(),item->row(),item->column())) ui->avgLCD->display(courseTableMgr->getAvg()); else - QMessageBox::critical(this,"Error","Missmatching data"); + QMessageBox::critical(this,tr("Error"),tr("Missmatching data")); } void MainScreen::on_clearTableButton_clicked() { @@ -319,7 +319,7 @@ void MainScreen::on_actionHebrew_triggered() ui->actionOS_Default->setChecked(false); qDebug() << "Changed Language to hebrew"; data->setLocal("he"); - QMessageBox::information(this,"Settings","will be valid next time you will run the application",QMessageBox::Ok); + QMessageBox::information(this,tr("Settings"),tr("Your settings will take effect next time you start the program"),QMessageBox::Ok); } else ui->actionHebrew->setChecked(true); @@ -333,7 +333,7 @@ void MainScreen::on_actionEnglish_triggered() ui->actionOS_Default->setChecked(false); qDebug() << "Changed Language to English"; data->setLocal("en"); - QMessageBox::information(this,"Settings","Your settings will take effect next time you start the program",QMessageBox::Ok); + QMessageBox::information(this,"Settings",tr("Your settings will take effect next time you start the program"),QMessageBox::Ok); } else ui->actionEnglish->setChecked(true); @@ -348,7 +348,7 @@ void MainScreen::on_actionOS_Default_triggered() ui->actionEnglish->setChecked(false); qDebug() << "Changed Language to OS Default"; data->setLocal("default"); - QMessageBox::information(this,"Settings","Your settings will take effect next time you start the program",QMessageBox::Ok); + QMessageBox::information(this,tr("Settings"),tr("Your settings will take effect next time you start the program"),QMessageBox::Ok); } else ui->actionOS_Default->setChecked(true); diff --git a/main/mainscreen.ui b/main/mainscreen.ui index 4c846fd..201f57c 100644 --- a/main/mainscreen.ui +++ b/main/mainscreen.ui @@ -61,7 +61,7 @@ background: qlineargradient(spread:pad, x1:0.496, y1:0, x2:0.508, y2:1, stop:0 r QTabWidget::Rounded - 0 + 2 false @@ -639,7 +639,7 @@ font-size: 15px; - &About + &File @@ -712,10 +712,23 @@ font-size: 15px; + usrnmLineEdit + pswdLineEdit + keepLogin loginButton + tabWidget + checkBoxCoursesInfluence + spinBoxCoursesFromYear + spinBoxCoursesFromSemester + spinBoxCoursesToYear + spinBoxCoursesToSemester ratesButton - clearTableButton coursesTable + spinBoxYear + spinBoxSemester + getCalendarBtn + clearTableButton + exportToCVSBtn diff --git a/src/jceData/page.cpp b/src/jceData/page.cpp index 22eb533..2827500 100644 --- a/src/jceData/page.cpp +++ b/src/jceData/page.cpp @@ -27,26 +27,6 @@ int Page::runToActualText(std::string& from, int index) } index++; } -// while(index < (int)from.length()) -// { -// if(from[index] == '<') -// { -// index++; -// if(from[index] == '!') -// { -// //!--FileName -// std::string bodyTag = from.substr(index, 11); //!--FileName - -// if(bodyTag == "!--FileName") //check if the tag is body tag -// { -// while(from[index] != '>') -// index++; -// return index; -// } -// } -// } -// index++; -//} return -1; }