From 031e8128c77259561e8cd5cc95413ac354129672 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 19 Feb 2014 14:33:34 -0500 Subject: [PATCH 1/4] fixed #912, added new page string for popular topics --- public/language/en_GB/pages.json | 1 + src/webserver.js | 37 ++++++++++++++++++++------------ 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/public/language/en_GB/pages.json b/public/language/en_GB/pages.json index d01f5f8a9b..9fc75d3d2b 100644 --- a/public/language/en_GB/pages.json +++ b/public/language/en_GB/pages.json @@ -1,6 +1,7 @@ { "home": "Home", "unread": "Unread Topics", + "popular": "Popular Topics", "recent": "Recent Topics", "users": "Registered Users", "notifications": "Notifications", diff --git a/src/webserver.js b/src/webserver.js index d87c58b66d..fd6536e5e4 100644 --- a/src/webserver.js +++ b/src/webserver.js @@ -132,16 +132,6 @@ module.exports.server = server; href: nconf.get('relative_path') + '/favicon.ico' }); - // Browser Title - var metaTitle = templateValues.metaTags.filter(function(tag) { - return tag.property === 'og:title'; - }); - if (metaTitle.length > 0 && metaTitle[0].content) { - templateValues.browserTitle = metaTitle[0].content; - } else { - templateValues.browserTitle = meta.config.browserTitle || 'NodeBB'; - } - if(options.req.user && options.req.user.uid) { uid = options.req.user.uid; } @@ -153,15 +143,34 @@ module.exports.server = server; templateValues.customCSS = meta.config.customCSS; } - user.isAdministrator(uid, function(err, isAdmin) { - templateValues.isAdmin = isAdmin; + async.parallel([ + function(next) { + translator.get('pages:' + path.basename(options.req.url), function(translated) { + var metaTitle = templateValues.metaTags.filter(function(tag) { + return tag.name === 'title'; + }); + if (translated) { + templateValues.browserTitle = translated; + } else if (metaTitle.length > 0 && metaTitle[0].content) { + templateValues.browserTitle = metaTitle[0].content; + } else { + templateValues.browserTitle = meta.config.browserTitle || 'NodeBB'; + } + next(); + }); + }, + function(next) { + user.isAdministrator(uid, function(err, isAdmin) { + templateValues.isAdmin = isAdmin || false; + next(); + }); + } + ], function() { translator.translate(templates.header.parse(templateValues), function(template) { callback(null, template); }); }); - - }); }; From 7c7f66c08bf8b2fb9307d4a0db46a804e95c13ea Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 19 Feb 2014 14:34:50 -0500 Subject: [PATCH 2/4] bringing language files up to date --- public/language/ar/pages.json | 1 + public/language/cs/pages.json | 1 + public/language/de/global.json | 8 ++--- public/language/de/notifications.json | 4 +-- public/language/de/pages.json | 1 + public/language/de/recent.json | 2 +- public/language/de/topic.json | 46 +++++++++++++-------------- public/language/de/user.json | 18 +++++------ public/language/es/pages.json | 1 + public/language/fi/pages.json | 1 + public/language/fr/pages.json | 1 + public/language/he/pages.json | 1 + public/language/hu/pages.json | 1 + public/language/it/pages.json | 1 + public/language/nb/pages.json | 1 + public/language/pl/global.json | 8 ++--- public/language/pl/pages.json | 1 + public/language/pl/topic.json | 10 +++--- public/language/pl/user.json | 2 +- public/language/pt_BR/pages.json | 1 + public/language/ru/notifications.json | 4 +-- public/language/ru/pages.json | 1 + public/language/ru/topic.json | 4 +-- public/language/sk/pages.json | 1 + public/language/sv/pages.json | 1 + public/language/tr/pages.json | 1 + public/language/zh_CN/global.json | 2 +- public/language/zh_CN/login.json | 2 +- public/language/zh_CN/pages.json | 1 + public/language/zh_CN/user.json | 30 ++++++++--------- public/language/zh_TW/pages.json | 1 + 31 files changed, 88 insertions(+), 70 deletions(-) diff --git a/public/language/ar/pages.json b/public/language/ar/pages.json index fa44fbfe46..d60e0a0a9b 100644 --- a/public/language/ar/pages.json +++ b/public/language/ar/pages.json @@ -1,6 +1,7 @@ { "home": "Home", "unread": "Unread Topics", + "popular": "Popular Topics", "recent": "Recent Topics", "users": "Registered Users", "notifications": "Notifications", diff --git a/public/language/cs/pages.json b/public/language/cs/pages.json index fa44fbfe46..d60e0a0a9b 100644 --- a/public/language/cs/pages.json +++ b/public/language/cs/pages.json @@ -1,6 +1,7 @@ { "home": "Home", "unread": "Unread Topics", + "popular": "Popular Topics", "recent": "Recent Topics", "users": "Registered Users", "notifications": "Notifications", diff --git a/public/language/de/global.json b/public/language/de/global.json index e301e623b4..7a6910df88 100644 --- a/public/language/de/global.json +++ b/public/language/de/global.json @@ -10,14 +10,14 @@ "500.message": "Ooops! Looks like something went wrong!", "register": "Registrierung", "login": "Login", - "welcome_back": "Welcome Back ", - "you_have_successfully_logged_in": "You have successfully logged in", + "welcome_back": "Willkommen zurück", + "you_have_successfully_logged_in": "Du hast dich erfolgreich eingeloggt", "logout": "Logout", "logout.title": "Du bist ausgeloggt.", "logout.message": "Du hast dich soeben erfolgreich aus dem Forum ausgeloggt.", "save_changes": "Speichere Änderungen", "close": "Schließen", - "pagination": "Pagination", + "pagination": "Seitennummerierung", "header.admin": "Admin", "header.recent": "Aktuell", "header.unread": "Ungelesen", @@ -52,5 +52,5 @@ "dnd": "Nicht stören", "invisible": "Unsichtbar", "offline": "Offline", - "privacy": "Privacy" + "privacy": "Privatsphäre" } \ No newline at end of file diff --git a/public/language/de/notifications.json b/public/language/de/notifications.json index 806e837806..b38e73a7bc 100644 --- a/public/language/de/notifications.json +++ b/public/language/de/notifications.json @@ -1,7 +1,7 @@ { "title": "Benachrichtigungen", - "no_notifs": "You have no new notifications", - "see_all": "See all Notifications", + "no_notifs": "Du hast keine neuen Benachrichtigungen", + "see_all": "Alle Benachrichtigungen ansehen", "back_to_home": "Zurück zur Startseite", "outgoing_link": "Externer Link", "outgoing_link_message": "Du verlässt nun", diff --git a/public/language/de/pages.json b/public/language/de/pages.json index fa44fbfe46..d60e0a0a9b 100644 --- a/public/language/de/pages.json +++ b/public/language/de/pages.json @@ -1,6 +1,7 @@ { "home": "Home", "unread": "Unread Topics", + "popular": "Popular Topics", "recent": "Recent Topics", "users": "Registered Users", "notifications": "Notifications", diff --git a/public/language/de/recent.json b/public/language/de/recent.json index 33ec31df44..b787bae5cc 100644 --- a/public/language/de/recent.json +++ b/public/language/de/recent.json @@ -3,5 +3,5 @@ "day": "Tag", "week": "Woche", "month": "Monat", - "no_recent_topics": "There are no recent topics." + "no_recent_topics": "Es gibt keine aktuellen Themen." } \ No newline at end of file diff --git a/public/language/de/topic.json b/public/language/de/topic.json index fc52499c9c..2c073da3db 100644 --- a/public/language/de/topic.json +++ b/public/language/de/topic.json @@ -2,7 +2,7 @@ "topic": "Thema", "topics": "Themen", "no_topics_found": "Keine passende Themen gefunden.", - "no_posts_found": "No posts found!", + "no_posts_found": "Keine Beiträge gefunden!", "profile": "Profil", "posted_by": "Geposted von", "chat": "Chat", @@ -19,19 +19,19 @@ "tools": "Tools", "flag": "Markieren", "flag_title": "Diesen Beitrag zur Moderation markieren", - "deleted_message": "This thread has been deleted. Only users with thread management privileges can see it.", - "watch": "Watch", - "share_this_post": "Share this Post", + "deleted_message": "Dieser Thread wurde gelöscht. Nur Nutzer mit Thread-Management Rechten können ihn sehen.", + "watch": "Beobachten", + "share_this_post": "Diesen Beitrag teilen", "thread_tools.title": "Thread Tools", "thread_tools.markAsUnreadForAll": "Als ungelesen markieren", - "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": "Thema anpinnen", + "thread_tools.unpin": "Thema nicht mehr anpinnen", + "thread_tools.lock": "Thema schließen", + "thread_tools.unlock": "Thema öffnen", + "thread_tools.move": "Thema verschieben", + "thread_tools.fork": "Thema aufspalten", + "thread_tools.delete": "Thema löschen", + "thread_tools.restore": "Thema wiederherstellen", "load_categories": "Kategorien laden", "disabled_categories_note": "Deaktivierte Kategorien sind ausgegraut.", "confirm_move": "verschieben", @@ -41,10 +41,10 @@ "favourites.not_logged_in.title": "Nicht eingeloggt!", "favourites.not_logged_in.message": "Bitte logge dich ein, um diesen Beitrag favorisieren zu können.", "favourites.has_no_favourites": "Du hast noch keine Favoriten.", - "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": "Nicht eingeloggt", + "vote.not_logged_in.message": "Zum Bewerten bitte einloggen", + "vote.cant_vote_self.title": "Ungültige Bewertung", + "vote.cant_vote_self.message": "Du kannst deinen eigenen Beitrag nicht bewerten", "loading_more_posts": "Lade Mehr Posts", "move_topic": "Thema verschieben", "move_post": "Beitrag verschieben", @@ -55,11 +55,11 @@ "fork_success": "Thema erfolgreich aufgespalten!", "reputation": "Reputation", "posts": "Beiträge", - "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": "Hier den Titel des Themas eingeben...", + "composer.write": "Schreiben", + "composer.preview": "Vorschau", + "composer.discard": "Verwerfen", + "composer.submit": "Absenden", + "composer.replying_to": "Als Antwort auf", + "composer.new_topic": "Neues Thema" } \ No newline at end of file diff --git a/public/language/de/user.json b/public/language/de/user.json index 4acbcc6c91..ae5f8f2993 100644 --- a/public/language/de/user.json +++ b/public/language/de/user.json @@ -9,7 +9,7 @@ "age": "Alter", "joined": "Beigetreten", "lastonline": "Zuletzt online", - "profile": "Profile", + "profile": "Profil", "profile_views": "Profilaufrufe", "reputation": "Reputation", "posts": "Posts", @@ -20,28 +20,28 @@ "gravatar": "Gravatar", "birthday": "Geburtstag", "chat": "Chat", - "follow": "Follow", - "unfollow": "Unfollow", + "follow": "Folgen", + "unfollow": "Nicht mehr folgen", "change_picture": "Ändere Profilbild", "edit": "Ändern", "uploaded_picture": "Hochgeladene Bilder", "upload_new_picture": "Neues Bild hochladen", - "current_password": "Current Password", + "current_password": "Aktuelles Passwort", "change_password": "Ändere Passwort", "confirm_password": "Passwort wiederholen", "password": "Passwort", "upload_picture": "Bild hochladen", "upload_a_picture": "Ein Bild hochladen", - "image_spec": "You may only upload PNG, JPG, or GIF files", + "image_spec": "Du darfst nur Dateien vom Typ PNG, JPG oder GIF hochladen", "max": "max.", "settings": "Einstellungen", "show_email": "Zeige meine E-Mail Adresse an.", "has_no_follower": "Dieser User hat noch keine Follower.", "follows_no_one": "Dieser User folgt noch niemanden.", - "has_no_posts": "This user didn't post anything yet.", + "has_no_posts": "Dieser Nutzer hat noch nichts gepostet.", "email_hidden": "E-Mail Adresse versteckt", "hidden": "versteckt", - "paginate_description": "Paginate topics and posts instead of using infinite scroll.", - "topics_per_page": "Topics per Page", - "posts_per_page": "Posts per Page" + "paginate_description": "Themen und Beiträge auf Seiten aufteilen statt unendliches Scrollen verweden", + "topics_per_page": "Themen pro Seite", + "posts_per_page": "Beiträge pro Seite" } \ No newline at end of file diff --git a/public/language/es/pages.json b/public/language/es/pages.json index fa44fbfe46..d60e0a0a9b 100644 --- a/public/language/es/pages.json +++ b/public/language/es/pages.json @@ -1,6 +1,7 @@ { "home": "Home", "unread": "Unread Topics", + "popular": "Popular Topics", "recent": "Recent Topics", "users": "Registered Users", "notifications": "Notifications", diff --git a/public/language/fi/pages.json b/public/language/fi/pages.json index fa44fbfe46..d60e0a0a9b 100644 --- a/public/language/fi/pages.json +++ b/public/language/fi/pages.json @@ -1,6 +1,7 @@ { "home": "Home", "unread": "Unread Topics", + "popular": "Popular Topics", "recent": "Recent Topics", "users": "Registered Users", "notifications": "Notifications", diff --git a/public/language/fr/pages.json b/public/language/fr/pages.json index baf9d9473e..3c61eb6cf8 100644 --- a/public/language/fr/pages.json +++ b/public/language/fr/pages.json @@ -1,6 +1,7 @@ { "home": "Accueil", "unread": "Sujets non lus", + "popular": "Popular Topics", "recent": "Sujets Récents", "users": "Utilisateurs enregistrés", "notifications": "Notifications", diff --git a/public/language/he/pages.json b/public/language/he/pages.json index a7cf97124d..0ff571585f 100644 --- a/public/language/he/pages.json +++ b/public/language/he/pages.json @@ -1,6 +1,7 @@ { "home": "דף הבית", "unread": "נושאים שלא נקראו", + "popular": "Popular Topics", "recent": "נושאים אחרונים", "users": "משתמשים רשומים", "notifications": "התראות", diff --git a/public/language/hu/pages.json b/public/language/hu/pages.json index 2cd8f7a0ce..00a3c97c1a 100644 --- a/public/language/hu/pages.json +++ b/public/language/hu/pages.json @@ -1,6 +1,7 @@ { "home": "Kezdőlap", "unread": "Olvasatlan Topikok", + "popular": "Popular Topics", "recent": "Friss Topikok", "users": "Regisztrált Felhasználók", "notifications": "Értesítések", diff --git a/public/language/it/pages.json b/public/language/it/pages.json index fa44fbfe46..d60e0a0a9b 100644 --- a/public/language/it/pages.json +++ b/public/language/it/pages.json @@ -1,6 +1,7 @@ { "home": "Home", "unread": "Unread Topics", + "popular": "Popular Topics", "recent": "Recent Topics", "users": "Registered Users", "notifications": "Notifications", diff --git a/public/language/nb/pages.json b/public/language/nb/pages.json index cf9620b18a..60940216d0 100644 --- a/public/language/nb/pages.json +++ b/public/language/nb/pages.json @@ -1,6 +1,7 @@ { "home": "Hjem", "unread": "Uleste emner", + "popular": "Popular Topics", "recent": "Seneste emner", "users": "Registrerte brukere", "notifications": "Varsler", diff --git a/public/language/pl/global.json b/public/language/pl/global.json index 0a908625df..b8f5162365 100644 --- a/public/language/pl/global.json +++ b/public/language/pl/global.json @@ -10,14 +10,14 @@ "500.message": "Coś poszło nie tak.", "register": "Zarejestruj się", "login": "Zaloguj się", - "welcome_back": "Welcome Back ", - "you_have_successfully_logged_in": "You have successfully logged in", + "welcome_back": "Witaj z powrotem!", + "you_have_successfully_logged_in": "Zostałeś pomyślnie zalogowany.", "logout": "Wyloguj się", "logout.title": "Wylogowałeś się.", "logout.message": "Pomyślnie wylogowałeś się z forum.", "save_changes": "Zapisz zmiany", "close": "Zamknij", - "pagination": "Pagination", + "pagination": "Numerowanie stron", "header.admin": "Administracja", "header.recent": "Ostatnie", "header.unread": "Nieprzeczytane", @@ -52,5 +52,5 @@ "dnd": "Nie przeszkadzać", "invisible": "Niewidoczny", "offline": "Niedostępny", - "privacy": "Privacy" + "privacy": "Prywatność" } \ No newline at end of file diff --git a/public/language/pl/pages.json b/public/language/pl/pages.json index a966a141cb..ee44ea945b 100644 --- a/public/language/pl/pages.json +++ b/public/language/pl/pages.json @@ -1,6 +1,7 @@ { "home": "Strona główna", "unread": "Nieprzeczytane wątki", + "popular": "Popular Topics", "recent": "Ostatnie wątki", "users": "Zarejestrowani użytkownicy", "notifications": "Powiadomienia", diff --git a/public/language/pl/topic.json b/public/language/pl/topic.json index 9cd30f9296..020d68d6c2 100644 --- a/public/language/pl/topic.json +++ b/public/language/pl/topic.json @@ -19,15 +19,15 @@ "tools": "Narzędzia", "flag": "Zgłoś", "flag_title": "Zgłoś post do moderacji", - "deleted_message": "This thread has been deleted. Only users with thread management privileges can see it.", - "watch": "Watch", - "share_this_post": "Share this Post", + "deleted_message": "Ten wątek został usunięty. Tylko użytkownicy z uprawnieniami do zarządzania wątkami mogą go widzieć.", + "watch": "Obserwuj", + "share_this_post": "Udostępnij", "thread_tools.title": "Narzędzia wątków", "thread_tools.markAsUnreadForAll": "Oznacz jako nieprzeczytany", "thread_tools.pin": "Przypnij wątek", - "thread_tools.unpin": "Unpin Topic", + "thread_tools.unpin": "Odepnij wątek", "thread_tools.lock": "Zamknij wątek", - "thread_tools.unlock": "Unlock Topic", + "thread_tools.unlock": "Otwórz wątek", "thread_tools.move": "Przenieś wątek", "thread_tools.fork": "Skopiuj wątek", "thread_tools.delete": "Usuń wątek", diff --git a/public/language/pl/user.json b/public/language/pl/user.json index e438b566ae..36d9b509ec 100644 --- a/public/language/pl/user.json +++ b/public/language/pl/user.json @@ -26,7 +26,7 @@ "edit": "Edytuj", "uploaded_picture": "Przesłane zdjęcie", "upload_new_picture": "Prześlij nowe zdjęcie", - "current_password": "Current Password", + "current_password": "Obecne hasło", "change_password": "Zmień hasło", "confirm_password": "Potwierdź hasło", "password": "Hasło", diff --git a/public/language/pt_BR/pages.json b/public/language/pt_BR/pages.json index 0519cf223e..8f6d6f08e8 100644 --- a/public/language/pt_BR/pages.json +++ b/public/language/pt_BR/pages.json @@ -1,6 +1,7 @@ { "home": "Home", "unread": "Tópicos Não Lidos", + "popular": "Popular Topics", "recent": "Tópicos Recentes", "users": "Usuários Registrados", "notifications": "Notificações", diff --git a/public/language/ru/notifications.json b/public/language/ru/notifications.json index 87245bd6f3..8749bb8a50 100644 --- a/public/language/ru/notifications.json +++ b/public/language/ru/notifications.json @@ -1,7 +1,7 @@ { "title": "Уведомления", - "no_notifs": "You have no new notifications", - "see_all": "See all Notifications", + "no_notifs": "Для Вас нет новых уведомлений", + "see_all": "Просмотреть все уведомления", "back_to_home": "Вернуться на NodeBB", "outgoing_link": "Внешняя ссылка", "outgoing_link_message": "Вы покидаете", diff --git a/public/language/ru/pages.json b/public/language/ru/pages.json index b4a44b79e7..0d5f5b9ca9 100644 --- a/public/language/ru/pages.json +++ b/public/language/ru/pages.json @@ -1,6 +1,7 @@ { "home": "Главная", "unread": "Непрочитанные темы", + "popular": "Popular Topics", "recent": "Последние темы", "users": "Зарегистрированные пользователи", "notifications": "Уведомления", diff --git a/public/language/ru/topic.json b/public/language/ru/topic.json index 785cacbf07..2ab3aadc57 100644 --- a/public/language/ru/topic.json +++ b/public/language/ru/topic.json @@ -26,8 +26,8 @@ "thread_tools.markAsUnreadForAll": "Отметить как непрочитанные", "thread_tools.pin": "Pin Topic", "thread_tools.unpin": "Unpin Topic", - "thread_tools.lock": "Lock Topic", - "thread_tools.unlock": "Unlock Topic", + "thread_tools.lock": "Закрыть Тему", + "thread_tools.unlock": "Открыть Тему", "thread_tools.move": "Move Topic", "thread_tools.fork": "Fork Topic", "thread_tools.delete": "Delete Topic", diff --git a/public/language/sk/pages.json b/public/language/sk/pages.json index fa44fbfe46..d60e0a0a9b 100644 --- a/public/language/sk/pages.json +++ b/public/language/sk/pages.json @@ -1,6 +1,7 @@ { "home": "Home", "unread": "Unread Topics", + "popular": "Popular Topics", "recent": "Recent Topics", "users": "Registered Users", "notifications": "Notifications", diff --git a/public/language/sv/pages.json b/public/language/sv/pages.json index 585c08b83b..dd938e334f 100644 --- a/public/language/sv/pages.json +++ b/public/language/sv/pages.json @@ -1,6 +1,7 @@ { "home": "Hem", "unread": "Olästa ämnen", + "popular": "Popular Topics", "recent": "Senaste ämnena", "users": "Registrerade användare", "notifications": "Notiser", diff --git a/public/language/tr/pages.json b/public/language/tr/pages.json index 4f3ecda974..55f625162f 100644 --- a/public/language/tr/pages.json +++ b/public/language/tr/pages.json @@ -1,6 +1,7 @@ { "home": "Ana Sayfa", "unread": "Okunmayan Başlıklar", + "popular": "Popular Topics", "recent": "Güncel Konular", "users": "Kayıtlı Kullanıcılar", "notifications": "Bildirimler", diff --git a/public/language/zh_CN/global.json b/public/language/zh_CN/global.json index abc3e33663..ca76a1ea64 100644 --- a/public/language/zh_CN/global.json +++ b/public/language/zh_CN/global.json @@ -10,7 +10,7 @@ "500.message": "不好!看来是哪里出错了!", "register": "注册", "login": "登录", - "welcome_back": "Welcome Back ", + "welcome_back": "欢迎回来", "you_have_successfully_logged_in": "You have successfully logged in", "logout": "退出", "logout.title": "你已经退出。", diff --git a/public/language/zh_CN/login.json b/public/language/zh_CN/login.json index 5c426ecbb3..25fe9a81f2 100644 --- a/public/language/zh_CN/login.json +++ b/public/language/zh_CN/login.json @@ -6,5 +6,5 @@ "forgot_password": "忘记密码?", "alternative_logins": "其他登录方式", "failed_login_attempt": "登录失败,请再尝试。", - "login_successful": "你已成功登录!" + "login_successful": "您已经成功登录!" } \ No newline at end of file diff --git a/public/language/zh_CN/pages.json b/public/language/zh_CN/pages.json index fa44fbfe46..d60e0a0a9b 100644 --- a/public/language/zh_CN/pages.json +++ b/public/language/zh_CN/pages.json @@ -1,6 +1,7 @@ { "home": "Home", "unread": "Unread Topics", + "popular": "Popular Topics", "recent": "Recent Topics", "users": "Registered Users", "notifications": "Notifications", diff --git a/public/language/zh_CN/user.json b/public/language/zh_CN/user.json index a9ed9e4495..698abc17c6 100644 --- a/public/language/zh_CN/user.json +++ b/public/language/zh_CN/user.json @@ -1,47 +1,47 @@ { "banned": "封禁", - "offline": "下线", + "offline": "离线", "username": "用户名", - "email": "Email", + "email": "邮件", "fullname": "姓名", "website": "网站", "location": "地址", "age": "年龄", "joined": "加入时间", "lastonline": "最后在线", - "profile": "Profile", + "profile": "资料", "profile_views": "资料被查看", "reputation": "声望", "posts": "发帖数", - "favourites": "Favourites", + "favourites": "收藏的帖子", "followers": "被关注", "following": "关注", "signature": "签名", "gravatar": "Gravatar头像", "birthday": "生日", - "chat": "Chat", - "follow": "Follow", - "unfollow": "Unfollow", + "chat": "聊天", + "follow": "关注", + "unfollow": "取消关注", "change_picture": "改变头像", "edit": "编辑", "uploaded_picture": "已有头像", "upload_new_picture": "上传新头像", - "current_password": "Current Password", + "current_password": "当前密码", "change_password": "更改密码", "confirm_password": "确认密码", "password": "密码", "upload_picture": "上传头像", "upload_a_picture": "上传一张照片", - "image_spec": "You may only upload PNG, JPG, or GIF files", - "max": "max.", - "settings": "Settings", + "image_spec": "您只能上传PNG,JPG或者是GIF图片文件", + "max": "最大.", + "settings": "设置", "show_email": "显示我的邮箱", "has_no_follower": "该用户还没有被任何人关注。", "follows_no_one": "该用户还没有关注过任何人。", - "has_no_posts": "This user didn't post anything yet.", + "has_no_posts": "此用户还未发表过任何帖子.", "email_hidden": "邮箱被隐藏", "hidden": "隐藏", - "paginate_description": "Paginate topics and posts instead of using infinite scroll.", - "topics_per_page": "Topics per Page", - "posts_per_page": "Posts per Page" + "paginate_description": "使用分页方式显示话题和帖子,代替滚动显示", + "topics_per_page": "每页话题数量设置", + "posts_per_page": "每页帖子数量设置" } \ No newline at end of file diff --git a/public/language/zh_TW/pages.json b/public/language/zh_TW/pages.json index fa44fbfe46..d60e0a0a9b 100644 --- a/public/language/zh_TW/pages.json +++ b/public/language/zh_TW/pages.json @@ -1,6 +1,7 @@ { "home": "Home", "unread": "Unread Topics", + "popular": "Popular Topics", "recent": "Recent Topics", "users": "Registered Users", "notifications": "Notifications", From 0d7e47ded745f1249960a1077b93a75d7da53ca8 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 19 Feb 2014 14:47:00 -0500 Subject: [PATCH 3/4] closed #1057 --- public/src/modules/composer.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/src/modules/composer.js b/public/src/modules/composer.js index d5ba7e8e73..79299e82e0 100644 --- a/public/src/modules/composer.js +++ b/public/src/modules/composer.js @@ -218,7 +218,12 @@ define(['taskbar'], function(taskbar) { case 'fa fa-link': if (selectionStart === selectionEnd) { // Nothing selected + var cursorPos = postContentEl[0].selectionStart; insertIntoInput(postContentEl, "[link text](link url)"); + + // Highlight "link url" + postContentEl[0].selectionStart = cursorPos + 12; + postContentEl[0].selectionEnd = cursorPos + 20; } else { // Text selected postContentEl.val(postContentEl.val().slice(0, selectionStart) + '[' + postContentEl.val().slice(selectionStart, selectionEnd) + '](link url)' + postContentEl.val().slice(selectionEnd)); From 3107e43b648dab020bae36450c9e0dc73d6c65d5 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 19 Feb 2014 15:24:39 -0500 Subject: [PATCH 4/4] cleaned up admin panel index a bit --- public/src/forum/admin/index.js | 18 +++++++++- public/templates/admin/index.tpl | 56 ++++++++++++++++++++------------ 2 files changed, 53 insertions(+), 21 deletions(-) diff --git a/public/src/forum/admin/index.js b/public/src/forum/admin/index.js index c99dd43cb9..914676115d 100644 --- a/public/src/forum/admin/index.js +++ b/public/src/forum/admin/index.js @@ -14,7 +14,23 @@ define(function() { }, function() { window.location.href = RELATIVE_PATH + '/'; }); - }) + }); + + $.get('https://api.github.com/repos/designcreateplay/NodeBB/tags', function(releases) { + var version = $('#version').html(), + latestVersion = releases[0].name.slice(1), + checkEl = $('.version-check'); + checkEl.html($('.version-check').html().replace('', 'v' + latestVersion)); + + // Alter box colour accordingly + if (latestVersion === version) { + checkEl.removeClass('alert-info').addClass('alert-success'); + checkEl.append('

You are up-to-date

'); + } else if (latestVersion > version) { + checkEl.removeClass('alert-info').addClass('alert-danger'); + checkEl.append('

A new version (v' + latestVersion + ') has been released. Consider upgrading your NodeBB.

'); + } + }); }; Admin.updateRoomUsage = function(err, data) { diff --git a/public/templates/admin/index.tpl b/public/templates/admin/index.tpl index aa4838ef35..0ff8383dc3 100644 --- a/public/templates/admin/index.tpl +++ b/public/templates/admin/index.tpl @@ -1,20 +1,36 @@ - -
-

Welcome to NodeBB

-
-

- NodeBB Community Forum - Get Plugins and Themes - Follow @NodeBB - NodeBB Wiki -

-

You are running NodeBB v{version}. Always make sure that your NodeBB is up to date for the latest security patches and bug fixes.

-
- - -
-

Active Users socket connections

-

- -

-
+
+ +
+
+
Active Users socket connections
+
+
+
+
+
+
+
+
Updates
+
+
+

You are running NodeBB v{version}.

+
+

+ Always make sure that your NodeBB is up to date for the latest security patches and bug fixes. +

+
+
+
+
\ No newline at end of file