forked from mrsimpson/Rocket.Chat
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Translation services (RocketChat#533)
This PR refactors the code of standard Rocket.Chat to allow other providers than google translate to be registered. Also, it adds a provider for DeepL and for the DB internal translation provider abstraction on the business hub.
- Loading branch information
Showing
22 changed files
with
1,141 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,55 @@ | ||
FROM node:8 | ||
FROM ubuntu:16.04 as builder | ||
|
||
ADD . /app | ||
RUN apt update && apt install curl git bzip2 g++ build-essential python -y | ||
|
||
ENV RC_VERSION=0.57.0-designpreview \ | ||
DEPLOY_METHOD=docker \ | ||
NODE_ENV=production \ | ||
PORT=3000 \ | ||
ROOT_URL=http://localhost:3000 | ||
# meteor installer doesn't work with the default tar binary | ||
RUN apt-get install -y bsdtar \ | ||
&& cp $(which tar) $(which tar)~ \ | ||
&& ln -sf $(which bsdtar) $(which tar) \ | ||
&& curl "https://install.meteor.com/?release=1.6.0.1" \ | ||
| sed 's/VERBOSITY="--silent"/VERBOSITY="--progress-bar"/' \ | ||
| sh \ | ||
&& mv $(which tar)~ $(which tar) | ||
|
||
COPY . /app | ||
|
||
# Add Chatpal which is a submodule | ||
WORKDIR /app | ||
RUN meteor npm i \ | ||
&& meteor npm run postinstall \ | ||
&& set +e \ | ||
&& meteor add rocketchat:lib --allow-superuser \ | ||
&& set -e \ | ||
&& meteor build --allow-superuser --server-only --headless --directory /tmp/build | ||
|
||
FROM assistify/chat-base:latest | ||
|
||
MAINTAINER [email protected] | ||
|
||
COPY --from=builder /tmp/build/bundle /app/bundle | ||
|
||
RUN set -x \ | ||
&& ls -l /app \ | ||
&& cd /app/bundle/programs/server \ | ||
&& npm install \ | ||
&& npm cache clear --force | ||
&& npm cache clear --force \ | ||
&& chown -R rocketchat:rocketchat /app | ||
|
||
USER rocketchat | ||
|
||
VOLUME /app/uploads | ||
|
||
WORKDIR /app/bundle | ||
|
||
# needs a mongoinstance - defaults to container linking with alias 'mongo' | ||
ENV DEPLOY_METHOD=docker \ | ||
NODE_ENV=production \ | ||
MONGO_URL=mongodb://mongo:27017/rocketchat \ | ||
HOME=/tmp \ | ||
PORT=3000 \ | ||
ROOT_URL=http://localhost:3000 \ | ||
Accounts_AvatarStorePath=/app/uploads | ||
|
||
EXPOSE 3000 | ||
|
||
CMD ["node", "main.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,82 @@ | ||
**/bin/** | ||
**/build/* | ||
**/node_modules/* | ||
**/tmp/* | ||
**/.meteor/.id | ||
**/.meteor/dev_bundle | ||
**/.meteor/local* | ||
**/.meteor/meteorite | ||
/private/certs/* | ||
*.bak | ||
*.iml | ||
*.ipr | ||
*.iws | ||
*.launch | ||
*.log | ||
*.pydevproject | ||
*.sublime-project | ||
*.sublime-workspace | ||
*.swp | ||
*.tmp | ||
*.tokens | ||
*.un~ | ||
*~ | ||
*~.nib | ||
.*.sw[a-z] | ||
.\#* | ||
._* | ||
.buildpath | ||
.classpath | ||
.clover | ||
.cproject | ||
.DS_Store | ||
.elasticbeanstalk | ||
.elc | ||
.emacs.desktop | ||
.emacs.desktop.lock | ||
.env | ||
.externalToolBuilders | ||
.git | ||
.gitignore | ||
LICENSE | ||
README.md | ||
docker-compose.yml | ||
.idea | ||
.vscode | ||
.loadpath | ||
.map | ||
.metadata | ||
packages/rocketchat-livechat/assets/rocketchat-livechat.min.js | ||
.mule | ||
.pmd | ||
.project | ||
.sass-cache | ||
.settings | ||
.Spotlight-V100 | ||
tatus | ||
.Trashes | ||
.wtpmodules | ||
\#*\# | ||
Desktop.ini | ||
docker-compose.yml | ||
ehthumbs.db | ||
example.css | ||
jrat.output | ||
jrat.xml | ||
local.properties | ||
meteor-vulcanize | ||
nb-configuration.xml | ||
nbactions.xml | ||
nbproject | ||
profiles.xml | ||
Session.vim | ||
smart.lock | ||
temp_* | ||
Thumbs.db | ||
thumbs.db | ||
tramp | ||
ecosystem.json | ||
pm2.json | ||
settings.json | ||
build.sh | ||
/public/livechat | ||
packages/rocketchat-i18n/i18n/livechat.* | ||
tests/end-to-end/temporary_staged_test | ||
.screenshots |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
This directory and the files immediately inside it are automatically generated | ||
when you change this package's NPM dependencies. Commit the files in this | ||
directory (npm-shrinkwrap.json, .gitignore, and this README) to source control | ||
so that others run the same versions of sub-dependencies. | ||
|
||
You should NOT check in the node_modules directory that Meteor automatically | ||
creates; if you are using git, the .gitignore file tells git to ignore it. |
87 changes: 87 additions & 0 deletions
87
packages/assistify-dbs-translation/.npm/package/npm-shrinkwrap.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
This directory and the files immediately inside it are automatically generated | ||
when you change this package's NPM dependencies. Commit the files in this | ||
directory (npm-shrinkwrap.json, .gitignore, and this README) to source control | ||
so that others run the same versions of sub-dependencies. | ||
|
||
You should NOT check in the node_modules directory that Meteor automatically | ||
creates; if you are using git, the .gitignore file tells git to ignore it. |
87 changes: 87 additions & 0 deletions
87
packages/rocketchat-autotranslate/.npm/package/npm-shrinkwrap.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/* globals RocketChat */ | ||
import _ from 'underscore'; | ||
|
||
RocketChat.AutoTranslate = { | ||
|
2 changes: 1 addition & 1 deletion
2
packages/rocketchat-autotranslate/client/views/autoTranslateFlexTab.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.