You've already forked tf2wikipricing
l10n: update attribution text and style
New text is easier to localize, strings can be found in free dictionaries
This commit is contained in:
@@ -403,10 +403,12 @@ async function inject() {
|
||||
const label = document.createElement("td");
|
||||
label.colSpan = 2;
|
||||
label.style.fontSize = "85%";
|
||||
label.style.textAlign = "center";
|
||||
const updateText = $T("Updated %@.", locale).replace('%@', updateTime.toLocaleString(locale, { year: 'numeric', month: 'long', day: 'numeric', hour: '2-digit', minute: '2-digit', timeZoneName: 'short' }))
|
||||
const attributionText = $T("Trade prices sourced from %@. Currency conversions are approximate.", locale).replace('%@', '<a rel="nofollow" class="external text" href="https://prices.tf">prices.tf</a>');
|
||||
const exchangeRateAttribution = `<a rel="nofollow" class="external text" href="https://www.exchangerate-api.com">Rates By Exchange Rate API</a>.`;
|
||||
label.innerHTML = `${updateText}<br>${attributionText}<br>${exchangeRateAttribution}`;
|
||||
const attributionHeader = $T("Acknowledgements");
|
||||
const pricesAttribution = `<a rel="nofollow" class="external text" href="https://prices.tf">prices.tf</a>`;
|
||||
const exchangeRateAttribution = `<a rel="nofollow" class="external text" href="https://www.exchangerate-api.com">Rates By Exchange Rate API</a>`;
|
||||
label.innerHTML = `${updateText}<br><b>${attributionHeader}</b><br>${pricesAttribution}<br>${exchangeRateAttribution}`;
|
||||
row.appendChild(label);
|
||||
|
||||
priceProgressRow.insertAdjacentElement('afterend', row);
|
||||
|
||||
Reference in New Issue
Block a user