mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Fixing up some inconsistent TODO: items.
This commit is contained in:
parent
1dea187483
commit
1005be472a
2 changed files with 5 additions and 5 deletions
|
@ -49,7 +49,7 @@ ghost.doFilter('messWithAdmin', adminNavbar, function () {
|
||||||
console.log('the dofilter hook called in /core/admin/controllers/index.js');
|
console.log('the dofilter hook called in /core/admin/controllers/index.js');
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO - make this a util or helper
|
// TODO: make this a util or helper
|
||||||
function setSelected(list, name) {
|
function setSelected(list, name) {
|
||||||
_.each(list, function (item, key) {
|
_.each(list, function (item, key) {
|
||||||
item.selected = key === name;
|
item.selected = key === name;
|
||||||
|
|
|
@ -21,9 +21,9 @@ I18n = function (ghost) {
|
||||||
lang = 'en';
|
lang = 'en';
|
||||||
}
|
}
|
||||||
|
|
||||||
/** TODO potentially use req.acceptedLanguages rather than the default
|
/** TODO: potentially use req.acceptedLanguages rather than the default
|
||||||
* TODO handle loading language file for frontend on frontend request etc
|
* TODO: handle loading language file for frontend on frontend request etc
|
||||||
* TODO switch this mess to be promise driven */
|
* TODO: switch this mess to be promise driven */
|
||||||
fs.stat(langFilePath, function (error) {
|
fs.stat(langFilePath, function (error) {
|
||||||
if (error) {
|
if (error) {
|
||||||
console.log('No language file found for language ' + lang + '. Defaulting to en');
|
console.log('No language file found for language ' + lang + '. Defaulting to en');
|
||||||
|
@ -38,7 +38,7 @@ I18n = function (ghost) {
|
||||||
try {
|
try {
|
||||||
data = JSON.parse(data);
|
data = JSON.parse(data);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw e; // TODO - do something better with the error here
|
throw e; // TODO: do something better with the error here
|
||||||
}
|
}
|
||||||
|
|
||||||
ghost.polyglot().extend(data);
|
ghost.polyglot().extend(data);
|
||||||
|
|
Loading…
Add table
Reference in a new issue