rv = stringBundleService->CreateBundle("chrome:
rv = stringBundleService->CreateBundle(sAddrbookProperties, getter_AddRefs(bundle));
nsresult AppendCityStateZip(nsAbCardProperty *aCard, AppendItem *aItem, mozITXTToHTMLConv *aConv, nsString &aResult) {  nsresult rv;  nsXPIDLString attrValue;    AppendItem item;    const char *stateCol, *zipCol;  if (strcmp(aItem->mColumn, kHomeCityColumn) == 0) {    stateCol = kHomeStateColumn;    zipCol = kHomeZipCodeColumn;  }  else {    stateCol = kWorkStateColumn;    zipCol = kWorkZipCodeColumn;  }  nsAutoString cityResult, stateResult, zipResult;  rv = AppendLine(aCard, aItem, aConv, cityResult);  NS_ENSURE_SUCCESS(rv,rv);    item.mColumn = stateCol;  item.mLabel = "";  rv = AppendLine(aCard, &item, aConv, stateResult);  NS_ENSURE_SUCCESS(rv,rv);  item.mColumn = zipCol;  rv = AppendLine(aCard, &item, aConv, zipResult);  NS_ENSURE_SUCCESS(rv,rv);  nsXPIDLString formattedString;  nsCOMPtr<nsIStringBundle> bundle;  nsCOMPtr<nsIStringBundleService> stringBundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);   NS_ENSURE_SUCCESS(rv,rv);  rv = stringBundleService->CreateBundle("chrome://messenger/locale/addressbook/addressBook.properties", getter_AddRefs(bundle));  NS_ENSURE_SUCCESS(rv,rv);   if (!cityResult.IsEmpty() && !stateResult.IsEmpty() && !zipResult.IsEmpty()) {    const PRUnichar *formatStrings[3] = { cityResult.get(), stateResult.get(), zipResult.get() };    rv = bundle->FormatStringFromName(NS_LITERAL_STRING("cityAndStateAndZip").get(), formatStrings, 3, getter_Copies(formattedString));    NS_ENSURE_SUCCESS(rv,rv);  }  else if (!cityResult.IsEmpty() && !stateResult.IsEmpty() && zipResult.IsEmpty()) {    const PRUnichar *formatStrings[2] = { cityResult.get(), stateResult.get() };    rv = bundle->FormatStringFromName(NS_LITERAL_STRING("cityAndStateNoZip").get(), formatStrings, 2, getter_Copies(formattedString));    NS_ENSURE_SUCCESS(rv,rv);  }  else if ((!cityResult.IsEmpty() && stateResult.IsEmpty() && !zipResult.IsEmpty()) ||          (cityResult.IsEmpty() && !stateResult.IsEmpty() && !zipResult.IsEmpty())) {    const PRUnichar *formatStrings[2] = { cityResult.IsEmpty() ? stateResult.get() : cityResult.get(), zipResult.get() };    rv = bundle->FormatStringFromName(NS_LITERAL_STRING("cityOrStateAndZip").get(), formatStrings, 2, getter_Copies(formattedString));    NS_ENSURE_SUCCESS(rv,rv);  }  else {    if (!cityResult.IsEmpty())       formattedString = cityResult;    else if (!stateResult.IsEmpty())       formattedString = stateResult;    else       formattedString = zipResult;  }  aResult.Append(formattedString);  return NS_OK;}