Skip to content

Node.js based forum software built for the modern web

added "pages" translation file to languages

Julian Lame69f5fff3b99
diff --git a/public/language/ar/pages.json b/public/language/ar/pages.json
new file mode 100644
index 0000000000..15d24da2a0
--- /dev/null
+++ b/public/language/ar/pages.json
@@ -0,0 +1,7 @@
+{
+ "home": "Home",
+ "unread": "Unread Topics",
+ "recent": "Recent Topics",
+ "users": "Registered Users",
+ "notifications": "Notifications"
+}
\ No newline at end of file
diff --git a/public/language/cs/pages.json b/public/language/cs/pages.json
new file mode 100644
index 0000000000..15d24da2a0
--- /dev/null
+++ b/public/language/cs/pages.json
@@ -0,0 +1,7 @@
+{
+ "home": "Home",
+ "unread": "Unread Topics",
+ "recent": "Recent Topics",
+ "users": "Registered Users",
+ "notifications": "Notifications"
+}
\ No newline at end of file
diff --git a/public/language/de/pages.json b/public/language/de/pages.json
new file mode 100644
index 0000000000..15d24da2a0
--- /dev/null
+++ b/public/language/de/pages.json
@@ -0,0 +1,7 @@
+{
+ "home": "Home",
+ "unread": "Unread Topics",
+ "recent": "Recent Topics",
+ "users": "Registered Users",
+ "notifications": "Notifications"
+}
\ No newline at end of file
diff --git a/public/language/en/pages.json b/public/language/en/pages.json
new file mode 100644
index 0000000000..15d24da2a0
--- /dev/null
+++ b/public/language/en/pages.json
@@ -0,0 +1,7 @@
+{
+ "home": "Home",
+ "unread": "Unread Topics",
+ "recent": "Recent Topics",
+ "users": "Registered Users",
+ "notifications": "Notifications"
+}
\ No newline at end of file
diff --git a/public/language/es/pages.json b/public/language/es/pages.json
new file mode 100644
index 0000000000..15d24da2a0
--- /dev/null
+++ b/public/language/es/pages.json
@@ -0,0 +1,7 @@
+{
+ "home": "Home",
+ "unread": "Unread Topics",
+ "recent": "Recent Topics",
+ "users": "Registered Users",
+ "notifications": "Notifications"
+}
\ No newline at end of file
diff --git a/public/language/fi/pages.json b/public/language/fi/pages.json
new file mode 100644
index 0000000000..15d24da2a0
--- /dev/null
+++ b/public/language/fi/pages.json
@@ -0,0 +1,7 @@
+{
+ "home": "Home",
+ "unread": "Unread Topics",
+ "recent": "Recent Topics",
+ "users": "Registered Users",
+ "notifications": "Notifications"
+}
\ No newline at end of file
diff --git a/public/language/fr/pages.json b/public/language/fr/pages.json
new file mode 100644
index 0000000000..15d24da2a0
--- /dev/null
+++ b/public/language/fr/pages.json
@@ -0,0 +1,7 @@
+{
+ "home": "Home",
+ "unread": "Unread Topics",
+ "recent": "Recent Topics",
+ "users": "Registered Users",
+ "notifications": "Notifications"
+}
\ No newline at end of file
diff --git a/public/language/it/pages.json b/public/language/it/pages.json
new file mode 100644
index 0000000000..15d24da2a0
--- /dev/null
+++ b/public/language/it/pages.json
@@ -0,0 +1,7 @@
+{
+ "home": "Home",
+ "unread": "Unread Topics",
+ "recent": "Recent Topics",
+ "users": "Registered Users",
+ "notifications": "Notifications"
+}
\ No newline at end of file
diff --git a/public/language/pt_br/pages.json b/public/language/pt_br/pages.json
new file mode 100644
index 0000000000..15d24da2a0
--- /dev/null
+++ b/public/language/pt_br/pages.json
@@ -0,0 +1,7 @@
+{
+ "home": "Home",
+ "unread": "Unread Topics",
+ "recent": "Recent Topics",
+ "users": "Registered Users",
+ "notifications": "Notifications"
+}
\ No newline at end of file
diff --git a/public/language/sk/pages.json b/public/language/sk/pages.json
new file mode 100644
index 0000000000..15d24da2a0
--- /dev/null
+++ b/public/language/sk/pages.json
@@ -0,0 +1,7 @@
+{
+ "home": "Home",
+ "unread": "Unread Topics",
+ "recent": "Recent Topics",
+ "users": "Registered Users",
+ "notifications": "Notifications"
+}
\ No newline at end of file
diff --git a/public/language/zh_cn/pages.json b/public/language/zh_cn/pages.json
new file mode 100644
index 0000000000..15d24da2a0
--- /dev/null
+++ b/public/language/zh_cn/pages.json
@@ -0,0 +1,7 @@
+{
+ "home": "Home",
+ "unread": "Unread Topics",
+ "recent": "Recent Topics",
+ "users": "Registered Users",
+ "notifications": "Notifications"
+}
\ No newline at end of file
diff --git a/public/language/zh_tw/pages.json b/public/language/zh_tw/pages.json
new file mode 100644
index 0000000000..15d24da2a0
--- /dev/null
+++ b/public/language/zh_tw/pages.json
@@ -0,0 +1,7 @@
+{
+ "home": "Home",
+ "unread": "Unread Topics",
+ "recent": "Recent Topics",
+ "users": "Registered Users",
+ "notifications": "Notifications"
+}
\ No newline at end of file
diff --git a/src/meta.js b/src/meta.js
index 7b3e7b6228..8f43fc653b 100644
--- a/src/meta.js
+++ b/src/meta.js
@@ -177,14 +177,15 @@ var fs = require('fs'),
});
},
parseFragment: function (urlFragment, callback) {
- if (urlFragment === '') {
- callback(null, 'Index');
- } else if (urlFragment === 'recent') {
- callback(null, 'Recent Topics');
- } else if (urlFragment === 'unread') {
- callback(null, 'Unread Topics');
- } else if (urlFragment === 'users') {
- callback(null, 'Registered Users');
+ var translated = ['', 'recent', 'unread', 'users', 'notifications'];
+ if (translated.indexOf(urlFragment) !== -1) {
+ if (!urlFragment.length) {
+ urlFragment = 'home';
+ }
+
+ translator.translate('[[pages:' + urlFragment + ']]', function(translated) {
+ callback(null, translated);
+ });
} else if (/^category\/\d+\/?/.test(urlFragment)) {
var cid = urlFragment.match(/category\/(\d+)/)[1];