1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00
gitea/templates/repo/diff/stats.tmpl
wxiaoguang 597b04fe2f
Backport ctx locale refactoring manually (#27231) (#27259) (#27260)
Backport #27231 #27259 manually

---------

Co-authored-by: delvh <dev.lh@web.de>
2023-09-25 13:15:51 +00:00

6 lines
487 B
Handlebars

{{Eval .file.Addition "+" .file.Deletion}}
<span class="diff-stats-bar gt-mx-3" data-tooltip-content="{{ctx.Locale.Tr "repo.diff.stats_desc_file" (Eval .file.Addition "+" .file.Deletion) .file.Addition .file.Deletion | Str2html}}">
{{/* if the denominator is zero, then the float result is "width: NaNpx", as before, it just works */}}
<div class="diff-stats-add-bar" style="width: {{Eval 100 "*" .file.Addition "/" "(" .file.Addition "+" .file.Deletion "+" 0.0 ")"}}%"></div>
</span>