Update Spanish locale, add missing CurseForge API Key translation, implement Turkish translation, and fix contributor links comma. (#135)

* Update Spanish locale and add missing CurseForge API Key translation

- Updated the Spanish locale name to distinguish between multiple locale types.
- Added missing translation for the page indicating the missing CurseForge API Key.

* Implemented Turkish locale support

* Add Turkish locale to available languages

* Add missing comma in contributor links

* Correct Portuguese language name in available languages

---------

Co-authored-by: Fazri Gading <fazrigading@gmail.com>
This commit is contained in:
xSamiVS
2026-01-24 23:01:42 +01:00
committed by GitHub
parent f974d9c767
commit 127c38f98b
7 changed files with 306 additions and 42 deletions

View File

@@ -4,8 +4,9 @@ const i18n = (() => {
let translations = {};
const availableLanguages = [
{ code: 'en', name: 'English' },
{ code: 'es', name: 'Español' },
{ code: 'pt-BR', name: 'Português (Brasil)' }
{ code: 'es-ES', name: 'Español (España)' },
{ code: 'pt-BR', name: 'Portuguese (Brazil)' },
{ code: 'tr-TR', name: 'Turkish (Turkey)' }
];
// Load single language file

View File

@@ -200,10 +200,15 @@ async function loadBrowseMods() {
browseContainer.innerHTML = `
<div class=\"empty-browse-mods\">
<i class=\"fas fa-key\"></i>
<h4>API Key Required</h4>
<p>CurseForge API key is needed to browse mods</p>
<h4 data-i18n="mods.apiKeyRequired">API Key Required</h4>
<p data-i18n="mods.apiKeyRequiredDesc">CurseForge API key is needed to browse mods</p>
</div>
`;
if (window.i18n) {
const container = modsContainer.querySelector('.empty-browse-mods');
container.querySelector('h4').textContent = window.i18n.t('mods.apiKeyRequired');
container.querySelector('p').textContent = window.i18n.t('mods.apiKeyRequiredDesc');
}
return;
}