New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

648: Fix newline and tab character filters #928

Merged
merged 4 commits into from Oct 16, 2018

Conversation

Projects
None yet
4 participants
@toolstack
Contributor

toolstack commented Sep 25, 2018

Add raw original data to the translations row and use it for the "copy from original" code, then remove the filtering of the invisibles tab/nl so that translations can contain these UTF characters. Also convert "copy from original" to a button and added two new buttons to make it easier to add tab and newline characters to the translation.

Resolves #648 and #681.

@toolstack toolstack self-assigned this Sep 25, 2018

@toolstack toolstack added this to the 3.0 milestone Sep 25, 2018

@toolstack toolstack requested a review from ocean90 Sep 25, 2018

@toolstack toolstack requested review from Mte90 and garrett-eclipse Oct 15, 2018

@Mte90

Mte90 approved these changes Oct 15, 2018

@pedro-mendonca

This comment has been minimized.

Contributor

pedro-mendonca commented Oct 16, 2018

@Mte90
The Copy from original button keeps the cursor focused (blinking) in the end added content.

This behaviour is also desirable for Insert tab and Insert new line.
Currently the cursor just hides and is repositioned in the end of the string on pressing the Insert buttons.
If a user wants to click more than once to add a few new lines or tabs in the midle of a string, one needs to put the cursor each time the button is clicked.

The focus should not change on pressing the Insert buttons.

@toolstack

This comment has been minimized.

Contributor

toolstack commented Oct 16, 2018

@pedro-mendonca good catch, I'll update the PR to fix this.

toolstack added some commits Sep 25, 2018

Fix newline and tab character filters
Add raw original data to the translations row and use it for the "copy from original" code, then remove the filtering of the invisibles tab/nl so that translations can contain these UTF characters.  Also convert "copy from original" to a button and added two new buttons to make it easier to add tab and newline characters to the translation.
@toolstack

This comment has been minimized.

Contributor

toolstack commented Oct 16, 2018

@pedro-mendonca I've updated the PR, give it a try now.

@pedro-mendonca

This comment has been minimized.

Contributor

pedro-mendonca commented Oct 16, 2018

@toolstack it's perfect now!
I had to manually copy the assets/js/editor.js content to assets/js/editor.min.js as the new code isn't yet in the min.js version.
Thanks :)

@toolstack

This comment has been minimized.

Contributor

toolstack commented Oct 16, 2018

@pedro-mendonca For my dev GP instance I set the SCRIPT_DEBUG flag (in wp-config.php) so GP will use the non-minified versions of the JS files.

We don't minify the JS until we do a release.

@toolstack toolstack merged commit 661be73 into develop Oct 16, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@toolstack toolstack deleted the 648-fix-tab-newline-filtering branch Oct 16, 2018

@pedro-mendonca

This comment has been minimized.

Contributor

pedro-mendonca commented Oct 16, 2018

Thanks @toolstack :)

@garrett-eclipse

This comment has been minimized.

Contributor

garrett-eclipse commented Oct 18, 2018

Tested and works nicely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment