diff --git a/.gitignore b/.gitignore
index c17e34cbfc..413b97ed3a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,3 +25,4 @@ pidfile
# templates
/public/templates
+/public/sounds
diff --git a/.tx/config b/.tx/config
index 73d171c4a7..e4583fbfde 100644
--- a/.tx/config
+++ b/.tx/config
@@ -8,6 +8,7 @@ source_lang = en_GB
trans.ar = public/language/ar/category.json
trans.cs = public/language/cs/category.json
trans.de = public/language/de/category.json
+trans.en_US = public/language/en_US/category.json
trans.en@pirate = public/language/en@pirate/category.json
trans.es = public/language/es/category.json
trans.et = public/language/et/category.json
@@ -38,6 +39,7 @@ source_lang = en_GB
trans.ar = public/language/ar/login.json
trans.cs = public/language/cs/login.json
trans.de = public/language/de/login.json
+trans.en_US = public/language/en_US/login.json
trans.en@pirate = public/language/en@pirate/login.json
trans.es = public/language/es/login.json
trans.et = public/language/et/login.json
@@ -67,6 +69,7 @@ source_lang = en_GB
trans.ar = public/language/ar/recent.json
trans.cs = public/language/cs/recent.json
trans.de = public/language/de/recent.json
+trans.en_US = public/language/en_US/recent.json
trans.en@pirate = public/language/en@pirate/recent.json
trans.es = public/language/es/recent.json
trans.et = public/language/et/recent.json
@@ -96,6 +99,7 @@ source_lang = en_GB
trans.ar = public/language/ar/unread.json
trans.cs = public/language/cs/unread.json
trans.de = public/language/de/unread.json
+trans.en_US = public/language/en_US/unread.json
trans.en@pirate = public/language/en@pirate/unread.json
trans.es = public/language/es/unread.json
trans.et = public/language/et/unread.json
@@ -125,6 +129,7 @@ source_lang = en_GB
trans.ar = public/language/ar/footer.json
trans.cs = public/language/cs/footer.json
trans.de = public/language/de/footer.json
+trans.en_US = public/language/en_US/footer.json
trans.en@pirate = public/language/en@pirate/footer.json
trans.es = public/language/es/footer.json
trans.et = public/language/et/footer.json
@@ -154,6 +159,7 @@ source_lang = en_GB
trans.ar = public/language/ar/modules.json
trans.cs = public/language/cs/modules.json
trans.de = public/language/de/modules.json
+trans.en_US = public/language/en_US/modules.json
trans.en@pirate = public/language/en@pirate/modules.json
trans.es = public/language/es/modules.json
trans.et = public/language/et/modules.json
@@ -183,6 +189,7 @@ source_lang = en_GB
trans.ar = public/language/ar/register.json
trans.cs = public/language/cs/register.json
trans.de = public/language/de/register.json
+trans.en_US = public/language/en_US/register.json
trans.en@pirate = public/language/en@pirate/register.json
trans.es = public/language/es/register.json
trans.et = public/language/et/register.json
@@ -212,6 +219,7 @@ source_lang = en_GB
trans.ar = public/language/ar/user.json
trans.cs = public/language/cs/user.json
trans.de = public/language/de/user.json
+trans.en_US = public/language/en_US/user.json
trans.en@pirate = public/language/en@pirate/user.json
trans.es = public/language/es/user.json
trans.et = public/language/et/user.json
@@ -241,6 +249,7 @@ source_lang = en_GB
trans.ar = public/language/ar/global.json
trans.cs = public/language/cs/global.json
trans.de = public/language/de/global.json
+trans.en_US = public/language/en_US/global.json
trans.en@pirate = public/language/en@pirate/global.json
trans.es = public/language/es/global.json
trans.et = public/language/et/global.json
@@ -270,6 +279,7 @@ source_lang = en_GB
trans.ar = public/language/ar/notifications.json
trans.cs = public/language/cs/notifications.json
trans.de = public/language/de/notifications.json
+trans.en_US = public/language/en_US/notifications.json
trans.en@pirate = public/language/en@pirate/notifications.json
trans.es = public/language/es/notifications.json
trans.et = public/language/et/notifications.json
@@ -299,6 +309,7 @@ source_lang = en_GB
trans.ar = public/language/ar/reset_password.json
trans.cs = public/language/cs/reset_password.json
trans.de = public/language/de/reset_password.json
+trans.en_US = public/language/en_US/reset_password.json
trans.en@pirate = public/language/en@pirate/reset_password.json
trans.es = public/language/es/reset_password.json
trans.et = public/language/et/reset_password.json
@@ -328,6 +339,7 @@ source_lang = en_GB
trans.ar = public/language/ar/users.json
trans.cs = public/language/cs/users.json
trans.de = public/language/de/users.json
+trans.en_US = public/language/en_US/users.json
trans.en@pirate = public/language/en@pirate/users.json
trans.es = public/language/es/users.json
trans.et = public/language/et/users.json
@@ -357,6 +369,7 @@ source_lang = en_GB
trans.ar = public/language/ar/language.json
trans.cs = public/language/cs/language.json
trans.de = public/language/de/language.json
+trans.en_US = public/language/en_US/language.json
trans.en@pirate = public/language/en@pirate/language.json
trans.es = public/language/es/language.json
trans.et = public/language/et/language.json
@@ -386,6 +399,7 @@ source_lang = en_GB
trans.ar = public/language/ar/pages.json
trans.cs = public/language/cs/pages.json
trans.de = public/language/de/pages.json
+trans.en_US = public/language/en_US/pages.json
trans.en@pirate = public/language/en@pirate/pages.json
trans.es = public/language/es/pages.json
trans.et = public/language/et/pages.json
@@ -415,6 +429,7 @@ source_lang = en_GB
trans.ar = public/language/ar/topic.json
trans.cs = public/language/cs/topic.json
trans.de = public/language/de/topic.json
+trans.en_US = public/language/en_US/topic.json
trans.en@pirate = public/language/en@pirate/topic.json
trans.es = public/language/es/topic.json
trans.et = public/language/et/topic.json
diff --git a/app.js b/app.js
index c72096d116..5d336a44fd 100644
--- a/app.js
+++ b/app.js
@@ -119,7 +119,6 @@ function start() {
require('./src/database').init(function(err) {
meta.configs.init(function () {
var templates = require('./public/src/templates'),
- translator = require('./public/src/translator'),
webserver = require('./src/webserver'),
sockets = require('./src/socket.io'),
plugins = require('./src/plugins'),
@@ -131,7 +130,6 @@ function start() {
if (schema_ok || nconf.get('check-schema') === false) {
sockets.init(webserver.server);
plugins.init();
- translator.loadServer();
nconf.set('url', nconf.get('base_url') + (nconf.get('use_port') ? ':' + nconf.get('port') : '') + nconf.get('relative_path'));
nconf.set('base_templates_path', path.join(nconf.get('themes_path'), 'nodebb-theme-vanilla/templates'));
diff --git a/package.json b/package.json
index 5df4aaa5f5..e8202d8648 100644
--- a/package.json
+++ b/package.json
@@ -43,6 +43,7 @@
"nodebb-widget-essentials": "~0.0.21",
"nodebb-theme-vanilla": "~0.0.19",
"nodebb-theme-lavender": "~0.0.25",
+ "nodebb-plugin-soundpack-default": "~0.1.0",
"less": "~1.6.3",
"daemon": "~1.1.0",
"underscore": "~1.6.0",
diff --git a/public/language/en_GB/notifications.json b/public/language/en_GB/notifications.json
index 1ad15012c1..748c89bfb7 100644
--- a/public/language/en_GB/notifications.json
+++ b/public/language/en_GB/notifications.json
@@ -7,5 +7,7 @@
"outgoing_link": "Outgoing Link",
"outgoing_link_message": "You are now leaving",
"continue_to": "Continue to",
- "return_to": "Return to "
+ "return_to": "Return to ",
+ "new_notification": "New Notification",
+ "you_have_unread_notifications": "You have unread notifications."
}
diff --git a/public/language/en_GB/success.json b/public/language/en_GB/success.json
index d38b90c6fa..6b079680b5 100644
--- a/public/language/en_GB/success.json
+++ b/public/language/en_GB/success.json
@@ -1,5 +1,5 @@
{
"topic-post": "You have successfully posted.",
- "authentication-successful": "Authentication Successful"
-
+ "authentication-successful": "Authentication Successful",
+ "settings-saved": "Settings saved!"
}
\ No newline at end of file
diff --git a/public/language/en_GB/topic.json b/public/language/en_GB/topic.json
index a11a3b941a..d7c09cd629 100644
--- a/public/language/en_GB/topic.json
+++ b/public/language/en_GB/topic.json
@@ -57,6 +57,14 @@
"thread_tools.restore": "Restore Topic",
"thread_tools.restore_confirm": "Are you sure you want to restore this thread?",
+ "topic_lock_success": "Topic has been successfully locked.",
+ "topic_unlock_success": "Topic has been successfully unlocked.",
+
+ "topic_pin_success": "Topic has been successfully pinned.",
+ "topic_unpin_success": "Topic has been successfully unpinned.",
+
+ "topic_move_success": "This topic has been successfully moved to %1",
+
"post_delete_confirm": "Are you sure you want to delete this post?",
"post_restore_confirm": "Are you sure you want to restore this post?",
"post_delete_error": "Could not delete this post!",
@@ -74,6 +82,7 @@
"loading_more_posts": "Loading More Posts",
"move_topic": "Move Topic",
"move_post": "Move Post",
+ "post_moved": "Post moved!",
"fork_topic": "Fork Topic",
"topic_will_be_moved_to": "This topic will be moved to the category",
"fork_topic_instruction": "Click the posts you want to fork",
diff --git a/public/language/en_US/category.json b/public/language/en_US/category.json
new file mode 100644
index 0000000000..c763d0114f
--- /dev/null
+++ b/public/language/en_US/category.json
@@ -0,0 +1,12 @@
+{
+ "new_topic_button": "New Topic",
+ "no_topics": "There are no topics in this category.
Why don't you try posting one?",
+ "posts": "posts",
+ "views": "views",
+ "posted": "posted",
+ "browsing": "browsing",
+ "no_replies": "No one has replied",
+ "replied": "replied",
+ "last_edited_by": "last edited by",
+ "share_this_category": "Share this category"
+}
\ No newline at end of file
diff --git a/public/language/en_US/footer.json b/public/language/en_US/footer.json
new file mode 100644
index 0000000000..ba75cdc608
--- /dev/null
+++ b/public/language/en_US/footer.json
@@ -0,0 +1,7 @@
+{
+ "stats.online": "Online",
+ "stats.users": "Users",
+ "stats.topics": "Topics",
+ "stats.posts": "Posts",
+ "success": "success"
+}
\ No newline at end of file
diff --git a/public/language/en_US/global.json b/public/language/en_US/global.json
new file mode 100644
index 0000000000..ce8c44d35e
--- /dev/null
+++ b/public/language/en_US/global.json
@@ -0,0 +1,55 @@
+{
+ "home": "Home",
+ "search": "Search",
+ "buttons.close": "Close",
+ "403.title": "Access Denied",
+ "403.message": "You seem to have stumbled upon a page that you do not have access to. Perhaps you should try logging in?",
+ "404.title": "Not Found",
+ "404.message": "You seem to have stumbled upon a page that does not exist. Return to the home page.",
+ "500.title": "Internal error.",
+ "500.message": "Oops! Looks like something went wrong!",
+ "register": "Register",
+ "login": "Login",
+ "please_log_in": "Please Log In",
+ "logout": "Logout",
+ "posting_restriction_info": "Posting is currently restricted to registered members only, click here to log in.",
+ "welcome_back": "Welcome Back ",
+ "you_have_successfully_logged_in": "You have successfully logged in",
+ "save_changes": "Save Changes",
+ "close": "Close",
+ "pagination": "Pagination",
+ "header.admin": "Admin",
+ "header.recent": "Recent",
+ "header.unread": "Unread",
+ "header.popular": "Popular",
+ "header.users": "Users",
+ "header.chats": "Chats",
+ "header.notifications": "Notifications",
+ "header.search": "Search",
+ "header.profile": "Profile",
+ "notifications.loading": "Loading Notifications",
+ "chats.loading": "Loading Chats",
+ "motd.welcome": "Welcome to NodeBB, the discussion platform of the future.",
+ "previouspage": "Previous Page",
+ "nextpage": "Next Page",
+ "alert.success": "Success",
+ "alert.error": "Error",
+ "alert.banned": "Banned",
+ "alert.banned.message": "You are banned you will be logged out!",
+ "alert.unfollow": "You are no longer following %1!",
+ "alert.follow": "You are now following %1!",
+ "posts": "Posts",
+ "views": "Views",
+ "posted": "posted",
+ "in": "in",
+ "norecentposts": "No Recent Posts",
+ "norecenttopics": "No Recent Topics",
+ "recentposts": "Recent Posts",
+ "recentips": "Recently Logged In IPs",
+ "online": "Online",
+ "away": "Away",
+ "dnd": "Do not Disturb",
+ "invisible": "Invisible",
+ "offline": "Offline",
+ "privacy": "Privacy"
+}
\ No newline at end of file
diff --git a/public/language/en_US/language.json b/public/language/en_US/language.json
new file mode 100644
index 0000000000..64fa5738f6
--- /dev/null
+++ b/public/language/en_US/language.json
@@ -0,0 +1,5 @@
+{
+ "name": "English (United States)",
+ "code": "en_US",
+ "dir": "ltr"
+}
\ No newline at end of file
diff --git a/public/language/en_US/login.json b/public/language/en_US/login.json
new file mode 100644
index 0000000000..0e52aa0e27
--- /dev/null
+++ b/public/language/en_US/login.json
@@ -0,0 +1,10 @@
+{
+ "login": "Login",
+ "username": "Username / Email",
+ "password": "Password",
+ "remember_me": "Remember Me?",
+ "forgot_password": "Forgot Password?",
+ "alternative_logins": "Alternative Logins",
+ "failed_login_attempt": "Failed login attempt, please try again.",
+ "login_successful": "You have successfully logged in!"
+}
\ No newline at end of file
diff --git a/public/language/en_US/modules.json b/public/language/en_US/modules.json
new file mode 100644
index 0000000000..32c1a50b09
--- /dev/null
+++ b/public/language/en_US/modules.json
@@ -0,0 +1,6 @@
+{
+ "chat.chatting_with": "Chat with ",
+ "chat.placeholder": "type chat message here, press enter to send",
+ "chat.send": "Send",
+ "chat.no_active": "You have no active chats."
+}
\ No newline at end of file
diff --git a/public/language/en_US/notifications.json b/public/language/en_US/notifications.json
new file mode 100644
index 0000000000..da41d46c51
--- /dev/null
+++ b/public/language/en_US/notifications.json
@@ -0,0 +1,10 @@
+{
+ "title": "Notifications",
+ "no_notifs": "You have no new notifications",
+ "see_all": "See all Notifications",
+ "back_to_home": "Back to NodeBB",
+ "outgoing_link": "Outgoing Link",
+ "outgoing_link_message": "You are now leaving",
+ "continue_to": "Continue to",
+ "return_to": "Return to "
+}
\ No newline at end of file
diff --git a/public/language/en_US/pages.json b/public/language/en_US/pages.json
new file mode 100644
index 0000000000..9925d77393
--- /dev/null
+++ b/public/language/en_US/pages.json
@@ -0,0 +1,15 @@
+{
+ "home": "Home",
+ "unread": "Unread Topics",
+ "popular": "Popular Topics",
+ "recent": "Recent Topics",
+ "users": "Registered Users",
+ "notifications": "Notifications",
+ "user.edit": "Editing \"%1\"",
+ "user.following": "People %1 Follows",
+ "user.followers": "People who Follow %1",
+ "user.posts": "Posts made by %1",
+ "user.topics": "Topics created by %1",
+ "user.favourites": "%1's Favorite Posts",
+ "user.settings": "User Settings"
+}
\ No newline at end of file
diff --git a/public/language/en_US/recent.json b/public/language/en_US/recent.json
new file mode 100644
index 0000000000..9a8bc95017
--- /dev/null
+++ b/public/language/en_US/recent.json
@@ -0,0 +1,7 @@
+{
+ "title": "Recent",
+ "day": "Day",
+ "week": "Week",
+ "month": "Month",
+ "no_recent_topics": "There are no recent topics."
+}
\ No newline at end of file
diff --git a/public/language/en_US/register.json b/public/language/en_US/register.json
new file mode 100644
index 0000000000..e553561c0e
--- /dev/null
+++ b/public/language/en_US/register.json
@@ -0,0 +1,18 @@
+{
+ "register": "Register",
+ "help.email": "By default, your email will be hidden from the public.",
+ "help.username_restrictions": "A unique username between %1 and %2 characters. Others can mention you with @username.",
+ "help.minimum_password_length": "Your password's length must be at least %1 characters.",
+ "email_address": "Email Address",
+ "email_address_placeholder": "Enter Email Address",
+ "username": "Username",
+ "username_placeholder": "Enter Username",
+ "password": "Password",
+ "password_placeholder": "Enter Password",
+ "confirm_password": "Confirm Password",
+ "confirm_password_placeholder": "Confirm Password",
+ "register_now_button": "Register Now",
+ "alternative_registration": "Alternative Registration",
+ "terms_of_use": "Terms of Use",
+ "agree_to_terms_of_use": "I agree to the Terms of Use"
+}
\ No newline at end of file
diff --git a/public/language/en_US/reset_password.json b/public/language/en_US/reset_password.json
new file mode 100644
index 0000000000..dcdf4e76b6
--- /dev/null
+++ b/public/language/en_US/reset_password.json
@@ -0,0 +1,14 @@
+{
+ "reset_password": "Reset Password",
+ "update_password": "Update Password",
+ "password_changed.title": "Password Changed",
+ "password_changed.message": "
Password successfully reset, please log in again.", + "wrong_reset_code.title": "Incorrect Reset Code", + "wrong_reset_code.message": "The reset code received was incorrect. Please try again, or request a new reset code.", + "new_password": "New Password", + "repeat_password": "Confirm Password", + "enter_email": "Please enter your email address and we will send you an email with instructions on how to reset your account.", + "enter_email_address": "Enter Email Address", + "password_reset_sent": "Password Reset Sent", + "invalid_email": "Invalid Email / Email does not exist!" +} \ No newline at end of file diff --git a/public/language/en_US/topic.json b/public/language/en_US/topic.json new file mode 100644 index 0000000000..d1824c2baf --- /dev/null +++ b/public/language/en_US/topic.json @@ -0,0 +1,93 @@ +{ + "topic": "Topic", + "topics": "Topics", + "topic_id": "Topic ID", + "topic_id_placeholder": "Enter topic ID", + "no_topics_found": "No topics found!", + "no_posts_found": "No posts found!", + "profile": "Profile", + "posted_by": "Posted by", + "chat": "Chat", + "notify_me": "Be notified of new replies in this topic", + "quote": "Quote", + "reply": "Reply", + "edit": "Edit", + "delete": "Delete", + "restore": "Restore", + "move": "Move", + "fork": "Fork", + "banned": "banned", + "link": "Link", + "share": "Share", + "tools": "Tools", + "flag": "Flag", + "bookmark_instructions": "Click here to return to your last position or close to discard.", + "flag_title": "Flag this post for moderation", + "flag_confirm": "Are you sure you want to flag this post?", + "flag_success": "This post has been flagged for moderation.", + "deleted_message": "This thread has been deleted. Only users with thread management privileges can see it.", + "following_topic.title": "Following Topic", + "following_topic.message": "You will now be receiving notifications when somebody posts to this topic.", + "not_following_topic.title": "Not Following Topic", + "not_following_topic.message": "You will no longer receive notifications from this topic.", + "login_to_subscribe": "Please register or log in in order to subscribe to this topic.", + "markAsUnreadForAll.success": "Topic marked as unread for all.", + "watch": "Watch", + "watch.title": "Be notified of new replies in this topic", + "share_this_post": "Share this Post", + "thread_tools.title": "Thread Tools", + "thread_tools.markAsUnreadForAll": "Mark Unread", + "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.delete_confirm": "Are you sure you want to delete this thread?", + "thread_tools.restore": "Restore Topic", + "thread_tools.restore_confirm": "Are you sure you want to restore this thread?", + "post_delete_confirm": "Are you sure you want to delete this post?", + "post_restore_confirm": "Are you sure you want to restore this post?", + "post_delete_error": "Could not delete this post!", + "post_restore_error": "Could not restore this post!", + "load_categories": "Loading Categories", + "disabled_categories_note": "Disabled Categories are greyed out", + "confirm_move": "Move", + "confirm_fork": "Fork", + "favourite": "Favorite", + "favourites": "Favorites", + "favourites.not_logged_in.title": "Not Logged In", + "favourites.not_logged_in.message": "Please log in in order to favorite this post", + "favourites.has_no_favourites": "You don't have any favorites, favorite some posts to see them here!", + "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", + "loading_more_posts": "Loading More Posts", + "move_topic": "Move Topic", + "move_post": "Move Post", + "fork_topic": "Fork Topic", + "topic_will_be_moved_to": "This topic will be moved to the category", + "fork_topic_instruction": "Click the posts you want to fork", + "fork_no_pids": "No posts selected!", + "fork_success": "Succesfully forked topic!", + "reputation": "Reputation", + "posts": "Posts", + "composer.title_placeholder": "Enter your topic title here...", + "composer.write": "Write", + "composer.preview": "Preview", + "composer.help": "Help", + "composer.discard": "Discard", + "composer.submit": "Submit", + "composer.replying_to": "Replying to", + "composer.new_topic": "New Topic", + "composer.uploading": "uploading...", + "composer.thumb_url_label": "Paste a topic thumbnail URL", + "composer.thumb_title": "Add a thumbnail to this topic", + "composer.thumb_url_placeholder": "http://example.com/thumb.png", + "composer.thumb_file_label": "Or upload a file", + "composer.thumb_remove": "Clear fields", + "composer.drag_and_drop_images": "Drag and Drop Images Here", + "composer.upload_instructions": "Upload images by dragging & dropping them." +} \ No newline at end of file diff --git a/public/language/en_US/unread.json b/public/language/en_US/unread.json new file mode 100644 index 0000000000..d682c0541f --- /dev/null +++ b/public/language/en_US/unread.json @@ -0,0 +1,9 @@ +{ + "title": "Unread", + "no_unread_topics": "There are no unread topics.", + "load_more": "Load More", + "mark_as_read": "Mark as Read", + "selected": "Selected", + "all": "All", + "topics_marked_as_read.success": "Topics marked as read!" +} \ No newline at end of file diff --git a/public/language/en_US/user.json b/public/language/en_US/user.json new file mode 100644 index 0000000000..6899dbc7ff --- /dev/null +++ b/public/language/en_US/user.json @@ -0,0 +1,55 @@ +{ + "banned": "Banned", + "offline": "Offline", + "username": "User Name", + "email": "Email", + "fullname": "Full Name", + "website": "Website", + "location": "Location", + "age": "Age", + "joined": "Joined", + "lastonline": "Last Online", + "profile": "Profile", + "profile_views": "Profile views", + "reputation": "Reputation", + "posts": "Posts", + "favourites": "Favorites", + "followers": "Followers", + "following": "Following", + "signature": "Signature", + "gravatar": "Gravatar", + "birthday": "Birthday", + "chat": "Chat", + "follow": "Follow", + "unfollow": "Unfollow", + "change_picture": "Change Picture", + "edit": "Edit", + "uploaded_picture": "Uploaded Picture", + "upload_new_picture": "Upload New Picture", + "current_password": "Current Password", + "change_password": "Change Password", + "change_password_error": "Invalid Password!", + "change_password_error_wrong_current": "Your current password is not correct!", + "change_password_error_length": "Password too short!", + "change_password_error_match": "Passwords must match!", + "change_password_error_privileges": "You are not have the rights to change this password.", + "change_password_success": "Your password is updated!", + "confirm_password": "Confirm Password", + "password": "Password", + "upload_picture": "Upload picture", + "upload_a_picture": "Upload a picture", + "image_spec": "You may only upload PNG, JPG, or GIF files", + "max": "max.", + "settings": "Settings", + "show_email": "Show My Email", + "has_no_follower": "This user doesn't have any followers :(", + "follows_no_one": "This user isn't following anyone :(", + "has_no_posts": "This user didn't post anything yet.", + "has_no_topics": "This user didn't post any topics yet.", + "email_hidden": "Email Hidden", + "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", + "notification_sounds": "Play a sound when you receive a notification." +} \ No newline at end of file diff --git a/public/language/en_US/users.json b/public/language/en_US/users.json new file mode 100644 index 0000000000..3a5612132a --- /dev/null +++ b/public/language/en_US/users.json @@ -0,0 +1,9 @@ +{ + "latest_users": "Latest Users", + "top_posters": "Top Posters", + "most_reputation": "Most Reputation", + "online": "Online", + "search": "Search", + "enter_username": "Enter a username to search", + "load_more": "Load More" +} \ No newline at end of file diff --git a/public/language/fr/unread.json b/public/language/fr/unread.json index f48f6def05..3ac195f32e 100644 --- a/public/language/fr/unread.json +++ b/public/language/fr/unread.json @@ -2,8 +2,8 @@ "title": "Non Lu", "no_unread_topics": "Aucun sujet non lu.", "load_more": "Charger la suite", - "mark_as_read": "Mark as Read", - "selected": "Selected", - "all": "All", - "topics_marked_as_read.success": "Topics marked as read!" + "mark_as_read": "Marquer comme Lu", + "selected": "Sélectionnés", + "all": "Tous", + "topics_marked_as_read.success": "Sujets marqués comme lus!" } \ No newline at end of file diff --git a/public/language/nb/pages.json b/public/language/nb/pages.json index 0e42905334..614bbaa676 100644 --- a/public/language/nb/pages.json +++ b/public/language/nb/pages.json @@ -9,7 +9,7 @@ "user.following": "Personer %1 følger", "user.followers": "Personer som følger %1", "user.posts": "Innlegg laget av %1", - "user.topics": "Topics created by %1", + "user.topics": "Emner opprettet av %1", "user.favourites": "%1 sine favoritt-innlegg", "user.settings": "Brukerinnstillinger" } \ No newline at end of file diff --git a/public/language/nb/topic.json b/public/language/nb/topic.json index b6bcd76e39..dada8fdca5 100644 --- a/public/language/nb/topic.json +++ b/public/language/nb/topic.json @@ -1,8 +1,8 @@ { "topic": "Emne", "topics": "Emner", - "topic_id": "Topic ID", - "topic_id_placeholder": "Enter topic ID", + "topic_id": "Emne-ID", + "topic_id_placeholder": "Skriv emne-ID", "no_topics_found": "Ingen emner funnet!", "no_posts_found": "Ingen innlegg funnet!", "profile": "Profil", @@ -23,8 +23,8 @@ "flag": "Rapporter", "bookmark_instructions": "Klikk her for å returnere til din siste posisjon eller lukk for å forkaste.", "flag_title": "Rapporter dette innlegget for granskning", - "flag_confirm": "Are you sure you want to flag this post?", - "flag_success": "This post has been flagged for moderation.", + "flag_confirm": "Er du sikker på at du vil rapportere dette innlegget?", + "flag_success": "Dette innlegget har blitt rapportert.", "deleted_message": "Denne tråden har blitt slettet. Bare brukere med trådhåndterings-privilegier kan se den.", "following_topic.title": "Følger tråd", "following_topic.message": "Du vil nå motta varsler når noen skriver i denne tråden.", @@ -44,13 +44,13 @@ "thread_tools.move": "Flytt tråd", "thread_tools.fork": "Forgren tråd", "thread_tools.delete": "Slett tråd", - "thread_tools.delete_confirm": "Are you sure you want to delete this thread?", + "thread_tools.delete_confirm": "Er du sikker på at du vil slette denne tråden?", "thread_tools.restore": "Gjenopprett tråd", - "thread_tools.restore_confirm": "Are you sure you want to restore this thread?", - "post_delete_confirm": "Are you sure you want to delete this post?", - "post_restore_confirm": "Are you sure you want to restore this post?", - "post_delete_error": "Could not delete this post!", - "post_restore_error": "Could not restore this post!", + "thread_tools.restore_confirm": "Er du sikker på at du vil gjenopprette denne tråden?", + "post_delete_confirm": "Er du sikker på at du vil slette dette innlegget?", + "post_restore_confirm": "Er du sikker på at du vil gjenopprette dette innlegget?", + "post_delete_error": "Kunne ikke slette dette innlegget!", + "post_restore_error": "Kunne ikke gjenopprette dette innlegget!", "load_categories": "Laster kategorier", "disabled_categories_note": "Deaktiverte kategorier er grået ut", "confirm_move": "Flytt", diff --git a/public/language/nb/unread.json b/public/language/nb/unread.json index f3a501649c..34d57eb1d8 100644 --- a/public/language/nb/unread.json +++ b/public/language/nb/unread.json @@ -2,8 +2,8 @@ "title": "Uleste", "no_unread_topics": "Det er ingen uleste emner.", "load_more": "Last mer", - "mark_as_read": "Mark as Read", - "selected": "Selected", - "all": "All", - "topics_marked_as_read.success": "Topics marked as read!" + "mark_as_read": "Marker som lest", + "selected": "Valgte", + "all": "Alle", + "topics_marked_as_read.success": "Emner merket som lest!" } \ No newline at end of file diff --git a/public/language/nb/user.json b/public/language/nb/user.json index 619ddc0ddb..0ab027d61c 100644 --- a/public/language/nb/user.json +++ b/public/language/nb/user.json @@ -28,12 +28,12 @@ "upload_new_picture": "Last opp nytt bidle", "current_password": "Gjeldende passord", "change_password": "Endre passord", - "change_password_error": "Invalid Password!", - "change_password_error_wrong_current": "Your current password is not correct!", - "change_password_error_length": "Password too short!", - "change_password_error_match": "Passwords must match!", - "change_password_error_privileges": "You are not have the rights to change this password.", - "change_password_success": "Your password is updated!", + "change_password_error": "Ugyldig passord!", + "change_password_error_wrong_current": "Ditt gjeldende passord er ikke korrekt!", + "change_password_error_length": "Passord for kort!", + "change_password_error_match": "Passordene må samsvare!", + "change_password_error_privileges": "Du har ikke rettigheter til å endre dette passordet.", + "change_password_success": "Passordet ditt ble oppdatert!", "confirm_password": "Bekreft passord", "password": "Passord", "upload_picture": "Last opp bilde", @@ -45,7 +45,7 @@ "has_no_follower": "Denne brukeren har ingen følgere :(", "follows_no_one": "Denne brukeren følger ingen :(", "has_no_posts": "Denne brukeren har ikke skrevet noe enda.", - "has_no_topics": "This user didn't post any topics yet.", + "has_no_topics": "Denne brukeren har ikke skrevet noen emner enda.", "email_hidden": "E-post skjult", "hidden": "skjult", "paginate_description": "Paginer tråder og innlegg istedet for å bruke uendelig skrolling.", diff --git a/public/language/pl/unread.json b/public/language/pl/unread.json index 74197b2f5a..d648c84e98 100644 --- a/public/language/pl/unread.json +++ b/public/language/pl/unread.json @@ -2,8 +2,8 @@ "title": "Nieprzeczytane", "no_unread_topics": "Nie masz żadnych nieprzeczytanych wątków.", "load_more": "Więcej", - "mark_as_read": "Mark as Read", - "selected": "Selected", - "all": "All", - "topics_marked_as_read.success": "Topics marked as read!" + "mark_as_read": "Oznacz jako przeczytane", + "selected": "Wybrane", + "all": "Wszystkie", + "topics_marked_as_read.success": "Wątki zostały oznaczone jako przeczytane!" } \ No newline at end of file diff --git a/public/sounds/notification.wav b/public/sounds/notification.wav deleted file mode 100644 index c6ba307524..0000000000 Binary files a/public/sounds/notification.wav and /dev/null differ diff --git a/public/sounds/waterdrop-high.wav b/public/sounds/waterdrop-high.wav deleted file mode 100644 index 581addfc89..0000000000 Binary files a/public/sounds/waterdrop-high.wav and /dev/null differ diff --git a/public/sounds/waterdrop-low.wav b/public/sounds/waterdrop-low.wav deleted file mode 100644 index cb50a587a6..0000000000 Binary files a/public/sounds/waterdrop-low.wav and /dev/null differ diff --git a/public/src/forum/account.js b/public/src/forum/account.js index ba5338448a..74c8d25a98 100644 --- a/public/src/forum/account.js +++ b/public/src/forum/account.js @@ -1,82 +1,76 @@ +'use strict'; + +/* globals define, ajaxify, app, utils, socket, translator*/ + define(['forum/accountheader'], function(header) { - var Account = {}; + var Account = {}, + yourid, + theirid, + isFollowing; Account.init = function() { header.init(); - var yourid = ajaxify.variables.get('yourid'), - theirid = ajaxify.variables.get('theirid'), - isFollowing = ajaxify.variables.get('isFollowing'); - - $(document).ready(function() { - var username = $('.account-username').html(); - app.enterRoom('user/' + theirid); - - utils.addCommasToNumbers($('.account .formatted-number')); - utils.makeNumbersHumanReadable($('.account .human-readable-number')); - $('.user-recent-posts img').addClass('img-responsive'); - - var followBtn = $('#follow-btn'); - var unfollowBtn = $('#unfollow-btn'); - var chatBtn = $('#chat-btn'); - - if (yourid !== theirid && yourid !== "0") { - if (isFollowing) { - followBtn.addClass('hide'); - unfollowBtn.removeClass('hide'); - } else { - followBtn.removeClass('hide'); - unfollowBtn.addClass('hide'); - } - chatBtn.removeClass('hide'); - } else { - followBtn.addClass('hide'); - unfollowBtn.addClass('hide'); - chatBtn.addClass('hide'); - } + yourid = ajaxify.variables.get('yourid'); + theirid = ajaxify.variables.get('theirid'); + isFollowing = ajaxify.variables.get('isFollowing'); + + app.enterRoom('user/' + theirid); + + processPage(); - followBtn.on('click', function() { - socket.emit('user.follow', { - uid: theirid - }, function(err) { - if(err) { - return app.alertError('There was an error following' + username + '!'); - } - - followBtn.addClass('hide'); - unfollowBtn.removeClass('hide'); - app.alertSuccess('[[global:alert.follow, ' + username + ']]'); - }); - return false; - }); - - unfollowBtn.on('click', function() { - socket.emit('user.unfollow', { - uid: theirid - }, function(err) { - if(err) { - return app.alertError('There was an error unfollowing ' + username + '!'); - } - - followBtn.removeClass('hide'); - unfollowBtn.addClass('hide'); - app.alertSuccess('[[global:alert.unfollow, ' + username + ']]'); - }); - return false; - }); - - chatBtn.on('click', function() { - app.openChat(username, theirid); - }); - - socket.on('user.isOnline', Account.handleUserOnline); - - socket.emit('user.isOnline', theirid, Account.handleUserOnline); + updateButtons(); + + $('#follow-btn').on('click', function() { + return toggleFollow('follow'); + }); + + $('#unfollow-btn').on('click', function() { + return toggleFollow('unfollow'); + }); + $('#chat-btn').on('click', function() { + app.openChat($('.account-username').html(), theirid); }); + + socket.on('user.isOnline', handleUserOnline); + + socket.emit('user.isOnline', theirid, handleUserOnline); }; - Account.handleUserOnline = function(err, data) { + function processPage() { + utils.addCommasToNumbers($('.account .formatted-number')); + utils.makeNumbersHumanReadable($('.account .human-readable-number')); + $('.user-recent-posts img').addClass('img-responsive'); + } + + function updateButtons() { + var isSelfOrNotLoggedIn = yourid === theirid || yourid === '0'; + $('#follow-btn').toggleClass('hide', isFollowing || isSelfOrNotLoggedIn); + $('#unfollow-btn').toggleClass('hide', !isFollowing || isSelfOrNotLoggedIn); + $('#chat-btn').toggleClass('hide', isSelfOrNotLoggedIn); + } + + function toggleFollow(type) { + socket.emit('user.' + type, { + uid: theirid + }, function(err) { + if(err) { + return app.alertError(err.message); + } + + $('#follow-btn').toggleClass('hide', type === 'follow'); + $('#unfollow-btn').toggleClass('hide', type === 'unfollow'); + app.alertSuccess('[[global:alert.' + type + ', ' + $('.account-username').html() + ']]'); + }); + return false; + } + + function handleUserOnline(err, data) { + if (err) { + return app.alertError(err.message); + } + var onlineStatus = $('.account-online-status'); if(parseInt(ajaxify.variables.get('theirid'), 10) !== parseInt(data.uid, 10)) { @@ -89,7 +83,7 @@ define(['forum/accountheader'], function(header) { .attr('data-original-title', translated); }); - }; + } return Account; }); diff --git a/public/src/forum/accountsettings.js b/public/src/forum/accountsettings.js index cf9fece08d..fcb4c52272 100644 --- a/public/src/forum/accountsettings.js +++ b/public/src/forum/accountsettings.js @@ -23,14 +23,14 @@ define(['forum/accountheader'], function(header) { socket.emit('user.saveSettings', settings, function(err) { if (err) { - return app.alertError('There was an error saving settings!'); + return app.alertError(err.message); } - app.alertSuccess('Settings saved!'); + app.alertSuccess('[[success:settings-saved]]'); }); return false; }); - + socket.emit('user.getSettings', function(err, settings) { for (var setting in settings) { if (settings.hasOwnProperty(setting)) { diff --git a/public/src/forum/admin/categories.js b/public/src/forum/admin/categories.js index 11786a7d0f..161f2179c5 100644 --- a/public/src/forum/admin/categories.js +++ b/public/src/forum/admin/categories.js @@ -37,13 +37,17 @@ define(['uploader'], function(uploader) { } function select_icon(el) { - var selected = el.attr('class').replace(' fa-2x', ''); + var selected = el.attr('class').replace('fa-2x', '').replace('fa', '').replace(/\s+/g, ''); $('#icons .selected').removeClass('selected'); + + if (selected === '') { + selected = 'fa-doesnt-exist'; + } if (selected) { - $('#icons .' + selected).parent().addClass('selected'); + $('#icons .fa-icons .fa.' + selected).parent().addClass('selected'); } - bootbox.confirm('