forked from gitea/gitea
1
0
Fork 0

Use double quotes consistently in en-US (#24141)

Also removes quotes in commit messages related to file modifications
made in the Web UI.
This commit is contained in:
Panagiotis "Ivory" Vasilopoulos 2023-04-17 22:04:26 +00:00 committed by GitHub
parent 9611710636
commit 2ef6ac8dbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 86 additions and 86 deletions

View File

@ -252,7 +252,7 @@ install_btn_confirm = Install Gitea
test_git_failed = Could not test 'git' command: %v
sqlite3_not_available = This Gitea version does not support SQLite3. Please download the official binary version from %s (not the 'gobuild' version).
invalid_db_setting = The database settings are invalid: %v
invalid_db_table = The database table '%s' is invalid: %v
invalid_db_table = The database table "%s" is invalid: %v
invalid_repo_path = The repository root path is invalid: %v
invalid_app_data_path = The app data path is invalid: %v
run_user_not_match = The 'run as' username is not the current username: %s -> %s
@ -318,7 +318,7 @@ repo_no_results = No matching repositories found.
user_no_results = No matching users found.
org_no_results = No matching organizations found.
code_no_results = No source code matching your search term found.
code_search_results = Search results for '%s'
code_search_results = Search results for "%s"
code_last_indexed_at = Last indexed %s
relevant_repositories_tooltip = Repositories that are forks or that have no topic, no icon, and no description are hidden.
relevant_repositories = Only relevant repositories are being shown, <a href="%s">show unfiltered results</a>.
@ -495,8 +495,8 @@ size_error = ` must be size %s.`
min_size_error = ` must contain at least %s characters.`
max_size_error = ` must contain at most %s characters.`
email_error = ` is not a valid email address.`
url_error = `'%s' is not a valid URL.`
include_error = ` must contain substring '%s'.`
url_error = `"%s" is not a valid URL.`
include_error = ` must contain substring "%s".`
glob_pattern_error = ` glob pattern is invalid: %s.`
regex_pattern_error = ` regex pattern is invalid: %s.`
username_error = ` can only contain alphanumeric chars ('0-9','a-z','A-Z'), dash ('-'), underscore ('_') and dot ('.'). It cannot begin or end with non-alphanumeric chars, and consecutive non-alphanumeric chars are also forbidden.`
@ -521,7 +521,7 @@ team_name_been_taken = The team name is already taken.
team_no_units_error = Allow access to at least one repository section.
email_been_used = The email address is already used.
email_invalid = The email address is invalid.
openid_been_used = The OpenID address '%s' is already used.
openid_been_used = The OpenID address "%s" is already used.
username_password_incorrect = Username or password is incorrect.
password_complexity = Password does not pass complexity requirements:
password_lowercase_one = At least one lowercase character
@ -573,9 +573,9 @@ disabled_public_activity = This user has disabled the public visibility of the a
email_visibility.limited = Your email address is visible to all authenticated users
email_visibility.private = Your email address is only visible to you and administrators
form.name_reserved = The username '%s' is reserved.
form.name_pattern_not_allowed = The pattern '%s' is not allowed in a username.
form.name_chars_not_allowed = User name '%s' contains invalid characters.
form.name_reserved = The username "%s" is reserved.
form.name_pattern_not_allowed = The pattern "%s" is not allowed in a username.
form.name_chars_not_allowed = User name "%s" contains invalid characters.
[settings]
profile = Profile
@ -606,7 +606,7 @@ location = Location
update_theme = Update Theme
update_profile = Update Profile
update_language = Update Language
update_language_not_found = Language '%s' is not available.
update_language_not_found = Language "%s" is not available.
update_language_success = Language has been updated.
update_profile_success = Your profile has been updated.
change_username = Your username has been changed.
@ -683,7 +683,7 @@ add_new_email = Add New Email Address
add_new_openid = Add New OpenID URI
add_email = Add Email Address
add_openid = Add OpenID URI
add_email_confirmation_sent = A confirmation email has been sent to '%s'. Please check your inbox within the next %s to confirm your email address.
add_email_confirmation_sent = A confirmation email has been sent to "%s". Please check your inbox within the next %s to confirm your email address.
add_email_success = The new email address has been added.
email_preference_set_success = Email preference has been set successfully.
add_openid_success = The new OpenID address has been added.
@ -722,7 +722,7 @@ gpg_token_help = You can generate a signature using:
gpg_token_code = echo "%s" | gpg -a --default-key %s --detach-sig
gpg_token_signature = Armored GPG signature
key_signature_gpg_placeholder = Begins with '-----BEGIN PGP SIGNATURE-----'
verify_gpg_key_success = GPG key '%s' has been verified.
verify_gpg_key_success = GPG key "%s" has been verified.
ssh_key_verified=Verified Key
ssh_key_verified_long=Key has been verified with a token and can be used to verify commits matching any activated email addresses for this user.
ssh_key_verify=Verify
@ -732,15 +732,15 @@ ssh_token = Token
ssh_token_help = You can generate a signature using:
ssh_token_signature = Armored SSH signature
key_signature_ssh_placeholder = Begins with '-----BEGIN SSH SIGNATURE-----'
verify_ssh_key_success = SSH key '%s' has been verified.
verify_ssh_key_success = SSH key "%s" has been verified.
subkeys = Subkeys
key_id = Key ID
key_name = Key Name
key_content = Content
principal_content = Content
add_key_success = The SSH key '%s' has been added.
add_gpg_key_success = The GPG key '%s' has been added.
add_principal_success = The SSH certificate principal '%s' has been added.
add_key_success = The SSH key "%s" has been added.
add_gpg_key_success = The GPG key "%s" has been added.
add_principal_success = The SSH certificate principal "%s" has been added.
delete_key = Remove
ssh_key_deletion = Remove SSH Key
gpg_key_deletion = Remove GPG Key
@ -995,8 +995,8 @@ archive.pull.nocomment = This repo is archived. You cannot comment on pull reque
form.reach_limit_of_creation_1 = The owner has already reached the limit of %d repository.
form.reach_limit_of_creation_n = The owner has already reached the limit of %d repositories.
form.name_reserved = The repository name '%s' is reserved.
form.name_pattern_not_allowed = The pattern '%s' is not allowed in a repository name.
form.name_reserved = The repository name "%s" is reserved.
form.name_pattern_not_allowed = The pattern "%s" is not allowed in a repository name.
need_auth = Authorization
migrate_options = Migration Options
@ -1148,7 +1148,7 @@ editor.must_be_on_a_branch = You must be on a branch to make or propose changes
editor.fork_before_edit = You must fork this repository to make or propose changes to this file.
editor.delete_this_file = Delete File
editor.must_have_write_access = You must have write access to make or propose changes to this file.
editor.file_delete_success = File '%s' has been deleted.
editor.file_delete_success = File "%s" has been deleted.
editor.name_your_file = Name your file…
editor.filename_help = Add a directory by typing its name followed by a slash ('/'). Remove a directory by typing backspace at the beginning of the input field.
editor.or = or
@ -1156,12 +1156,12 @@ editor.cancel_lower = Cancel
editor.commit_signed_changes = Commit Signed Changes
editor.commit_changes = Commit Changes
editor.add_tmpl = Add '<filename>'
editor.add = Add '%s'
editor.update = Update '%s'
editor.delete = Delete '%s'
editor.add = Add %s
editor.update = Update %s
editor.delete = Delete %s
editor.patch = Apply Patch
editor.patching = Patching:
editor.fail_to_apply_patch = Unable to apply patch '%s'
editor.fail_to_apply_patch = Unable to apply patch "%s"
editor.new_patch = New Patch
editor.commit_message_desc = Add an optional extended description…
editor.signoff_desc = Add a Signed-off-by trailer by the committer at the end of the commit log message.
@ -1173,29 +1173,29 @@ editor.new_branch_name = Name the new branch for this commit
editor.new_branch_name_desc = New branch name…
editor.cancel = Cancel
editor.filename_cannot_be_empty = The filename cannot be empty.
editor.filename_is_invalid = The filename is invalid: '%s'.
editor.branch_does_not_exist = Branch '%s' does not exist in this repository.
editor.branch_already_exists = Branch '%s' already exists in this repository.
editor.directory_is_a_file = Directory name '%s' is already used as a filename in this repository.
editor.file_is_a_symlink = '%s' is a symbolic link. Symbolic links cannot be edited in the web editor
editor.filename_is_a_directory = Filename '%s' is already used as a directory name in this repository.
editor.file_editing_no_longer_exists = The file being edited, '%s', no longer exists in this repository.
editor.file_deleting_no_longer_exists = The file being deleted, '%s', no longer exists in this repository.
editor.filename_is_invalid = The filename is invalid: "%s".
editor.branch_does_not_exist = Branch "%s" does not exist in this repository.
editor.branch_already_exists = Branch "%s" already exists in this repository.
editor.directory_is_a_file = Directory name "%s" is already used as a filename in this repository.
editor.file_is_a_symlink = "%s" is a symbolic link. Symbolic links cannot be edited in the web editor
editor.filename_is_a_directory = Filename "%s" is already used as a directory name in this repository.
editor.file_editing_no_longer_exists = The file being edited, "%s", no longer exists in this repository.
editor.file_deleting_no_longer_exists = The file being deleted, "%s", no longer exists in this repository.
editor.file_changed_while_editing = The file contents have changed since you started editing. <a target="_blank" rel="noopener noreferrer" href="%s">Click here</a> to see them or <strong>Commit Changes again</strong> to overwrite them.
editor.file_already_exists = A file named '%s' already exists in this repository.
editor.file_already_exists = A file named "%s" already exists in this repository.
editor.commit_empty_file_header = Commit an empty file
editor.commit_empty_file_text = The file you're about to commit is empty. Proceed?
editor.no_changes_to_show = There are no changes to show.
editor.fail_to_update_file = Failed to update/create file '%s'.
editor.fail_to_update_file = Failed to update/create file "%s".
editor.fail_to_update_file_summary = Error Message:
editor.push_rejected_no_message = The change was rejected by the server without a message. Please check Git Hooks.
editor.push_rejected = The change was rejected by the server. Please check Git Hooks.
editor.push_rejected_summary = Full Rejection Message:
editor.add_subdir = Add a directory…
editor.unable_to_upload_files = Failed to upload files to '%s' with error: %v
editor.upload_file_is_locked = File '%s' is locked by %s.
editor.upload_files_to_dir = Upload files to '%s'
editor.cannot_commit_to_protected_branch = Cannot commit to protected branch '%s'.
editor.unable_to_upload_files = Failed to upload files to "%s" with error: %v
editor.upload_file_is_locked = File "%s" is locked by %s.
editor.upload_files_to_dir = Upload files to "%s"
editor.cannot_commit_to_protected_branch = Cannot commit to protected branch "%s".
editor.no_commit_to_branch = Unable to commit directly to branch because:
editor.user_no_push_to_branch = User cannot push to branch
editor.require_signed_commit = Branch requires a signed commit
@ -1204,7 +1204,7 @@ editor.revert = Revert %s onto:
commits.desc = Browse source code change history.
commits.commits = Commits
commits.no_commits = No commits in common. '%s' and '%s' have entirely different histories.
commits.no_commits = No commits in common. "%s" and "%s" have entirely different histories.
commits.nothing_to_compare = These branches are equal.
commits.search = Search commits…
commits.search.tooltip = You can prefix keywords with "author:", "committer:", "after:", or "before:", e.g. "revert author:Alice before:2019-01-13".
@ -1240,14 +1240,14 @@ projects.create = Create Project
projects.title = Title
projects.new = New Project
projects.new_subheader = Coordinate, track, and update your work in one place, so projects stay transparent and on schedule.
projects.create_success = The project '%s' has been created.
projects.create_success = The project "%s" has been created.
projects.deletion = Delete Project
projects.deletion_desc = Deleting a project removes it from all related issues. Continue?
projects.deletion_success = The project has been deleted.
projects.edit = Edit Project
projects.edit_subheader = Projects organize issues and track progress.
projects.modify = Edit Project
projects.edit_success = Project '%s' has been updated.
projects.edit_success = Project "%s" has been updated.
projects.type.none = "None"
projects.type.basic_kanban = "Basic Kanban"
projects.type.bug_triage = "Bug Triage"
@ -1319,7 +1319,7 @@ issues.label_templates.title = Load a predefined set of labels
issues.label_templates.info = No labels exist yet. Create a label with 'New Label' or use a predefined label set:
issues.label_templates.helper = Select a label set
issues.label_templates.use = Use Label Set
issues.label_templates.fail_to_load_file = Failed to load label template file '%s': %v
issues.label_templates.fail_to_load_file = Failed to load label template file "%s": %v
issues.add_label = added the %s label %s
issues.add_labels = added the %s labels %s
issues.remove_label = removed the %s label %s
@ -1563,7 +1563,7 @@ issues.review.add_review_request = "requested review from %s %s"
issues.review.remove_review_request = "removed review request for %s %s"
issues.review.remove_review_request_self = "refused to review %s"
issues.review.pending = Pending
issues.review.pending.tooltip = This comment is not currently visible to other users. To submit your pending comments, select '%s' -> '%s/%s/%s' at the top of the page.
issues.review.pending.tooltip = This comment is not currently visible to other users. To submit your pending comments, select "%s" -> "%s/%s/%s" at the top of the page.
issues.review.review = Review
issues.review.reviewers = Reviewers
issues.review.outdated = Outdated
@ -1731,12 +1731,12 @@ milestones.desc = Description
milestones.due_date = Due Date (optional)
milestones.clear = Clear
milestones.invalid_due_date_format = "Due date format must be 'yyyy-mm-dd'."
milestones.create_success = The milestone '%s' has been created.
milestones.create_success = The milestone "%s" has been created.
milestones.edit = Edit Milestone
milestones.edit_subheader = Milestones organize issues and track progress.
milestones.cancel = Cancel
milestones.modify = Update Milestone
milestones.edit_success = Milestone '%s' has been updated.
milestones.edit_success = Milestone "%s" has been updated.
milestones.deletion = Delete Milestone
milestones.deletion_desc = Deleting a milestone removes it from all related issues. Continue?
milestones.deletion_success = The milestone has been deleted.
@ -1747,7 +1747,7 @@ milestones.filter_sort.most_complete = Most complete
milestones.filter_sort.most_issues = Most issues
milestones.filter_sort.least_issues = Least issues
signing.will_sign = This commit will be signed with key '%s'
signing.will_sign = This commit will be signed with key "%s"
signing.wont_sign.error = There was an error whilst checking if the commit could be signed
signing.wont_sign.nokey = There is no key available to sign this commit
signing.wont_sign.never = Commits are never signed
@ -1783,9 +1783,9 @@ wiki.file_revision = Page Revision
wiki.wiki_page_revisions = Wiki Page Revisions
wiki.back_to_wiki = Back to wiki page
wiki.delete_page_button = Delete Page
wiki.delete_page_notice_1 = Deleting the wiki page '%s' cannot be undone. Continue?
wiki.delete_page_notice_1 = Deleting the wiki page "%s" cannot be undone. Continue?
wiki.page_already_exists = A wiki page with the same name already exists.
wiki.reserved_page = The wiki page name '%s' is reserved.
wiki.reserved_page = The wiki page name "%s" is reserved.
wiki.pages = Pages
wiki.last_updated = Last updated %s
wiki.page_name_desc = Enter a name for this Wiki page. Some special names are: 'Home', '_Sidebar' and '_Footer'.
@ -2132,7 +2132,7 @@ settings.title = Title
settings.deploy_key_content = Content
settings.key_been_used = A deploy key with identical content is already in use.
settings.key_name_used = A deploy key with the same name already exists.
settings.add_key_success = The deploy key '%s' has been added.
settings.add_key_success = The deploy key "%s" has been added.
settings.deploy_key_deletion = Remove Deploy Key
settings.deploy_key_deletion_desc = Removing a deploy key will revoke its access to this repository. Continue?
settings.deploy_key_deletion_success = The deploy key has been removed.
@ -2181,9 +2181,9 @@ settings.protect_unprotected_file_patterns = "Unprotected file patterns (separat
settings.protect_unprotected_file_patterns_desc = "Unprotected files that are allowed to be changed directly if user has write access, bypassing push restriction. Multiple patterns can be separated using semicolon (';'). See <a href='https://pkg.go.dev/github.com/gobwas/glob#Compile'>github.com/gobwas/glob</a> documentation for pattern syntax. Examples: <code>.drone.yml</code>, <code>/docs/**/*.txt</code>."
settings.add_protected_branch = Enable protection
settings.delete_protected_branch = Disable protection
settings.update_protect_branch_success = Branch protection for rule '%s' has been updated.
settings.remove_protected_branch_success = Branch protection for rule '%s' has been removed.
settings.remove_protected_branch_failed = Removing branch protection rule '%s' failed.
settings.update_protect_branch_success = Branch protection for rule "%s" has been updated.
settings.remove_protected_branch_success = Branch protection for rule "%s" has been removed.
settings.remove_protected_branch_failed = Removing branch protection rule "%s" failed.
settings.protected_branch_deletion = Delete Branch Protection
settings.protected_branch_deletion_desc = Disabling branch protection allows users with write permission to push to the branch. Continue?
settings.block_rejected_reviews = Block merge on rejected reviews
@ -2368,42 +2368,42 @@ release.tags_for = Tags for %s
branch.name = Branch Name
branch.search = Search branches
branch.already_exists = A branch named '%s' already exists.
branch.already_exists = A branch named "%s" already exists.
branch.delete_head = Delete
branch.delete = Delete Branch '%s'
branch.delete = Delete Branch "%s"
branch.delete_html = Delete Branch
branch.delete_desc = Deleting a branch is permanent. It <strong>CANNOT</strong> be undone. Continue?
branch.deletion_success = Branch '%s' has been deleted.
branch.deletion_failed = Failed to delete branch '%s'.
branch.delete_branch_has_new_commits = Branch '%s' cannot be deleted because new commits have been added after merging.
branch.deletion_success = Branch "%s" has been deleted.
branch.deletion_failed = Failed to delete branch "%s".
branch.delete_branch_has_new_commits = Branch "%s" cannot be deleted because new commits have been added after merging.
branch.create_branch = Create branch <strong>%s</strong>
branch.create_from = from '%s'
branch.create_success = Branch '%s' has been created.
branch.branch_already_exists = Branch '%s' already exists in this repository.
branch.branch_name_conflict = Branch name '%s' conflicts with the already existing branch '%s'.
branch.tag_collision = Branch '%s' cannot be created as a tag with same name already exists in the repository.
branch.create_from = from "%s"
branch.create_success = Branch "%s" has been created.
branch.branch_already_exists = Branch "%s" already exists in this repository.
branch.branch_name_conflict = Branch name "%s" conflicts with the already existing branch "%s".
branch.tag_collision = Branch "%s" cannot be created as a tag with same name already exists in the repository.
branch.deleted_by = Deleted by %s
branch.restore_success = Branch '%s' has been restored.
branch.restore_failed = Failed to restore branch '%s'.
branch.protected_deletion_failed = Branch '%s' is protected. It cannot be deleted.
branch.default_deletion_failed = Branch '%s' is the default branch. It cannot be deleted.
branch.restore = Restore Branch '%s'
branch.download = Download Branch '%s'
branch.restore_success = Branch "%s" has been restored.
branch.restore_failed = Failed to restore branch "%s".
branch.protected_deletion_failed = Branch "%s" is protected. It cannot be deleted.
branch.default_deletion_failed = Branch "%s" is the default branch. It cannot be deleted.
branch.restore = Restore Branch "%s"
branch.download = Download Branch "%s"
branch.included_desc = This branch is part of the default branch
branch.included = Included
branch.create_new_branch = Create branch from branch:
branch.confirm_create_branch = Create branch
branch.create_branch_operation = Create branch
branch.new_branch = Create new branch
branch.new_branch_from = Create new branch from '%s'
branch.new_branch_from = Create new branch from "%s"
branch.renamed = Branch %s was renamed to %s.
tag.create_tag = Create tag <strong>%s</strong>
tag.create_tag_operation = Create tag
tag.confirm_create_tag = Create tag
tag.create_tag_from = Create new tag from '%s'
tag.create_tag_from = Create new tag from "%s"
tag.create_success = Tag '%s' has been created.
tag.create_success = Tag "%s" has been created.
topic.manage_topics = Manage Topics
topic.done = Done
@ -2440,8 +2440,8 @@ team_permission_desc = Permission
team_unit_desc = Allow Access to Repository Sections
team_unit_disabled = (Disabled)
form.name_reserved = The organization name '%s' is reserved.
form.name_pattern_not_allowed = The pattern '%s' is not allowed in an organization name.
form.name_reserved = The organization name "%s" is reserved.
form.name_pattern_not_allowed = The pattern "%s" is not allowed in an organization name.
form.create_org_not_allowed = You are not allowed to create an organization.
settings = Settings
@ -2650,7 +2650,7 @@ users.created = Created
users.last_login = Last Sign-In
users.never_login = Never Signed-In
users.send_register_notify = Send User Registration Notification
users.new_success = The user account '%s' has been created.
users.new_success = The user account "%s" has been created.
users.edit = Edit
users.auth_source = Authentication Source
users.local = Local
@ -2850,7 +2850,7 @@ auths.tip.yandex = Create a new application at https://oauth.yandex.com/client/n
auths.tip.mastodon = Input a custom instance URL for the mastodon instance you want to authenticate with (or use the default one)
auths.edit = Edit Authentication Source
auths.activated = This Authentication Source is Activated
auths.new_success = The authentication '%s' has been added.
auths.new_success = The authentication "%s" has been added.
auths.update_success = The authentication source has been updated.
auths.update = Update Authentication Source
auths.delete = Delete Authentication Source
@ -2858,7 +2858,7 @@ auths.delete_auth_title = Delete Authentication Source
auths.delete_auth_desc = Deleting an authentication source prevents users from using it to sign in. Continue?
auths.still_in_used = The authentication source is still in use. Convert or delete any users using this authentication source first.
auths.deletion_success = The authentication source has been deleted.
auths.login_source_exist = The authentication source '%s' already exists.
auths.login_source_exist = The authentication source "%s" already exists.
auths.login_source_of_type_exist = An authentication source of this type already exists.
auths.unable_to_initialize_openid = Unable to initialize OpenID Connect Provider: %s
auths.invalid_openIdConnectAutoDiscoveryURL = Invalid Auto Discovery URL (this must be a valid URL starting with http:// or https://)
@ -2951,8 +2951,8 @@ config.mailer_sendmail_timeout = Sendmail Timeout
config.mailer_use_dummy = Dummy
config.test_email_placeholder = Email (e.g. test@example.com)
config.send_test_mail = Send Testing Email
config.test_mail_failed = Failed to send a testing email to '%s': %v
config.test_mail_sent = A testing email has been sent to '%s'.
config.test_mail_failed = Failed to send a testing email to "%s": %v
config.test_mail_sent = A testing email has been sent to "%s".
config.oauth_config = OAuth Configuration
config.oauth_enabled = Enabled
@ -3343,7 +3343,7 @@ name = Name
creation = Add Secret
creation.name_placeholder = case-insensitive, alphanumeric characters or underscores only, cannot start with GITEA_ or GITHUB_
creation.value_placeholder = Input any content. Whitespace at the start and end will be omitted.
creation.success = The secret '%s' has been added.
creation.success = The secret "%s" has been added.
creation.failed = Failed to add secret.
deletion = Remove secret
deletion.description = Removing a secret is permanent and cannot be undone. Continue?

View File

@ -214,7 +214,7 @@ func TestAPICreateFile(t *testing.T) {
req = NewRequestWithJSON(t, "POST", url, &createFileOptions)
resp = MakeRequest(t, req, http.StatusCreated)
DecodeJSON(t, resp, &fileResponse)
expectedMessage := "Add '" + treePath + "'\n"
expectedMessage := "Add " + treePath + "\n"
assert.EqualValues(t, expectedMessage, fileResponse.Commit.Message)
// Test trying to create a file that already exists, should fail

View File

@ -99,7 +99,7 @@ func TestAPIDeleteFile(t *testing.T) {
req = NewRequestWithJSON(t, "DELETE", url, &deleteFileOptions)
resp = MakeRequest(t, req, http.StatusOK)
DecodeJSON(t, resp, &fileResponse)
expectedMessage := "Delete '" + treePath + "'\n"
expectedMessage := "Delete " + treePath + "\n"
assert.EqualValues(t, expectedMessage, fileResponse.Commit.Message)
// Test deleting a file with the wrong SHA

View File

@ -199,7 +199,7 @@ func TestAPIUpdateFile(t *testing.T) {
req = NewRequestWithJSON(t, "PUT", url, &updateFileOptions)
resp = MakeRequest(t, req, http.StatusOK)
DecodeJSON(t, resp, &fileResponse)
expectedMessage := "Update '" + treePath + "'\n"
expectedMessage := "Update " + treePath + "\n"
assert.EqualValues(t, expectedMessage, fileResponse.Commit.Message)
// Test updating a file with the wrong SHA

View File

@ -55,7 +55,7 @@ func TestCreateFileOnProtectedBranch(t *testing.T) {
// Check if master branch has been locked successfully
flashCookie := session.GetCookie(gitea_context.CookieNameFlash)
assert.NotNil(t, flashCookie)
assert.EqualValues(t, "success%3DBranch%2Bprotection%2Bfor%2Brule%2B%2527master%2527%2Bhas%2Bbeen%2Bupdated.", flashCookie.Value)
assert.EqualValues(t, "success%3DBranch%2Bprotection%2Bfor%2Brule%2B%2522master%2522%2Bhas%2Bbeen%2Bupdated.", flashCookie.Value)
// Request editor page
req = NewRequest(t, "GET", "/user2/repo1/_new/master/")
@ -76,7 +76,7 @@ func TestCreateFileOnProtectedBranch(t *testing.T) {
resp = session.MakeRequest(t, req, http.StatusOK)
// Check body for error message
assert.Contains(t, resp.Body.String(), "Cannot commit to protected branch &#39;master&#39;.")
assert.Contains(t, resp.Body.String(), "Cannot commit to protected branch &#34;master&#34;.")
// remove the protected branch
csrf = GetCSRF(t, session, "/user2/repo1/settings/branches")
@ -95,7 +95,7 @@ func TestCreateFileOnProtectedBranch(t *testing.T) {
// Check if master branch has been locked successfully
flashCookie = session.GetCookie(gitea_context.CookieNameFlash)
assert.NotNil(t, flashCookie)
assert.EqualValues(t, "error%3DRemoving%2Bbranch%2Bprotection%2Brule%2B%25271%2527%2Bfailed.", flashCookie.Value)
assert.EqualValues(t, "error%3DRemoving%2Bbranch%2Bprotection%2Brule%2B%25221%2522%2Bfailed.", flashCookie.Value)
})
}

View File

@ -439,7 +439,7 @@ func doProtectBranch(ctx APITestContext, branch, userToWhitelist, unprotectedFil
// Check if master branch has been locked successfully
flashCookie := ctx.Session.GetCookie(gitea_context.CookieNameFlash)
assert.NotNil(t, flashCookie)
assert.EqualValues(t, "success%3DBranch%2Bprotection%2Bfor%2Brule%2B%2527"+url.QueryEscape(branch)+"%2527%2Bhas%2Bbeen%2Bupdated.", flashCookie.Value)
assert.EqualValues(t, "success%3DBranch%2Bprotection%2Bfor%2Brule%2B%2522"+url.QueryEscape(branch)+"%2522%2Bhas%2Bbeen%2Bupdated.", flashCookie.Value)
}
}

View File

@ -67,7 +67,7 @@ func TestPullCreate(t *testing.T) {
resp = session.MakeRequest(t, req, http.StatusOK)
assert.Regexp(t, `\+Hello, World \(Edited\)`, resp.Body)
assert.Regexp(t, "diff", resp.Body)
assert.Regexp(t, `Subject: \[PATCH\] Update 'README.md'`, resp.Body)
assert.Regexp(t, `Subject: \[PATCH\] Update README.md`, resp.Body)
assert.NotRegexp(t, "diff.*diff", resp.Body) // not two diffs, just one
})
}

View File

@ -187,7 +187,7 @@ func TestPullCleanUpAfterMerge(t *testing.T) {
htmlDoc := NewHTMLParser(t, resp.Body)
resultMsg := htmlDoc.doc.Find(".ui.message>p").Text()
assert.EqualValues(t, "Branch 'user1/repo1:feature/test' has been deleted.", resultMsg)
assert.EqualValues(t, "Branch \"user1/repo1:feature/test\" has been deleted.", resultMsg)
})
}