|
1 | 1 | @page "/profile" |
2 | 2 |
|
3 | | -<h1 class="title mb-5">Profile</h1> |
| 3 | +<h1 class="title mb-5">@Loc["Profile"]</h1> |
4 | 4 | <div class="profile d-flex flex-row column-gap-2 mb-5"> |
5 | 5 | <Avatar Url="@Athlete.ImgUrl" Size="50"/> |
6 | 6 | <div class="d-flex flex-column"> |
7 | 7 | <span class="profile-name">@Athlete.Name</span> |
8 | | - <span class="member-since">Member since @CreatedTime</span> |
| 8 | + <span class="member-since">@string.Format(Loc["MemberSince"], @CreatedTime)</span> |
9 | 9 | </div> |
10 | 10 | </div> |
11 | 11 |
|
|
15 | 15 | @if (Athlete.PendingFollowers?.Count > 0 && Athlete.PendingFollowers is not null) |
16 | 16 | { |
17 | 17 | <div class="follow-requests"> |
18 | | - <h2 class="mb-3">Follow Requests</h2> |
| 18 | + <h2 class="mb-3">@Loc["FollowRequests"]</h2> |
19 | 19 | <div class="d-flex flex-column row-gap-3"> |
20 | 20 | @foreach (Athlete? pendingFollower in Athlete.PendingFollowers) |
21 | 21 | { |
|
32 | 32 | </div> |
33 | 33 | </div> |
34 | 34 | } |
35 | | - |
| 35 | + |
36 | 36 | <div class="followers"> |
37 | | - <h2 class="mb-3">Followers</h2> |
| 37 | + <h2 class="mb-3">@Loc["Followers"]</h2> |
38 | 38 | @if (Athlete.Followers?.Count == 0 || Athlete.Followers is null) |
39 | 39 | { |
40 | | - <span>You currently have no followers 😕</span> |
| 40 | + <span>@Loc["NoFollowers"]</span> |
41 | 41 | } |
42 | 42 | else |
43 | 43 | { |
|
57 | 57 | </div> |
58 | 58 |
|
59 | 59 | <div class="following mb-5"> |
60 | | - <h2 class="mb-3">Following</h2> |
| 60 | + <h2 class="mb-3">@Loc["Following"]</h2> |
61 | 61 | @if ((Athlete.Following?.Count == 0 || Athlete.Following is null) && (Athlete.PendingFollowing?.Count == 0 || Athlete.PendingFollowing is null)) |
62 | 62 | { |
63 | | - <span>You're not following anyone 😕</span> |
| 63 | + <span>@Loc["NoFollowings"]</span> |
64 | 64 | } |
65 | 65 | else |
66 | 66 | { |
|
92 | 92 | </div> |
93 | 93 | <div class="profile-actions mb-5"> |
94 | 94 | <div class="d-flex flex-column row-gap-3"> |
95 | | - <h4 class="mt-4">Import activities from Strava</h4> |
96 | | - <span>Import last 30 days of activities to get started! <br/> (This can only be done once)</span> |
| 95 | + <h4 class="mt-4">@Loc["Import_title"]</h4> |
| 96 | + <span>@(new MarkupString(Loc["Import_body"]))</span> |
97 | 97 | <button class="btn btn-primary" @onclick="Import" disabled="@(Importing || Athlete.HasImportedActivities)"> |
98 | 98 | <i class="bi bi-box-arrow-in-down me-1" aria-hidden="true"></i> |
99 | 99 | @if (Athlete.HasImportedActivities) |
100 | 100 | { |
101 | | - <text>Import complete</text> |
| 101 | + <text>@Loc["ImportComplete"]</text> |
102 | 102 | } |
103 | 103 | else if (Importing) |
104 | 104 | { |
105 | | - <text>Importing...</text> |
| 105 | + <text>@Loc["Importing"]...</text> |
106 | 106 | } |
107 | 107 | else |
108 | 108 | { |
109 | | - <text>Import activities</text> |
| 109 | + <text>@Loc["ImportActivities"]</text> |
110 | 110 | } |
111 | 111 | </button> |
112 | 112 | @if (!string.IsNullOrEmpty(ImportResult)) |
|
116 | 116 | </div> |
117 | 117 |
|
118 | 118 | <div class="d-flex flex-column row-gap-2"> |
119 | | - <h4 class="mt-4">Sign out</h4> |
120 | | - <span>If using a public/shared computer, please remember to sign out.</span> |
121 | | - <a class="btn btn-secondary mt-1" href="/auth/logout"><i class="bi bi-box-arrow-right me-1" |
122 | | - aria-hidden="true"></i>Sign out</a> |
| 119 | + <h4 class="mt-4">@Loc["Signout_title"]</h4> |
| 120 | + <span>@Loc["Signout_body"]</span> |
| 121 | + <a class="btn btn-secondary mt-1" href="/auth/logout"> |
| 122 | + <i class="bi bi-box-arrow-right me-1" aria-hidden="true"></i>@Loc["SignOut"] |
| 123 | + </a> |
123 | 124 | </div> |
124 | 125 |
|
125 | 126 | <div class="d-flex flex-column row-gap-2"> |
126 | | - <h4 class="mt-4">Delete account</h4> |
127 | | - <span class="text-danger"> |
128 | | - Delete user account and deauthorize application. All data will be |
129 | | - removed.<br/>NB! This cannot be undone! |
130 | | - </span> |
| 127 | + <h4 class="mt-4">@Loc["DeleteAccount_title"]</h4> |
| 128 | + <span class="text-danger">@(new MarkupString(Loc["DeleteAccount_body"]))</span> |
131 | 129 | <a class="btn btn-danger mt-1" data-bs-toggle="modal" data-bs-target="#deleteAccount"> |
132 | | - <i class="bi bi-trash-fill me-1" aria-hidden="true"></i>Forget me |
| 130 | + <i class="bi bi-trash-fill me-1" aria-hidden="true"></i>@Loc["ForgetMe"] |
133 | 131 | </a> |
134 | 132 | </div> |
135 | 133 | </div> |
|
138 | 136 |
|
139 | 137 | <Modal Id="deleteAccount" Size="sm"> |
140 | 138 | <HeaderContent> |
141 | | - <span>Delete account</span> |
| 139 | + <span>@Loc["DeleteAccount_title"]</span> |
142 | 140 | </HeaderContent> |
143 | 141 | <BodyContent> |
144 | 142 | <i class="bi bi-trash delete-account-modal-icon" aria-hidden="true"></i> |
145 | | - <span class="text-center delete-account-modal-text">Are you sure you want to delete your Tevling account?</span> |
| 143 | + <span class="text-center delete-account-modal-text">@Loc["DeleteAccount_confirm"]</span> |
146 | 144 | </BodyContent> |
147 | 145 | <FooterContent> |
148 | | - <a class="btn btn-danger mt-1 delete-account-modal-button" href="/auth/logout?deauthorize=true">Delete |
149 | | - account</a> |
150 | | - <button class="btn btn-secondary mt-1 delete-account-modal-button" data-bs-dismiss="modal">Cancel</button> |
| 146 | + <a class="btn btn-danger mt-1 delete-account-modal-button" href="/auth/logout?deauthorize=true">@Loc["DeleteAccount"]</a> |
| 147 | + <button class="btn btn-secondary mt-1 delete-account-modal-button" data-bs-dismiss="modal">@Loc["Cancel"]</button> |
151 | 148 | </FooterContent> |
152 | 149 | </Modal> |
0 commit comments