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

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

Issue 2867993002: Updated new translate UI bubble text. (Closed)
Patch Set: Disambiguated UI string with a meaning attribute. Created 3 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 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 if (before_always_translate_checkbox_) 517 if (before_always_translate_checkbox_)
518 before_always_translate_checkbox_->SetChecked(should_always_translate_); 518 before_always_translate_checkbox_->SetChecked(should_always_translate_);
519 for (int i = 0; i < child_count(); i++) { 519 for (int i = 0; i < child_count(); i++) {
520 views::View* view = child_at(i); 520 views::View* view = child_at(i);
521 view->SetVisible(view == GetCurrentView()); 521 view->SetVisible(view == GetCurrentView());
522 } 522 }
523 } 523 }
524 524
525 views::View* TranslateBubbleView::CreateViewBeforeTranslate() { 525 views::View* TranslateBubbleView::CreateViewBeforeTranslate() {
526 const int kQuestionWidth = 200; 526 const int kQuestionWidth = 200;
527
527 base::string16 original_language_name = 528 base::string16 original_language_name =
528 model_->GetLanguageNameAt(model_->GetOriginalLanguageIndex()); 529 model_->GetLanguageNameAt(model_->GetOriginalLanguageIndex());
530 if (original_language_name.empty()) {
531 original_language_name =
532 l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_UNKNOWN_LANGUAGE);
533 }
529 534
530 views::View* view = new views::View(); 535 views::View* view = new views::View();
531 views::GridLayout* layout = new views::GridLayout(view); 536 views::GridLayout* layout = new views::GridLayout(view);
532 view->SetLayoutManager(layout); 537 view->SetLayoutManager(layout);
533 538
534 using views::GridLayout; 539 using views::GridLayout;
535 540
536 enum { 541 enum {
537 COLUMN_SET_ID_MESSAGE, 542 COLUMN_SET_ID_MESSAGE,
538 COLUMN_SET_ID_CONTENT, 543 COLUMN_SET_ID_CONTENT,
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 base::string16 label; 951 base::string16 label;
947 if (model_->IsPageTranslatedInCurrentLanguages()) 952 if (model_->IsPageTranslatedInCurrentLanguages())
948 label = l10n_util::GetStringUTF16(IDS_DONE); 953 label = l10n_util::GetStringUTF16(IDS_DONE);
949 else 954 else
950 label = l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_ACCEPT); 955 label = l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_ACCEPT);
951 advanced_done_button_->SetText(label); 956 advanced_done_button_->SetText(label);
952 advanced_done_button_->SizeToPreferredSize(); 957 advanced_done_button_->SizeToPreferredSize();
953 if (advanced_view_) 958 if (advanced_view_)
954 advanced_view_->Layout(); 959 advanced_view_->Layout();
955 } 960 }
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