Skip to content

Conversation

@lonemadmax
Copy link
Contributor

Collect and rewrite some js code dealing with translation/edit.

Based off #9.

Move ping server code and LANG_CODE replacement from several sites to a
common file.
Use a listener in the document root instead of adding a handler to each
node. As a bonus, images inside translation blocks can be clicked now,
solving https://dev.haiku-os.org/ticket/15871
The text and fuzzy variables are updated even when the server does not
accept a change. The block is marked and the edit window is kept open,
but the user may just cancel and the block will keep the incorrect
text, instead of going back to the original.

Update the variables only for accepted changes, so that on cancel the
page reflects the real values.
Also fixes the title not being translated on load.
Add unreachable blocks like in the translate tool, so that they can
be edited like body blocks.
Directly loop through the nodes marked as translatable blocks, instead
of recursively visiting each node and its children to find them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant