Translates Hearthstone card names using cards data from HearthstoneJSON.
Go to http://protron.github.io/hearthstone-cards-translator/
- a webpage (output/index.html) that allows its users to translate card names.
- a Node.js program (src/index.js) that downloads the latest card names from HearthstoneJSON and generates the webpage in the step above.
- a GitHub workflow (.github\workflows\update-cards.yml) that checks every day for new card definitions from HearthstoneJSON, and if there are any, automatically updates all the code detailed in the steps above.
The webpage presents an autocomplete input (awesomplete) to search for the card name in the source language of your choice. Start typing and some options will appear below. Once you select one card, it will show in the right side the name of that card in the target language.
Having node.js v20 installed, open a command line in the folder in which you cloned the project, and run:
npm run build
That will automatically do the following:
- Downloads cards information from HearthstoneJSON.
- If HearthstoneJSON has a newer version of the cards (comparing last time we downloaded using the date we store at
last-update.json
) - Download the new version of the cards into
intermediate-assets/cards.json
. - Generates
output/translations-*.js
for each source language (with just the texts from the card names).
- If HearthstoneJSON has a newer version of the cards (comparing last time we downloaded using the date we store at
- Generates the output html:
output/index.html
.
Then, to host the generated website you can use:
npm start
That will just host the output folder via npx http-server output
.