/** Calculate message for replace all last names */
 private String getReplaceAllMsg() {
   if (sameLastNames.length < 2) return null;
   // we're using getDisplayValue() here
   // because like in PropertyRelationship's case there might be more
   // in the gedcom value than what we want to display (witness@INDI:BIRT)
   return RESOURCES.getString(
       "choice.global.confirm",
       "" + sameLastNames.length,
       ((PropertyName) getProperty()).getLastName(),
       cLast.getText());
 }
  /** Finish editing a property through proxy */
  @Override
  protected void commitImpl(Property property) {

    PropertyName p = (PropertyName) property;

    // ... calc texts
    String first = cFirst.getText().trim();
    String last = cLast.getText().trim();
    String suff = tSuff.getText().trim();
    String nick = tNick.getText().trim();

    Gedcom ged = p.getGedcom();
    if (ged != null) {
      switch (Options.getInstance().correctName) {
          // John DOE
        case 2:
          last = last.toUpperCase(ged.getLocale());
          cLast.setText(last);
          // John Doe
        case 1:
          if (first.length() > 0) {
            first =
                Character.toString(first.charAt(0)).toUpperCase(ged.getLocale())
                    + first.substring(1);
            cFirst.setText(first);
          }
      }
    }

    // ... store changed value
    p.setName(first, last, suff, cAll.isSelected());
    p.setNick(nick);

    // start fresh
    setPropertyImpl(p);

    // Done
  }