Commit Graph

252 Commits

Author SHA1 Message Date
amy null
93a4198ca3 Add Discord project integration (#86)
* Add basic Discord webhook support

* Add Discord integration tests

* Revert lockfiles
2019-05-09 17:11:24 -04:00
Simon Prévost
e1b1b106c6
Add GitHub webhooks integration to sync a project (#85)
* Add GitHub webhooks integration to sync a project

The webhook generates events that reads the repo’s config file (the same
config file used by accent-cli) and build "sync" and "add translations"
events in Accent.

It supports a default ref: you can specify to only
trigger the "sync" on the "release/production" branch. It also supports
automatic version sync. If you have a version in Accent that matches
your git tag, "sync" events will be generated for those versions,
without touching your current translations. This can be useful if you
use versions to freeze translations on your releases.

This commit only adds the API side of the feature. So while it’s not
user facing, if you want to test the feature, you can add a matching
"integrations" row in the database and setup your webhook in GitHub :)

* Add tests for integration scope

* Rename hook sync to hook update since the hook sync and add translations

* Order mix.exs deps

* Run formatter

* Fix credo

* Fix tests

* Move GitHub producer with the same shared code as the other producer, simple queue without back pressure

* Remove unused function

* Update event producer from gen stage queue broadcaster

* Add tests
2019-04-26 12:41:51 -04:00
Simon Prévost
1d300c308a Add version handling in sync and add translations operations 2019-04-21 14:02:44 -04:00
Simon Prévost
9e1dbb9dbd Replace number status code with atom 2019-04-21 14:02:44 -04:00
Simon Prévost
083645a546 Update icons 2019-04-07 16:28:15 -04:00
Simon Prévost
ae0df57dae
Add basic support for XLIFF 1.2 file format (#79)
![image](https://user-images.githubusercontent.com/464900/55203015-35c17980-51a0-11e9-8647-d91209c7b6de.png)

## Issue
📚 https://github.com/mirego/accent/issues/21

## Feature
This is a basic implementation of the XLIFF 1.2 format. This format is used heavily in a lot of translations related tool (and in XCode) so I may have missed some of the implementation details. But it’s a good start for someone who want to contribute to Accent 😉 

## Refactor
This format is a bit trickier than other since it required the master language to export the targets. We needed to refactor some module to use the master language in the serialization process. Also, not needed but cleaner, we wrap the document’s key `top_of_the_file_comment` and `header` inside a new struct `Language.Document`. This will become handy if we ever need to add an attribute to the document OR if we add a different attribute to the serialization input.

## Next steps
This format includes 2 new dependencies to handle XML encode and decode. _Why not use the same XML library used for the XML Android format?_ Because… \*drum roll\* The `<source>` XML tag when encoded by the `mochiweb_html` module is a self closing tag (per the HTML spec) 🥇 

Since those 2 new deps are required for the XLIFF format and can pretty print XML, we should use them _instead of `mochiweb`_ 🎉
2019-03-31 16:16:20 -04:00
Simon Prévost
5fd55241c9 Fix docker setup with bad libcrypto from alpine 3.9 2019-03-10 21:16:23 -04:00
Simon Prévost
2dd1ea1b53 Fix tests 2019-03-09 22:46:07 -05:00
Simon Prévost
a3e96e4236 Add just in place translation kit to translate directly in the project’s app 2019-03-09 22:46:07 -05:00
Simon Prévost
57b8559feb Refactor UI 2019-03-09 22:46:07 -05:00
Simon Prévost
fa55c9a543 Update deps and elixir/erlang version 2019-03-03 14:56:36 -05:00
Simon Prévost
835d32285c Fix placeholders inclusion in previous translation mapping 2019-01-22 08:09:45 -05:00
Simon Prévost
6316fc4ec3 Add halt in webapp controller when rendering maintenance 2019-01-11 14:19:53 -05:00
Simon Prévost
3cd60023a4 Fix filename parsing when using document path param and fix export filename parsing 2019-01-11 10:28:36 -05:00
Simon Prévost
a5454cf4ad Add maintenance page when ember build runs in the background on deploy 2019-01-11 09:47:14 -05:00
Simon Prévost
aed5793dab Add distillery and docker setup 2019-01-11 09:47:14 -05:00
Simon Prévost
0ba4d0474d wip 2019-01-09 08:01:19 -05:00
Simon Prévost
9a9b50e0d8 Add more tests and refactor scripts and endpoint 2019-01-06 22:41:53 -05:00
Simon Prévost
2a8512be87 Fix styles and sync type option 2018-12-22 14:37:34 -05:00
Simon Prévost
e0b24790e8 Refactor codes and UI with new standard 2018-12-12 20:05:57 -05:00
Simon Prévost
c6dbc084e1 Rename interpolations to placeholders 2018-12-12 19:57:34 -05:00
Benoit Ducharme
8ead83b52a Add interpolations to translation forms
Interpolations are strings automatically marked (based on the format) to
be replaced by the application at runtime. Those strings are meant to be
left unmodified and not translatable. The UI reflects that. The
interpolations shown to the user is always the master translation’s
ones. This is to clearly show on not translated content that maybe
interpolations uploaded after the correction were removed or added.
2018-12-12 19:57:34 -05:00
Simon Prévost
dbbadab99e Add Credo.Check.Readability.AliasOrder to credo config 2018-12-08 19:57:20 -05:00
Simon Prévost
53a0e5c8ac Refactor and adds credo env var check 2018-12-08 16:43:06 -05:00
Simon Prévost
65a41aaf88 Refactor 2018-12-08 16:06:55 -05:00
Simon Prévost
531caf156a Fix last synced at type for project 2018-12-08 15:21:42 -05:00
Simon Prévost
b373646e6c Replace Poison with Jason in app code 2018-12-08 15:21:42 -05:00
Simon Prévost
a4a68b8862 Update sentry to 7.0 to remove peer Plug.Conn error 2018-12-08 15:21:42 -05:00
Simon Prévost
b360e50339 Update Ecto and Phoenix deps 2018-12-08 15:21:42 -05:00
Simon Prévost
da82db5883 Fix credo 2018-12-08 15:12:45 -05:00
Simon Prévost
2f8c8a5522 Add sync type passive as a comparer in sync operation
The "sync_type" option can now be passed to the sync request to have a
different way to handle operations.

The new "passive" option will ignore all actions but the `new`, `renew`
and `remove`. It will ensure that when uploading a file, no translations
or master strings can be overwritten. It behaves the same way as the
existing merge_type "passive".
2018-12-08 15:12:45 -05:00
Simon Prévost
91114ba0dc Add Go i18n JSON document format 2018-09-10 07:54:21 -04:00
Simon Prévost
a4025cd0cf Add plural forms support for gettext serializer 2018-07-06 16:33:34 -04:00
Nicolas Boisvert
be950f5f0e laravel_php - Redone job in new branch 2018-06-08 16:59:28 -04:00
Simon Prévost
78d8c90ad9 Refactor langue tests setup and naming 2018-05-14 08:27:26 -04:00
Łukasz Jan Niemier
b3882e7bc5 Add support for CSV formatter
Issue #22
2018-05-11 07:34:04 -04:00
Łukasz Jan Niemier
fd1499ae52 Count translations in DB instead
Old way required 2 DB queries, where one would be sufficient.
2018-05-11 07:32:46 -04:00
Łukasz Jan Niemier
22b70541c0 Use inner joins instead of left joins
Inner join is default join for Ecto for valid reasons, it helps DB
optimizer to reduce amount of tuples fetched from storage.
2018-05-11 07:32:46 -04:00
Łukasz Jan Niemier
d868bff0ad Write tests for new functionalities 2018-05-11 07:32:25 -04:00
Łukasz Jan Niemier
a40e6a2e0d Do not assume that there will be value in language
Closes #26
2018-05-11 07:32:25 -04:00
Łukasz Jan Niemier
d9c733c0a3 Keep newlines in translations
Closes #28
2018-05-11 07:32:25 -04:00
Simon Prévost
ae6043e292 Add plural and locked state for translations 2018-04-27 08:49:50 -04:00
Simon Prévost
6fd43e95cd Remove useless updated_at in Repo.update and invert conflicted and active count query 2018-04-24 20:05:24 -04:00
Simon Prévost
53d96bc6a6 Add float value type 2018-04-24 20:03:39 -04:00
Simon Prévost
d420bd0fbe Refactor operation and translation value_type to always have a value and handle string/empty/null etc 2018-04-23 21:43:15 -04:00
Simon Prévost
d8c20f5de7 Use Ecto embedded schema to store previous translation on operation 2018-04-13 13:43:52 -04:00
Simon Prévost
c502ce2e4e Fix mass insert of operations that raised a postgresql error on max parameters size 2018-04-13 13:43:38 -04:00
Simon Prévost
d9711d5973 Add tests for hook consumers 2018-04-11 06:02:16 -04:00
Simon Prévost
0bb0b01171 Add email abilities restriction capabilities with RESTRICTED_DOMAIN env var 2018-04-11 06:01:00 -04:00
Simon Prévost
e0afd6806d Add tests for error view module 2018-04-09 20:52:22 -04:00
Simon Prévost
249b15790b Remove unexisting route /login in project invite email 2018-04-09 15:00:25 -04:00
Simon Prévost
bca59c4caa Initial commit 💥 2018-04-05 16:47:36 -04:00