Währungen in Kleinbuchstaben und kleine Fixes
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
{{ $pbRates := dict }}
|
||||
{{ $latestUpdate := "" }}
|
||||
{{ range $record := $pbData }}
|
||||
{{ $pbRates = merge $pbRates (dict (lower $record.id) $record.rate) }}
|
||||
{{ $pbRates = merge $pbRates (dict $record.id $record.rate) }}
|
||||
{{ if or (eq $latestUpdate "") (gt $record.updated $latestUpdate) }}
|
||||
{{ $latestUpdate = $record.updated }}
|
||||
{{ end }}
|
||||
@@ -39,17 +39,17 @@
|
||||
{{ if not $pbOk }}{{ continue }}{{ end }}
|
||||
{{ $pbCurrencies := slice }}
|
||||
{{ range $record := $pbData }}
|
||||
{{ $pbCurrencies = $pbCurrencies | append (lower $record.id) }}
|
||||
{{ $pbCurrencies = $pbCurrencies | append $record.id }}
|
||||
{{ end }}
|
||||
{{ $availableCurrencies := $pbCurrencies | append "eur" }}
|
||||
{{ range $fromCode := $availableCurrencies }}
|
||||
{{ range $toCode := $availableCurrencies }}
|
||||
{{ if eq $fromCode $toCode }}{{ continue }}{{ end }}
|
||||
{{ $fromName := $fromCode | upper }}
|
||||
{{ $fromName := $fromCode }}
|
||||
{{ with index $units $fromCode }}
|
||||
{{ $fromName = .name }}
|
||||
{{ end }}
|
||||
{{ $toName := $toCode | upper }}
|
||||
{{ $toName := $toCode }}
|
||||
{{ with index $units $toCode }}
|
||||
{{ $toName = .name }}
|
||||
{{ end }}
|
||||
@@ -59,8 +59,8 @@
|
||||
{{ $description := printf
|
||||
"Konvertieren Sie %s in %s. Einfache und schnelle Umrechnung mit Einheitsumrechner."
|
||||
$fromName $toName }}
|
||||
{{ $fromCurrency := $fromCode | upper }}
|
||||
{{ $toCurrency := $toCode | upper }}
|
||||
{{ $fromCurrency := $fromCode }}
|
||||
{{ $toCurrency := $toCode }}
|
||||
{{ $fromRate := 1 }}
|
||||
{{ if ne $fromCode "eur" }}
|
||||
{{ $fromRate = index $pbRates $fromCode }}
|
||||
|
||||
Reference in New Issue
Block a user