Skip to content

Improve placeholders match and visibility#1620

Merged
amieiro merged 22 commits into
GlotPress:developfrom
pedro-mendonca:glossary-placeholders
Jan 24, 2024
Merged

Improve placeholders match and visibility#1620
amieiro merged 22 commits into
GlotPress:developfrom
pedro-mendonca:glossary-placeholders

Conversation

@pedro-mendonca

Copy link
Copy Markdown
Member

What?

  • Add support for placeholder list type (eg: %l, %1$l, %1$10l, etc ) (a5a059f)
  • Fix missing placeholder match for pattern of no indexed and with minimum width (eg: %1s, %2d, %10l, etc ) (0bb1c10)
  • Add some CSS to highlight placeholders, the same as invisible-spaces (8ab786f)
  • Fix matching glossary items preceded by placeholders (76fb698) (Fixes #1570)
  • Fix a missing match that showed up after fixing the matching glossary items (97e04b2)
  • Add all the test cases described in the below screenshots (7be505a)

Why?

Improve the placeholders visibility as described in the issue #1619
Fix glossary matching items when preceded by known placeholders. Fixes #1570

Screenshots or screencast

The placeholders are now highlighted and the glossary items are matched when have placeholders before, after or both.

imagem

akirk
akirk previously approved these changes May 4, 2023

@akirk akirk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you!

ocean90
ocean90 previously requested changes Jun 8, 2023
Comment thread tests/phpunit/testcases/test_template_helper_functions.php Outdated
Comment thread gp-templates/helper-functions.php Outdated
@pedro-mendonca

Copy link
Copy Markdown
Member Author

Due to major changes in the develop branch, for this PR to pass tests, must be fixed a bug introduced in #1696 to be able again to match strings bounded by a preceding placeholder.
The fix is proposed in #1733

I'll push the rest of the commits here after the bug is fixed.

Comment thread tests/phpunit/testcases/test_template_helper_functions.php Outdated
@amieiro amieiro dismissed ocean90’s stale review January 24, 2024 10:30

The strings were added to the DataProvider, so the requested changes were made.

@amieiro amieiro merged commit b07e139 into GlotPress:develop Jan 24, 2024
@pedro-mendonca pedro-mendonca deleted the glossary-placeholders branch January 24, 2024 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

if an original contains a glossary verb between %sreview%s then it is not indicated as glossary verb

4 participants