loading up the forgejo repo on tangled to test page performance

fix(i18n): fix several usages of i18n (#7422)

- Add new translations, if an existing one couldn't be used.
- Use existing translations, if one existed and fit the purpose.
- Spotted by the lint-locale-usage tooling by @fogti.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7422
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>

authored by Gusted Gusted and committed by 0ko bd9366e7 f691f037

Changed files
+15 -12
options
locale
locale_next
routers
web
repo
templates
admin
repo
settings
user
+1 -1
options/locale/locale_en-US.ini
··· 1436 1436 editor.filename_is_a_directory = Filename "%s" is already used as a directory name in this repository. 1437 1437 editor.file_editing_no_longer_exists = The file being edited, "%s", no longer exists in this repository. 1438 1438 editor.file_deleting_no_longer_exists = The file being deleted, "%s", no longer exists in this repository. 1439 - 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. 1439 + editor.file_changed_while_editing = The file contents have changed since you opened the file. <a target="_blank" rel="noopener noreferrer" href="%s">Click here</a> to see them or <strong>Commit changes again</strong> to overwrite them. 1440 1440 editor.file_already_exists = A file named "%s" already exists in this repository. 1441 1441 editor.commit_id_not_matching = The file was changed while you were editing it. Commit to a new branch and then merge. 1442 1442 editor.push_out_of_date = The push appears to be out of date.
+4 -1
options/locale_next/locale_en-US.json
··· 18 18 "themes.names.forgejo-light": "Forgejo light", 19 19 "themes.names.forgejo-dark": "Forgejo dark", 20 20 "error.not_found.title": "Page not found", 21 - "alert.asset_load_failed": "Failed to load asset files from {path}. Please make sure the asset files can be accessed." 21 + "alert.asset_load_failed": "Failed to load asset files from {path}. Please make sure the asset files can be accessed.", 22 + "settings.adopt": "Adopt", 23 + "install.invalid_lfs_path": "Unable to create the LFS root at the specified path: %[1]s", 24 + "install.lfs_jwt_secret_failed": "Unable to generate a LFS JWT secret: %[1]s" 22 25 }
+1 -1
routers/web/repo/editor.go
··· 585 585 ctx.Error(http.StatusInternalServerError, err.Error()) 586 586 } 587 587 } else if models.IsErrCommitIDDoesNotMatch(err) || git.IsErrPushOutOfDate(err) { 588 - ctx.RenderWithErr(ctx.Tr("repo.editor.file_changed_while_deleting", ctx.Repo.RepoLink+"/compare/"+util.PathEscapeSegments(form.LastCommit)+"..."+util.PathEscapeSegments(ctx.Repo.CommitID)), tplDeleteFile, &form) 588 + ctx.RenderWithErr(ctx.Tr("repo.editor.file_changed_while_editing", ctx.Repo.RepoLink+"/compare/"+util.PathEscapeSegments(form.LastCommit)+"..."+util.PathEscapeSegments(ctx.Repo.CommitID)), tplDeleteFile, &form) 589 589 } else if git.IsErrPushRejected(err) { 590 590 errPushRej := err.(*git.ErrPushRejected) 591 591 if len(errPushRej.Message) == 0 {
+1 -1
templates/admin/auth/list.tmpl
··· 31 31 <td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}">{{svg "octicon-pencil"}}</a></td> 32 32 </tr> 33 33 {{else}} 34 - <tr><td class="tw-text-center" colspan="7">{{ctx.Locale.Tr "no_results_found"}}</td></tr> 34 + <tr><td class="tw-text-center" colspan="7">{{ctx.Locale.Tr "repo.pulls.no_results"}}</td></tr> 35 35 {{end}} 36 36 </tbody> 37 37 </table>
+1 -1
templates/admin/emails/list.tmpl
··· 67 67 </td> 68 68 </tr> 69 69 {{else}} 70 - <tr><td class="tw-text-center" colspan="6">{{ctx.Locale.Tr "no_results_found"}}</td></tr> 70 + <tr><td class="tw-text-center" colspan="6">{{ctx.Locale.Tr "repo.pulls.no_results"}}</td></tr> 71 71 {{end}} 72 72 </tbody> 73 73 </table>
+1 -1
templates/admin/notice.tmpl
··· 25 25 <td class="view-detail"><a href="#">{{svg "octicon-note" 16}}</a></td> 26 26 </tr> 27 27 {{else}} 28 - <tr><td class="tw-text-center" colspan="6">{{ctx.Locale.Tr "no_results_found"}}</td></tr> 28 + <tr><td class="tw-text-center" colspan="6">{{ctx.Locale.Tr "repo.pulls.no_results"}}</td></tr> 29 29 {{end}} 30 30 </tbody> 31 31 {{if .Notices}}
+1 -1
templates/admin/org/list.tmpl
··· 67 67 <td><a href="{{.OrganisationLink}}/settings" data-tooltip-content="{{ctx.Locale.Tr "edit"}}">{{svg "octicon-pencil"}}</a></td> 68 68 </tr> 69 69 {{else}} 70 - <tr><td class="tw-text-center" colspan="7">{{ctx.Locale.Tr "no_results_found"}}</td></tr> 70 + <tr><td class="tw-text-center" colspan="7">{{ctx.Locale.Tr "repo.pulls.no_results"}}</td></tr> 71 71 {{end}} 72 72 </tbody> 73 73 </table>
+1 -1
templates/admin/packages/list.tmpl
··· 75 75 <td><a class="delete-button" href="" data-url="{{$.Link}}/delete?page={{$.Page.Paginater.Current}}&sort={{$.SortType}}" data-id="{{.Version.ID}}" data-name="{{.Package.Name}}" data-data-version="{{.Version.Version}}">{{svg "octicon-trash"}}</a></td> 76 76 </tr> 77 77 {{else}} 78 - <tr><td class="tw-text-center" colspan="10">{{ctx.Locale.Tr "no_results_found"}}</td></tr> 78 + <tr><td class="tw-text-center" colspan="10">{{ctx.Locale.Tr "repo.pulls.no_results"}}</td></tr> 79 79 {{end}} 80 80 </tbody> 81 81 </table>
+1 -1
templates/admin/repo/list.tmpl
··· 87 87 <td><a class="delete-button" href="" data-url="{{$.Link}}/delete?page={{$.Page.Paginater.Current}}&sort={{$.SortType}}" data-id="{{.ID}}" data-name="{{.Name}}">{{svg "octicon-trash"}}</a></td> 88 88 </tr> 89 89 {{else}} 90 - <tr><td class="tw-text-center" colspan="12">{{ctx.Locale.Tr "no_results_found"}}</td></tr> 90 + <tr><td class="tw-text-center" colspan="12">{{ctx.Locale.Tr "repo.pulls.no_results"}}</td></tr> 91 91 {{end}} 92 92 </tbody> 93 93 </table>
+1 -1
templates/admin/user/list.tmpl
··· 110 110 </td> 111 111 </tr> 112 112 {{else}} 113 - <tr class="no-results-row"><td class="tw-text-center" colspan="9">{{ctx.Locale.Tr "no_results_found"}}</td></tr> 113 + <tr class="no-results-row"><td class="tw-text-center" colspan="9">{{ctx.Locale.Tr "repo.pulls.no_results"}}</td></tr> 114 114 {{end}} 115 115 </tbody> 116 116 </table>
+1 -1
templates/repo/settings/lfs_file.tmpl
··· 31 31 <strong>{{ctx.Locale.Tr "repo.audio_not_supported_in_browser"}}</strong> 32 32 </audio> 33 33 {{else if .IsPDFFile}} 34 - <div class="pdf-content is-loading" data-src="{{$.RawFileLink}}" data-fallback-button-text="{{ctx.Locale.Tr "diff.view_file"}}"></div> 34 + <div class="pdf-content is-loading" data-src="{{$.RawFileLink}}" data-fallback-button-text="{{ctx.Locale.Tr "repo.diff.view_file"}}"></div> 35 35 {{else}} 36 36 <a href="{{$.RawFileLink}}" rel="nofollow">{{ctx.Locale.Tr "repo.file_view_raw"}}</a> 37 37 {{end}}
+1 -1
templates/user/auth/finalize_openid.tmpl
··· 30 30 <div class="inline field"> 31 31 <label></label> 32 32 <button class="ui primary button">{{ctx.Locale.Tr "sign_in"}}</button> 33 - <a href="{{AppSubUrl}}/user/forget_password">{{ctx.Locale.Tr "auth.forget_password"}}</a> 33 + <a href="{{AppSubUrl}}/user/forget_password">{{ctx.Locale.Tr "auth.forgot_password"}}</a> 34 34 </div> 35 35 {{if .ShowRegistrationButton}} 36 36 <div class="inline field">