Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 266094 - Don't use "(s)" as placeholder for singular and plural
Summary: Don't use "(s)" as placeholder for singular and plural
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P2 trivial (vote)
Target Milestone: 3.6 M4   Edit
Assignee: Deepak Azad CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-25 05:27 EST by Dani Megert CLA
Modified: 2009-12-08 04:02 EST (History)
2 users (show)

See Also:


Attachments
Patch (74.31 KB, patch)
2009-10-24 06:58 EDT, Deepak Azad CLA
daniel_megert: iplog+
daniel_megert: review+
Details | Diff
fix for remaining strings (33.83 KB, patch)
2009-11-11 00:29 EST, Deepak Azad CLA
daniel_megert: iplog+
daniel_megert: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2009-02-25 05:27:57 EST
I20090224-0800.

Example can be found e.g. in refactoringui.properties:
PullUpInputPage1_status_line={0} member(s) selected.
Comment 1 Dani Megert CLA 2009-04-30 09:03:31 EDT
There are too many of these to fix so late in the cycle.
Comment 2 Deepak Azad CLA 2009-10-24 06:58:38 EDT
Created attachment 150440 [details]
Patch

29 strings updated in all.
Comment 3 Dani Megert CLA 2009-11-02 07:07:22 EST
Reviewed LTK changes. Patch is good but changed some minor details:
- moved the strings from ScriptingMessages to RefactoringUIMessages as it makes
  no sense that they are separated
- replaced  "1" with "the"
  ==> Are you sure you want to delete the refactoring...
Comment 4 Dani Megert CLA 2009-11-02 08:30:04 EST
Reviewed JDT UI changes: Patch is good but I modified the patch a little bit
- I generally prefer to not write the same code twice i.e. instead of
    if (...)
      set(x);
    else
      set(y);
  I prefer:
    String m= ... ? X : Y.
    set(m);
  or sometimes even:
    set(... ? X : Y);

  
Typo:
ReorgPolicyFactory_copy_roots_header_singular=Copy source folders to ''{1}''
==> ReorgPolicyFactory_copy_roots_header_singular=Copy source folder to ''{1}''

In case where there's just one element/thing, we often use the name/label, e.g.
"Move method 'foo()' to X" instead of "Move method to X". Please revisit your patch (HEAD now) and check whether there are places where this applies.

There are still 15 remaining cases in JDT UI and please also fix it for org.eclipse.jdt.junit.
Comment 5 Deepak Azad CLA 2009-11-11 00:29:31 EST
Created attachment 151917 [details]
fix for remaining strings

(In reply to comment #4)
> There are still 15 remaining cases in JDT UI and please also fix it for
> org.eclipse.jdt.junit.
Done, 45 strings fixed in total. (44 in JDT UI and 1 in org.eclipse.jdt.junit)

Will delete 2 keys (ShowInNavigator_description, SelectionTransferDropAdapter_dialog_question) as part of 294552.

For the following string keys there is no count hence I have used the plural form here
-OpenProjectAction_dialog_message
-NewVariableEntryDialog_info_noselection
-JarFileExportOperation_classFileOnClasspathNotAccessible
-ExtractMethodRefactoring_add_method
-ExtractMethodRefactoring_substitute_with_call
-JUnitPreferencePage_addpackagebutton_tooltip

For 'PromoteTempInputPage_constructors' there is a count but it was hard to determine hence I have left it as is

For the rest I have created 2 strings (singular and plural forms)

> In case where there's just one element/thing, we often use the name/label, e.g.
> "Move method 'foo()' to X" instead of "Move method to X". Please revisit your
> patch (HEAD now) and check whether there are places where this applies.
Will create another patch for this.
Comment 6 Dani Megert CLA 2009-11-12 08:10:34 EST
For the JUnit changes: the correct fix is to remove the tool tips from the buttons (text buttons must not have tool tips). Fixed that in HEAD.
Comment 7 Dani Megert CLA 2009-11-12 09:07:37 EST
Committed to HEAD with the following changes:

- made the logic in the following classes more readable (please verify)
    - AddDelegateMethodsAction
    - AddGetterSetterAction

- {0} Duplicate methods selected ==> {0} duplicate methods selected

>For 'PromoteTempInputPage_constructors' there is a count but it was hard to
>determine hence I have left it as is
Replaced "(s)" with "s".


Available in builds > N20091111-2000.


Please file a new bug for the remaining issue:
> In case where there's just one element/thing, we often use the name/label, e.g.
> "Move method 'foo()' to X" instead of "Move method to X". Please revisit your
> patch (HEAD now) and check whether there are places where this applies.
Comment 8 Deepak Azad CLA 2009-11-12 09:34:55 EST
(In reply to comment #7)

> - made the logic in the following classes more readable (please verify)
>     - AddDelegateMethodsAction
>     - AddGetterSetterAction
Verified.

> Please file a new bug for the remaining issue:
> > In case where there's just one element/thing, we often use the name/label, e.g.
> > "Move method 'foo()' to X" instead of "Move method to X". Please revisit your
> > patch (HEAD now) and check whether there are places where this applies.
Filed Bug 294970 for this.
Comment 9 Raksha Vasisht CLA 2009-12-08 04:02:21 EST
Verified for 3.6 M4 with I20091207-1800.