Baris Soner Usakli 11 years ago
commit 6ddf977166

@ -87,20 +87,20 @@ function start() {
});
nconf.defaults({
themes_dir: path.join(__dirname, 'node_modules')
themes_path: path.join(__dirname, 'node_modules')
});
nconf.set('url', nconf.get('base_url') + (nconf.get('use_port') ? ':' + nconf.get('port') : '') + nconf.get('relative_path'));
nconf.set('upload_url', path.join(path.sep, nconf.get('relative_path'), 'uploads', path.sep));
nconf.set('base_dir', __dirname);
// Ensure themes_dir is a full filepath
nconf.set('themes_dir', path.resolve(__dirname, nconf.get('themes_dir')));
// Ensure themes_path is a full filepath
nconf.set('themes_path', path.resolve(__dirname, nconf.get('themes_path')));
winston.info('Time: ' + new Date());
winston.info('Initializing NodeBB v' + pkg.version);
winston.info('* using ' + nconf.get('database') +' store at ' + nconf.get(nconf.get('database') + ':host') + ':' + nconf.get(nconf.get('database') + ':port'));
winston.info('* using themes stored in: ' + nconf.get('themes_dir'));
winston.info('* using themes stored in: ' + nconf.get('themes_path'));
if (process.env.NODE_ENV === 'development') {
winston.info('Base Configuration OK.');
@ -130,7 +130,7 @@ function start() {
translator.loadServer();
var customTemplates = meta.config['theme:templates'] ? path.join(nconf.get('themes_dir'), meta.config['theme:id'], meta.config['theme:templates']) : false;
var customTemplates = meta.config['theme:templates'] ? path.join(nconf.get('themes_path'), meta.config['theme:id'], meta.config['theme:templates']) : false;
utils.walk(path.join(__dirname, 'public/templates'), function (err, tplsToLoad) {
templates.init(tplsToLoad, customTemplates);

@ -1,6 +1,6 @@
{
"title": "Notifications",
"no_notifs": "You have no notifications",
"no_notifs": "You have no new notifications",
"see_all": "See all Notifications",
"back_to_home": "Back to NodeBB",

@ -41,12 +41,12 @@
"alert.follow": "Nasleduješ %1!",
"posts": "Príspevkov",
"views": "Zhliadnutí",
"posted": "posted",
"in": "in",
"recentposts": "Recent Posts",
"posted": "príspevok",
"in": "v",
"recentposts": "Posledné príspevky",
"online": "Online",
"away": "Away",
"dnd": "Do not Disturb",
"invisible": "Invisible",
"away": "Preč",
"dnd": "Nevyrušovať",
"invisible": "Neviditeľný",
"offline": "Offline"
}

@ -1,7 +1,7 @@
{
"title": "Notifikácie",
"no_notifs": "You have no notifications",
"see_all": "See all Notifications",
"no_notifs": "Nemáte žiadne nové notifikácie",
"see_all": "Pozri všetky notifikácie",
"back_to_home": "Späť na úvodnú stránku",
"outgoing_link": "Odkaz mimo fórum",
"outgoing_link_message": "Teraz opúšťate fórum",

@ -3,5 +3,5 @@
"day": "Deň",
"week": "Týždeň",
"month": "Mesiac",
"no_recent_topics": "There are no recent topics."
"no_recent_topics": "Nie sú žiadne posledné témy"
}

@ -13,6 +13,6 @@
"confirm_password_placeholder": "Potvrdťe heslo",
"register_now_button": "Zaregistrovať sa",
"alternative_registration": "Iný spôsob registrácie",
"terms_of_use": "Terms of Use",
"agree_to_terms_of_use": "I agree to the Terms of Use"
"terms_of_use": "Podmienky používania",
"agree_to_terms_of_use": "Súhlasím s podmienkami používania"
}

@ -2,9 +2,9 @@
"topic": "Téma",
"topics": "Témy",
"no_topics_found": "Neboli nájdené žiadne témy!",
"no_posts_found": "No posts found!",
"no_posts_found": "Neboli nájdené žiadne príspevky",
"profile": "Profil",
"posted_by": "Posted by",
"posted_by": "Príspevok od",
"chat": "Chat",
"notify_me": "Sledovať túto tému",
"quote": "Citovať",
@ -19,17 +19,17 @@
"tools": "Nástroje",
"flag": "Označiť",
"flag_title": "Označiť príspevok pre moderáciu",
"deleted_message": "This thread has been deleted. Only users with thread management privileges can see it.",
"deleted_message": "Toto vlákno bolo vymazané. Iba užívatelia s privilégiami ho môžu vidieť.",
"thread_tools.title": "Nástroje",
"thread_tools.markAsUnreadForAll": "Označ ako neprečítané",
"thread_tools.pin": "Pin Topic",
"thread_tools.unpin": "Unpin Topic",
"thread_tools.lock": "Lock Topic",
"thread_tools.unlock": "Unlock Topic",
"thread_tools.move": "Move Topic",
"thread_tools.fork": "Fork Topic",
"thread_tools.delete": "Delete Topic",
"thread_tools.restore": "Restore Topic",
"thread_tools.pin": "Zviditeľniť tému",
"thread_tools.unpin": "Odstrániť zviditeľnenie témy",
"thread_tools.lock": "Zamknúť tému",
"thread_tools.unlock": "Odomknúť tému",
"thread_tools.move": "Presunúť tému",
"thread_tools.fork": "Rozvetviť tému",
"thread_tools.delete": "Vymazať tému",
"thread_tools.restore": "Vrátiť tému",
"load_categories": "Načítanie kategórií",
"disabled_categories_note": "Vypnuté (disabled) kategorie sú šedé.",
"confirm_move": "Presunúť",
@ -39,10 +39,10 @@
"favourites.not_logged_in.title": "Prihlásiť sa!",
"favourites.not_logged_in.message": "Pre obľúbenie príspevku sa musíte prihlásiť.",
"favourites.has_no_favourites": "Nemáte žiadne obľúbené príspevky, pridajte niektorý príspevok k obľúbeným a uvidíte ho tu!",
"vote.not_logged_in.title": "Not Logged In",
"vote.not_logged_in.message": "Please log in in order to vote",
"vote.cant_vote_self.title": "Invalid Vote",
"vote.cant_vote_self.message": "You cannot vote for your own post",
"vote.not_logged_in.title": "Neprihlásený",
"vote.not_logged_in.message": "Prihlás sa pre hlasovanie",
"vote.cant_vote_self.title": "Neplatný hlas",
"vote.cant_vote_self.message": "Nemôžeš voliť pre svoj vlastný príspevok",
"loading_more_posts": "Načítavanie viac príspevkov",
"move_topic": "Presunúť tému",
"move_post": "Presunúť príspevok",
@ -53,11 +53,11 @@
"fork_success": "Téma bola úspešne rozdelená!",
"reputation": "Reputácia",
"posts": "Príspevky",
"composer.title_placeholder": "Enter your topic title here...",
"composer.write": "Write",
"composer.preview": "Preview",
"composer.discard": "Discard",
"composer.submit": "Submit",
"composer.replying_to": "Replying to",
"composer.new_topic": "New Topic"
"composer.title_placeholder": "Vlož nadpis témy sem...",
"composer.write": "Píš",
"composer.preview": "Náhľad",
"composer.discard": "Zahodiť",
"composer.submit": "Poslať",
"composer.replying_to": "Odpovedáš ",
"composer.new_topic": "Nová téma"
}

@ -9,11 +9,11 @@
"age": "Vek",
"joined": "Registrovaný",
"lastonline": "Naposledy online",
"profile": "Profile",
"profile": "Profil",
"profile_views": "Zobrazenie profilu",
"reputation": "Reputácia",
"posts": "Príspevky",
"favourites": "Favourites",
"favourites": "Obľúbené",
"followers": "Nasledujú ho",
"following": "Nasleduje",
"signature": "Podpis",
@ -29,11 +29,11 @@
"upload_picture": "Nahrať obrázok",
"upload_a_picture": "Nahrať obrázok",
"image_spec": "Môžete nahrávať iba obrázky vo formáte PNG, JPG, alebo GIF o veľkosti menšej než 256kb.",
"settings": "Settings",
"settings": "Nastavenia",
"show_email": "Zobrazovať môj email v profile",
"has_no_follower": "Tohoto užívatela nikto nesleduje :(",
"follows_no_one": "Tento užívateľ nikoho nesleduje :(",
"has_no_posts": "This user didn't post anything yet.",
"has_no_posts": "Tento používateľ ešte nespravil príspevok",
"email_hidden": "Skrytý email",
"hidden": "skrytý"
}

@ -85,7 +85,7 @@ var fs = require('fs'),
Meta.themes = {
get: function (callback) {
var themePath = nconf.get('themes_dir');
var themePath = nconf.get('themes_path');
fs.readdir(themePath, function (err, files) {
async.filter(files, function (file, next) {
fs.stat(path.join(themePath, file), function (err, fileStat) {
@ -132,7 +132,7 @@ var fs = require('fs'),
case 'local':
async.waterfall([
function(next) {
fs.readFile(path.join(nconf.get('themes_dir'), data.id, 'theme.json'), function(err, config) {
fs.readFile(path.join(nconf.get('themes_path'), data.id, 'theme.json'), function(err, config) {
if (!err) {
config = JSON.parse(config.toString());
next(null, config);

@ -255,7 +255,7 @@ module.exports.server = server;
// Theme's static directory
if (themeData['theme:staticDir']) {
app.use('/css/assets', express.static(path.join(nconf.get('themes_dir'), themeData['theme:id'], themeData['theme:staticDir']), {
app.use('/css/assets', express.static(path.join(nconf.get('themes_path'), themeData['theme:id'], themeData['theme:staticDir']), {
maxAge: app.enabled('cache') ? 5184000000 : 0
}));
if (process.env.NODE_ENV === 'development') {
@ -264,7 +264,7 @@ module.exports.server = server;
}
if (themeData['theme:templates']) {
app.use('/templates', express.static(path.join(nconf.get('themes_dir'), themeData['theme:id'], themeData['theme:templates']), {
app.use('/templates', express.static(path.join(nconf.get('themes_path'), themeData['theme:id'], themeData['theme:templates']), {
maxAge: app.enabled('cache') ? 5184000000 : 0
}));
if (process.env.NODE_ENV === 'development') {
@ -273,7 +273,7 @@ module.exports.server = server;
}
app.use(require('less-middleware')({
src: path.join(nconf.get('themes_dir'), themeId),
src: path.join(nconf.get('themes_path'), themeId),
dest: path.join(__dirname, '../public/css'),
prefix: nconf.get('relative_path') + '/css',
yuicompress: app.enabled('minification') ? true : false
@ -287,7 +287,7 @@ module.exports.server = server;
}
app.use(require('less-middleware')({
src: path.join(nconf.get('themes_dir'), '/nodebb-theme-vanilla'),
src: path.join(nconf.get('themes_path'), '/nodebb-theme-vanilla'),
dest: path.join(__dirname, '../public/css'),
prefix: nconf.get('relative_path') + '/css',
yuicompress: app.enabled('minification') ? true : false
@ -303,7 +303,7 @@ module.exports.server = server;
async.each(themes, function(themeObj, next) {
if (themeObj.screenshot) {
screenshotPath = path.join(nconf.get('themes_dir'), themeObj.id, themeObj.screenshot);
screenshotPath = path.join(nconf.get('themes_path'), themeObj.id, themeObj.screenshot);
(function(id, path) {
fs.exists(path, function(exists) {
if (exists) {

Loading…
Cancel
Save