Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363805 - Several string variables in properties files not OK
Summary: Several string variables in properties files not OK
Status: VERIFIED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 1.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-15 07:04 EST by Dani Megert CLA
Modified: 2012-11-06 03:45 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2011-11-15 07:04:19 EST
1.2.

Variables inside strings should be in single quotes.

Bug 363357 covers one case: replace double quotes with single quotes.

There are several other mistakes in properties files:
- some variables have no quotes at all
- some variables use ' which is not OK because single quotes need to be escaped 
  by '. This is also true for all other single quotes on the same line.

==> use ''{0}'' at all places and '' for single quotes on lines with variables
Comment 1 Dani Megert CLA 2011-11-15 07:06:59 EST
Note that there might be rare situations where no quotes are needed but those are rare.
Comment 2 Dani Megert CLA 2011-11-17 05:23:51 EST
>==> use ''{0}'' at all places and '' for single quotes on lines with variables

Just to clarify: this is mostly when you refer to resource or other named entities. If it's e.g. a number or something else then no quotes are needed.
Comment 3 Dani Megert CLA 2011-11-17 05:33:12 EST
Pushed http://egit.eclipse.org/r/4635 which fixes the missing escapes on single quotes.
Comment 4 Robin Stocker CLA 2012-11-05 17:33:56 EST
Was merged (a long time ago):

http://git.eclipse.org/c/egit/egit.git/commit/?id=bbdb70d347cf85bc92a26ea37d4619788af6bfcb