mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
- The existing common.i18n library contained code for core and theme translations - There is some shared logic and some theme-specific logic, and the theme-specific logic has dependencies we don't want in lib/common - This refactor introduces an I18n base class that does all the main shared logic, with no dependencies on other parts of the codebase - ThemeI18n then extends this logic, and replaces the functions it needs to handle differently and adds it's dependencies on config and settingsCache - The class has several methods broken down into smaller pieces to make it easier to extend only the necessary parts - The class also encapsulates all of its logic, without external functions or variables - The function loadThemeTranslations becomes the 'init()' function overridden in themeI18n. |
||
---|---|---|
.. | ||
tpl | ||
asset.js | ||
author.js | ||
authors.js | ||
body_class.js | ||
cancel_link.js | ||
concat.js | ||
content.js | ||
date.js | ||
encode.js | ||
excerpt.js | ||
facebook_url.js | ||
foreach.js | ||
get.js | ||
ghost_foot.js | ||
ghost_head.js | ||
has.js | ||
img_url.js | ||
index.js | ||
is.js | ||
lang.js | ||
link.js | ||
link_class.js | ||
meta_description.js | ||
meta_title.js | ||
navigation.js | ||
page_url.js | ||
pagination.js | ||
plural.js | ||
post_class.js | ||
prev_next.js | ||
price.js | ||
proxy.js | ||
reading_time.js | ||
register.js | ||
t.js | ||
tags.js | ||
template.js | ||
title.js | ||
twitter_url.js | ||
url.js | ||
utils.js |