housekeep: TU rename - UI elements

Rename all UI elements and translations.

Signed-off-by: moson <moson@archlinux.org>
This commit is contained in:
moson 2023-09-01 14:44:43 +02:00
parent 1702075875
commit f540c79580
No known key found for this signature in database
GPG key ID: 4A4760AB4EE15296
76 changed files with 952 additions and 1143 deletions

View file

@ -11,7 +11,7 @@ test_expect_success 'Test basic authentication.' '
grep -q AUR_PRIVILEGED=0 out
'
test_expect_success 'Test Trusted User authentication.' '
test_expect_success 'Test Package Maintainer authentication.' '
cover "$GIT_AUTH" "$AUTH_KEYTYPE_TU" "$AUTH_KEYTEXT_TU" >out &&
grep -q AUR_USER=tu out &&
grep -q AUR_PRIVILEGED=1 out

View file

@ -124,7 +124,7 @@ test_expect_success "Try to push to someone else's repository." '
cover "$GIT_SERVE" 2>&1
'
test_expect_success "Try to push to someone else's repository as Trusted User." '
test_expect_success "Try to push to someone else's repository as Package Maintainer." '
cat >expected <<-EOF &&
tu
foobar
@ -195,7 +195,7 @@ test_expect_success "Adopt an already adopted package base." '
cover "$GIT_SERVE" 2>&1
'
test_expect_success "Adopt a package base as a Trusted User." '
test_expect_success "Adopt a package base as a Package Maintainer." '
SSH_ORIGINAL_COMMAND="adopt foobar2" AUR_USER=tu AUR_PRIVILEGED=1 \
cover "$GIT_SERVE" 2>&1 &&
cat >expected <<-EOF &&
@ -216,7 +216,7 @@ test_expect_success "Disown one's own package base as a regular user." '
test_cmp expected actual
'
test_expect_success "Disown one's own package base as a Trusted User." '
test_expect_success "Disown one's own package base as a Package Maintainer." '
SSH_ORIGINAL_COMMAND="disown foobar2" AUR_USER=tu AUR_PRIVILEGED=1 \
cover "$GIT_SERVE" 2>&1 &&
cat >expected <<-EOF &&
@ -248,7 +248,7 @@ test_expect_success "Try to steal another user's package as a regular user." '
cover "$GIT_SERVE" 2>&1
'
test_expect_success "Try to steal another user's package as a Trusted User." '
test_expect_success "Try to steal another user's package as a Package Maintainer." '
SSH_ORIGINAL_COMMAND="adopt foobar" AUR_USER=user AUR_PRIVILEGED=0 \
cover "$GIT_SERVE" 2>&1 &&
SSH_ORIGINAL_COMMAND="adopt foobar" AUR_USER=tu AUR_PRIVILEGED=1 \
@ -285,7 +285,7 @@ test_expect_success "Try to disown another user's package as a regular user." '
cover "$GIT_SERVE" 2>&1
'
test_expect_success "Try to disown another user's package as a Trusted User." '
test_expect_success "Try to disown another user's package as a Package Maintainer." '
SSH_ORIGINAL_COMMAND="adopt foobar" AUR_USER=user AUR_PRIVILEGED=0 \
cover "$GIT_SERVE" 2>&1 &&
SSH_ORIGINAL_COMMAND="disown foobar" AUR_USER=tu AUR_PRIVILEGED=1 \

View file

@ -125,7 +125,7 @@ test_expect_success 'Performing a non-fast-forward ref update.' '
test_cmp expected actual
'
test_expect_success 'Performing a non-fast-forward ref update as Trusted User.' '
test_expect_success 'Performing a non-fast-forward ref update as Package Maintainer.' '
old=$(git -C aur.git rev-parse HEAD) &&
new=$(git -C aur.git rev-parse HEAD^) &&
cat >expected <<-EOD &&
@ -149,7 +149,7 @@ test_expect_success 'Performing a non-fast-forward ref update as normal user wit
test_cmp expected actual
'
test_expect_success 'Performing a non-fast-forward ref update as Trusted User with AUR_OVERWRITE=1.' '
test_expect_success 'Performing a non-fast-forward ref update as Package Maintainer with AUR_OVERWRITE=1.' '
old=$(git -C aur.git rev-parse HEAD) &&
new=$(git -C aur.git rev-parse HEAD^) &&
AUR_USER=tu AUR_PKGBASE=foobar AUR_PRIVILEGED=1 AUR_OVERWRITE=1 \
@ -536,7 +536,7 @@ test_expect_success 'Pushing a blacklisted package.' '
test_cmp expected actual
'
test_expect_success 'Pushing a blacklisted package as Trusted User.' '
test_expect_success 'Pushing a blacklisted package as Package Maintainer.' '
old=$(git -C aur.git rev-parse HEAD) &&
test_when_finished "git -C aur.git reset --hard $old" &&
echo "pkgname = forbidden" >>aur.git/.SRCINFO &&
@ -565,7 +565,7 @@ test_expect_success 'Pushing a package already in the official repositories.' '
test_cmp expected actual
'
test_expect_success 'Pushing a package already in the official repositories as Trusted User.' '
test_expect_success 'Pushing a package already in the official repositories as Package Maintainer.' '
old=$(git -C aur.git rev-parse HEAD) &&
test_when_finished "git -C aur.git reset --hard $old" &&
echo "pkgname = official" >>aur.git/.SRCINFO &&

View file

@ -183,7 +183,7 @@ def test_homepage_stats(redis, packages):
("Packages updated in the past year", r"\d+"),
("Packages never updated", r"\d+"),
("Registered Users", r"\d+"),
("Trusted Users", r"\d+"),
("Package Maintainers", r"\d+"),
]
stats = root.xpath('//div[@id="pkg-stats"]//tr')

View file

@ -88,7 +88,7 @@ def test_archdev_navbar_authenticated_tu(client: TestClient, package_maintainer:
"Requests",
"Accounts",
"My Account",
"Trusted User",
"Package Maintainer",
"Logout",
]
cookies = {"AURSID": package_maintainer.login(Request(), "testPassword")}

View file

@ -554,7 +554,7 @@ def test_tu_vote_reminders(user: User):
email = Email(1).parse()
assert email.headers.get("To") == user.Email
expected = f"TU Vote Reminder: Proposal {vote_id}"
expected = f"Package Maintainer Vote Reminder: Proposal {vote_id}"
assert email.headers.get("Subject") == expected
expected = f"""\
@ -579,7 +579,7 @@ def test_notify_main(user: User):
email = Email(1).parse()
assert email.headers.get("To") == user.Email
expected = f"TU Vote Reminder: Proposal {vote_id}"
expected = f"Package Maintainer Vote Reminder: Proposal {vote_id}"
assert email.headers.get("Subject") == expected
expected = f"""\

View file

@ -1574,7 +1574,7 @@ def test_packages_post_disown_as_maintainer(
def test_packages_post_disown(
client: TestClient, tu_user: User, maintainer: User, package: Package
):
"""Disown packages as a Trusted User, which cannot bypass idle time."""
"""Disown packages as a Package Maintainer, which cannot bypass idle time."""
cookies = {"AURSID": tu_user.login(Request(), "testPassword")}
with client as request:
request.cookies = cookies

View file

@ -634,7 +634,7 @@ def test_tu_running_proposal(
active = details.xpath('./div[contains(@class, "field")]')[1]
content = active.text.strip()
assert "Active Trusted Users assigned:" in content
assert "Active Package Maintainers assigned:" in content
assert "1" in content
submitted = details.xpath('./div[contains(@class, "submitted")]/text()')[0]
@ -796,7 +796,7 @@ def test_tu_proposal_vote_unauthorized(
root = parse_root(response.text)
status = root.xpath('//span[contains(@class, "status")]/text()')[0]
assert status == "Only Trusted Users are allowed to vote."
assert status == "Only Package Maintainers are allowed to vote."
with client as request:
data = {"decision": "Yes"}
@ -806,7 +806,7 @@ def test_tu_proposal_vote_unauthorized(
root = parse_root(response.text)
status = root.xpath('//span[contains(@class, "status")]/text()')[0]
assert status == "Only Trusted Users are allowed to vote."
assert status == "Only Package Maintainers are allowed to vote."
def test_tu_proposal_vote_cant_self_vote(client, proposal):

View file

@ -36,7 +36,7 @@ def email_pieces(voteinfo: TUVoteInfo) -> Tuple[str, str]:
:param voteinfo: TUVoteInfo instance
:return: tuple(subject, content)
"""
subject = f"TU Vote Reminder: Proposal {voteinfo.ID}"
subject = f"Package Maintainer Vote Reminder: Proposal {voteinfo.ID}"
content = (
f"Please remember to cast your vote on proposal {voteinfo.ID} "
f"[1]. The voting period\nends in less than 48 hours.\n\n"