diff --git a/README.md b/README.md index a1a63678..fdff3b06 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ After logging in, use [localhost admin](https://127.0.0.1:8080/admin) to modify In case you want to enable the mail system: 1. Insert your mail details in the configuration file. -2. Delete the `DISABLE_MAIL` line. +2. Change the `DISABLE_MAIL` line value to False. ## Code modification check list diff --git a/lms/lmsdb/models.py b/lms/lmsdb/models.py index 35c111d1..f311296c 100644 --- a/lms/lmsdb/models.py +++ b/lms/lmsdb/models.py @@ -733,7 +733,7 @@ def get_by_exercise(cls, exercise: Exercise): class ExerciseTestName(BaseModel): FATAL_TEST_NAME = 'fatal_test_failure' - FATAL_TEST_PRETTY_TEST_NAME = _('כישלון חמור') + FATAL_TEST_PRETTY_TEST_NAME = _('Fatal error') exercise_test = ForeignKeyField(model=ExerciseTest) test_name = TextField() diff --git a/lms/lmstests/public/identical_tests/services.py b/lms/lmstests/public/identical_tests/services.py index 5694d461..5116bcb1 100644 --- a/lms/lmstests/public/identical_tests/services.py +++ b/lms/lmstests/public/identical_tests/services.py @@ -101,7 +101,7 @@ def _clone_solution_comments( user=to_solution.solver, related_id=to_solution, message=_( - 'הפתרון שלך לתרגיל %(subject)s נבדק.', + 'Your solution for the %(subject)s exercise has been checked.', subject=to_solution.exercise.subject, ), action_url=f'{routes.SOLUTIONS}/{to_solution.id}', diff --git a/lms/lmstests/public/linters/services.py b/lms/lmstests/public/linters/services.py index 5023ca4a..05e94e6b 100644 --- a/lms/lmstests/public/linters/services.py +++ b/lms/lmstests/public/linters/services.py @@ -93,7 +93,8 @@ def _fire_notification_if_needed(self): errors_len = len(self._errors) exercise_name = self.solution.exercise.subject msg = _( - 'הבודק האוטומטי נתן %(errors_num)d הערות על תרגילך %(name)s.', + 'The automatic checker gave you %(errors_num)d for your ' + '%(name)s solution.', errors_num=errors_len, name=exercise_name, ) return notifications.send( diff --git a/lms/lmstests/public/unittests/services.py b/lms/lmstests/public/unittests/services.py index aae881e0..e62a6eb3 100644 --- a/lms/lmstests/public/unittests/services.py +++ b/lms/lmstests/public/unittests/services.py @@ -13,7 +13,7 @@ NumberOfErrors = int -CANT_EXECUTE_CODE_MESSAGE = _('הבודק האוטומטי לא הצליח להריץ את הקוד שלך.') +CANT_EXECUTE_CODE_MESSAGE = _("The automatic checker couldn't run your code.") class UnitTestChecker: @@ -118,7 +118,8 @@ def _populate_junit_results(self, raw_results: bytes) -> None: return None fail_message = _( - 'הבודק האוטומטי נכשל ב־ %(number)d דוגמאות בתרגיל "%(subject)s".', + 'The automatic checker failed in %(number)d examples in your ' + '"%(subject)s" solution.', number=number_of_failures, subject=self._solution.exercise.subject, ) @@ -138,7 +139,7 @@ def _handle_failed_to_execute_tests(self, raw_results: bytes) -> None: solution=self._solution, test_name=models.ExerciseTestName.FATAL_TEST_NAME, user_message=fail_user_message, - staff_message=_('אחי, בדקת את הקוד שלך?'), + staff_message=_('Bro, did you check your code?'), ) notifications.send( kind=notifications.NotificationKind.UNITTEST_ERROR, diff --git a/lms/lmstests/sandbox/linters/base.py b/lms/lmstests/sandbox/linters/base.py index 1c04bdae..9823c5ef 100644 --- a/lms/lmstests/sandbox/linters/base.py +++ b/lms/lmstests/sandbox/linters/base.py @@ -13,7 +13,7 @@ class LinterError(typing.NamedTuple): solution_file_id: str -CANT_EXECUTE_CODE_MESSAGE = _('הבודק האוטומטי לא הצליח להריץ את הקוד שלך.') +CANT_EXECUTE_CODE_MESSAGE = _("The automatic checker couldn't run your code.") class BaseLinter: diff --git a/lms/lmsweb/config.py.example b/lms/lmsweb/config.py.example index 2cf5aa90..c3bb4b0c 100644 --- a/lms/lmsweb/config.py.example +++ b/lms/lmsweb/config.py.example @@ -22,7 +22,7 @@ MAIL_USE_TLS = False MAIL_USERNAME = 'username@gmail.com' MAIL_PASSWORD = 'password' MAIL_DEFAULT_SENDER = 'username@gmail.com' -DISABLE_MAIL = True # On production, delete this line! +DISABLE_MAIL = True # On production, change this value to False! # ADMIN PANEL FLASK_ADMIN_FLUID_LAYOUT = True diff --git a/lms/lmsweb/forms/change_password.py b/lms/lmsweb/forms/change_password.py index 7ded2800..8ccf23b7 100644 --- a/lms/lmsweb/forms/change_password.py +++ b/lms/lmsweb/forms/change_password.py @@ -17,7 +17,7 @@ class ChangePasswordForm(FlaskForm): confirm = PasswordField( 'Password Confirmation', validators=[ InputRequired(), - EqualTo('password', message=_('הסיסמאות שהוקלדו אינן זהות')), + EqualTo('password', message=_('The passwords are not identical')), ], ) @@ -27,7 +27,9 @@ def __init__(self, user, *args, **kwargs): def validate_current_password(self, field): if session['_invalid_password_tries'] >= MAX_INVALID_PASSWORD_TRIES: - raise ValidationError(_('הזנת סיסמה שגויה מספר רב מדי של פעמים')) + raise ValidationError( + _('Invalid old password has been inserted too many times'), + ) if not self.user.is_password_valid(field.data): session['_invalid_password_tries'] += 1 - raise ValidationError(_('הסיסמה הנוכחית שהוזנה שגויה')) + raise ValidationError(_('Invalid current password')) diff --git a/lms/lmsweb/forms/register.py b/lms/lmsweb/forms/register.py index 5e7eb526..5298783b 100644 --- a/lms/lmsweb/forms/register.py +++ b/lms/lmsweb/forms/register.py @@ -11,7 +11,7 @@ class RegisterForm(FlaskForm): email = StringField( 'Email', validators=[ - InputRequired(), Email(message=_('אימייל לא תקין')), + InputRequired(), Email(message=_('Invalid email')), UniqueEmailRequired, ], ) @@ -29,6 +29,6 @@ class RegisterForm(FlaskForm): confirm = PasswordField( 'Password Confirmation', validators=[ InputRequired(), - EqualTo('password', message=_('הסיסמאות שהוקלדו אינן זהות')), + EqualTo('password', message=_('The passwords are not identical')), ], ) diff --git a/lms/lmsweb/forms/reset_password.py b/lms/lmsweb/forms/reset_password.py index 49bc9afe..1785eaa8 100644 --- a/lms/lmsweb/forms/reset_password.py +++ b/lms/lmsweb/forms/reset_password.py @@ -9,7 +9,7 @@ class ResetPassForm(FlaskForm): email = StringField( 'Email', validators=[ - InputRequired(), Email(message=_('אימייל לא תקין')), + InputRequired(), Email(message=_('Invalid email')), EmailNotExists, ], ) @@ -22,6 +22,6 @@ class RecoverPassForm(FlaskForm): confirm = PasswordField( 'Password Confirmation', validators=[ InputRequired(), - EqualTo('password', message=_('הסיסמאות שהוקלדו אינן זהות')), + EqualTo('password', message=_('The passwords are not identical')), ], ) diff --git a/lms/lmsweb/tools/validators.py b/lms/lmsweb/tools/validators.py index 580c68d9..0b73d3ce 100644 --- a/lms/lmsweb/tools/validators.py +++ b/lms/lmsweb/tools/validators.py @@ -10,7 +10,7 @@ def UniqueUsernameRequired( ) -> None: username_exists = User.get_or_none(User.username == field.data) if username_exists: - raise ValidationError(_('שם המשתמש כבר נמצא בשימוש')) + raise ValidationError(_('The username is already in use')) def UniqueEmailRequired( @@ -18,7 +18,7 @@ def UniqueEmailRequired( ) -> None: email_exists = User.get_or_none(User.mail_address == field.data) if email_exists: - raise ValidationError(_('האימייל כבר נמצא בשימוש')) + raise ValidationError(_('The email is already in use')) def EmailNotExists( @@ -26,4 +26,4 @@ def EmailNotExists( ) -> None: email_exists = User.get_or_none(User.mail_address == field.data) if not email_exists: - raise ValidationError(_('האימייל לא רשום במערכת')) + raise ValidationError(_('Invalid email')) diff --git a/lms/lmsweb/translations/en/LC_MESSAGES/messages.po b/lms/lmsweb/translations/en/LC_MESSAGES/messages.po deleted file mode 100644 index 81b6ee74..00000000 --- a/lms/lmsweb/translations/en/LC_MESSAGES/messages.po +++ /dev/null @@ -1,538 +0,0 @@ -# English translations for . -# Copyright (C) 2020 ORGANIZATION -# This file is distributed under the same license as the project. -# FIRST AUTHOR , 2020. -# -msgid "" -msgstr "" -"Project-Id-Version: lmsweb-1.0\n" -"Report-Msgid-Bugs-To: bugs@mesicka.com\n" -"POT-Creation-Date: 2021-09-15 18:29+0300\n" -"PO-Revision-Date: 2020-09-16 18:29+0300\n" -"Last-Translator: Or Ronai\n" -"Language: en\n" -"Language-Team: en\n" -"Plural-Forms: nplurals=2; plural=(n != 1)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.9.1\n" - -#: lmsdb/models.py:703 -msgid "כישלון חמור" -msgstr "Fatal error" - -#: lmstests/public/identical_tests/services.py:104 -#, python-format -msgid "הפתרון שלך לתרגיל %(subject)s נבדק." -msgstr "Your solution for the %(subject)s exercise has been checked." - -#: lmstests/public/linters/services.py:99 -#, python-format -msgid "הבודק האוטומטי נתן %(errors_num)d הערות על תרגילך %(name)s." -msgstr "The automatic checker gave you %(errors_num)d for your %(name)s solution." - -#: lmstests/public/unittests/services.py:96 -#, python-format -msgid "הבודק האוטומטי נכשל ב־ %(number)d דוגמאות בתרגיל \"%(subject)s\"." -msgstr "The automatic checker failed in %(number)d examples in your \"%(subject)s\" solution." - -#: lmstests/public/unittests/services.py:112 -msgid "הבודק האוטומטי לא הצליח להריץ את הקוד שלך." -msgstr "The automatic checker couldn't run your code." - -#: lmstests/public/unittests/services.py:119 -msgid "אחי, בדקת את הקוד שלך?" -msgstr "Bro, did you check your code?" - -#: lmsweb/views.py:131 -msgid "לא ניתן להירשם כעת" -msgstr "Can not register now" - -#: lmsweb/views.py:152 -msgid "ההרשמה בוצעה בהצלחה" -msgstr "Registration successfully" - -#: lmsweb/views.py:175 -msgid "קישור האימות פג תוקף, קישור חדש נשלח אל תיבת המייל שלך" -msgstr "The confirmation link is expired, new link has been sent to your email" - -#: lmsweb/views.py:188 -#, fuzzy -msgid "המשתמש שלך אומת בהצלחה, כעת אתה יכול להתחבר למערכת" -msgstr "Your user has been successfully confirmed, you can now login" - -#: lmsweb/views.py:213 lmsweb/views.py:273 -#, fuzzy -msgid "הסיסמה שלך שונתה בהצלחה" -msgstr "Your password has successfully changed" - -#: lmsweb/views.py:229 -msgid "קישור לאיפוס הסיסמה נשלח בהצלחה" -msgstr "Password reset link has successfully sent" - -#: lmsweb/views.py:250 -msgid "קישור איפוס הסיסמה פג תוקף" -msgstr "Reset password link is expired" - -#: lmsweb/forms/change_password.py:20 lmsweb/forms/register.py:32 -#: lmsweb/forms/reset_password.py:25 -msgid "הסיסמאות שהוקלדו אינן זהות" -msgstr "The passwords are not identical" - -#: lmsweb/forms/change_password.py:30 -msgid "הזנת סיסמה שגויה מספר רב מדי של פעמים" -msgstr "Invalid old password has been inserted too many times" - -#: lmsweb/forms/change_password.py:33 -msgid "הסיסמה הנוכחית שהוזנה שגויה" -msgstr "Invalid current password" - -#: lmsweb/forms/register.py:14 lmsweb/forms/reset_password.py:12 -msgid "אימייל לא תקין" -msgstr "Invalid email" - -#: lmsweb/tools/registration.py:109 -msgid "מערכת הגשת התרגילים" -msgstr "Exercise submission system" - -#: lmsweb/tools/validators.py:13 -msgid "שם המשתמש כבר נמצא בשימוש" -msgstr "The username already in use" - -#: lmsweb/tools/validators.py:21 -msgid "האימייל כבר נמצא בשימוש" -msgstr "The email already in use" - -#: lmsweb/tools/validators.py:29 -#, fuzzy -msgid "האימייל לא רשום במערכת" -msgstr "Invalid email" - -#: models/solutions.py:50 -#, python-format -msgid "%(solver)s הגיב לך על בדיקת תרגיל \"%(subject)s\"." -msgstr "%(solver)s has replied for your \"%(subject)s\" check." - -#: models/solutions.py:57 -#, python-format -msgid "%(checker)s הגיב לך על תרגיל \"%(subject)s\"." -msgstr "%(checker)s replied for \"%(subject)s\"." - -#: models/solutions.py:69 -#, python-format -msgid "הפתרון שלך לתרגיל \"%(subject)s\" נבדק." -msgstr "Your solution for the \"%(subject)s\" exercise has been checked." - -#: models/users.py:28 -#, fuzzy -msgid "שם המשתמש או הסיסמה שהוזנו לא תקינים" -msgstr "Invalid username or password" - -#: models/users.py:30 -#, fuzzy -msgid "עליך לאשר את מייל האימות" -msgstr "You have to confirm your registration with the link sent to your email" - -#: templates/banned.html:8 templates/login.html:7 -#: templates/recover-password.html:8 templates/reset-password.html:8 -#: templates/signup.html:8 -msgid "תמונת הפרופיל של קורס פייתון" -msgstr "Profile picture of the Python Course" - -#: templates/banned.html:12 -msgid "המשתמש שלך הושעה על ידי מנהל המערכת." -msgstr "Your account has been suspended by the manager." - -#: templates/banned.html:13 -msgid "לפרטים נוספים אנא פנה אל צוות הניהול." -msgstr "For more details please contact the management team." - -#: templates/base.html:6 -msgid "מערכת הגשת תרגילים לקורס פייתון" -msgstr "Exercise submission system for the Python Course" - -#: templates/change-password.html:8 -#, fuzzy -msgid "שינוי סיסמה" -msgstr "Change Password" - -#: templates/change-password.html:10 -#, fuzzy -msgid "הזינו סיסמה ישנה וסיסמה חדשה לצורך שינוי הסיסמה:" -msgstr "Insert current password and new password for changing it:" - -#: templates/change-password.html:13 -msgid "סיסמה נוכחית" -msgstr "Current password" - -#: templates/change-password.html:14 templates/recover-password.html:14 -#, fuzzy -msgid "סיסמה חדשה" -msgstr "Password" - -#: templates/change-password.html:15 templates/recover-password.html:15 -#, fuzzy -msgid "אימות סיסמה חדשה" -msgstr "Password Confirmation" - -#: templates/change-password.html:18 templates/user.html:19 -#, fuzzy -msgid "שנה סיסמה" -msgstr "Change Password" - -#: templates/exercises.html:8 -msgid "תרגילים" -msgstr "Exercises" - -#: templates/exercises.html:21 templates/view.html:101 -msgid "הערות על התרגיל" -msgstr "Comments for the solution" - -#: templates/exercises.html:30 -msgid "שלח" -msgstr "Send" - -#: templates/exercises.html:32 -msgid "הצצה" -msgstr "View" - -#: templates/exercises.html:34 -msgid "לבדיקה" -msgstr "Check" - -#: templates/exercises.html:53 -msgid "לכל התרגילים" -msgstr "All Exercises" - -#: templates/login.html:8 -msgid "התחברות" -msgstr "Login" - -#: templates/login.html:10 templates/signup.html:11 -msgid "ברוכים הבאים למערכת התרגילים!" -msgstr "Welcome to the exercise system!" - -#: templates/login.html:11 -msgid "הזינו את שם המשתמש והסיסמה שלכם:" -msgstr "Insert your username and password:" - -#: templates/login.html:22 templates/login.html:24 templates/signup.html:16 -msgid "שם משתמש" -msgstr "Username" - -#: templates/login.html:28 templates/login.html:30 templates/signup.html:18 -msgid "סיסמה" -msgstr "Password" - -#: templates/login.html:35 -msgid "התחבר" -msgstr "Login" - -#: templates/login.html:36 -msgid "שכחת את הסיסמה?" -msgstr "Forgot your password?" - -#: templates/login.html:40 templates/signup.html:22 -msgid "הירשם" -msgstr "Register" - -#: templates/navbar.html:8 -msgid "הלוגו של פרויקט לומדים פייתון: נחש צהוב על רקע עיגול בצבע תכלת, ומתחתיו כתוב - לומדים פייתון." -msgstr "The logo of the Learning Python project: yellow snake on light blue circle background and behind of it written - Learning Python" - -#: templates/navbar.html:15 -msgid "הודעות" -msgstr "Messages" - -#: templates/navbar.html:36 -msgid "סמן הכל כנקרא" -msgstr "Mark all as read" - -#: templates/navbar.html:43 -msgid "העלאת תרגילים" -msgstr "Upload Exercises" - -#: templates/navbar.html:50 -msgid "רשימת התרגילים" -msgstr "Exercises List" - -#: templates/navbar.html:58 -msgid "ארכיון התרגילים" -msgstr "Exercises Archive" - -#: templates/navbar.html:65 -msgid "המשתמש שלי" -msgstr "My User" - -#: templates/navbar.html:80 -msgid "בדוק תרגילים" -msgstr "Check Exercises" - -#: templates/navbar.html:87 -msgid "התנתקות" -msgstr "Logout" - -#: templates/recover-password.html:9 templates/reset-password.html:9 -#, fuzzy -msgid "איפוס סיסמה" -msgstr "Reset Password" - -#: templates/recover-password.html:11 -#, fuzzy -msgid "הזינו סיסמה לצורך שינוי הסיסמה:" -msgstr "Insert password for changing it:" - -#: templates/recover-password.html:18 -#, fuzzy -msgid "אפס סיסמה" -msgstr "Reset Password" - -#: templates/reset-password.html:11 -#, fuzzy -msgid "הזינו אימייל לצורך שליחת קישור לאיפוס הסיסמה:" -msgstr "Insert your email for getting link to reset it:" - -#: templates/reset-password.html:14 templates/signup.html:15 -msgid "כתובת אימייל" -msgstr "Email Address" - -#: templates/reset-password.html:15 -msgid "שלח מייל איפוס סיסמה" -msgstr "Send Reset Password Link" - -#: templates/reset-password.html:18 templates/signup.html:25 -msgid "חזרה לדף ההתחברות" -msgstr "Back to login page" - -#: templates/signup.html:9 -#, fuzzy -msgid "הרשמה" -msgstr "Registration" - -#: templates/signup.html:12 -msgid "הזינו אימייל וסיסמה לצורך רישום למערכת:" -msgstr "Insert your email and password for registration:" - -#: templates/signup.html:17 -msgid "שם מלא" -msgstr "Full Name" - -#: templates/signup.html:19 -#, fuzzy -msgid "אימות סיסמה" -msgstr "Password Confirmation" - -#: templates/status.html:7 -msgid "חמ\"ל תרגילים" -msgstr "Exercises operations room" - -#: templates/status.html:12 -msgid "שם" -msgstr "Name" - -#: templates/status.html:13 -msgid "נבדקו" -msgstr "Checked" - -#: templates/status.html:14 -msgid "נפתרו" -msgstr "Solved" - -#: templates/status.html:15 -msgid "באחוזים" -msgstr "Percentage" - -#: templates/status.html:16 -msgid "מדד" -msgstr "Measurement" - -#: templates/status.html:31 -msgid "ארכיון" -msgstr "Archive" - -#: templates/upload.html:7 -msgid "העלאת מחברות" -msgstr "Upload Notebooks" - -#: templates/upload.html:11 -msgid "גררו לכאן את קובץ המחברת, או לחצו ובחרו אותה מהמחשב שלכם." -msgstr "Drag here the notebook file or click and choose it from your computer." - -#: templates/upload.html:14 -msgid "חזרו לרשימת התרגילים" -msgstr "Back to Exercises List" - -#: templates/upload.html:17 -msgid "הועלו" -msgstr "Matches" - -#: templates/upload.html:18 -msgid "נכשלו" -msgstr "Misses" - -#: templates/user.html:9 -msgid "פרטי משתמש:" -msgstr "User details:" - -#: templates/user.html:11 -msgid "שם משתמש:" -msgstr "Username:" - -#: templates/user.html:12 -msgid "דואר אלקטרוני:" -msgstr "Email Address:" - -#: templates/user.html:16 -msgid "פעולות:" -msgstr "Actions:" - -#: templates/user.html:24 -msgid "תרגילים שהוגשו:" -msgstr "Exercises Submitted:" - -#: templates/user.html:29 -msgid "שם תרגיל" -msgstr "Exercise name" - -#: templates/user.html:30 -msgid "מצב הגשה" -msgstr "Submission status" - -#: templates/user.html:31 -msgid "הגשה" -msgstr "Submission" - -#: templates/user.html:32 -msgid "בודק" -msgstr "Checker" - -#: templates/user.html:41 -msgid "נבדק" -msgstr "Checked" - -#: templates/user.html:41 -msgid "הוגש" -msgstr "Submitted" - -#: templates/user.html:41 -msgid "לא הוגש" -msgstr "Not submitted" - -#: templates/user.html:52 -msgid "פתקיות:" -msgstr "Notes:" - -#: templates/user.html:57 templates/user.html:59 -msgid "פתקית חדשה" -msgstr "New Note" - -#: templates/user.html:63 -msgid "תרגיל משויך:" -msgstr "Exercise:" - -#: templates/user.html:72 -msgid "רמת פרטיות:" -msgstr "Privacy Level:" - -#: templates/user.html:78 -msgid "הוסף פתקית" -msgstr "Add Note" - -#: templates/view.html:6 -msgid "תצוגת תרגיל" -msgstr "Exercise view" - -#: templates/view.html:9 -msgid "התרגיל שלך נבדק!" -msgstr "Your solution had checked!" - -#: templates/view.html:9 -msgid "לחצו על השורות האדומות כדי לראות את הערות הבודקים." -msgstr "Click on the red lines in order to see the comments." - -#: templates/view.html:11 -msgid "התרגיל שלך נבדק ברגעים אלו!" -msgstr "Your solution is being checked in these moments!" - -#: templates/view.html:13 -msgid "פתרון זה אינו פתרון עדכני!" -msgstr "This solution is not up to date!" - -#: templates/view.html:15 -msgid "התרגיל שלך מחכה לבדיקה." -msgstr "Your solution hasn't been checked." - -#: templates/view.html:15 -msgid "חשוב לנו שכל תרגיל יעבור בדיקה של עין אנושית." -msgstr "It's important for us that all exercises will be checked by human eye." - -#: templates/view.html:18 -msgid "מגיש" -msgstr "Presenter" - -#: templates/view.html:21 -msgid "ניווט בגרסאות ההגשה" -msgstr "Navigate in solution versions" - -#: templates/view.html:27 -msgid "העמוד הנוכחי" -msgstr "Current page" - -#: templates/view.html:35 -msgid "לסיום בדיקה" -msgstr "Finish Checking" - -#: templates/view.html:75 -msgid "בדיקות אוטומטיות" -msgstr "Automatic Checking" - -#: templates/view.html:82 -msgid "שגיאה:" -msgstr "Error:" - -#: templates/view.html:87 -msgid "שגיאת סגל:" -msgstr "Staff Error:" - -#: templates/view.html:109 -msgid "הערות כלליות" -msgstr "General comments" - -#: templates/view.html:117 -msgid "הערות בודק" -msgstr "Checker comments" - -#: templates/view.html:127 -msgid "סיימתי לבדוק!" -msgstr "Done Checking!" - -#: utils/mail.py:25 -#, python-format -msgid "מייל אימות - %(site_name)s" -msgstr "Confirmation mail - %(site_name)s" - -#: utils/mail.py:30 -#, fuzzy, python-format -msgid "שלום %(fullname)s,\nלינק האימות שלך למערכת הוא: %(link)s" -msgstr "Hello %(fullname)s,\n Your confirmation link is: %(link)s" - -#: utils/mail.py:40 -#, fuzzy, python-format -msgid "מייל איפוס סיסמה - %(site_name)s" -msgstr "Reset password mail - %(site_name)s" - -#: utils/mail.py:45 -#, fuzzy, python-format -msgid "שלום %(fullname)s,\nלינק לצורך איפוס הסיסמה שלך הוא: %(link)s" -msgstr "Hello %(fullname)s,\nYour reset password link is: %(link)s" - -#: utils/mail.py:54 -#, fuzzy, python-format -msgid "שינוי סיסמה - %(site_name)s" -msgstr "Changing password - %(site_name)s" - -#: utils/mail.py:56 -#, python-format -msgid "שלום %(fullname)s. הסיסמה שלך באתר %(site_name)s שונתה.\nאם אתה לא עשית את זה צור קשר עם הנהלת האתר.\nכתובת המייל: %(site_mail)s" -msgstr "Hello %(fullname)s. Your password in %(site_name)s site has been changed.\nIf you didn't do it please contact with the site management.\nMail address: %(site_mail)s" diff --git a/lms/lmsweb/translations/he/LC_MESSAGES/messages.po b/lms/lmsweb/translations/he/LC_MESSAGES/messages.po new file mode 100644 index 00000000..29a622f6 --- /dev/null +++ b/lms/lmsweb/translations/he/LC_MESSAGES/messages.po @@ -0,0 +1,505 @@ +# Hebrew translations for PROJECT. +# Copyright (C) 2021 ORGANIZATION +# This file is distributed under the same license as the PROJECT project. +# FIRST AUTHOR , 2021. +# +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2021-09-29 11:58+0300\n" +"PO-Revision-Date: 2021-09-29 11:30+0300\n" +"Last-Translator: Or Ronai\n" +"Language: he\n" +"Language-Team: he \n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.9.1\n" + +#: lmsdb/models.py:736 +msgid "Fatal error" +msgstr "כישלון חמור" + +#: lmstests/public/identical_tests/services.py:103 +#, python-format +msgid "Your solution for the %(subject)s exercise has been checked." +msgstr "הפתרון שלך לתרגיל %(subject)s נבדק." + +#: lmstests/public/linters/services.py:95 +#, python-format +msgid "The automatic checker gave you %(errors_num)d for your %(name)s solution." +msgstr "הבודק האוטומטי נתן %(errors_num)d הערות על תרגילך %(name)s." + +#: lmstests/public/unittests/services.py:16 lmstests/sandbox/linters/base.py:16 +msgid "The automatic checker couldn't run your code." +msgstr "הבודק האוטומטי לא הצליח להריץ את הקוד שלך." + +#: lmstests/public/unittests/services.py:120 +#, python-format +msgid "" +"The automatic checker failed in %(number)d examples in your " +"\"%(subject)s\" solution." +msgstr "הבודק האוטומטי נכשל ב־ %(number)d דוגמאות בתרגיל \"%(subject)s\"." + +#: lmstests/public/unittests/services.py:142 +msgid "Bro, did you check your code?" +msgstr "אחי, בדקת את הקוד שלך?" + +#: lmsweb/views.py:129 +msgid "Can not register now" +msgstr "לא ניתן להירשם כעת" + +#: lmsweb/views.py:146 +msgid "Registration successfully" +msgstr "ההרשמה בוצעה בהצלחה" + +#: lmsweb/views.py:169 +msgid "The confirmation link is expired, new link has been sent to your email" +msgstr "קישור האימות פג תוקף, קישור חדש נשלח אל תיבת המייל שלך" + +#: lmsweb/views.py:185 +msgid "Your user has been successfully confirmed, you can now login" +msgstr "המשתמש שלך אומת בהצלחה, כעת אתה יכול להתחבר למערכת" + +#: lmsweb/views.py:208 lmsweb/views.py:265 +msgid "Your password has successfully changed" +msgstr "הסיסמה שלך שונתה בהצלחה" + +#: lmsweb/views.py:224 +msgid "Password reset link has successfully sent" +msgstr "קישור לאיפוס הסיסמה נשלח בהצלחה" + +#: lmsweb/views.py:245 +msgid "Reset password link is expired" +msgstr "קישור איפוס הסיסמה פג תוקף" + +#: lmsweb/forms/change_password.py:20 lmsweb/forms/register.py:32 +#: lmsweb/forms/reset_password.py:25 +msgid "The passwords are not identical" +msgstr "הסיסמאות שהוקלדו אינן זהות" + +#: lmsweb/forms/change_password.py:31 +msgid "Invalid old password has been inserted too many times" +msgstr "הזנת סיסמה שגויה מספר רב מדי של פעמים" + +#: lmsweb/forms/change_password.py:35 +msgid "Invalid current password" +msgstr "הסיסמה הנוכחית שהוזנה שגויה" + +#: lmsweb/forms/register.py:14 lmsweb/forms/reset_password.py:12 +#: lmsweb/tools/validators.py:29 +msgid "Invalid email" +msgstr "אימייל לא תקין" + +#: lmsweb/tools/validators.py:13 +msgid "The username is already in use" +msgstr "שם המשתמש כבר נמצא בשימוש" + +#: lmsweb/tools/validators.py:21 +msgid "The email is already in use" +msgstr "האימייל כבר נמצא בשימוש" + +#: models/solutions.py:50 +#, python-format +msgid "%(solver)s has replied for your \"%(subject)s\" check." +msgstr "%(solver)s הגיב לך על בדיקת תרגיל \"%(subject)s\"." + +#: models/solutions.py:57 +#, python-format +msgid "%(checker)s replied for \"%(subject)s\"." +msgstr "%(checker)s הגיב לך על תרגיל \"%(subject)s\"." + +#: models/solutions.py:69 +#, python-format +msgid "Your solution for the \"%(subject)s\" exercise has been checked." +msgstr "הפתרון שלך לתרגיל \"%(subject)s\" נבדק." + +#: models/users.py:28 +msgid "Invalid username or password" +msgstr "שם המשתמש או הסיסמה שהוזנו לא תקינים" + +#: models/users.py:31 +msgid "You have to confirm your registration with the link sent to your email" +msgstr "עליך לאשר את מייל האימות" + +#: templates/banned.html:8 templates/login.html:7 +#: templates/recover-password.html:8 templates/reset-password.html:8 +#: templates/signup.html:8 +msgid "Profile picture of the Python Course" +msgstr "תמונת הפרופיל של קורס פייתון" + +#: templates/banned.html:12 +msgid "Your account has been suspended by the manager." +msgstr "המשתמש שלך הושעה על ידי מנהל המערכת." + +#: templates/banned.html:13 +msgid "For more details please contact the management team." +msgstr "לפרטים נוספים אנא פנה אל צוות הניהול." + +#: templates/base.html:6 +msgid "Exercise submission system for the Python Course" +msgstr "מערכת הגשת תרגילים לקורס פייתון" + +#: templates/change-password.html:8 templates/change-password.html:17 +#: templates/user.html:19 +msgid "Change Password" +msgstr "שנה סיסמה" + +#: templates/change-password.html:10 +msgid "Insert current password and new password for changing it:" +msgstr "הזינו סיסמה ישנה וסיסמה חדשה לצורך שינוי הסיסמה:" + +#: templates/change-password.html:13 +msgid "Current password" +msgstr "סיסמה נוכחית" + +#: templates/change-password.html:14 templates/login.html:28 +#: templates/login.html:30 templates/recover-password.html:14 +#: templates/signup.html:18 +msgid "Password" +msgstr "סיסמה" + +#: templates/change-password.html:15 templates/recover-password.html:15 +#: templates/signup.html:19 +msgid "Password Confirmation" +msgstr "אימות סיסמה" + +#: templates/exercises.html:8 +msgid "Exercises" +msgstr "תרגילים" + +#: templates/exercises.html:21 templates/view.html:101 +msgid "Comments for the solution" +msgstr "הערות על התרגיל" + +#: templates/exercises.html:30 +msgid "Send" +msgstr "שלח" + +#: templates/exercises.html:32 +msgid "View" +msgstr "הצצה" + +#: templates/exercises.html:34 +msgid "Check" +msgstr "לבדיקה" + +#: templates/exercises.html:53 +msgid "All Exercises" +msgstr "לכל התרגילים" + +#: templates/login.html:8 templates/login.html:35 +msgid "Login" +msgstr "התחברות" + +#: templates/login.html:10 templates/signup.html:11 +msgid "Welcome to the exercise system!" +msgstr "ברוכים הבאים למערכת התרגילים!" + +#: templates/login.html:11 +msgid "Insert your username and password:" +msgstr "הזינו את שם המשתמש והסיסמה שלכם:" + +#: templates/login.html:22 templates/login.html:24 templates/signup.html:16 +#: templates/user.html:11 +msgid "Username" +msgstr "שם משתמש" + +#: templates/login.html:37 +msgid "Forgot your password?" +msgstr "שכחת את הסיסמה?" + +#: templates/login.html:40 templates/signup.html:22 +msgid "Register" +msgstr "הירשם" + +#: templates/navbar.html:21 +msgid "Messages" +msgstr "הודעות" + +#: templates/navbar.html:37 +msgid "Mark all as read" +msgstr "סמן הכל כנקרא" + +#: templates/navbar.html:44 +msgid "Upload Exercises" +msgstr "העלאת תרגילים" + +#: templates/navbar.html:51 +msgid "Exercises List" +msgstr "רשימת התרגילים" + +#: templates/navbar.html:59 +msgid "Exercises Archive" +msgstr "ארכיון התרגילים" + +#: templates/navbar.html:69 +msgid "Check Exercises" +msgstr "בדוק תרגילים" + +#: templates/navbar.html:76 +msgid "Logout" +msgstr "התנתקות" + +#: templates/recover-password.html:9 templates/recover-password.html:17 +#: templates/reset-password.html:9 +msgid "Reset Password" +msgstr "אפס סיסמה" + +#: templates/recover-password.html:11 +msgid "Insert password for changing it:" +msgstr "הזינו סיסמה לצורך שינוי הסיסמה:" + +#: templates/reset-password.html:11 +msgid "Insert your email for getting link to reset it:" +msgstr "הזינו אימייל לצורך שליחת קישור לאיפוס הסיסמה:" + +#: templates/reset-password.html:14 templates/signup.html:15 +#: templates/user.html:12 +msgid "Email Address" +msgstr "כתובת אימייל" + +#: templates/reset-password.html:15 +msgid "Send Reset Password Link" +msgstr "שלח מייל איפוס סיסמה" + +#: templates/reset-password.html:18 templates/signup.html:25 +msgid "Back to login page" +msgstr "חזרה לדף ההתחברות" + +#: templates/signup.html:9 +msgid "Registration" +msgstr "הרשמה" + +#: templates/signup.html:12 +msgid "Insert your email and password for registration:" +msgstr "הזינו אימייל וסיסמה לצורך רישום למערכת:" + +#: templates/signup.html:17 +msgid "Full Name" +msgstr "שם מלא" + +#: templates/status.html:7 +msgid "Exercises operations room" +msgstr "חמ\"ל תרגילים" + +#: templates/status.html:12 +msgid "Name" +msgstr "שם" + +#: templates/status.html:13 templates/user.html:41 +msgid "Checked" +msgstr "נבדק/ו" + +#: templates/status.html:14 +msgid "Solved" +msgstr "נפתר/ו" + +#: templates/status.html:15 +msgid "Percentage" +msgstr "באחוזים" + +#: templates/status.html:16 +msgid "Measurement" +msgstr "מדד" + +#: templates/status.html:31 +msgid "Archive" +msgstr "ארכיון" + +#: templates/upload.html:7 +msgid "Upload Notebooks" +msgstr "העלאת מחברות" + +#: templates/upload.html:11 +msgid "Drag here the notebook file or click and choose it from your computer." +msgstr "גררו לכאן את קובץ המחברת, או לחצו ובחרו אותה מהמחשב שלכם." + +#: templates/upload.html:14 +msgid "Back to Exercises List" +msgstr "חזרו לרשימת התרגילים" + +#: templates/upload.html:17 +msgid "Matches" +msgstr "הועלו" + +#: templates/upload.html:18 +msgid "Misses" +msgstr "נכשלו" + +#: templates/user.html:9 +msgid "User details" +msgstr "פרטי משתמש" + +#: templates/user.html:16 +msgid "Actions" +msgstr "פעולות" + +#: templates/user.html:24 +msgid "Exercises Submitted" +msgstr "תרגילים שהוגשו" + +#: templates/user.html:29 +msgid "Exercise name" +msgstr "שם תרגיל" + +#: templates/user.html:30 +msgid "Submission status" +msgstr "מצב הגשה" + +#: templates/user.html:31 +msgid "Submission" +msgstr "הגשה" + +#: templates/user.html:32 +msgid "Checker" +msgstr "בודק" + +#: templates/user.html:41 +msgid "Submitted" +msgstr "הוגש" + +#: templates/user.html:41 +msgid "Not submitted" +msgstr "לא הוגש" + +#: templates/user.html:52 +msgid "Notes" +msgstr "פתקיות" + +#: templates/user.html:57 templates/user.html:59 +msgid "New Note" +msgstr "פתקית חדשה" + +#: templates/user.html:63 +msgid "Related Exercise" +msgstr "תרגיל משויך" + +#: templates/user.html:72 +msgid "Privacy Level" +msgstr "רמת פרטיות" + +#: templates/user.html:78 +msgid "Add Note" +msgstr "הוסף פתקית" + +#: templates/view.html:6 +#, fuzzy +msgid "Exercise view" +msgstr "שם תרגיל" + +#: templates/view.html:9 +msgid "Your solution had checked!" +msgstr "התרגיל שלך נבדק!" + +#: templates/view.html:9 +msgid "Click on the red lines in order to see the comments." +msgstr "לחצו על השורות האדומות כדי לראות את הערות הבודקים." + +#: templates/view.html:11 +msgid "Your solution is being checked in these moments!" +msgstr "התרגיל שלך נבדק ברגעים אלו!" + +#: templates/view.html:13 +msgid "This solution is not up to date!" +msgstr "פתרון זה אינו פתרון עדכני!" + +#: templates/view.html:15 +#, fuzzy, python-format +msgid "Your solution hasn't been checked." +msgstr "הפתרון שלך לתרגיל %(subject)s נבדק." + +#: templates/view.html:15 +msgid "It's important for us that all exercises will be checked by human eye." +msgstr "חשוב לנו שכל תרגיל יעבור בדיקה של עין אנושית." + +#: templates/view.html:18 +msgid "Presenter" +msgstr "מגיש" + +#: templates/view.html:21 +msgid "Navigate in solution versions" +msgstr "ניווט בגרסאות ההגשה" + +#: templates/view.html:27 +#, fuzzy +msgid "Current page" +msgstr "סיסמה נוכחית" + +#: templates/view.html:35 +msgid "Finish Checking" +msgstr "סיום בדיקה" + +#: templates/view.html:75 +msgid "Automatic Checking" +msgstr "בדיקות אוטומטיות" + +#: templates/view.html:82 +#, fuzzy +msgid "Error" +msgstr "כישלון חמור" + +#: templates/view.html:87 +#, fuzzy +msgid "Staff Error" +msgstr "כישלון חמור" + +#: templates/view.html:109 +msgid "General comments" +msgstr "הערות כלליות" + +#: templates/view.html:117 +msgid "Checker comments" +msgstr "הערות בודק" + +#: templates/view.html:127 +msgid "Done Checking" +msgstr "סיום בדיקה" + +#: utils/mail.py:25 +#, python-format +msgid "Confirmation mail - %(site_name)s" +msgstr "מייל אימות - %(site_name)s" + +#: utils/mail.py:32 +#, python-format +msgid "" +"Hello %(fullname)s,\n" +"Your confirmation link is: %(link)s" +msgstr "" +"שלום %(fullname)s,\n" +"לינק האימות שלך למערכת הוא: %(link)s" + +#: utils/mail.py:42 +#, python-format +msgid "Reset password mail - %(site_name)s" +msgstr "מייל איפוס סיסמה - %(site_name)s" + +#: utils/mail.py:49 +#, python-format +msgid "" +"Hello %(fullname)s,\n" +"Your reset password link is: %(link)s" +msgstr "" +"שלום %(fullname)s,\n" +"לינק לצורך איפוס הסיסמה שלך הוא: %(link)s" + +#: utils/mail.py:58 +#, python-format +msgid "Changing password - %(site_name)s" +msgstr "שינוי סיסמה - %(site_name)s" + +#: utils/mail.py:62 +#, python-format +msgid "" +"Hello %(fullname)s. Your password in %(site_name)s site has been changed." +"\n" +"If you didn't do it please contact with the site management.\n" +"Mail address: %(site_mail)s" +msgstr "" +"שלום %(fullname)s. הסיסמה שלך באתר %(site_name)s שונתה.\n" +"אם אתה לא עשית את זה צור קשר עם הנהלת האתר.\n" +"כתובת המייל: %(site_mail)s" + diff --git a/lms/lmsweb/views.py b/lms/lmsweb/views.py index 0c0022c3..608b15ea 100644 --- a/lms/lmsweb/views.py +++ b/lms/lmsweb/views.py @@ -126,7 +126,7 @@ def login(login_message: Optional[str] = None): def signup(): if not webapp.config.get('REGISTRATION_OPEN', False): return redirect(url_for( - 'login', login_message=_('לא ניתן להירשם כעת'), + 'login', login_message=_('Can not register now'), )) form = RegisterForm() @@ -143,7 +143,7 @@ def signup(): }) send_confirmation_mail(user) return redirect(url_for( - 'login', login_message=_('ההרשמה בוצעה בהצלחה'), + 'login', login_message=_('Registration successfully'), )) @@ -166,7 +166,10 @@ def confirm_email(user_id: int, token: str): send_confirmation_mail(user) return redirect(url_for( 'login', login_message=( - _('קישור האימות פג תוקף, קישור חדש נשלח אל תיבת המייל שלך'), + _( + 'The confirmation link is expired, new link has been ' + 'sent to your email', + ), ), )) except BadSignature: @@ -179,7 +182,10 @@ def confirm_email(user_id: int, token: str): update.execute() return redirect(url_for( 'login', login_message=( - _('המשתמש שלך אומת בהצלחה, כעת אתה יכול להתחבר למערכת'), + _( + 'Your user has been successfully confirmed, ' + 'you can now login', + ), ), )) @@ -199,7 +205,7 @@ def change_password(): send_change_password_mail(user) return redirect(url_for( 'login', login_message=( - _('הסיסמה שלך שונתה בהצלחה'), + _('Your password has successfully changed'), ), )) @@ -215,7 +221,7 @@ def reset_password(): send_reset_password_mail(user) return redirect(url_for( - 'login', login_message=_('קישור לאיפוס הסיסמה נשלח בהצלחה'), + 'login', login_message=_('Password reset link has successfully sent'), )) @@ -236,7 +242,7 @@ def recover_password(user_id: int, token: str): except SignatureExpired: return redirect(url_for( 'login', login_message=( - _('קישור איפוס הסיסמה פג תוקף'), + _('Reset password link is expired'), ), )) except BadSignature: @@ -256,7 +262,7 @@ def recover_password_check(user: User, token: str): user.save() return redirect(url_for( 'login', login_message=( - _('הסיסמה שלך שונתה בהצלחה'), + _('Your password has successfully changed'), ), )) diff --git a/lms/models/solutions.py b/lms/models/solutions.py index 824960a8..d61d5e15 100644 --- a/lms/models/solutions.py +++ b/lms/models/solutions.py @@ -48,14 +48,14 @@ def get_message_and_addressee( ) -> Tuple[str, User]: if solution.solver == user: msg = _( - '%(solver)s הגיב לך על בדיקת תרגיל "%(subject)s".', + '%(solver)s has replied for your "%(subject)s" check.', solver=solution.solver.fullname, subject=solution.exercise.subject, ) addressee = solution.checker else: # solution.checker == user msg = _( - '%(checker)s הגיב לך על תרגיל "%(subject)s".', + '%(checker)s replied for "%(subject)s".', checker=solution.checker.fullname, subject=solution.exercise.subject, ) @@ -67,7 +67,7 @@ def mark_as_checked(solution_id: int, checker_id: int) -> bool: checked_solution: Solution = Solution.get_by_id(solution_id) is_updated = checked_solution.mark_as_checked(by=checker_id) msg = _( - 'הפתרון שלך לתרגיל "%(subject)s" נבדק.', + 'Your solution for the "%(subject)s" exercise has been checked.', subject=checked_solution.exercise.subject, ) if is_updated: diff --git a/lms/models/users.py b/lms/models/users.py index 6f060396..afdb1de8 100644 --- a/lms/models/users.py +++ b/lms/models/users.py @@ -25,9 +25,14 @@ def retrieve_salt(user: User) -> str: def auth(username: str, password: str) -> User: user = User.get_or_none(username=username) if user is None or not user.is_password_valid(password): - raise UnauthorizedError(_('שם המשתמש או הסיסמה שהוזנו לא תקינים'), 400) + raise UnauthorizedError(_('Invalid username or password'), 400) elif user.role.is_unverified: - raise ForbiddenPermission(_('עליך לאשר את מייל האימות'), 403) + raise ForbiddenPermission( + _( + 'You have to confirm your registration with the link sent ' + 'to your email', + ), 403, + ) return user diff --git a/lms/static/my.css b/lms/static/my.css index 2de91442..f0d9d564 100644 --- a/lms/static/my.css +++ b/lms/static/my.css @@ -47,6 +47,7 @@ a { } #login-container, +#banned-container, #signup-container, #change-password-container, #reset-password-container, @@ -58,6 +59,7 @@ a { } #login, +#banned, #signup, #change-password, #reset-password, @@ -69,6 +71,7 @@ a { } #login-logo, +#banned-logo, #signup-logo, #reset-password-logo, #recover-password-logo { diff --git a/lms/templates/banned.html b/lms/templates/banned.html index 5fa43fca..74a393e8 100644 --- a/lms/templates/banned.html +++ b/lms/templates/banned.html @@ -2,15 +2,15 @@ {% block page_content %}
-
-
+
+

השעייה

- {{ _('המשתמש שלך הושעה על ידי מנהל המערכת.') }}
- {{ _('לפרטים נוספים אנא פנה אל צוות הניהול.') }} + {{ _('Your account has been suspended by the manager.') }}
+ {{ _('For more details please contact the management team.') }}

diff --git a/lms/templates/base.html b/lms/templates/base.html index 2ca3d2a8..6ea2efae 100644 --- a/lms/templates/base.html +++ b/lms/templates/base.html @@ -3,7 +3,7 @@ - {{ _('מערכת הגשת תרגילים לקורס פייתון') }} + {{ _('Exercise submission system for the Python Course') }} {%- if direction == 'ltr' %} {% else %} diff --git a/lms/templates/change-password.html b/lms/templates/change-password.html index 61c5ef71..5e95f475 100644 --- a/lms/templates/change-password.html +++ b/lms/templates/change-password.html @@ -5,16 +5,16 @@
-

{{ _('שינוי סיסמה') }}

+

{{ _('Change Password') }}

- {{ _('הזינו סיסמה ישנה וסיסמה חדשה לצורך שינוי הסיסמה:') }} + {{ _('Insert current password and new password for changing it:') }}

- {{ render_field(form.current_password, cls="form-control form-control-lg", placeholder=_('סיסמה נוכחית')) }} - {{ render_field(form.password, cls="form-control form-control-lg", placeholder=_('סיסמה חדשה')) }} - {{ render_field(form.confirm, cls="form-control form-control-lg", placeholder=_('אימות סיסמה חדשה')) }} + {{ render_field(form.current_password, cls="form-control form-control-lg", placeholder=_('Current password')) }} + {{ render_field(form.password, cls="form-control form-control-lg", placeholder=_('Password')) }} + {{ render_field(form.confirm, cls="form-control form-control-lg", placeholder=_('Password Confirmation')) }} - +
diff --git a/lms/templates/exercises.html b/lms/templates/exercises.html index 9e668d2e..3f274494 100644 --- a/lms/templates/exercises.html +++ b/lms/templates/exercises.html @@ -5,7 +5,7 @@
-

{{ _('תרגילים') }}

+

{{ _('Exercises') }}

@@ -18,7 +18,7 @@

{{ _('תרגילים') }}

{{ exercise['comments_num'] }} - {{ _("הערות על התרגיל") }} + {{ _("Comments for the solution") }}
{%- if exercise['notebook'] %}
@@ -27,11 +27,11 @@

{{ _('תרגילים') }}

{%- endif %} {%- if exercise.get('is_checked') is none %} - {% set details = {'page': 'send', 'icon': 'upload', 'text': _('שלח'), 'css': 'send', 'page_id': exercise['exercise_id']} %} + {% set details = {'page': 'send', 'icon': 'upload', 'text': _('Send'), 'css': 'send', 'page_id': exercise['exercise_id']} %} {% elif not exercise.get('is_checked') %} - {% set details = {'page': 'view', 'icon': 'eye', 'text': _('הצצה'), 'css': 'view', 'page_id': exercise['solution_id']} %} + {% set details = {'page': 'view', 'icon': 'eye', 'text': _('View'), 'css': 'view', 'page_id': exercise['solution_id']} %} {% else %} - {% set details = {'page': 'view', 'icon': 'check-circle-o', 'text': _('לבדיקה'), 'css': 'checked', 'page_id': exercise['solution_id']} %} + {% set details = {'page': 'view', 'icon': 'check-circle-o', 'text': _('Check'), 'css': 'checked', 'page_id': exercise['solution_id']} %} {% endif -%} {%- if not exercise.get('is_archived') or exercise.get('is_checked') is not none %} @@ -50,7 +50,7 @@

{{ _('תרגילים') }}

{%- if not fetch_archived %}
{% endif -%} diff --git a/lms/templates/login.html b/lms/templates/login.html index 20dd92a6..7d81f944 100644 --- a/lms/templates/login.html +++ b/lms/templates/login.html @@ -4,11 +4,11 @@
- -

{{ _('התחברות') }}

+ +

{{ _('Login') }}

- {{ _('ברוכים הבאים למערכת התרגילים!') }}
- {{ _('הזינו את שם המשתמש והסיסמה שלכם:') }} + {{ _('Welcome to the exercise system!') }}
+ {{ _('Insert your username and password:') }}

{% if login_message %}
@@ -19,25 +19,25 @@

{{ _('התחברות') }}

{% endif %}
- +
- +
- +
- +
- +
- {{ _('שכחת את הסיסמה?') }} + {{ _('Forgot your password?') }} {% if config.REGISTRATION_OPEN %}
- {{ _('הירשם') }} + {{ _('Register') }} {% endif %}
diff --git a/lms/templates/navbar.html b/lms/templates/navbar.html index 7f78d734..6dd4d40c 100644 --- a/lms/templates/navbar.html +++ b/lms/templates/navbar.html @@ -18,7 +18,7 @@ {%- if not exercises or fetch_archived %} {% endif -%} @@ -56,7 +56,7 @@ {% endif -%} @@ -66,14 +66,14 @@ {% endif -%} diff --git a/lms/templates/recover-password.html b/lms/templates/recover-password.html index a805977c..030137df 100644 --- a/lms/templates/recover-password.html +++ b/lms/templates/recover-password.html @@ -5,16 +5,16 @@
- -

{{ _('איפוס סיסמה') }}

+ +

{{ _('Reset Password') }}

- {{ _('הזינו סיסמה לצורך שינוי הסיסמה:') }} + {{ _('Insert password for changing it:') }}

- {{ render_field(form.password, cls="form-control form-control-lg", placeholder=_('סיסמה חדשה')) }} - {{ render_field(form.confirm, cls="form-control form-control-lg", placeholder=_('אימות סיסמה חדשה')) }} + {{ render_field(form.password, cls="form-control form-control-lg", placeholder=_('Password')) }} + {{ render_field(form.confirm, cls="form-control form-control-lg", placeholder=_('Password Confirmation')) }} - +
diff --git a/lms/templates/reset-password.html b/lms/templates/reset-password.html index 98464480..75b68a5b 100644 --- a/lms/templates/reset-password.html +++ b/lms/templates/reset-password.html @@ -5,17 +5,17 @@
- -

{{ _('איפוס סיסמה') }}

+ +

{{ _('Reset Password') }}

- {{ _('הזינו אימייל לצורך שליחת קישור לאיפוס הסיסמה:') }} + {{ _('Insert your email for getting link to reset it:') }}

- {{ render_field(form.email, cls="form-control form-control-lg", placeholder=_('כתובת אימייל')) }} - + {{ render_field(form.email, cls="form-control form-control-lg", placeholder=_('Email Address')) }} +

- {{ _('חזרה לדף ההתחברות') }} + {{ _('Back to login page') }}
diff --git a/lms/templates/signup.html b/lms/templates/signup.html index 226478fa..f1a196d6 100644 --- a/lms/templates/signup.html +++ b/lms/templates/signup.html @@ -5,24 +5,24 @@
- -

{{ _('הרשמה') }}

+ +

{{ _('Registration') }}

- {{ _('ברוכים הבאים למערכת התרגילים!') }}
- {{ _('הזינו אימייל וסיסמה לצורך רישום למערכת:') }} + {{ _('Welcome to the exercise system!') }}
+ {{ _('Insert your email and password for registration:') }}

- {{ render_field(form.email, cls="form-control form-control-lg", placeholder=_('כתובת אימייל')) }} - {{ render_field(form.username, cls="form-control form-control-lg", placeholder=_('שם משתמש')) }} - {{ render_field(form.fullname, cls="form-control form-control-lg", placeholder=_('שם מלא')) }} - {{ render_field(form.password, cls="form-control form-control-lg", placeholder=_('סיסמה')) }} - {{ render_field(form.confirm, cls="form-control form-control-lg", placeholder=_('אימות סיסמה')) }} + {{ render_field(form.email, cls="form-control form-control-lg", placeholder=_('Email Address')) }} + {{ render_field(form.username, cls="form-control form-control-lg", placeholder=_('Username')) }} + {{ render_field(form.fullname, cls="form-control form-control-lg", placeholder=_('Full Name')) }} + {{ render_field(form.password, cls="form-control form-control-lg", placeholder=_('Password')) }} + {{ render_field(form.confirm, cls="form-control form-control-lg", placeholder=_('Password Confirmation')) }} - +

- {{ _('חזרה לדף ההתחברות') }} + {{ _('Back to login page') }}
diff --git a/lms/templates/status.html b/lms/templates/status.html index 0edc8d00..bcd77c36 100644 --- a/lms/templates/status.html +++ b/lms/templates/status.html @@ -4,16 +4,16 @@ {% block page_content %}
-

{{ _('חמ"ל תרגילים') }}

+

{{ _('Exercises operations room') }}

- - - - - + + + + + @@ -28,7 +28,7 @@

{{ _('חמ"ל תרגילים') }}

{% endfor -%} - + {%- for exercise in exercises|selectattr("is_archived") %} diff --git a/lms/templates/upload.html b/lms/templates/upload.html index 0d365821..939fd572 100644 --- a/lms/templates/upload.html +++ b/lms/templates/upload.html @@ -4,18 +4,18 @@
-

{{ _('העלאת מחברות') }}

+

{{ _('Upload Notebooks') }}

- +
- {{ _('חזרו לרשימת התרגילים') }} + {{ _('Back to Exercises List') }}
diff --git a/lms/templates/user.html b/lms/templates/user.html index 2a1c46fb..222a7452 100644 --- a/lms/templates/user.html +++ b/lms/templates/user.html @@ -6,30 +6,30 @@

{{ user.fullname | e }}

-

{{ _('פרטי משתמש:') }}

+

{{ _('User details') }}:

    -
  • {{ _('שם משתמש:') }} {{ user.username | e }}
  • -
  • {{ _('דואר אלקטרוני:') }} {{ user.mail_address | e }}
  • +
  • {{ _('Username') }}: {{ user.username | e }}
  • +
  • {{ _('Email Address') }}: {{ user.mail_address | e }}
-

{{ _('תרגילים שהוגשו:') }}

+

{{ _('Exercises Submitted') }}:

#{{ _('שם') }}{{ _('נבדקו') }}{{ _('נפתרו') }}{{ _('באחוזים') }}{{ _('מדד') }}{{ _('Name') }}{{ _('Checked') }}{{ _('Solved') }}{{ _('Percentage') }}{{ _('Measurement') }}
{{ _('ארכיון') }}{{ _('Archive') }}
- - - - + + + + @@ -38,7 +38,7 @@

{{ _('תרגילים שהוגשו:') }}

@@ -49,18 +49,18 @@

{{ _('תרגילים שהוגשו:') }}

{% if user.notes or is_manager %}
-

{{ _('פתקיות:') }}

+

{{ _('Notes') }}:

{%- if is_manager %}
- +
- +
- + {% for solution in solutions %} @@ -69,13 +69,13 @@

{{ _('פתקיות:') }}

- +
- + {% endif -%}
diff --git a/lms/templates/view.html b/lms/templates/view.html index 8504abf5..ab6721d4 100644 --- a/lms/templates/view.html +++ b/lms/templates/view.html @@ -3,28 +3,28 @@ {% block page_content %}
-

{{ _('תצוגת תרגיל') }} {{ solution['exercise']['id'] }}: {{ solution['exercise']['subject'] }}

+

{{ _('Exercise view') }} {{ solution['exercise']['id'] }}: {{ solution['exercise']['subject'] }}

{% if not is_manager and not shared_url %} {% if solution['state'] == 'DONE' %} -

{{ _('התרגיל שלך נבדק!') }} {{ _('לחצו על השורות האדומות כדי לראות את הערות הבודקים.') }}

+

{{ _('Your solution had checked!') }} {{ _('Click on the red lines in order to see the comments.') }}

{% elif solution['state'] == 'IN_CHECKING' %} -

{{ _('התרגיל שלך נבדק ברגעים אלו!') }}

+

{{ _('Your solution is being checked in these moments!') }}

{% elif solution['state'] == 'OLD_SOLUTION' %} -

{{ _('פתרון זה אינו פתרון עדכני!') }}

+

{{ _('This solution is not up to date!') }}

{% else %} -

{{ _('התרגיל שלך מחכה לבדיקה.') }} {{ _('חשוב לנו שכל תרגיל יעבור בדיקה של עין אנושית.') }}

+

{{ _("Your solution hasn't been checked.") }} {{ _("It's important for us that all exercises will be checked by human eye.") }}

{% endif %} {% else %} -

{{ _('מגיש') }}: {{ solution['solver']['fullname'] | e }}

+

{{ _('Presenter') }}: {{ solution['solver']['fullname'] | e }}

{% endif %} {% if not shared_url %} -
{% if test_results and not shared_url %}
-

{{ _('בדיקות אוטומטיות') }}

+

{{ _('Automatic Checking') }}

    {%- for test_result in test_results %}
  1. {{ test_result.pretty_test_name | e }}
    - {{ _('שגיאה:') }} + {{ _('Error') }}:
    {{ test_result.user_message | e }}
    {% if is_manager %} - {{ _('שגיאת סגל:') }} + {{ _('Staff Error') }}:
    {{ test_result.staff_message | e }}
    @@ -98,7 +98,7 @@
    {% if is_manager and not shared_url %} diff --git a/lms/utils/mail.py b/lms/utils/mail.py index ed044bce..5d22311f 100644 --- a/lms/utils/mail.py +++ b/lms/utils/mail.py @@ -22,13 +22,15 @@ def wrapper(*args, **kwargs): @send_message def send_confirmation_mail(user: User) -> Message: token = generate_user_token(user) - subject = _('מייל אימות - %(site_name)s', site_name=config.SITE_NAME) + subject = _( + 'Confirmation mail - %(site_name)s', site_name=config.SITE_NAME, + ) msg = Message(subject, recipients=[user.mail_address]) link = url_for( 'confirm_email', user_id=user.id, token=token, _external=True, ) msg.body = _( - 'שלום %(fullname)s,\nלינק האימות שלך למערכת הוא: %(link)s', + 'Hello %(fullname)s,\nYour confirmation link is: %(link)s', fullname=user.fullname, link=link, ) return msg @@ -37,13 +39,15 @@ def send_confirmation_mail(user: User) -> Message: @send_message def send_reset_password_mail(user: User) -> Message: token = generate_user_token(user) - subject = _('מייל איפוס סיסמה - %(site_name)s', site_name=config.SITE_NAME) + subject = _( + 'Reset password mail - %(site_name)s', site_name=config.SITE_NAME, + ) msg = Message(subject, recipients=[user.mail_address]) link = url_for( 'recover_password', user_id=user.id, token=token, _external=True, ) msg.body = _( - 'שלום %(fullname)s,\nלינק לצורך איפוס הסיסמה שלך הוא: %(link)s', + 'Hello %(fullname)s,\nYour reset password link is: %(link)s', fullname=user.fullname, link=link, ) return msg @@ -51,12 +55,14 @@ def send_reset_password_mail(user: User) -> Message: @send_message def send_change_password_mail(user: User) -> Message: - subject = _('שינוי סיסמה - %(site_name)s', site_name=config.SITE_NAME) + subject = _( + 'Changing password - %(site_name)s', site_name=config.SITE_NAME, + ) msg = Message(subject, recipients=[user.mail_address]) msg.body = _( - 'שלום %(fullname)s. הסיסמה שלך באתר %(site_name)s שונתה.\n' - 'אם אתה לא עשית את זה צור קשר עם הנהלת האתר.\n' - 'כתובת המייל: %(site_mail)s', + 'Hello %(fullname)s. Your password in %(site_name)s site has been ' + "changed.\nIf you didn't do it please contact with the site " + 'management.\nMail address: %(site_mail)s', fullname=user.fullname, site_name=config.SITE_NAME, site_mail=config.MAIL_DEFAULT_SENDER, )
#{{ _('שם תרגיל') }}{{ _('מצב הגשה') }}{{ _('הגשה') }}{{ _('בודק') }}{{ _('Exercise name') }}{{ _('Submission status') }}{{ _('Submission') }}{{ _('Checker') }}
{{ solution.exercise_id | e }} {{ solution.exercise_name | e }} - {{ _('נבדק') if solution.is_checked else _('הוגש') if solution.solution_id else _('לא הוגש') }} + {{ _('Checked') if solution.is_checked else _('Submitted') if solution.solution_id else _('Not submitted') }} {{ solution.solution_id }} {{ solution.get('checker', '') | e }}