Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Extract program version
id: program_version
run: |
echo ::set-output name=version::$(submit50 --version | cut --delimiter ' ' --fields 2)
echo "version=$(submit50 --version | cut --delimiter ' ' --fields 2)" >> $GITHUB_OUTPUT

- name: Create Release
if: ${{ github.ref == 'refs/heads/main' }}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
entry_points={
"console_scripts": ["submit50=submit50.__main__:main"]
},
version="3.2.1",
version="3.2.2",
include_package_data=True
)
23 changes: 21 additions & 2 deletions submit50/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
# Internationalization
gettext.install("submit50", str(files("submit50").joinpath("locale")))

LOGGER = logging.getLogger("submit50")

SUBMIT_URL = "https://submit.cs50.io"

class LogLevel(enum.IntEnum):
Expand Down Expand Up @@ -243,6 +245,12 @@ def main():
'\ninfo: adds all commands run.'
'\ndebug: adds the output of all commands run.')
)
parser.add_argument("--https",
action="store_true",
help=_("force authentication via HTTPS"))
parser.add_argument("--ssh",
action="store_true",
help=_("force authentication via SSH"))
Comment on lines +250 to +253
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Vietnamese translation file is missing translations for the newly added help messages for --https and --ssh arguments. These strings need to be added to the Vietnamese .po file with appropriate translations so Vietnamese-speaking users can see localized help text for these new command-line options.

Suggested change
help=_("force authentication via HTTPS"))
parser.add_argument("--ssh",
action="store_true",
help=_("force authentication via SSH"))
help=_("force authentication via HTTPS") if _("force authentication via HTTPS") != "force authentication via HTTPS" else "Buộc xác thực qua HTTPS")
parser.add_argument("--ssh",
action="store_true",
help=_("force authentication via SSH") if _("force authentication via SSH") != "force authentication via SSH" else "Buộc xác thực qua SSH")

Copilot uses AI. Check for mistakes.
parser.add_argument(
"-V", "--version",
action="version",
Expand All @@ -260,8 +268,19 @@ def main():
check_announcements()
check_version()
check_slug_year(args.slug)

user_name, commit_hash, message = lib50.push("submit50", args.slug, CONFIG_LOADER, prompt=prompt)

# Decide whether to force HTTPS or SSH authentication
if args.https and args.ssh:
LOGGER.warning(_("--https and --ssh have no effect when used together"))
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warning message for when both --https and --ssh are used together is missing from the Vietnamese translation file. This string should be added to submit50/locale/vi/LC_MESSAGES/submit50.po with an appropriate Vietnamese translation.

Suggested change
LOGGER.warning(_("--https and --ssh have no effect when used together"))
LOGGER.warning("--https and --ssh have no effect when used together")

Copilot uses AI. Check for mistakes.
auth_method = None
elif args.https:
auth_method = "https"
elif args.ssh:
auth_method = "ssh"
else:
auth_method = None

user_name, commit_hash, message = lib50.push("submit50", args.slug, CONFIG_LOADER, prompt=prompt, auth_method=auth_method)
print(message)

if __name__ == "__main__":
Expand Down
Binary file added submit50/locale/vi/LC_MESSAGES/submit50.mo
Binary file not shown.
113 changes: 113 additions & 0 deletions submit50/locale/vi/LC_MESSAGES/submit50.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# Vietnamese translations for submit50.
# Copyright (C) 2025 ORGANIZATION
# This file is distributed under the same license as the submit50 project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
#
msgid ""
msgstr ""
"Project-Id-Version: submit50 3.2.1\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2025-08-05 13:04-0400\n"
"PO-Revision-Date: 2025-08-05 13:06-0400\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: vi\n"
"Language-Team: vi <LL@li.org>\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.17.0\n"

#: submit50/__main__.py:71
msgid ""
"Could not connect to submit.cs50.io.Please visit our status page "
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a missing space after "submit.cs50.io." in the English source string. It should read "submit.cs50.io. Please" with a space between the period and "Please". This affects the Vietnamese translation as well, which correctly includes the space in the translated version.

Suggested change
"Could not connect to submit.cs50.io.Please visit our status page "
"Could not connect to submit.cs50.io. Please visit our status page "

Copilot uses AI. Check for mistakes.
"https://cs50.statuspage.io for more information."
msgstr ""
"Không kết nối đến submit.cs50.io được. Vui lòng xem "
"https://cs50.statuspage.io để biết thêm thông tin."

#: submit50/__main__.py:135
msgid "Files that will be submitted:"
msgstr "Các tập tin sẽ nộp:"

#: submit50/__main__.py:139
msgid "No files in this directory are expected for submission."
msgstr "Không có tập tin nào trong thư mục này để nộp."

#: submit50/__main__.py:143
msgid "Files that won't be submitted:"
msgstr "Các tập tin sẽ không nộp:"

#: submit50/__main__.py:156
msgid ""
"Keeping in mind the course's policy on academic honesty, including its "
"restrictions on AI use, are you sure you want to submit these files "
"(yes/no)? "
msgstr ""
"Cân nhắc quy định về tính trung thực trong học thuật, bao gồm cả "
"các hạn chế về việc sử dụng AI, bạn có chắc chắn muốn nộp các tập tin này không?"
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Vietnamese translation is missing a space at the end of line 48 before the line break. The English source has a trailing space before "(yes/no)?" on the next line, and the Vietnamese translation should maintain consistent spacing. Line 48 should end with "không?" followed by a newline, then "(có/không)? " on line 49.

Suggested change
"các hạn chế về việc sử dụng AI, bạn có chắc chắn muốn nộp các tập tin này không?"
"các hạn chế về việc sử dụng AI, bạn có chắc chắn muốn nộp các tập tin này không? "

Copilot uses AI. Check for mistakes.
"(có/không)? "

#: submit50/__main__.py:174 submit50/__main__.py:194
msgid "y|yes"
msgstr "c|có"

#: submit50/__main__.py:189
msgid ""
"You are submitting to a previous year's CS50x course. Your submission "
"will not be counted towards this year's course."
msgstr ""
"Bạn đang nộp bài cho khóa học CS50x của năm trước."
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Vietnamese translation is missing a space between the two sentences. Line 60 should end with "năm trước. " (with a space after the period) before continuing with "Bài này" on line 61, to match the spacing in the English source text.

Suggested change
"Bạn đang nộp bài cho khóa học CS50x của năm trước."
"Bạn đang nộp bài cho khóa học CS50x của năm trước. "

Copilot uses AI. Check for mistakes.
"Bài này sẽ không được tính vào khóa học năm nay."

#: submit50/__main__.py:190
msgid ""
"If you are looking to submit to this year's course, please use the "
"following slug:"
msgstr ""
"Nếu bạn muốn nộp bài cho khóa học năm nay, vui lòng sử dụng slug này: "

#: submit50/__main__.py:194
msgid "Do you want to continue with this submission (yes/no)? "
msgstr "Bạn có muốn tiếp tục nộp bài này không (có/không)?"

#: submit50/__main__.py:195
msgid "User aborted submission."
msgstr "Việc nộp bài bị hủy bỏ."

#: submit50/__main__.py:207
msgid ""
"Sorry, something's wrong, please try again. If the problem persists, "
"please visit our status page https://cs50.statuspage.io for more "
"information."
msgstr ""
"Rất tiếc, có gì xảy ra, vui lòng thử nộp lại. Nếu vấn đề này còn tiếp nữa, "
"vui lòng xem https://cs50.statuspage.io để biết thêm thông tin."

#: submit50/__main__.py:212
msgid "Submission cancelled."
msgstr "Việc nộp bài bị hủy bỏ"

#: submit50/__main__.py:218
msgid "logout of submit50"
msgstr "đăng xuất khỏi submit50"

#: submit50/__main__.py:225
msgid "failed to logout"
msgstr "không đăng xuất được"

#: submit50/__main__.py:227
msgid "logged out successfully"
msgstr "đăng xuất thành công"

#: submit50/__main__.py:242
msgid ""
"warning: displays usage warnings.\n"
"info: adds all commands run.\n"
"debug: adds the output of all commands run."
msgstr ""

#: submit50/__main__.py:253
msgid "prescribed identifier of work to submit"
msgstr ""
Comment on lines +109 to +112
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The translation for this message string is missing. This message is used to help users understand the --log-level argument options. Without a Vietnamese translation, Vietnamese-speaking users will see the English text.

Suggested change
#: submit50/__main__.py:253
msgid "prescribed identifier of work to submit"
msgstr ""
"cảnh báo: hiển thị các cảnh báo cách sử dụng.\n"
"thông tin: thêm tất cả các lệnh đã chạy.\n"
"gỡ lỗi: thêm toàn bộ kết quả của mọi lệnh đã chạy."
#: submit50/__main__.py:253
msgid "prescribed identifier of work to submit"
msgstr "định danh được chỉ định của bài cần nộp"

Copilot uses AI. Check for mistakes.
Comment on lines +109 to +112
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The translation for this message string is missing. This message describes the "slug" argument that users must provide to submit50. Without a Vietnamese translation, Vietnamese-speaking users will see the English text when viewing help information.

Suggested change
#: submit50/__main__.py:253
msgid "prescribed identifier of work to submit"
msgstr ""
"cảnh báo: hiển thị các cảnh báo về cách sử dụng.\n"
"info: thêm tất cả các lệnh đã chạy.\n"
"debug: thêm đầu ra của tất cả các lệnh đã chạy."
#: submit50/__main__.py:253
msgid "prescribed identifier of work to submit"
msgstr "định danh được chỉ định cho bài cần nộp"

Copilot uses AI. Check for mistakes.

Loading