Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(615)

Side by Side Diff: chrome/browser/ui/views/translate/translate_bubble_view.cc

Issue 1963183002: create a new message for 'Always do this' instead of using the existing one to avoid localization i… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/translate/translate_bubble_view.h" 5 #include "chrome/browser/ui/views/translate/translate_bubble_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_BEFORE_TRANSLATE))); 582 l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_BEFORE_TRANSLATE)));
583 layout->AddView( 583 layout->AddView(
584 CreateLink(this, IDS_TRANSLATE_BUBBLE_ADVANCED, LINK_ID_ADVANCED)); 584 CreateLink(this, IDS_TRANSLATE_BUBBLE_ADVANCED, LINK_ID_ADVANCED));
585 } 585 }
586 586
587 // In an incognito window, the "Always translate" checkbox shouldn't be shown. 587 // In an incognito window, the "Always translate" checkbox shouldn't be shown.
588 if (Use2016Q2UI() && !is_in_incognito_window_) { 588 if (Use2016Q2UI() && !is_in_incognito_window_) {
589 layout->StartRow(0, COLUMN_SET_ID_MESSAGE); 589 layout->StartRow(0, COLUMN_SET_ID_MESSAGE);
590 layout->SkipColumns(1); 590 layout->SkipColumns(1);
591 always_translate_checkbox_ = new views::Checkbox( 591 always_translate_checkbox_ = new views::Checkbox(
592 l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_ALWAYS)); 592 l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_ALWAYS_DO_THIS));
593 always_translate_checkbox_->SetChecked( 593 always_translate_checkbox_->SetChecked(
594 model_->ShouldAlwaysTranslateBeCheckedByDefault()); 594 model_->ShouldAlwaysTranslateBeCheckedByDefault());
595 always_translate_checkbox_->set_id(BUTTON_ID_ALWAYS_TRANSLATE); 595 always_translate_checkbox_->set_id(BUTTON_ID_ALWAYS_TRANSLATE);
596 always_translate_checkbox_->set_listener(this); 596 always_translate_checkbox_->set_listener(this);
597 layout->AddView(always_translate_checkbox_); 597 layout->AddView(always_translate_checkbox_);
598 } 598 }
599 layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing); 599 layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing);
600 600
601 layout->StartRow(0, COLUMN_SET_ID_CONTENT); 601 layout->StartRow(0, COLUMN_SET_ID_CONTENT);
602 views::LabelButton* accept_button = 602 views::LabelButton* accept_button =
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 advanced_done_button_->SizeToPreferredSize(); 934 advanced_done_button_->SizeToPreferredSize();
935 if (advanced_view_) 935 if (advanced_view_)
936 advanced_view_->Layout(); 936 advanced_view_->Layout();
937 } 937 }
938 938
939 void TranslateBubbleView::ReportUiAction( 939 void TranslateBubbleView::ReportUiAction(
940 translate::TranslateBubbleUiEvent action) { 940 translate::TranslateBubbleUiEvent action) {
941 UMA_HISTOGRAM_ENUMERATION(kTranslateBubbleUIEvent, action, 941 UMA_HISTOGRAM_ENUMERATION(kTranslateBubbleUIEvent, action,
942 translate::TRANSLATE_BUBBLE_UI_EVENT_MAX); 942 translate::TRANSLATE_BUBBLE_UI_EVENT_MAX);
943 } 943 }
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698