Patrick Connolly
48d72522ed
Pulled translation code into separate funcs.
2018-10-25 22:16:47 +08:00
Patrick Connolly
e62b9b4f65
Don't show translation when result is identical string.
2018-10-25 21:16:31 +08:00
Patrick Connolly
8971502f31
Allowed Slack attachments to be properly updated on edit.
2018-10-24 17:03:00 +08:00
Patrick Connolly
eeccb7acd3
Fixed bug in msg/rmsg confusion.
2018-10-24 17:02:29 +08:00
Patrick Connolly
434184507a
Merge branch '536-fixed-populateUsers' into 499-google-translation
2018-10-24 15:43:35 +08:00
Patrick Connolly
88bb9f7339
Merge branch 'master' into 499-google-translation
2018-10-24 15:40:20 +08:00
Patrick Connolly
4bcd1171a7
Merge branch 'master' into 499-google-translation
2018-10-24 15:38:52 +08:00
Patrick Connolly
24a60f262a
Update helpers.go
2018-10-24 11:58:20 +08:00
Wim
76a601a474
Update bridge/slack/helpers.go
...
Co-Authored-By: patcon <patrick.c.connolly@gmail.com >
2018-10-24 11:38:57 +08:00
Patrick Connolly
291594b99c
Allow origin CHANNEL to be used in RemoteNickFormat ( #515 )
...
* Added origin CHANNEL to RemoteNickFormat. Updated config docs. [Fixes #515 ]
* Update matterbridge.toml.sample
Co-Authored-By: patcon <patrick.c.connolly@gmail.com >
2018-10-23 21:53:11 +02:00
Patrick Connolly
f59eb23474
Specified nmt type model for translation.
2018-10-24 01:41:16 +08:00
Patrick Connolly
7705aa2a3b
Accepted codestyle suggestion.
2018-10-24 01:32:50 +08:00
Patrick Connolly
ccadda3ec2
Extracted translation code in separate files.
2018-10-24 01:10:10 +08:00
Patrick Connolly
fc8fe48b49
Cleaned up logic around knowing whether message is translated.
2018-10-23 22:41:58 +08:00
Patrick Connolly
c0b64573a5
Created handleTranslation func. Added IsTranslation key to Message struct.
2018-10-23 20:17:42 +08:00
Patrick Connolly
c42a4db10b
Moved Google Translate client to Router.
2018-10-23 19:34:47 +08:00
Patrick Connolly
25dc18518e
Fixed pointer/reference issue in populateUsers. [ #536 ]
2018-10-23 19:10:32 +08:00
Patrick Connolly
5697772ee3
Removed newlines from link to untranslated message.
2018-10-23 17:39:48 +08:00
Duco van Amstel
f2cdda7278
Update Blackfriday dependency ( closes #522 ) ( #532 )
...
- Fixup Telegram bridge implementation to support updated dependency.
2018-10-22 19:48:29 +02:00
Duco van Amstel
6911458d15
Clean up message send logic (slack). ( #531 )
2018-10-22 19:43:57 +02:00
Patrick Connolly
3b0a91d3ee
Fixed poor trimming of translation source text.
2018-10-20 19:48:36 +08:00
Patrick Connolly
311ac5a099
Added general slack msg options back into API call.
2018-10-20 19:31:55 +08:00
Patrick Connolly
93a87e153d
Fixed missing variable.
2018-10-20 18:16:50 +08:00
Patrick Connolly
21c8dcb1ba
Show untranslated text in attachment when using Slack.
2018-10-20 18:09:59 +08:00
Patrick Connolly
1ba7385175
Fixed updating of html2md pkg.
2018-10-20 17:49:59 +08:00
Patrick Connolly
5a2610991c
Updated to accomodate breaking changes in slack pkg.
2018-10-20 17:49:12 +08:00
Patrick Connolly
ed32a079b6
Updated pkgs html2md (PR accepted), and slack (getPermalink support added).
2018-10-20 15:48:09 +08:00
Duco van Amstel
6238effdc2
Clean up user and channel information management (slack) ( #521 )
2018-10-16 20:34:09 +02:00
Patrick Connolly
c36a6ad984
Reset msg.Text back to original for each channel's message handling.
2018-10-15 09:28:53 +08:00
Patrick Connolly
ae5c3f02ee
Added lots of debug output while working on PR.
2018-10-15 08:40:35 +08:00
Patrick Connolly
ea89e62a96
Don't contact google to translate empty messages.
2018-10-15 08:35:34 +08:00
Patrick Connolly
03e2b90a24
Merge branch 'master' into 499-google-translation
2018-10-15 07:09:37 +08:00
Patrick Connolly
f32e7a9c35
Moved translation attribute into toml config. Now using origmsg var for msg text.
2018-10-15 06:48:14 +08:00
Patrick Connolly
4eaa59c594
Went back to using <pre> for multiline code.
2018-10-15 04:38:35 +08:00
Patrick Connolly
b339e21526
Added ability to render slackdown bold.
2018-10-15 04:10:23 +08:00
Patrick Connolly
ddda1aad1a
Cleaned up language checks.
2018-10-15 03:52:06 +08:00
Patrick Connolly
aeb06c7478
Moved translation client from bridge to router.
2018-10-15 03:50:44 +08:00
Patrick Connolly
3e036b370a
Fixed list parsing.
2018-10-15 03:07:02 +08:00
Patrick Connolly
02c99569d8
Use close brackets in br tags etc.
2018-10-15 03:06:24 +08:00
Patrick Connolly
8808ee4e39
Allowed preservation of codeblock formatting between translations.
2018-10-15 01:07:39 +08:00
Patrick Connolly
9cdb44d919
Added ability to handle strikethrough after slackdown parsing. (Updated html2md pkg.)
2018-10-14 23:11:52 +08:00
Patrick Connolly
3253bf2d47
First pass at preserving slackdown format through translation.
2018-10-14 23:07:45 +08:00
Patrick Connolly
93f252c223
Sorted @usernames and #channels by length so translation protections happens correctly.
2018-10-14 22:26:55 +08:00
Patrick Connolly
170b42c1ad
Added the better HTML strip library.
2018-10-14 22:12:17 +08:00
Patrick Connolly
c975ac0ff3
Fixed url matching to protect from translation.
2018-10-14 17:53:34 +08:00
Patrick Connolly
44e6f99e62
Added fix for Google Translate bug.
2018-10-14 17:30:01 +08:00
Patrick Connolly
6d4be25037
Simplified emoji replacement in Google Translate.
2018-10-14 17:00:58 +08:00
Patrick Connolly
0185e86e74
Initialized Google Translation during bridge init.
2018-10-14 14:45:40 +08:00
Patrick Connolly
ceb078bd5b
Added mention of how to set google credentials.
2018-10-14 11:35:18 +08:00
Duco van Amstel
498377a230
Clean up code and strengthening (slack) ( #519 )
...
Changes include:
- Refactor of strings into package-wide constants.
- Predeclaration of regexps to be instantiated at package load time.
- Checking of unchecked errors.
- Structural changes:
- Adding verifications to type-casting code.
- Remove unnecessary 'len(X) > 0' checks before iterating over X.
- Remove unnecessary 'else' clause after 'if' with 'return'.
- Unexporting of public fields of Bridge struct.
- Formatting:
- One-field-per-line struct definitions.
2018-10-13 01:02:14 +02:00