You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When translators navigate through the units, and decide to open a preview link, it would be good to automatically update the preview window contents for as long as the preview window stays opened. This will allow to keep both the translation UI and the preview window opened on a larger monitor at the same time, and provide translators with the context without them to do any extra clicks.
Here's how this can be implemented:
Step 1: let's change the links that we render in unit comments so that they have the _preview target name instead of _blank. This will allow us to identify such links on a page easily, regardless of how they are created.
Step 2: when a preview link is clicked, dynamically open a preview window (or focus on an existing one), and send the link there (first, using postMessage to let the server handle the navigation, then falling back to setting a new location). It would be also nice to have a currently active preview link highlighted in the comments (we could render it in inverted color). See https://jsfiddle.net/iafan/crko8z9e/ for a complete example.
Step 3: when the user goes to a new translation unit, and we know that a preview window is open, auto-send the first preview link there.
The text was updated successfully, but these errors were encountered:
This works for links in unit comments marked to be opened in a
`_preview` target window. Opened links will be higlighted and navigating
to new units will update the contents of the preview window, should it
be open.
Fixesserge-community#411.
When translators navigate through the units, and decide to open a preview link, it would be good to automatically update the preview window contents for as long as the preview window stays opened. This will allow to keep both the translation UI and the preview window opened on a larger monitor at the same time, and provide translators with the context without them to do any extra clicks.
Here's how this can be implemented:
Step 1: let's change the links that we render in unit comments so that they have the
_preview
target name instead of_blank
. This will allow us to identify such links on a page easily, regardless of how they are created.Step 2: when a preview link is clicked, dynamically open a preview window (or focus on an existing one), and send the link there (first, using
postMessage
to let the server handle the navigation, then falling back to setting a new location). It would be also nice to have a currently active preview link highlighted in the comments (we could render it in inverted color). See https://jsfiddle.net/iafan/crko8z9e/ for a complete example.Step 3: when the user goes to a new translation unit, and we know that a preview window is open, auto-send the first preview link there.
The text was updated successfully, but these errors were encountered: