Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chinese Translations #72

Open
wants to merge 4 commits into
base: chinese-translation
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM node:6

RUN mkdir -p /server
WORKDIR /server

COPY package.json /server/

RUN npm install
COPY .babelrc ./
COPY db/ ./db
COPY *.js ./
COPY models/ ./models
COPY migrations/ ./migrations
COPY client/ ./client
COPY api/ ./api

RUN npm run build

EXPOSE 5000

VOLUME db

CMD [ "npm", "start" ]
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
A website or database developed collaboratively by a community of users, allowing any user to add and edit content. Example: Wikipedia

## Why do you need a wiki?
As your company grows it becomes difficult to keep track of all the knowledge in your team. It is difficult to communicate every detail about company policies to new team members. Things get lost in Slack channels. It becomes difficult to keep things in context.
As your company grows it becomes difficult to keep track of all the knowledge in your team. It is difficult to communicate every detail about the company policies to new team members. Things get lost in Slack channels. It becomes difficult to keep things in context.

A wiki helps you keep track of all this information. Every article is filed under a topic to keep things organised among departments. Everything is transparent, who made what changes to which document and when.

Expand Down Expand Up @@ -72,6 +72,17 @@ module.exports = {
}
```

## Run with Docker:

You can run MatterWiki with Docker.

1. Clone this repository `git clone http://github.com/matterwiki/matterwiki`
2. Run `docker build -t matterwiki .`
3. Start a docker container with `docker run --name=matterwiki -p 5000:5000 matterwiki`

You can add `-v /<path>/db:/server/db` to store the db on the host filesystem, and `-v /<path>/config.js:/server/config.js`
to specify your own JWT secret configuration. Add `--restart=always -d` options to run it as a daemon.


## Under the hood

Expand Down
2 changes: 1 addition & 1 deletion api/authentication.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ comment in the articles.js (same directory).
// Importing the topics model
var Users = require('../models/user.js');
var jwt = require('jsonwebtoken'); // used to create, sign, and verify tokens
var bcrypt = require('bcrypt');
var bcrypt = require('bcryptjs');
const saltRounds = 10;
var db = require('../db.js'); //this file contains the knex file import. it's equal to knex=require('knex')

Expand Down
2 changes: 1 addition & 1 deletion api/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ comment in the articles.js (same directory).
// Importing the topics model
var Users = require('../models/user.js');
var Topics = require('../models/topic.js');
var bcrypt = require('bcrypt');
var bcrypt = require('bcryptjs');
const saltRounds = 10;
var db = require('../db.js'); //this file contains the knex file import. it's equal to knex=require('knex')

Expand Down
2 changes: 1 addition & 1 deletion api/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ comment in the articles.js (same directory).

// Importing the topics model
var Users = require('../models/user.js');
var bcrypt = require('bcrypt');
var bcrypt = require('bcryptjs');
const saltRounds = 10;
var db = require('../db.js'); //this file contains the knex file import. it's equal to knex=require('knex')

Expand Down
2 changes: 1 addition & 1 deletion client/app/components/edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class EditArticle extends React.Component {
});
var myInit = { method: 'PUT',
headers: myHeaders,
body: "id="+this.props.params.articleId+"&title="+title+"&body="+body+"&topic_id="+topicId+"&user_id="+window.localStorage.getItem("userId")+"&what_changed="+what_changed
body: "id="+this.props.params.articleId+"&title="+title+"&body="+encodeURIComponent(body)+"&topic_id="+topicId+"&user_id="+window.localStorage.getItem("userId")+"&what_changed="+what_changed
};
var that = this;
fetch('/api/articles/',myInit)
Expand Down
2 changes: 1 addition & 1 deletion client/app/components/new.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class NewArticle extends React.Component {
});
var myInit = { method: 'POST',
headers: myHeaders,
body: "title="+title+"&body="+body+"&topic_id="+topicId+"&user_id="+window.localStorage.getItem("userId")
body: "title="+title+"&body="+encodeURIComponent(body)+"&topic_id="+topicId+"&user_id="+window.localStorage.getItem("userId")
};
var that = this;
fetch('/api/articles/',myInit)
Expand Down
47 changes: 47 additions & 0 deletions l10n/admin.l10n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"de-DE": {
"add_user": "Benutzer hinzufügen",
"add_topic": "Thema hinzufügen",
"edit": "bearbeiten",
"delete": "löschen",
"name": "Name",
"about": "Über",
"description": "Beschreibung",
"email": "E-Mail",
"password": "Passwort",
"user_added": "Benutzer wurde erstellt",
"user_deleted": "Benutzer wurde gelöscht",
"topic_added": "Thema wurde erstellt",
"topic_deleted": "Thema wurde gelöscht"
},
"en-EN": {
"add_user": "Add User",
"add_topic": "Add Topic",
"edit": "Edit",
"delete": "Delete",
"name": "Name",
"about": "About",
"description": "Description",
"email": "Email",
"password": "Password",
"user_added": "User has been added",
"user_deleted": "User has been deleted",
"topic_added": "Topic has been added",
"topic_deleted": "Topic has been deleted"
},
"zh-CN": {
"add_user": "新增用户",
"add_topic": "新增主题",
"edit": "编辑",
"delete": "删除",
"name": "用户名",
"about": "简介",
"description": "描述",
"email": "Email",
"password": "密码",
"user_added": "用户已新增",
"user_deleted": "用户已删除",
"topic_added": "主题已新增",
"topic_deleted": "主题已删除"
}
}
26 changes: 26 additions & 0 deletions l10n/app.l10n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"de-DE": {
"loggedout": "Du wurdest erfolgreich abgemeldet",
"toggle-navigation": "Navigation wechseln",
"admin": "Admin",
"new-article": "Neuer Artikel",
"logout": "Abmelden",
"powered-by": "Unterstützt von "
},
"en-EN": {
"loggedout": "You've been successfully logged out",
"toggle-navigation": "Toggle navigation",
"admin": "Admin",
"new-article": "New Article",
"logout": "Logout",
"powered-by": "Powered by "
},
"zh-CN": {
"loggedout": "您已成功注销",
"toggle-navigation": "切换导航",
"admin": "管理员",
"new-article": "新增文章",
"logout": "注销",
"powered-by": "提供者 by "
}
}
43 changes: 43 additions & 0 deletions l10n/article.l10n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"de-DE": {
"article-deleted": "Artikel wurde gelöscht",
"last-updated-on": "Zuletzt aktualisiert am ",
"filed-under": "Abgelegt unter ",
"last-updated-by": "Zuletzt aktualisiert von ",
"what-changed": "Was sich zuletzt geändert hat",
"no-info": "Keine Informationen verfügbar",
"edit": "Bearbeiten",
"history": "Verlauf",
"h1-article-published": "Yayyyy!",
"h3-article-published": "Dein Artikel wurde veröffentlicht",
"great": "Das ist großartig"
},
"en-EN": {
"article-deleted": "Article has been deleted",
"last-updated": "Last updated on ",
"filed-under": "Filed under ",
"last-updated-by": "Last Updated By ",
"what-changed": "What Changed in last edit",
"no-info": "No information available",
"edit": "Edit",
"history": "History",
"h1-article-published": "Yayyyy!",
"h3-article-published": "Your article has been published",
"great": "That's great"

},
"zh-CN": {
"article-deleted": "文章已删除",
"last-updated": "最后修改于 ",
"filed-under": "文件位于 ",
"last-updated-by": "最后修改者 ",
"what-changed": "最后修改内容",
"no-info": "没有有效信息",
"edit": "编辑",
"history": "历史",
"h1-article-published": "Yayyyy!",
"h3-article-published": "您的文章已发布",
"great": "真棒"

}
}
14 changes: 14 additions & 0 deletions l10n/browse_archives.l10n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"de-DE": {
"no-archive-for-article": "Es gibt keine Archive für diesen Artikel",
"view-archives": "Archiv anzeigen"
},
"en-EN": {
"no-archive-for-article": "There are no archives for this article",
"view-archives": "View Archives"
},
"zh-CN": {
"no-archive-for-article": "此文章没有可用归档",
"view-archives": "查看归档"
}
}
14 changes: 14 additions & 0 deletions l10n/browse_articles.l10n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"de-DE": {
"no-article-for-topic": "Es gibt keine Artikel zu diesem Thema",
"last-updated-on": "Zuletzt aktualisiert am "
},
"en-EN": {
"no-article-for-topic": "There are no articles under this topic",
"last-updated-on": "Last updated on "
},
"zh-CN": {
"no-article-for-topic": "此主题下没有可用文章",
"last-updated-on": "最后修改于 "
}
}
14 changes: 14 additions & 0 deletions l10n/browse_topics.l10n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"de-DE": {
"no-topics": "Es gibt noch keine Themen",
"view-topics": "Themen anzeigen"
},
"en-EN": {
"no-topics": "There are no topics created yet",
"view-topics": "View Topics"
},
"zh-CN": {
"no-topics": "尚未创建主题",
"view-topics": "浏览主题"
}
}
29 changes: 29 additions & 0 deletions l10n/edit_users.l10n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"de-DE": {
"alert_success": "Benutzer erfolgreich geändert",
"update_user": "Benutzer aktualisieren",
"placeholder_name": "Name",
"placeholder_about": "Über mich",
"placeholder_email": "E-Mail",
"placeholder_pw": "Passwort",
"button_update": "Benutzer aktualisieren"
},
"en-EN": {
"alert_success": "User has been edited.",
"update_user": "Update User",
"placeholder_name": "Name",
"placeholder_about": "About",
"placeholder_email": "Email",
"placeholder_pw": "Password",
"button_update": "Update User"
},
"zh-CN": {
"alert_success": "用户信息已更新.",
"update_user": "更新用户",
"placeholder_name": "用户名",
"placeholder_about": "简介",
"placeholder_email": "Email",
"placeholder_pw": "密码",
"button_update": "更新信息"
}
}
14 changes: 14 additions & 0 deletions l10n/loader.l10n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"de-DE": {
"message": "Lade...",
"message_timeout": "Es scheint bei deiner Anfrage ein Problem zu geben, versuche es bitte noch einmal."
},
"en-EN": {
"message": "Loading...",
"message_timeout": "There seems to be a problem in processing your request. Please try again."
},
"zh-CN": {
"message": "加载中...",
"message_timeout": "请求出错, 请重试。"
}
}
23 changes: 23 additions & 0 deletions l10n/login.l10n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"de-DE": {
"alert_success": "Du bist jetzt angemeldet",
"login": "Anmeldung",
"placeholder_email": "E-Mail",
"placeholder_pw": "Passwort",
"button_signin": "Anmelden"
},
"en-EN": {
"alert_success": "You are now logged in",
"login": "Login",
"placeholder_email": "Email",
"placeholder_pw": "Password",
"button_signin": "Sign in"
},
"zh-CN": {
"alert_success": "您已登录",
"login": "登录",
"placeholder_email": "Email",
"placeholder_pw": "密码",
"button_signin": "登录"
}
}
20 changes: 20 additions & 0 deletions l10n/logo_upload.l10n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"de-DE": {
"alert_success": "Dein Logo wurde erfolgreich geändert",
"change_logo": "Logo ändern",
"help_block": "Bitte die Seite aktualisieren, um die Änderungen für alle Seiten sichtbar zu machen",
"button_submit": "Logo hochladen"
},
"en-EN": {
"alert_success": "Your logo has been successfully updated.",
"change_logo": "Change Logo",
"help_block": "Please reload the page for the changes to reflect throughout the site.",
"button_submit": "Upload Logo"
},
"zh-CN": {
"alert_success": "您的Logo已更新",
"change_logo": "更换Logo",
"help_block": "请刷新页面以查看完整效果.",
"button_submit": "更换Logo"
}
}
26 changes: 26 additions & 0 deletions l10n/new.l10n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"de-DE": {
"alert_success": "Eintrag wurde erfolgreich abgespeichert",
"alert_error": "Es werden Informationen zum Inhalt, Titel und Thema benötigt",
"placeholder_title": "Bitte Titel angeben...",
"placeholder_editor": "Schreibe etwas...",
"choose_topic": "Wähle ein Thema",
"button_submit": "Eintrag erstellen"
},
"en-EN": {
"alert_success": "Article has been successfully saved",
"alert_error": "Article Body, Title and Topic Information is required.",
"placeholder_title": "Enter article title...",
"placeholder_editor": "Start writing here....",
"choose_topic": "Choose topic",
"button_submit": "Create Article"
},
"zh-CN": {
"alert_success": "文章已保存成功",
"alert_error": "请填写文章标题、正文和主题信息。",
"placeholder_title": "填写文章标题...",
"placeholder_editor": "在这里输入正文...",
"choose_topic": "选择主题",
"button_submit": "生成文章"
}
}
Loading