You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "csutherl (via GitHub)" <gi...@apache.org> on 2025/10/31 19:10:49 UTC

[PR] Fix formatValueImport to handle MessageFormat quotes and line continuations [tomcat]

csutherl opened a new pull request, #913:
URL: https://github.com/apache/tomcat/pull/913

   While I was poking around with the test categorization changes I'm working on I noticed that some of the buildutils tests were failing. I took a pass at adjusting the logic to pass the tests, but  I've never used POEditor so creating a PR to be safe :)
   
   ## Summary
   - Fixed `formatValueImport` in buildutil Utils class to properly handle MessageFormat quote escaping and line continuation formatting
   - Removed unnecessary call to `formatValueCommon`
   
   ## Problem
   7/10 buildutil tests were failing because `formatValueImport` wasn't:
   1. Doubling single quotes for MessageFormat placeholders (e.g., `{0}`)
   2. Adding line continuations after initial `\n` escape sequences
   
   ## Solution
   Replaced the call to `formatValueCommon` with new logic to handle import-specific formatting. All 10 tests in `TestUtils` now pass (previously 7 failures).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [PR] Fix formatValueImport to handle MessageFormat quotes and line continuations [tomcat]

Posted by "csutherl (via GitHub)" <gi...@apache.org>.
csutherl closed pull request #913: Fix formatValueImport to handle MessageFormat quotes and line continuations
URL: https://github.com/apache/tomcat/pull/913


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [PR] Fix formatValueImport to handle MessageFormat quotes and line continuations [tomcat]

Posted by "markt-asf (via GitHub)" <gi...@apache.org>.
markt-asf commented on PR #913:
URL: https://github.com/apache/tomcat/pull/913#issuecomment-3480499065

   For completeness, the continuation line tests weren't quite right either. They should have been changed at the same point in time.  I'll add some extra comments to try and explain what is going on and tweak the tests to align with the current POE import/export behaviour.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [PR] Fix formatValueImport to handle MessageFormat quotes and line continuations [tomcat]

Posted by "csutherl (via GitHub)" <gi...@apache.org>.
csutherl commented on PR #913:
URL: https://github.com/apache/tomcat/pull/913#issuecomment-3480439264

   Bah, sorry I didn't think to do a historical review...thanks! I'll go ahead and close this out then.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [PR] Fix formatValueImport to handle MessageFormat quotes and line continuations [tomcat]

Posted by "markt-asf (via GitHub)" <gi...@apache.org>.
markt-asf commented on PR #913:
URL: https://github.com/apache/tomcat/pull/913#issuecomment-3474591449

   I need to look at these before it is merged. The POEditor import/export is working as expected so this is unexpected. I should get to this early next week.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [PR] Fix formatValueImport to handle MessageFormat quotes and line continuations [tomcat]

Posted by "markt-asf (via GitHub)" <gi...@apache.org>.
markt-asf commented on PR #913:
URL: https://github.com/apache/tomcat/pull/913#issuecomment-3480292284

   Tomcat doesn't do single quote replacement on import any more (as of ~May 2021). POEditor updated their import/export routines making the Tomcat replacement unnecessary. Those updates did add a new issue which is handled by `fixUnnecessaryEscaping()`.
   The associated tests should have been removed in 3199da4. I'll do that now.
   
   I suspect the line ending handling has a similar history but I still need to check those tests.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org