Comments (6)
Comment Author: [email protected]
Because of the ticket regarding the offline mode, I am also very concerned about the problem with the mess that can appear during translation by multiple localizers. So, I decided to accept this task too.
If we do not want to leave ajax behind and start to use websockets (if we want, let me know. I'm in! :)), we cannot get true real time notifications.
As far as I can see, we have two options:
- send a request for all available translation updates every X seconds/minutes. It looks inappropriate for me in the context of this task. Let me know if you think otherwise.
- check for updates for particular entity before adding new translation for it
- if we have no updates, add new translation as usual
- if updates exist, send a response that contains all required information about them and let a localizer decide what to do: submit new translation anyway or discard it.
Which of these options do you prefer?
How should a localizer be notified about the updates? A dialog with a message and "Keep my translation anyway" and "Cancel my translation" buttons? I clearly see how to implement logic on the client and server sides, but I am not sure about the UI.
from pontoon.
Comment Author: @mathjazz
I was actually thinking WebSockets here. :) But if that turns out to be too big of a task, too complicated or what not, we'll have to fallback to AJAX.
As for notifications, I was thinking something like Google Docs / Etherpad:
- Simply apply translations in the sidebar and in-place if applicable (also update stats).
- In the main toolbar, show a list of users viewing the current locale-project-resource combination. Represent usrs with their profile pictures.
from pontoon.
Comment Author: [email protected]
I like the idea about WebSockets too much!
Well, it's decided. I'll play around with it and let you know when I have something to show.
from pontoon.
Comment Author: :Gijs (back Sept 20; he/him) <[email protected]>
FWIW, before websockets the way you used to do this was "long polling" - you'd keep a single ajax request open to the server at all times. The server would just not write a response until it had one, or until about 50-55 seconds had passed (after 1 minute, all kinds of software/firewalls/whatever starts killing TCP things, so you want to make sure you're done before then). If it "timed out", the server would just tell you "no updates!" and otherwise it would be able to write updates to the client listening for them essentially in real time. Once the request returned, the client would just restart the same "poll" request and you'd continue like that. I'm just dropping by via Matjaz' blogpost, so I'm not sure what language is involved here and how you'd do this in that language. :-)
from pontoon.
Comment Author: @Osmose
Peterbe did something similar to what's being proposed here using fanout.io: https://air.mozilla.org/webdev-beer-and-tell-august-2015/#@15m44s
from pontoon.
Comment Author: @mathjazz
See also:
https://www.peterbe.com/plog/using-fanout.io-in-django
https://devcenter.heroku.com/articles/websockets
from pontoon.
Related Issues (20)
- Can't save term translation after updating the term's text in DB HOT 1
- Update Django to the latest patch release
- Prefetch `latest_translation__approved_user` to speed up Latest Activity data
- Include more activities in Latest activity column
- Optimize logic to retrieve Resources in the Localization dashboard
- Add search field to Tags dashboards
- Refactor and redesign Tags Admin
- Enable opt-in consents for email communication and create an Unsubscribe page
- Integrate debug_sql()
- Hitting a server error when accessing a Tag page of a Tag without any resoures associated to it
- Strings updated in INI file keep validated in pontoon HOT 2
- Headers on /contributors and /insights pages are cached
- Allow admins to disable users from their profile, and provide a motivation HOT 1
- Regularly purge unused database data HOT 9
- Docs are failing to build
- Docs are failing to build due to conflicting dependencies
- Increase cache hit rate
- Speed up Project Notifications tab
- String displayed even if not matching filters
- Add an option to filter strings by creation date
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pontoon.