diff --git a/jceGrade.pro b/jceGrade.pro index b03a0f8..9e068ba 100644 --- a/jceGrade.pro +++ b/jceGrade.pro @@ -41,7 +41,8 @@ HEADERS += main/coursestablemanager.h \ src/data/savedata.h \ - +TRANSLATIONS = jce_en.ts \ + jce_he.ts FORMS += \ main/mainscreen.ui diff --git a/jce_en.qm b/jce_en.qm new file mode 100644 index 0000000..fed56a9 Binary files /dev/null and b/jce_en.qm differ diff --git a/jce_en.ts b/jce_en.ts new file mode 100644 index 0000000..4db1d16 --- /dev/null +++ b/jce_en.ts @@ -0,0 +1,253 @@ + + + + + MainScreen + + + JCE Avg Calculator + JCE Manager + + + + + Login + Login + + + + Keep login + Keep login + + + <color=#000000>Username + Usernameasdfasdg + + + + + Username + Username + + + + Password + Password + + + + Courses + Grade Table + + + + <html><head/><body><p><span style=" font-weight:600;">Get your grades</span></p></body></html> + Get Your Grades + + + + Add + Add + + + + <html><head/><body><p><span style=" font-weight:600;">Clear table</span></p></body></html> + Clear Table + + + + Clear + Clear + + + + Average: + Average: + + + + Settings + Sattings + + + + Semester + Senester + + + + Year + Year + + + + From + From + + + + To + To + + + + Only influence Courses + Only influence Courses + + + + &About + &About + + + + Credits + Credits + + + + Exit + Exit + + + + How-To + How-To + + + + 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! :-) + + + + + + diff --git a/jce_he.qm b/jce_he.qm new file mode 100644 index 0000000..e0f821f Binary files /dev/null and b/jce_he.qm differ diff --git a/jce_he.ts b/jce_he.ts new file mode 100644 index 0000000..e28c3bd --- /dev/null +++ b/jce_he.ts @@ -0,0 +1,262 @@ + + + + +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 +טיפ: רוצה לשנות את תקופת הזמן? לחץ על נקה, ולאחר מכן שנה את תקופת הזמן ולחץ על הוספה שוב! :-) + + + + + + diff --git a/main/coursestablemanager.cpp b/main/coursestablemanager.cpp index db6991c..74e2e29 100644 --- a/main/coursestablemanager.cpp +++ b/main/coursestablemanager.cpp @@ -12,13 +12,12 @@ coursesTableManager::coursesTableManager(QTableWidget *ptr, user *usrPtr) courseTBL->setRowCount(0); courseTBL->setColumnCount(COURSE_FIELDS); QStringList mz; - mz << "Serial" << "Name" << "Type" << "Points" << "Hours" << "Grade" << "Additions"; + mz << QObject::tr("Code") << QObject::tr("Name") << QObject::tr("Type") << QObject::tr("Points") << QObject::tr("Hours") << QObject::tr("Grade") << QObject::tr("Additions"); courseTBL->setHorizontalHeaderLabels(mz); courseTBL->verticalHeader()->setVisible(true); courseTBL->setSelectionMode(QAbstractItemView::SingleSelection); courseTBL->setShowGrid(true); courseTBL->setStyleSheet("QTableView {selection-background-color: red;}"); - } coursesTableManager::~coursesTableManager() diff --git a/main/main.cpp b/main/main.cpp index db7f78f..96f4be6 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1,9 +1,15 @@ #include "mainscreen.h" #include +#include +#include int main(int argc, char *argv[]) { QApplication a(argc, argv); + QTranslator translator; + QString locale = QLocale::system().name(); + translator.load("jce_"+locale , a.applicationDirPath()); + a.installTranslator(&translator); MainScreen w; w.show(); diff --git a/main/mainscreen.cpp b/main/mainscreen.cpp index eab8cd3..20cd284 100644 --- a/main/mainscreen.cpp +++ b/main/mainscreen.cpp @@ -8,6 +8,7 @@ MainScreen::MainScreen(QWidget *parent) :QMainWindow(parent), ui(new Ui::MainScr this->setFixedSize(this->size()); //main not resizeable + //Login Tab ui->pswdLineEdit->setEchoMode((QLineEdit::Password)); @@ -228,15 +229,15 @@ void MainScreen::setLabelConnectionStatus(jceLogin::jceStatus statusDescription) case jceLogin::jceStatus::JCE_START_VALIDATING_PROGRESS: iconPix.load(":/icons/blueStatusIcon.png"); - statusLabel->setText("Connecting"); + statusLabel->setText(tr("Connecting")); break; case jceLogin::jceStatus::JCE_YOU_ARE_IN: iconPix.load(":/icons/greenStatusIcon.png"); - statusLabel->setText("Connected"); + statusLabel->setText(tr("Connected")); break; default: iconPix.load(":/icons/redStatusIcon.png"); - statusLabel->setText("Disconnected"); + statusLabel->setText(tr("Disconnected")); break; } ButtomStatusLabel->setPixmap(iconPix); @@ -245,19 +246,19 @@ void MainScreen::setLabelConnectionStatus(jceLogin::jceStatus statusDescription) } void MainScreen::on_actionCredits_triggered() { - QMessageBox::about(this, "About", "A tiny Application to calculate your grades average. v1.0

" - "This software is licensed under Qt5's
GNU LESSER GENERAL PUBLIC LICENSE V2
" - "The source code is available at github:
" + QMessageBox::about(this, "About", tr("CREDITS-ROOL-UP1") + " v1.0

" + + tr("CREDITS-ROOL-UP2")+"
GNU LESSER GENERAL PUBLIC LICENSE V2
" + + tr("CREDITS-ROOL-UP3")+"
" "jceAverageCalculator Repository" - "

This front end is Powered by Jce Connection

" - "Developed by: " + "

"+tr("CREDITS-ROOL-UP4")+" Jce Connection

" + +tr("DevBy")+":" "" - "Thanks to: " + +tr("Tnks")+ "... :" ""); } @@ -275,22 +276,13 @@ void MainScreen::on_actionHow_To_triggered() QMessageBox::information(this,"How To", "How To.." "
    " - "
  • Insert your username and password correctly
  • " - "
  • Login and wait for the ball in the status (buttom) bar to become Green
  • " - "
  • Check Settings to select your date Interval
  • " - "
  • Press Courses tab and then press Add button and wait until courses will be loaded into the table
  • " - "
  • Change the once of the grade cell and see your average is changing.
  • " - "

    Tip: Need to change Date interval? in Courses tab click Clean, then change the date interval then hit Add again! :-)" - "
" - "

הסבר" - "
    " - "
  • הכנס את שם המשתמש והסיסמה שלך כנדרש
  • " - "
  • לחץ התחבר והמתן מספר שניות עד להופעת כדור ירוק בתחתית המסך
  • " - "
  • בדוק הגדרות כדי לבדוק את תקופת הזמן אותם תרצה להציג
  • " - "
  • לחץ על Courses ולאחר מכן על כפתור Add והמתן מספר שניות עד להופעת הקורסים בטבלה
  • " - "
  • כעת ניתן לשנות ערכים בתא הציונים ולראות את ממוצע הציונים בהתאם
  • " - "

    טיפ: רוצה לשנות את תקופת הזמן? לחץ על Clean , ולאחר מכן שנה את תקופת הזמן ולחץ על Add שוב! :-)" - "
"); + "
  • "+tr("HELP1")+"
  • " + "
  • "+tr("HELP2")+"
  • " + "
  • "+tr("HELP3")+"
  • " + "
  • "+tr("HELP4")+"
  • " + "
  • "+tr("HELP5")+"
  • " + "

    "+tr("HELP6")+ + ""); } diff --git a/main/mainscreen.ui b/main/mainscreen.ui index 04cc955..2f62dd3 100644 --- a/main/mainscreen.ui +++ b/main/mainscreen.ui @@ -231,7 +231,7 @@ font-size: 15px; - <color=#000000>Username + Username Qt::RichText