Chromium Code Reviews| Index: chrome/browser/app_modal_dialog_mac.mm |
| =================================================================== |
| --- chrome/browser/app_modal_dialog_mac.mm (revision 24737) |
| +++ chrome/browser/app_modal_dialog_mac.mm (working copy) |
| @@ -6,10 +6,11 @@ |
| #import <Cocoa/Cocoa.h> |
| -#include "app/l10n_util.h" |
| +#include "app/l10n_util_mac.h" |
| #include "app/message_box_flags.h" |
| #include "base/sys_string_conversions.h" |
| #include "grit/generated_resources.h" |
| +#include "grit/app_strings.h" |
|
Mark Mentovai
2009/08/28 18:16:04
sortile
|
| // Helper object that receives the notification that the dialog/sheet is |
| // going away. Is responsible for cleaning itself up. |
| @@ -78,9 +79,8 @@ |
| // Determine the names of the dialog buttons based on the flags. "Default" |
| // is the OK button. "Other" is the cancel button. We don't use the |
| // "Alternate" button in NSRunAlertPanel. |
| - // TODO(pinkerton): Need to find the right localized strings for these. |
| - NSString* default_button = NSLocalizedString(@"OK", nil); |
| - NSString* other_button = NSLocalizedString(@"Cancel", nil); |
| + NSString* default_button = l10n_util::GetNSStringWithFixup(IDS_APP_OK); |
| + NSString* other_button = l10n_util::GetNSStringWithFixup(IDS_APP_CANCEL); |
| bool text_field = false; |
| bool one_button = false; |
| switch (dialog_flags_) { |
| @@ -89,12 +89,10 @@ |
| break; |
| case MessageBoxFlags::kIsJavascriptConfirm: |
| if (is_before_unload_dialog_) { |
| - std::string button_text = l10n_util::GetStringUTF8( |
| + default_button = l10n_util::GetNSStringWithFixup( |
| IDS_BEFOREUNLOAD_MESSAGEBOX_OK_BUTTON_LABEL); |
| - default_button = base::SysUTF8ToNSString(button_text); |
| - button_text = l10n_util::GetStringUTF8( |
| + other_button = l10n_util::GetNSStringWithFixup( |
| IDS_BEFOREUNLOAD_MESSAGEBOX_CANCEL_BUTTON_LABEL); |
| - other_button = base::SysUTF8ToNSString(button_text); |
| } |
| break; |
| case MessageBoxFlags::kIsJavascriptPrompt: |