Skip to content
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

Improve compatibility with pluralized strings referenced as singulars #151

Merged
merged 3 commits into from
Jan 30, 2024

Conversation

swissspidy
Copy link
Owner

Handle cases where a pluralized string is only used as a singular one.

For example, when both __( 'Product' ) and _n( 'Product', 'Products' ) are used, the entry key will have the format "ProductNULProducts". Fall back to looking up just "Product" to support this edge case.

@swissspidy swissspidy added the bug Something isn't working label Jan 30, 2024
@swissspidy swissspidy added this to the 1.1.0 milestone Jan 30, 2024
Copy link

codecov bot commented Jan 30, 2024

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (efa850e) 92.50% compared to head (85b58a2) 90.60%.

Files Patch % Lines
lib/class-ginger-mo-translation-file.php 15.38% 11 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #151      +/-   ##
============================================
- Coverage     92.50%   90.60%   -1.90%     
- Complexity      221      223       +2     
============================================
  Files             6        6              
  Lines           520      532      +12     
============================================
+ Hits            481      482       +1     
- Misses           39       50      +11     
Flag Coverage Δ
default 53.38% <15.38%> (-1.04%) ⬇️
integration 39.66% <0.00%> (-0.92%) ⬇️
multisite 39.66% <0.00%> (-0.92%) ⬇️
trunk 65.41% <15.38%> (-1.32%) ⬇️
unit 53.38% <15.38%> (-1.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@swissspidy swissspidy merged commit 35b07b8 into main Jan 30, 2024
15 of 17 checks passed
@swissspidy swissspidy deleted the add/fallback-compat branch January 30, 2024 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant