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

Side by Side Diff: chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm

Issue 2002673003: i18n of several browser messages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address first review Created 4 years, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #import "chrome/browser/ui/cocoa/website_settings/website_settings_bubble_contro ller.h" 5 #import "chrome/browser/ui/cocoa/website_settings/website_settings_bubble_contro ller.h"
6 6
7 #import <AppKit/AppKit.h> 7 #import <AppKit/AppKit.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 10
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 // that sometimes permissions may not be displayed at all, so it's 935 // that sometimes permissions may not be displayed at all, so it's
936 // incorrect to check they are set before the cookie info. 936 // incorrect to check they are set before the cookie info.
937 937
938 // |cookieInfoList| should only ever have 2 items: first- and third-party 938 // |cookieInfoList| should only ever have 2 items: first- and third-party
939 // cookies. 939 // cookies.
940 DCHECK_EQ(cookieInfoList.size(), 2u); 940 DCHECK_EQ(cookieInfoList.size(), 2u);
941 base::string16 firstPartyLabelText; 941 base::string16 firstPartyLabelText;
942 base::string16 thirdPartyLabelText; 942 base::string16 thirdPartyLabelText;
943 for (const auto& i : cookieInfoList) { 943 for (const auto& i : cookieInfoList) {
944 if (i.is_first_party) { 944 if (i.is_first_party) {
945 firstPartyLabelText = 945 firstPartyLabelText = l10n_util::GetPluralStringFUTF16(
946 l10n_util::GetStringFUTF16(IDS_WEBSITE_SETTINGS_FIRST_PARTY_SITE_DATA, 946 IDS_WEBSITE_SETTINGS_FIRST_PARTY_SITE_DATA, i.allowed);
947 base::IntToString16(i.allowed));
948 } else { 947 } else {
949 thirdPartyLabelText = 948 thirdPartyLabelText = l10n_util::GetPluralStringFUTF16(
950 l10n_util::GetStringFUTF16(IDS_WEBSITE_SETTINGS_THIRD_PARTY_SITE_DATA, 949 IDS_WEBSITE_SETTINGS_THIRD_PARTY_SITE_DATA, i.allowed);
951 base::IntToString16(i.allowed));
952 } 950 }
953 } 951 }
954 952
955 base::string16 sectionTitle = 953 base::string16 sectionTitle =
956 l10n_util::GetStringUTF16(IDS_WEBSITE_SETTINGS_TITLE_SITE_DATA); 954 l10n_util::GetStringUTF16(IDS_WEBSITE_SETTINGS_TITLE_SITE_DATA);
957 bool isRTL = base::i18n::RIGHT_TO_LEFT == 955 bool isRTL = base::i18n::RIGHT_TO_LEFT ==
958 base::i18n::GetStringDirection(firstPartyLabelText); 956 base::i18n::GetStringDirection(firstPartyLabelText);
959 957
960 [cookiesView_ setSubviews:[NSArray array]]; 958 [cookiesView_ setSubviews:[NSArray array]];
961 NSPoint controlOrigin = NSMakePoint(kFramePadding, 0); 959 NSPoint controlOrigin = NSMakePoint(kFramePadding, 0);
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 void WebsiteSettingsUIBridge::SetPermissionInfo( 1174 void WebsiteSettingsUIBridge::SetPermissionInfo(
1177 const PermissionInfoList& permission_info_list, 1175 const PermissionInfoList& permission_info_list,
1178 const ChosenObjectInfoList& chosen_object_info_list) { 1176 const ChosenObjectInfoList& chosen_object_info_list) {
1179 [bubble_controller_ setPermissionInfo:permission_info_list 1177 [bubble_controller_ setPermissionInfo:permission_info_list
1180 andChosenObjects:chosen_object_info_list]; 1178 andChosenObjects:chosen_object_info_list];
1181 } 1179 }
1182 1180
1183 void WebsiteSettingsUIBridge::SetSelectedTab(TabId tab_id) { 1181 void WebsiteSettingsUIBridge::SetSelectedTab(TabId tab_id) {
1184 // TODO(lgarron): Remove this from the interface. (crbug.com/571533) 1182 // TODO(lgarron): Remove this from the interface. (crbug.com/571533)
1185 } 1183 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698