fix: correct tel: URL for translated about section (#518)

In the about section, a correct `tel:` URL was only generated if the
name of the sociallink was "Phone". Now, a correct link will also be
generated if the name of the sociallink corresponds to the translation
of "phone" in one of the i18n files.

Co-authored-by: stueja <jan@jBook.local>
Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
This commit is contained in:
Jan 2022-01-31 18:10:53 +01:00 committed by GitHub
parent d74549f870
commit 46769a2b6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,7 +31,7 @@
<li>
{{ if eq .name "Email" }}
<a href="mailto:{{ .url }}" title="{{ .name }}" target="_blank" rel="noopener"><i class="{{ .icon }}"></i></a>
{{ else if eq .name "Phone" }}
{{ else if eq .name (i18n "phone") }}
<a href="tel:{{ .url }}" title="{{ .name }}" target="_blank" rel="noopener"><i class="{{ .icon }}"></i></a>
{{ else }}
<a href="{{ .url }}" title="{{ .name }}" target="_blank" rel="noopener"><i class="{{ .icon }}"></i></a>