feat(ui): make JS asset load error message translatable (#7388)

- The 'Failed to load asset files from [...]' is now an translatable string.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7388
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
This commit is contained in:
0ko 2025-04-01 16:14:38 +00:00 committed by Gusted
parent c497ef9e81
commit 6ad625b0c1
4 changed files with 45 additions and 18 deletions

View file

@ -13,7 +13,7 @@
{{template "base/footer_content" .}}
<script src="{{AssetUrlPrefix}}/js/index.js?v={{AssetVersion}}" onerror="alert('Failed to load asset files from ' + this.src + '. Please make sure the asset files can be accessed.')"></script>
<script src="{{AssetUrlPrefix}}/js/index.js?v={{AssetVersion}}" onerror="alert('{{ctx.Locale.Tr "alert.asset_load_failed"}}'.replace('{path}', this.src))"></script>
{{template "custom/footer" .}}
</body>