wolf128058 / mc-dealer-yml2json

Convert Minecraft Dealer yaml-Directory to json-Array and HTML-Frontend
MIT License
0 stars 1 forks source link

Added search bar placeholder in translation files / Edited Readme a little bit #11

Closed CptGummiball closed 10 months ago

CptGummiball commented 10 months ago

The search bar placeholder is now MCDEALER_SEARCH_BAR_PLACEHOLDER.

Translation script for the placeholder has not been added yet

CptGummiball commented 10 months ago

I write the translation script but not testet it yet:

//add standalone function async function updateSearchPlaceholder() { const placeholderKey = "MCDEALER_SEARCH_BAR_PLACEHOLDER"; const placeholderTranslation = await getTranslation(placeholderKey); const searchInput = document.getElementById('item-search-input'); searchInput.placeholder = placeholderTranslation; }

//add to async function changeLanguage() updateSearchPlaceholder();

//add to end of the scripts to run script at page load updateSearchPlaceholder();

wolf128058 commented 10 months ago

was cherrypicked and stashed. i close this one.