diff --git a/assets/lang/en_us.json b/assets/lang/en_us.json index 610e8a2429..5ccabb92bb 100644 --- a/assets/lang/en_us.json +++ b/assets/lang/en_us.json @@ -1,5 +1,6 @@ { "title": "TerraFirmaCraft Field Guide", + "short_title": "TFC Field Guide", "index": "Index", "contents": "Contents", "version": "Version", diff --git a/assets/templates/default.html b/assets/templates/default.html index 22373da05a..324486ee41 100644 --- a/assets/templates/default.html +++ b/assets/templates/default.html @@ -9,7 +9,7 @@ - + {long_title} diff --git a/src/i18n.py b/src/i18n.py index 8581c3d2e7..8ed3ba5cd0 100644 --- a/src/i18n.py +++ b/src/i18n.py @@ -6,6 +6,7 @@ def key(text: str) -> str: class I18n: TITLE = key('title') + SHORT_TITLE = key('short_title') INDEX = key('index') CONTENTS = key('contents') VERSION = key('version') diff --git a/src/main.py b/src/main.py index 8cda1b3543..c0677b8a87 100644 --- a/src/main.py +++ b/src/main.py @@ -409,7 +409,7 @@ def build_book_html(context: Context): title=context.translate(I18n.TITLE), long_title=context.translate(I18n.TITLE) + " | " + versions.MC_VERSION, short_description=context.translate(I18n.HOME), - preview_image=get_splash_location(), + preview_image=get_splash_location().replace('..\\..\\_images\\', ''), text_index=context.translate(I18n.INDEX), text_contents=context.translate(I18n.CONTENTS), text_version=context.translate(I18n.VERSION), @@ -461,9 +461,9 @@ def build_book_html(context: Context): for category_id, cat in context.sorted_categories: util.write_html(context.output_dir, category_id, 'index.html', html=TEMPLATE.format( title=context.translate(I18n.TITLE), - long_title=cat.name + " | " + context.translate(I18n.TITLE), + long_title=cat.name + " | " + context.translate(I18n.SHORT_TITLE), short_description=cat.name, - preview_image=get_splash_location(), + preview_image=get_splash_location().replace('..\\..\\_images\\', ''), text_index=context.translate(I18n.INDEX), text_contents=context.translate(I18n.CONTENTS), text_version=context.translate(I18n.VERSION), @@ -520,9 +520,9 @@ def build_book_html(context: Context): for entry_id, entry in cat.sorted_entries: util.write_html(context.output_dir, entry_id + '.html', html=TEMPLATE.format( title=context.translate(I18n.TITLE), - long_title=entry.name + " | " + cat.name + " | " + context.translate(I18n.TITLE), + long_title=entry.name + " | " + cat.name + " | " + context.translate(I18n.SHORT_TITLE), short_description=entry.name, - preview_image=entry.icon, + preview_image=entry.icon.replace('..\\..\\_images\\', ''), text_index=context.translate(I18n.INDEX), text_contents=context.translate(I18n.CONTENTS), text_version=context.translate(I18n.VERSION),