Community
Participate
Working Groups
This is a problem reported by the national language translators. The following message is in the file org.eclipse.cdt.refactoring.messages.properties CRenameLocalProcessor.error.nameErrorWhat=''{0}'' {1} {2}. It seems that {0} is a name, {1} is a verb and {2} noun. This doesn't work in the national language. Need to provide translatable messages.
This message is used when conflicting bindings are encountered during a refactoring. {0} is the name of the binding that conflicts (i.e. variable name, etc.) Example: SomeVariable {1} is an error message (which is already translated since the message comes from a properties file). Example: "will redeclare" {2} is the type of the binding that conflicts. Example: "a local variable" Put them together and you get "SomeVariable will redeclare a global variable." I gather that this sentence structure does not work for all languages. I don't think we can fix this without more input from the translation team as we are not experts in the sentence structure of all the required languages. There are too many combinations of error message and type to have them all be distinct property strings that can be independently translated. Unless they can propose a simple fix, I don't think this is likely to be fixed for CDT 3.1.
I'm going to attempt to rework the error message display for M7 so that it works better in other languages. So far my thought is to display the info in non-sentance form. E.g., ======================== A conflict was encountered during refactoring. Type of Problem: redeclaration New Element: <name> Conflicting Element Type: local variable ======================== I'd rework the strings a bit so that they'd flow better in this context. E.g. "a local variable" would become "local variable", "will redeclare" would become "redeclaration", etc. Does this solution sound acceptable to everyone?
Ravi, can you please look at this too? Thanks.
(In reply to comment #3) > Ravi, can you please look at this too? Thanks. Sure Vivian.
Created attachment 62176 [details] Proposed patch by Ravi Sankar Please review the patch and write the comments Ravi
I've updated the copyright information and applied your patch to HEAD. Thanks Ravi!
Vivian, the patch causes 25 failures in the regression tests (org.eclipse.cdt.refactoring.tests.RenameRegressionTests). Please update them, such that they are passing again.
Thanks for pointing that out Markus. Sorry about that. I'll fix them now.
I've updated the refactoring test cases in HEAD.
Should this be marked as FIXED now?
Marking it fixed