From 34820361270d1ebc6cebdc87cbb083d2533a0533 Mon Sep 17 00:00:00 2001 From: bridiver Date: Tue, 23 Oct 2018 12:05:05 -0700 Subject: [PATCH 1/3] fix resource organization and dependencies fix https://github.com/brave/brave-browser/issues/1808 --- .gitignore | 2 +- BUILD.gn | 12 +- brave_paks.gni | 8 +- browser/BUILD.gn | 2 +- browser/extensions/BUILD.gn | 2 +- ...ve_component_extension_resource_manager.cc | 6 +- browser/extensions/brave_component_loader.cc | 2 +- browser/resources/resource_ids | 11 +- browser/ui/BUILD.gn | 2 +- browser/ui/webui/brave_donate_ui.cc | 2 +- browser/ui/webui/brave_rewards_ui.cc | 2 +- browser/ui/webui/brave_webui_source.cc | 2 + .../whitelist.cc | 2 +- .../browser/rewards_service_impl.cc | 8 +- components/brave_rewards/resources/BUILD.gn | 28 ++ .../resources/brave_rewards_resources.grd | 34 ++ .../{ => resources}/donate/BUILD.gn | 0 .../donate/actions/donate_actions.ts | 0 .../{ => resources}/donate/brave_donate.html | 0 .../{ => resources}/donate/brave_donate.tsx | 4 +- .../{ => resources}/donate/components/app.tsx | 0 .../donate/components/siteBanner.tsx | 0 .../donate/constants/donate_types.ts | 0 .../donate/reducers/donate_reducer.ts | 0 .../{ => resources}/donate/reducers/index.ts | 0 .../{ => resources}/donate/store.ts | 0 .../{ => resources}/donate/utils.ts | 0 .../{ => resources}/extension/BUILD.gn | 19 +- .../extension/brave_rewards/BUILD.gn | 2 +- .../brave_rewards/_locales/am/messages.json | 0 .../brave_rewards/_locales/ar/messages.json | 0 .../brave_rewards/_locales/bg/messages.json | 0 .../brave_rewards/_locales/bn/messages.json | 0 .../brave_rewards/_locales/ca/messages.json | 0 .../brave_rewards/_locales/cs/messages.json | 0 .../brave_rewards/_locales/da/messages.json | 0 .../brave_rewards/_locales/de/messages.json | 0 .../brave_rewards/_locales/el/messages.json | 0 .../brave_rewards/_locales/en/messages.json | 0 .../_locales/en_GB/messages.json | 0 .../brave_rewards/_locales/es/messages.json | 0 .../_locales/es_419/messages.json | 0 .../brave_rewards/_locales/et/messages.json | 0 .../brave_rewards/_locales/fa/messages.json | 0 .../brave_rewards/_locales/fi/messages.json | 0 .../brave_rewards/_locales/fil/messages.json | 0 .../brave_rewards/_locales/fr/messages.json | 0 .../brave_rewards/_locales/gu/messages.json | 0 .../brave_rewards/_locales/he/messages.json | 0 .../brave_rewards/_locales/hi/messages.json | 0 .../brave_rewards/_locales/hr/messages.json | 0 .../brave_rewards/_locales/hu/messages.json | 0 .../brave_rewards/_locales/id/messages.json | 0 .../brave_rewards/_locales/it/messages.json | 0 .../brave_rewards/_locales/ja/messages.json | 0 .../brave_rewards/_locales/kn/messages.json | 0 .../brave_rewards/_locales/ko/messages.json | 0 .../brave_rewards/_locales/lt/messages.json | 0 .../brave_rewards/_locales/lv/messages.json | 0 .../brave_rewards/_locales/ml/messages.json | 0 .../brave_rewards/_locales/mr/messages.json | 0 .../brave_rewards/_locales/ms/messages.json | 0 .../brave_rewards/_locales/nl/messages.json | 0 .../brave_rewards/_locales/no/messages.json | 0 .../brave_rewards/_locales/pl/messages.json | 0 .../_locales/pt_BR/messages.json | 0 .../_locales/pt_PT/messages.json | 0 .../brave_rewards/_locales/ro/messages.json | 0 .../brave_rewards/_locales/ru/messages.json | 0 .../brave_rewards/_locales/sk/messages.json | 0 .../brave_rewards/_locales/sl/messages.json | 0 .../brave_rewards/_locales/sr/messages.json | 0 .../brave_rewards/_locales/sv/messages.json | 0 .../brave_rewards/_locales/sw/messages.json | 0 .../brave_rewards/_locales/ta/messages.json | 0 .../brave_rewards/_locales/te/messages.json | 0 .../brave_rewards/_locales/th/messages.json | 0 .../brave_rewards/_locales/tr/messages.json | 0 .../brave_rewards/_locales/uk/messages.json | 0 .../brave_rewards/_locales/vi/messages.json | 0 .../_locales/zh_CN/messages.json | 0 .../_locales/zh_TW/messages.json | 0 .../actions/rewards_panel_actions.ts | 0 .../extension/brave_rewards/background.ts | 0 .../background/actions/rewardsPanelActions.ts | 0 .../background/api/locale_api.ts | 0 .../brave_rewards/background/api/tabs_api.ts | 0 .../background/events/rewardsEvents.ts | 0 .../background/events/tabEvents.ts | 0 .../background/reducers/index.ts | 0 .../reducers/rewards_panel_reducer.ts | 0 .../brave_rewards/background/storage.ts | 2 +- .../brave_rewards/background/store.ts | 0 .../brave_rewards/brave_rewards_panel.html | 0 .../brave_rewards/brave_rewards_panel.tsx | 4 +- .../brave_rewards/components/app.tsx | 0 .../brave_rewards/components/panel.tsx | 0 .../constants/rewards_panel_types.ts | 0 .../extension/brave_rewards/img/bat-128.png | Bin .../extension/brave_rewards/img/bat-16.png | Bin .../extension/brave_rewards/img/bat-256.png | Bin .../extension/brave_rewards/img/bat-32.png | Bin .../extension/brave_rewards/img/bat-48.png | Bin .../extension/brave_rewards/img/bat-64.png | Bin .../extension/brave_rewards/manifest.json | 0 .../extension/brave_rewards/utils.ts | 0 .../extension/extension_resources.grd} | 10 +- .../resources/img}/BAT.svg | 0 .../resources/img}/BTC.svg | 0 .../resources/img}/ETH.svg | 0 .../resources/img}/LTC.svg | 0 .../resources/img}/ads_disabled.svg | 0 .../resources/img}/captcha_bat.png | Bin .../resources/img}/contribute_disabled.svg | 0 .../resources/img}/donate_bg_1.svg | 0 .../resources/img}/donate_bg_2.svg | 0 .../resources/img}/donate_disabled.svg | 0 .../resources/img}/temp/bartBaker.jpeg | Bin .../resources/img}/wallet_bg.svg | 0 .../resources/img}/welcome_bg.svg | 0 .../brave_rewards/{ => resources}/ui/BUILD.gn | 0 .../ui/actions/rewards_actions.ts | 0 .../{ => resources}/ui/brave_rewards.html | 0 .../{ => resources}/ui/brave_rewards.tsx | 4 +- .../{ => resources}/ui/components/adsBox.tsx | 4 +- .../{ => resources}/ui/components/app.tsx | 0 .../ui/components/contributeBox.tsx | 4 +- .../ui/components/donationsBox.tsx | 4 +- .../{ => resources}/ui/components/grant.tsx | 2 +- .../ui/components/pageWallet.tsx | 2 +- .../ui/components/settingsPage.tsx | 0 .../ui/constants/rewards_types.ts | 0 .../ui/reducers/grant_reducer.ts | 0 .../{ => resources}/ui/reducers/index.ts | 0 .../ui/reducers/publishers_reducer.ts | 0 .../ui/reducers/rewards_reducer.ts | 0 .../ui/reducers/wallet_reducer.ts | 0 .../{ => resources}/ui/storage.ts | 2 +- .../brave_rewards/{ => resources}/ui/store.ts | 0 .../brave_rewards/{ => resources}/ui/utils.ts | 0 components/resources/BUILD.gn | 18 +- .../resources/brave_components_resources.grd | 375 +----------------- .../resources/brave_components_strings.grd | 357 +++++++++++++++++ .../test/brave_rewards/donate/utils_test.ts | 2 +- .../extension/brave_rewards/utils_test.ts | 2 +- .../ui/actions/rewards_actions_test.ts | 4 +- .../brave_rewards/ui/components/app_test.tsx | 4 +- .../brave_rewards/ui/reducers/index_test.ts | 2 +- .../ui/reducers/wallet_reducer_test.ts | 8 +- .../test/brave_rewards/ui/utils_test.ts | 2 +- components/webpack/dev.config.js | 8 +- components/webpack/prod.config.js | 8 +- patches/chrome-BUILD.gn.patch | 12 +- 153 files changed, 541 insertions(+), 449 deletions(-) create mode 100644 components/brave_rewards/resources/BUILD.gn create mode 100644 components/brave_rewards/resources/brave_rewards_resources.grd rename components/brave_rewards/{ => resources}/donate/BUILD.gn (100%) rename components/brave_rewards/{ => resources}/donate/actions/donate_actions.ts (100%) rename components/brave_rewards/{ => resources}/donate/brave_donate.html (100%) rename components/brave_rewards/{ => resources}/donate/brave_donate.tsx (96%) rename components/brave_rewards/{ => resources}/donate/components/app.tsx (100%) rename components/brave_rewards/{ => resources}/donate/components/siteBanner.tsx (100%) rename components/brave_rewards/{ => resources}/donate/constants/donate_types.ts (100%) rename components/brave_rewards/{ => resources}/donate/reducers/donate_reducer.ts (100%) rename components/brave_rewards/{ => resources}/donate/reducers/index.ts (100%) rename components/brave_rewards/{ => resources}/donate/store.ts (100%) rename components/brave_rewards/{ => resources}/donate/utils.ts (100%) rename components/brave_rewards/{ => resources}/extension/BUILD.gn (52%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/BUILD.gn (90%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/am/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/ar/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/bg/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/bn/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/ca/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/cs/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/da/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/de/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/el/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/en/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/en_GB/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/es/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/es_419/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/et/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/fa/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/fi/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/fil/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/fr/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/gu/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/he/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/hi/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/hr/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/hu/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/id/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/it/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/ja/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/kn/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/ko/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/lt/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/lv/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/ml/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/mr/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/ms/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/nl/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/no/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/pl/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/pt_BR/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/pt_PT/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/ro/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/ru/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/sk/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/sl/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/sr/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/sv/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/sw/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/ta/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/te/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/th/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/tr/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/uk/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/vi/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/zh_CN/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/_locales/zh_TW/messages.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/actions/rewards_panel_actions.ts (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/background.ts (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/background/actions/rewardsPanelActions.ts (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/background/api/locale_api.ts (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/background/api/tabs_api.ts (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/background/events/rewardsEvents.ts (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/background/events/tabEvents.ts (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/background/reducers/index.ts (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/background/reducers/rewards_panel_reducer.ts (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/background/storage.ts (95%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/background/store.ts (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/brave_rewards_panel.html (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/brave_rewards_panel.tsx (93%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/components/app.tsx (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/components/panel.tsx (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/constants/rewards_panel_types.ts (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/img/bat-128.png (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/img/bat-16.png (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/img/bat-256.png (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/img/bat-32.png (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/img/bat-48.png (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/img/bat-64.png (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/manifest.json (100%) rename components/brave_rewards/{ => resources}/extension/brave_rewards/utils.ts (100%) rename components/brave_rewards/{extension/resources.grd => resources/extension/extension_resources.grd} (79%) rename components/{img/rewards => brave_rewards/resources/img}/BAT.svg (100%) rename components/{img/rewards => brave_rewards/resources/img}/BTC.svg (100%) rename components/{img/rewards => brave_rewards/resources/img}/ETH.svg (100%) rename components/{img/rewards => brave_rewards/resources/img}/LTC.svg (100%) rename components/{img/rewards => brave_rewards/resources/img}/ads_disabled.svg (100%) rename components/{img/rewards => brave_rewards/resources/img}/captcha_bat.png (100%) rename components/{img/rewards => brave_rewards/resources/img}/contribute_disabled.svg (100%) rename components/{img/rewards => brave_rewards/resources/img}/donate_bg_1.svg (100%) rename components/{img/rewards => brave_rewards/resources/img}/donate_bg_2.svg (100%) rename components/{img/rewards => brave_rewards/resources/img}/donate_disabled.svg (100%) rename components/{img/rewards => brave_rewards/resources/img}/temp/bartBaker.jpeg (100%) rename components/{img/rewards => brave_rewards/resources/img}/wallet_bg.svg (100%) rename components/{img/rewards => brave_rewards/resources/img}/welcome_bg.svg (100%) rename components/brave_rewards/{ => resources}/ui/BUILD.gn (100%) rename components/brave_rewards/{ => resources}/ui/actions/rewards_actions.ts (100%) rename components/brave_rewards/{ => resources}/ui/brave_rewards.html (100%) rename components/brave_rewards/{ => resources}/ui/brave_rewards.tsx (98%) rename components/brave_rewards/{ => resources}/ui/components/adsBox.tsx (90%) rename components/brave_rewards/{ => resources}/ui/components/app.tsx (100%) rename components/brave_rewards/{ => resources}/ui/components/contributeBox.tsx (98%) rename components/brave_rewards/{ => resources}/ui/components/donationsBox.tsx (98%) rename components/brave_rewards/{ => resources}/ui/components/grant.tsx (98%) rename components/brave_rewards/{ => resources}/ui/components/pageWallet.tsx (99%) rename components/brave_rewards/{ => resources}/ui/components/settingsPage.tsx (100%) rename components/brave_rewards/{ => resources}/ui/constants/rewards_types.ts (100%) rename components/brave_rewards/{ => resources}/ui/reducers/grant_reducer.ts (100%) rename components/brave_rewards/{ => resources}/ui/reducers/index.ts (100%) rename components/brave_rewards/{ => resources}/ui/reducers/publishers_reducer.ts (100%) rename components/brave_rewards/{ => resources}/ui/reducers/rewards_reducer.ts (100%) rename components/brave_rewards/{ => resources}/ui/reducers/wallet_reducer.ts (100%) rename components/brave_rewards/{ => resources}/ui/storage.ts (96%) rename components/brave_rewards/{ => resources}/ui/store.ts (100%) rename components/brave_rewards/{ => resources}/ui/utils.ts (100%) create mode 100644 components/resources/brave_components_strings.grd diff --git a/.gitignore b/.gitignore index 1abe1d13b0e5..c1349b71ddc5 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,7 @@ /.idea/ /browser/resources/brave_extension/ /components/brave_webtorrent/extension/out/ -/components/brave_rewards/extension/brave_rewards/out/ +/components/brave_rewards/resources/extension/brave_rewards/out/ /dist/ /out/ /vendor diff --git a/BUILD.gn b/BUILD.gn index c888e2d68fce..ec5e372f1547 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -47,11 +47,21 @@ group("brave") { ] } +group("resources") { + public_deps = [ + # TODO(bridiver) + # "//brave/browser:resources", + # "//brave/common:resources", + # "//brave/renderer:resources", + "//brave/components/resources", + ] +} + if (is_mac) { group("framework_bundle_data") { deps = [ "vendor/brave-extension:brave_extension_framework_bundle_data", - "components/brave_rewards/extension:framework_bundle_data", + "components/brave_rewards/resources/extension:framework_bundle_data", ] } } diff --git a/brave_paks.gni b/brave_paks.gni index 3c0b3955a32b..058828201ef4 100644 --- a/brave_paks.gni +++ b/brave_paks.gni @@ -58,7 +58,8 @@ template("brave_extra_paks") { "$root_gen_dir/brave/brave_unscaled_resources.pak", "$root_gen_dir/brave/browser/resources/brave_settings_resources.pak", "$root_gen_dir/components/brave_components_resources.pak", - "$root_gen_dir/brave/components/brave_rewards/extension/brave_rewards_resources.pak", + "$root_gen_dir/brave/components/brave_rewards/resources/brave_rewards_resources.pak", + "$root_gen_dir/brave/components/brave_rewards/resources/extension/brave_rewards_extension_resources.pak", "$target_gen_dir/browser/resources/brave_extension.pak", "$target_gen_dir/components/brave_webtorrent/brave_webtorrent_resources.pak", ] @@ -66,9 +67,10 @@ template("brave_extra_paks") { deps = [ "//brave/app:brave_generated_resources_grit", "//brave/app/theme:brave_unscaled_resources", - "//brave/components/brave_rewards/extension:resources", + "//brave/components/brave_rewards/resources", + "//brave/components/brave_rewards/resources/extension:resources", "//brave/components/brave_webtorrent:resources", - "//brave/components/resources:brave_components_resources_grit", + "//brave/components/resources", "//brave/browser/resources:brave_extension_grit", "//brave/browser/resources:brave_settings_resources", "//brave/common/extensions/api" diff --git a/browser/BUILD.gn b/browser/BUILD.gn index c3bde29872c1..f240b5504a7a 100644 --- a/browser/BUILD.gn +++ b/browser/BUILD.gn @@ -118,7 +118,7 @@ source_set("browser") { "autoplay", "//base", "//brave/components/brave_shields/browser:brave_shields", - "//brave/components/resources:brave_components_resources_grit", + "//brave/components/resources", "//brave/browser/resources:brave_extension_grit", "//chrome/browser", "download", diff --git a/browser/extensions/BUILD.gn b/browser/extensions/BUILD.gn index 61f8b3042633..ecee9225c521 100644 --- a/browser/extensions/BUILD.gn +++ b/browser/extensions/BUILD.gn @@ -35,7 +35,7 @@ source_set("extensions") { deps = [ "//brave/browser/resources:brave_extension_grit", "//brave/common/extensions/api", - "//brave/components/brave_rewards/extension:resources", + "//brave/components/brave_rewards/resources/extension:resources", "//brave/components/brave_webtorrent:resources", "//chrome/browser", "//content/public/browser", diff --git a/browser/extensions/brave_component_extension_resource_manager.cc b/browser/extensions/brave_component_extension_resource_manager.cc index fb9675a14285..01744a320854 100644 --- a/browser/extensions/brave_component_extension_resource_manager.cc +++ b/browser/extensions/brave_component_extension_resource_manager.cc @@ -5,7 +5,7 @@ #include "brave/browser/extensions/brave_component_extension_resource_manager.h" #include "brave/browser/resources/grit/brave_extension_resources_map.h" -#include "brave/components/brave_rewards/extension/grit/brave_rewards_resources_map.h" +#include "brave/components/brave_rewards/resources/extension/grit/brave_rewards_extension_resources_map.h" #include "brave/components/brave_webtorrent/grit/brave_webtorrent_resources_map.h" namespace extensions { @@ -17,8 +17,8 @@ BraveComponentExtensionResourceManager() { kBraveExtensionSize); AddComponentResourceEntries( - kBraveRewardsResources, - kBraveRewardsResourcesSize); + kBraveRewardsExtensionResources, + kBraveRewardsExtensionResourcesSize); AddComponentResourceEntries( kBraveWebtorrentResources, diff --git a/browser/extensions/brave_component_loader.cc b/browser/extensions/brave_component_loader.cc index 35d8500460c9..e54cfb6f464b 100644 --- a/browser/extensions/brave_component_loader.cc +++ b/browser/extensions/brave_component_loader.cc @@ -11,7 +11,7 @@ #include "brave/common/brave_switches.h" #include "brave/common/extensions/extension_constants.h" #include "brave/components/brave_rewards/browser/buildflags/buildflags.h" -#include "brave/components/brave_rewards/extension/grit/brave_rewards_resources.h" +#include "brave/components/brave_rewards/resources/extension/grit/brave_rewards_extension_resources.h" #include "brave/components/brave_webtorrent/grit/brave_webtorrent_resources.h" #include "components/grit/brave_components_resources.h" #include "extensions/browser/extension_prefs.h" diff --git a/browser/resources/resource_ids b/browser/resources/resource_ids index 10b0833be962..de8050a74c4c 100644 --- a/browser/resources/resource_ids +++ b/browser/resources/resource_ids @@ -6,7 +6,6 @@ }, "brave/components/resources/brave_components_resources.grd": { "includes": [33000], - "messages": [33500], }, "brave/browser/resources/brave_extension.grd": { "includes": [34000], @@ -26,5 +25,13 @@ "includes": [36500], }, # brave webtorrent 37500 - # brave rewards 38000 + "brave/components/brave_rewards/resources/extension/extension_resources.grd": { + "includes": [38000] + }, + "brave/components/brave_rewards/resources/brave_rewards_resources.grd": { + "includes": [38500] + }, + "brave/components/resources/brave_components_strings.grd": { + "messages": [39000] + }, } diff --git a/browser/ui/BUILD.gn b/browser/ui/BUILD.gn index 0e336be7f518..e2f5fe853d03 100644 --- a/browser/ui/BUILD.gn +++ b/browser/ui/BUILD.gn @@ -115,7 +115,7 @@ source_set("ui") { "//brave/components/brave_rewards/browser", "//brave/browser/tor", "//brave/browser/resources:brave_settings_resources", - "//brave/components/resources:brave_components_resources_grit", + "//brave/components/resources", "//chrome/app:command_ids", "//chrome/common", "//content/public/browser", diff --git a/browser/ui/webui/brave_donate_ui.cc b/browser/ui/webui/brave_donate_ui.cc index 1143a134d836..8142132edd0d 100644 --- a/browser/ui/webui/brave_donate_ui.cc +++ b/browser/ui/webui/brave_donate_ui.cc @@ -8,13 +8,13 @@ #include "brave/browser/ui/webui/basic_ui.h" #include "brave/common/pref_names.h" #include "brave/common/webui_url_constants.h" +#include "brave/components/brave_rewards/resources/grit/brave_rewards_resources.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/chrome_pages.h" #include "chrome/browser/ui/webui/constrained_web_dialog_ui.h" #include "chrome/common/pref_names.h" #include "chrome/common/webui_url_constants.h" -#include "components/grit/brave_components_resources.h" #include "components/prefs/pref_change_registrar.h" #include "components/prefs/pref_service.h" #include "content/public/browser/web_ui_data_source.h" diff --git a/browser/ui/webui/brave_rewards_ui.cc b/browser/ui/webui/brave_rewards_ui.cc index 126a73c48a65..58a8d3802a79 100644 --- a/browser/ui/webui/brave_rewards_ui.cc +++ b/browser/ui/webui/brave_rewards_ui.cc @@ -15,9 +15,9 @@ #include "brave/components/brave_rewards/browser/rewards_notifications_service_observer.h" #include "brave/components/brave_rewards/browser/rewards_service_factory.h" #include "brave/components/brave_rewards/browser/rewards_service_observer.h" +#include "brave/components/brave_rewards/resources/grit/brave_rewards_resources.h" #include "brave/common/webui_url_constants.h" #include "chrome/browser/profiles/profile.h" -#include "components/grit/brave_components_resources.h" #include "content/public/browser/web_ui_message_handler.h" #include "content/public/browser/web_ui_data_source.h" #include "content/public/browser/web_ui_message_handler.h" diff --git a/browser/ui/webui/brave_webui_source.cc b/browser/ui/webui/brave_webui_source.cc index 147dfe50340c..8408a91b795a 100644 --- a/browser/ui/webui/brave_webui_source.cc +++ b/browser/ui/webui/brave_webui_source.cc @@ -6,7 +6,9 @@ #include +#include "brave/components/brave_rewards/resources/grit/brave_rewards_resources.h" #include "components/grit/brave_components_resources.h" +#include "components/grit/brave_components_strings.h" #include "content/public/browser/web_ui_data_source.h" namespace { diff --git a/chromium_src/chrome/browser/extensions/component_extensions_whitelist/whitelist.cc b/chromium_src/chrome/browser/extensions/component_extensions_whitelist/whitelist.cc index 068024c6751a..9146b6fe292f 100644 --- a/chromium_src/chrome/browser/extensions/component_extensions_whitelist/whitelist.cc +++ b/chromium_src/chrome/browser/extensions/component_extensions_whitelist/whitelist.cc @@ -8,7 +8,7 @@ #include "brave/common/extensions/extension_constants.h" #include "components/grit/brave_components_resources.h" -#include "brave/components/brave_rewards/extension/grit/brave_rewards_resources.h" +#include "brave/components/brave_rewards/resources/extension/grit/brave_rewards_extension_resources.h" #include "brave/components/brave_webtorrent/grit/brave_webtorrent_resources.h" namespace extensions { diff --git a/components/brave_rewards/browser/rewards_service_impl.cc b/components/brave_rewards/browser/rewards_service_impl.cc index e87020252c7d..9f0a3b7326b9 100644 --- a/components/brave_rewards/browser/rewards_service_impl.cc +++ b/components/brave_rewards/browser/rewards_service_impl.cc @@ -3,8 +3,6 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "brave/components/brave_rewards/browser/rewards_service_impl.h" -#include "brave/components/brave_rewards/browser/wallet_properties.h" -#include "brave/components/brave_rewards/browser/balance_report.h" #include #include @@ -28,18 +26,20 @@ #include "bat/ledger/wallet_info.h" #include "brave/common/brave_switches.h" #include "brave/common/extensions/api/brave_rewards.h" +#include "brave/components/brave_rewards/browser/balance_report.h" #include "brave/components/brave_rewards/browser/publisher_info_database.h" #include "brave/components/brave_rewards/browser/rewards_fetcher_service_observer.h" #include "brave/components/brave_rewards/browser/rewards_notifications_service.h" #include "brave/components/brave_rewards/browser/rewards_notifications_service_factory.h" #include "brave/components/brave_rewards/browser/rewards_service_observer.h" +#include "brave/components/brave_rewards/browser/wallet_properties.h" +#include "brave/components/brave_rewards/resources/grit/brave_rewards_resources.h" #include "chrome/browser/bitmap_fetcher/bitmap_fetcher_service_factory.h" #include "chrome/browser/browser_process_impl.h" #include "chrome/browser/favicon/favicon_service_factory.h" #include "chrome/browser/profiles/profile.h" #include "components/favicon/core/favicon_service.h" #include "components/favicon_base/favicon_types.h" -#include "components/grit/brave_components_resources.h" #include "content_site.h" #include "extensions/browser/event_router.h" #include "extensions/browser/extension_api_frame_id_map.h" @@ -664,7 +664,7 @@ void RewardsServiceImpl::OnPublisherStateSaved( void RewardsServiceImpl::LoadNicewareList( ledger::GetNicewareListCallback callback) { std::string data = ui::ResourceBundle::GetSharedInstance().GetRawDataResource( - IDR_BRAVE_REWARDS_NICEWARE_LIST).as_string(); + IDR_BRAVE_REWARDS_NICEWARE_LIST).as_string(); if (data.empty()) { LOG(ERROR) << "Failed to read in niceware list"; diff --git a/components/brave_rewards/resources/BUILD.gn b/components/brave_rewards/resources/BUILD.gn new file mode 100644 index 000000000000..77babbf1ce32 --- /dev/null +++ b/components/brave_rewards/resources/BUILD.gn @@ -0,0 +1,28 @@ +import("//brave/components/brave_rewards/browser/buildflags/buildflags.gni") +import("//extensions/buildflags/buildflags.gni") +import("//tools/grit/grit_rule.gni") +import("//tools/grit/repack.gni") + + +grit("resources") { + source = "brave_rewards_resources.grd" + + outputs = [ + "grit/brave_rewards_resources.h", + "brave_rewards_resources.pak", + ] + + deps = [ + "ui", + "donate", + ] + + grit_flags = [ + "-E", + "root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir), + ] + + resource_ids = "//brave/browser/resources/resource_ids" + + output_dir = "$root_gen_dir/brave/components/brave_rewards/resources" +} diff --git a/components/brave_rewards/resources/brave_rewards_resources.grd b/components/brave_rewards/resources/brave_rewards_resources.grd new file mode 100644 index 000000000000..c42f5c1d5951 --- /dev/null +++ b/components/brave_rewards/resources/brave_rewards_resources.grd @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/components/brave_rewards/donate/BUILD.gn b/components/brave_rewards/resources/donate/BUILD.gn similarity index 100% rename from components/brave_rewards/donate/BUILD.gn rename to components/brave_rewards/resources/donate/BUILD.gn diff --git a/components/brave_rewards/donate/actions/donate_actions.ts b/components/brave_rewards/resources/donate/actions/donate_actions.ts similarity index 100% rename from components/brave_rewards/donate/actions/donate_actions.ts rename to components/brave_rewards/resources/donate/actions/donate_actions.ts diff --git a/components/brave_rewards/donate/brave_donate.html b/components/brave_rewards/resources/donate/brave_donate.html similarity index 100% rename from components/brave_rewards/donate/brave_donate.html rename to components/brave_rewards/resources/donate/brave_donate.html diff --git a/components/brave_rewards/donate/brave_donate.tsx b/components/brave_rewards/resources/donate/brave_donate.tsx similarity index 96% rename from components/brave_rewards/donate/brave_donate.tsx rename to components/brave_rewards/resources/donate/brave_donate.tsx index 9a623ca3604a..4a6e04e50369 100644 --- a/components/brave_rewards/donate/brave_donate.tsx +++ b/components/brave_rewards/resources/donate/brave_donate.tsx @@ -11,8 +11,8 @@ require('emptykit.css') // Components import App from './components/app' -require('../../fonts/muli.css') -require('../../fonts/poppins.css') +require('../../../fonts/muli.css') +require('../../../fonts/poppins.css') // Utils import store from './store' diff --git a/components/brave_rewards/donate/components/app.tsx b/components/brave_rewards/resources/donate/components/app.tsx similarity index 100% rename from components/brave_rewards/donate/components/app.tsx rename to components/brave_rewards/resources/donate/components/app.tsx diff --git a/components/brave_rewards/donate/components/siteBanner.tsx b/components/brave_rewards/resources/donate/components/siteBanner.tsx similarity index 100% rename from components/brave_rewards/donate/components/siteBanner.tsx rename to components/brave_rewards/resources/donate/components/siteBanner.tsx diff --git a/components/brave_rewards/donate/constants/donate_types.ts b/components/brave_rewards/resources/donate/constants/donate_types.ts similarity index 100% rename from components/brave_rewards/donate/constants/donate_types.ts rename to components/brave_rewards/resources/donate/constants/donate_types.ts diff --git a/components/brave_rewards/donate/reducers/donate_reducer.ts b/components/brave_rewards/resources/donate/reducers/donate_reducer.ts similarity index 100% rename from components/brave_rewards/donate/reducers/donate_reducer.ts rename to components/brave_rewards/resources/donate/reducers/donate_reducer.ts diff --git a/components/brave_rewards/donate/reducers/index.ts b/components/brave_rewards/resources/donate/reducers/index.ts similarity index 100% rename from components/brave_rewards/donate/reducers/index.ts rename to components/brave_rewards/resources/donate/reducers/index.ts diff --git a/components/brave_rewards/donate/store.ts b/components/brave_rewards/resources/donate/store.ts similarity index 100% rename from components/brave_rewards/donate/store.ts rename to components/brave_rewards/resources/donate/store.ts diff --git a/components/brave_rewards/donate/utils.ts b/components/brave_rewards/resources/donate/utils.ts similarity index 100% rename from components/brave_rewards/donate/utils.ts rename to components/brave_rewards/resources/donate/utils.ts diff --git a/components/brave_rewards/extension/BUILD.gn b/components/brave_rewards/resources/extension/BUILD.gn similarity index 52% rename from components/brave_rewards/extension/BUILD.gn rename to components/brave_rewards/resources/extension/BUILD.gn index 6d622d3e83b0..e6164cb7853c 100644 --- a/components/brave_rewards/extension/BUILD.gn +++ b/components/brave_rewards/resources/extension/BUILD.gn @@ -1,22 +1,25 @@ +import("//extensions/buildflags/buildflags.gni") import("//tools/grit/grit_rule.gni") import("//tools/grit/repack.gni") +assert(enable_extensions) + grit("resources") { - source = "resources.grd" + source = "extension_resources.grd" outputs = [ - "grit/brave_rewards_resources_map.cc", - "grit/brave_rewards_resources_map.h", - "grit/brave_rewards_resources.h", - "brave_rewards_resources.pak", + "grit/brave_rewards_extension_resources_map.cc", + "grit/brave_rewards_extension_resources_map.h", + "grit/brave_rewards_extension_resources.h", + "brave_rewards_extension_resources.pak", ] deps = [ - "//brave/components/brave_rewards/extension/brave_rewards" + "//brave/components/brave_rewards/resources/extension/brave_rewards" ] - resource_ids = "" + resource_ids = "//brave/browser/resources/resource_ids" - output_dir = "$root_gen_dir/brave/components/brave_rewards/extension" + output_dir = "$root_gen_dir/brave/components/brave_rewards/resources/extension" } if (is_mac) { diff --git a/components/brave_rewards/extension/brave_rewards/BUILD.gn b/components/brave_rewards/resources/extension/brave_rewards/BUILD.gn similarity index 90% rename from components/brave_rewards/extension/brave_rewards/BUILD.gn rename to components/brave_rewards/resources/extension/brave_rewards/BUILD.gn index 14bf320f19d9..66a0740f0602 100644 --- a/components/brave_rewards/extension/brave_rewards/BUILD.gn +++ b/components/brave_rewards/resources/extension/brave_rewards/BUILD.gn @@ -33,5 +33,5 @@ transpile_web_ui("brave_rewards_panel") { ] output_dir = - "$root_gen_dir/../../../brave/components/brave_rewards/extension/brave_rewards/out" + "$root_gen_dir/../../../brave/components/brave_rewards/resources/extension/brave_rewards/out" } diff --git a/components/brave_rewards/extension/brave_rewards/_locales/am/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/am/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/am/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/am/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/ar/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/ar/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/ar/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/ar/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/bg/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/bg/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/bg/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/bg/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/bn/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/bn/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/bn/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/bn/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/ca/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/ca/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/ca/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/ca/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/cs/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/cs/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/cs/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/cs/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/da/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/da/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/da/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/da/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/de/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/de/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/de/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/de/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/el/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/el/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/el/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/el/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/en/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/en/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/en/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/en/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/en_GB/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/en_GB/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/en_GB/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/en_GB/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/es/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/es/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/es/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/es/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/es_419/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/es_419/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/es_419/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/es_419/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/et/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/et/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/et/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/et/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/fa/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/fa/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/fa/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/fa/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/fi/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/fi/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/fi/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/fi/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/fil/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/fil/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/fil/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/fil/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/fr/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/fr/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/fr/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/fr/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/gu/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/gu/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/gu/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/gu/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/he/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/he/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/he/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/he/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/hi/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/hi/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/hi/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/hi/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/hr/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/hr/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/hr/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/hr/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/hu/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/hu/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/hu/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/hu/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/id/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/id/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/id/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/id/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/it/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/it/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/it/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/it/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/ja/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/ja/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/ja/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/ja/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/kn/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/kn/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/kn/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/kn/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/ko/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/ko/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/ko/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/ko/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/lt/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/lt/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/lt/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/lt/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/lv/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/lv/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/lv/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/lv/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/ml/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/ml/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/ml/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/ml/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/mr/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/mr/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/mr/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/mr/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/ms/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/ms/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/ms/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/ms/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/nl/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/nl/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/nl/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/nl/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/no/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/no/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/no/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/no/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/pl/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/pl/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/pl/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/pl/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/pt_BR/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/pt_BR/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/pt_BR/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/pt_BR/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/pt_PT/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/pt_PT/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/pt_PT/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/pt_PT/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/ro/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/ro/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/ro/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/ro/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/ru/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/ru/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/ru/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/ru/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/sk/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/sk/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/sk/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/sk/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/sl/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/sl/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/sl/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/sl/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/sr/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/sr/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/sr/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/sr/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/sv/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/sv/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/sv/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/sv/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/sw/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/sw/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/sw/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/sw/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/ta/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/ta/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/ta/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/ta/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/te/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/te/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/te/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/te/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/th/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/th/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/th/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/th/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/tr/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/tr/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/tr/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/tr/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/uk/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/uk/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/uk/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/uk/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/vi/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/vi/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/vi/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/vi/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/zh_CN/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/zh_CN/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/zh_CN/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/zh_CN/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/_locales/zh_TW/messages.json b/components/brave_rewards/resources/extension/brave_rewards/_locales/zh_TW/messages.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/_locales/zh_TW/messages.json rename to components/brave_rewards/resources/extension/brave_rewards/_locales/zh_TW/messages.json diff --git a/components/brave_rewards/extension/brave_rewards/actions/rewards_panel_actions.ts b/components/brave_rewards/resources/extension/brave_rewards/actions/rewards_panel_actions.ts similarity index 100% rename from components/brave_rewards/extension/brave_rewards/actions/rewards_panel_actions.ts rename to components/brave_rewards/resources/extension/brave_rewards/actions/rewards_panel_actions.ts diff --git a/components/brave_rewards/extension/brave_rewards/background.ts b/components/brave_rewards/resources/extension/brave_rewards/background.ts similarity index 100% rename from components/brave_rewards/extension/brave_rewards/background.ts rename to components/brave_rewards/resources/extension/brave_rewards/background.ts diff --git a/components/brave_rewards/extension/brave_rewards/background/actions/rewardsPanelActions.ts b/components/brave_rewards/resources/extension/brave_rewards/background/actions/rewardsPanelActions.ts similarity index 100% rename from components/brave_rewards/extension/brave_rewards/background/actions/rewardsPanelActions.ts rename to components/brave_rewards/resources/extension/brave_rewards/background/actions/rewardsPanelActions.ts diff --git a/components/brave_rewards/extension/brave_rewards/background/api/locale_api.ts b/components/brave_rewards/resources/extension/brave_rewards/background/api/locale_api.ts similarity index 100% rename from components/brave_rewards/extension/brave_rewards/background/api/locale_api.ts rename to components/brave_rewards/resources/extension/brave_rewards/background/api/locale_api.ts diff --git a/components/brave_rewards/extension/brave_rewards/background/api/tabs_api.ts b/components/brave_rewards/resources/extension/brave_rewards/background/api/tabs_api.ts similarity index 100% rename from components/brave_rewards/extension/brave_rewards/background/api/tabs_api.ts rename to components/brave_rewards/resources/extension/brave_rewards/background/api/tabs_api.ts diff --git a/components/brave_rewards/extension/brave_rewards/background/events/rewardsEvents.ts b/components/brave_rewards/resources/extension/brave_rewards/background/events/rewardsEvents.ts similarity index 100% rename from components/brave_rewards/extension/brave_rewards/background/events/rewardsEvents.ts rename to components/brave_rewards/resources/extension/brave_rewards/background/events/rewardsEvents.ts diff --git a/components/brave_rewards/extension/brave_rewards/background/events/tabEvents.ts b/components/brave_rewards/resources/extension/brave_rewards/background/events/tabEvents.ts similarity index 100% rename from components/brave_rewards/extension/brave_rewards/background/events/tabEvents.ts rename to components/brave_rewards/resources/extension/brave_rewards/background/events/tabEvents.ts diff --git a/components/brave_rewards/extension/brave_rewards/background/reducers/index.ts b/components/brave_rewards/resources/extension/brave_rewards/background/reducers/index.ts similarity index 100% rename from components/brave_rewards/extension/brave_rewards/background/reducers/index.ts rename to components/brave_rewards/resources/extension/brave_rewards/background/reducers/index.ts diff --git a/components/brave_rewards/extension/brave_rewards/background/reducers/rewards_panel_reducer.ts b/components/brave_rewards/resources/extension/brave_rewards/background/reducers/rewards_panel_reducer.ts similarity index 100% rename from components/brave_rewards/extension/brave_rewards/background/reducers/rewards_panel_reducer.ts rename to components/brave_rewards/resources/extension/brave_rewards/background/reducers/rewards_panel_reducer.ts diff --git a/components/brave_rewards/extension/brave_rewards/background/storage.ts b/components/brave_rewards/resources/extension/brave_rewards/background/storage.ts similarity index 95% rename from components/brave_rewards/extension/brave_rewards/background/storage.ts rename to components/brave_rewards/resources/extension/brave_rewards/background/storage.ts index 5c6bcfcffc99..9f288d5a23eb 100644 --- a/components/brave_rewards/extension/brave_rewards/background/storage.ts +++ b/components/brave_rewards/resources/extension/brave_rewards/background/storage.ts @@ -3,7 +3,7 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ // Utils -import { debounce } from '../../../../common/debounce' +import { debounce } from '../../../../../common/debounce' const keyName = 'rewards-panel-data' diff --git a/components/brave_rewards/extension/brave_rewards/background/store.ts b/components/brave_rewards/resources/extension/brave_rewards/background/store.ts similarity index 100% rename from components/brave_rewards/extension/brave_rewards/background/store.ts rename to components/brave_rewards/resources/extension/brave_rewards/background/store.ts diff --git a/components/brave_rewards/extension/brave_rewards/brave_rewards_panel.html b/components/brave_rewards/resources/extension/brave_rewards/brave_rewards_panel.html similarity index 100% rename from components/brave_rewards/extension/brave_rewards/brave_rewards_panel.html rename to components/brave_rewards/resources/extension/brave_rewards/brave_rewards_panel.html diff --git a/components/brave_rewards/extension/brave_rewards/brave_rewards_panel.tsx b/components/brave_rewards/resources/extension/brave_rewards/brave_rewards_panel.tsx similarity index 93% rename from components/brave_rewards/extension/brave_rewards/brave_rewards_panel.tsx rename to components/brave_rewards/resources/extension/brave_rewards/brave_rewards_panel.tsx index f750565c2a76..ca91dc7361aa 100644 --- a/components/brave_rewards/extension/brave_rewards/brave_rewards_panel.tsx +++ b/components/brave_rewards/resources/extension/brave_rewards/brave_rewards_panel.tsx @@ -11,8 +11,8 @@ import Theme from 'brave-ui/theme/brave-default' import { ThemeProvider } from 'brave-ui/theme' import { initLocale } from 'brave-ui/helpers' require('emptykit.css') -require('../../../fonts/muli.css') -require('../../../fonts/poppins.css') +require('../../../../fonts/muli.css') +require('../../../../fonts/poppins.css') // Components import App from './components/app' diff --git a/components/brave_rewards/extension/brave_rewards/components/app.tsx b/components/brave_rewards/resources/extension/brave_rewards/components/app.tsx similarity index 100% rename from components/brave_rewards/extension/brave_rewards/components/app.tsx rename to components/brave_rewards/resources/extension/brave_rewards/components/app.tsx diff --git a/components/brave_rewards/extension/brave_rewards/components/panel.tsx b/components/brave_rewards/resources/extension/brave_rewards/components/panel.tsx similarity index 100% rename from components/brave_rewards/extension/brave_rewards/components/panel.tsx rename to components/brave_rewards/resources/extension/brave_rewards/components/panel.tsx diff --git a/components/brave_rewards/extension/brave_rewards/constants/rewards_panel_types.ts b/components/brave_rewards/resources/extension/brave_rewards/constants/rewards_panel_types.ts similarity index 100% rename from components/brave_rewards/extension/brave_rewards/constants/rewards_panel_types.ts rename to components/brave_rewards/resources/extension/brave_rewards/constants/rewards_panel_types.ts diff --git a/components/brave_rewards/extension/brave_rewards/img/bat-128.png b/components/brave_rewards/resources/extension/brave_rewards/img/bat-128.png similarity index 100% rename from components/brave_rewards/extension/brave_rewards/img/bat-128.png rename to components/brave_rewards/resources/extension/brave_rewards/img/bat-128.png diff --git a/components/brave_rewards/extension/brave_rewards/img/bat-16.png b/components/brave_rewards/resources/extension/brave_rewards/img/bat-16.png similarity index 100% rename from components/brave_rewards/extension/brave_rewards/img/bat-16.png rename to components/brave_rewards/resources/extension/brave_rewards/img/bat-16.png diff --git a/components/brave_rewards/extension/brave_rewards/img/bat-256.png b/components/brave_rewards/resources/extension/brave_rewards/img/bat-256.png similarity index 100% rename from components/brave_rewards/extension/brave_rewards/img/bat-256.png rename to components/brave_rewards/resources/extension/brave_rewards/img/bat-256.png diff --git a/components/brave_rewards/extension/brave_rewards/img/bat-32.png b/components/brave_rewards/resources/extension/brave_rewards/img/bat-32.png similarity index 100% rename from components/brave_rewards/extension/brave_rewards/img/bat-32.png rename to components/brave_rewards/resources/extension/brave_rewards/img/bat-32.png diff --git a/components/brave_rewards/extension/brave_rewards/img/bat-48.png b/components/brave_rewards/resources/extension/brave_rewards/img/bat-48.png similarity index 100% rename from components/brave_rewards/extension/brave_rewards/img/bat-48.png rename to components/brave_rewards/resources/extension/brave_rewards/img/bat-48.png diff --git a/components/brave_rewards/extension/brave_rewards/img/bat-64.png b/components/brave_rewards/resources/extension/brave_rewards/img/bat-64.png similarity index 100% rename from components/brave_rewards/extension/brave_rewards/img/bat-64.png rename to components/brave_rewards/resources/extension/brave_rewards/img/bat-64.png diff --git a/components/brave_rewards/extension/brave_rewards/manifest.json b/components/brave_rewards/resources/extension/brave_rewards/manifest.json similarity index 100% rename from components/brave_rewards/extension/brave_rewards/manifest.json rename to components/brave_rewards/resources/extension/brave_rewards/manifest.json diff --git a/components/brave_rewards/extension/brave_rewards/utils.ts b/components/brave_rewards/resources/extension/brave_rewards/utils.ts similarity index 100% rename from components/brave_rewards/extension/brave_rewards/utils.ts rename to components/brave_rewards/resources/extension/brave_rewards/utils.ts diff --git a/components/brave_rewards/extension/resources.grd b/components/brave_rewards/resources/extension/extension_resources.grd similarity index 79% rename from components/brave_rewards/extension/resources.grd rename to components/brave_rewards/resources/extension/extension_resources.grd index 352a66042415..a915d1d1d59d 100644 --- a/components/brave_rewards/extension/resources.grd +++ b/components/brave_rewards/resources/extension/extension_resources.grd @@ -1,15 +1,15 @@ - + - - - + + + - + diff --git a/components/img/rewards/BAT.svg b/components/brave_rewards/resources/img/BAT.svg similarity index 100% rename from components/img/rewards/BAT.svg rename to components/brave_rewards/resources/img/BAT.svg diff --git a/components/img/rewards/BTC.svg b/components/brave_rewards/resources/img/BTC.svg similarity index 100% rename from components/img/rewards/BTC.svg rename to components/brave_rewards/resources/img/BTC.svg diff --git a/components/img/rewards/ETH.svg b/components/brave_rewards/resources/img/ETH.svg similarity index 100% rename from components/img/rewards/ETH.svg rename to components/brave_rewards/resources/img/ETH.svg diff --git a/components/img/rewards/LTC.svg b/components/brave_rewards/resources/img/LTC.svg similarity index 100% rename from components/img/rewards/LTC.svg rename to components/brave_rewards/resources/img/LTC.svg diff --git a/components/img/rewards/ads_disabled.svg b/components/brave_rewards/resources/img/ads_disabled.svg similarity index 100% rename from components/img/rewards/ads_disabled.svg rename to components/brave_rewards/resources/img/ads_disabled.svg diff --git a/components/img/rewards/captcha_bat.png b/components/brave_rewards/resources/img/captcha_bat.png similarity index 100% rename from components/img/rewards/captcha_bat.png rename to components/brave_rewards/resources/img/captcha_bat.png diff --git a/components/img/rewards/contribute_disabled.svg b/components/brave_rewards/resources/img/contribute_disabled.svg similarity index 100% rename from components/img/rewards/contribute_disabled.svg rename to components/brave_rewards/resources/img/contribute_disabled.svg diff --git a/components/img/rewards/donate_bg_1.svg b/components/brave_rewards/resources/img/donate_bg_1.svg similarity index 100% rename from components/img/rewards/donate_bg_1.svg rename to components/brave_rewards/resources/img/donate_bg_1.svg diff --git a/components/img/rewards/donate_bg_2.svg b/components/brave_rewards/resources/img/donate_bg_2.svg similarity index 100% rename from components/img/rewards/donate_bg_2.svg rename to components/brave_rewards/resources/img/donate_bg_2.svg diff --git a/components/img/rewards/donate_disabled.svg b/components/brave_rewards/resources/img/donate_disabled.svg similarity index 100% rename from components/img/rewards/donate_disabled.svg rename to components/brave_rewards/resources/img/donate_disabled.svg diff --git a/components/img/rewards/temp/bartBaker.jpeg b/components/brave_rewards/resources/img/temp/bartBaker.jpeg similarity index 100% rename from components/img/rewards/temp/bartBaker.jpeg rename to components/brave_rewards/resources/img/temp/bartBaker.jpeg diff --git a/components/img/rewards/wallet_bg.svg b/components/brave_rewards/resources/img/wallet_bg.svg similarity index 100% rename from components/img/rewards/wallet_bg.svg rename to components/brave_rewards/resources/img/wallet_bg.svg diff --git a/components/img/rewards/welcome_bg.svg b/components/brave_rewards/resources/img/welcome_bg.svg similarity index 100% rename from components/img/rewards/welcome_bg.svg rename to components/brave_rewards/resources/img/welcome_bg.svg diff --git a/components/brave_rewards/ui/BUILD.gn b/components/brave_rewards/resources/ui/BUILD.gn similarity index 100% rename from components/brave_rewards/ui/BUILD.gn rename to components/brave_rewards/resources/ui/BUILD.gn diff --git a/components/brave_rewards/ui/actions/rewards_actions.ts b/components/brave_rewards/resources/ui/actions/rewards_actions.ts similarity index 100% rename from components/brave_rewards/ui/actions/rewards_actions.ts rename to components/brave_rewards/resources/ui/actions/rewards_actions.ts diff --git a/components/brave_rewards/ui/brave_rewards.html b/components/brave_rewards/resources/ui/brave_rewards.html similarity index 100% rename from components/brave_rewards/ui/brave_rewards.html rename to components/brave_rewards/resources/ui/brave_rewards.html diff --git a/components/brave_rewards/ui/brave_rewards.tsx b/components/brave_rewards/resources/ui/brave_rewards.tsx similarity index 98% rename from components/brave_rewards/ui/brave_rewards.tsx rename to components/brave_rewards/resources/ui/brave_rewards.tsx index 8e999e907a35..1cb73813ceb8 100644 --- a/components/brave_rewards/ui/brave_rewards.tsx +++ b/components/brave_rewards/resources/ui/brave_rewards.tsx @@ -11,8 +11,8 @@ require('emptykit.css') // Components import App from './components/app' -require('../../fonts/muli.css') -require('../../fonts/poppins.css') +require('../../../fonts/muli.css') +require('../../../fonts/poppins.css') // Utils import store from './store' diff --git a/components/brave_rewards/ui/components/adsBox.tsx b/components/brave_rewards/resources/ui/components/adsBox.tsx similarity index 90% rename from components/brave_rewards/ui/components/adsBox.tsx rename to components/brave_rewards/resources/ui/components/adsBox.tsx index 655fd9c31b3c..bbd4b4edb1e1 100644 --- a/components/brave_rewards/ui/components/adsBox.tsx +++ b/components/brave_rewards/resources/ui/components/adsBox.tsx @@ -10,11 +10,11 @@ import { connect } from 'react-redux' import { Box, DisabledContent } from 'brave-ui/features/rewards' // Utils -import { getLocale } from '../../../common/locale' +import { getLocale } from '../../../../common/locale' import * as rewardsActions from '../actions/rewards_actions' // Assets -const adsDisabledIcon = require('../../../img/rewards/ads_disabled.svg') +const adsDisabledIcon = require('../../img/ads_disabled.svg') class AdsBox extends React.Component { adsDisabled () { diff --git a/components/brave_rewards/ui/components/app.tsx b/components/brave_rewards/resources/ui/components/app.tsx similarity index 100% rename from components/brave_rewards/ui/components/app.tsx rename to components/brave_rewards/resources/ui/components/app.tsx diff --git a/components/brave_rewards/ui/components/contributeBox.tsx b/components/brave_rewards/resources/ui/components/contributeBox.tsx similarity index 98% rename from components/brave_rewards/ui/components/contributeBox.tsx rename to components/brave_rewards/resources/ui/components/contributeBox.tsx index 1f8644993e27..1bb533c03fa1 100644 --- a/components/brave_rewards/ui/components/contributeBox.tsx +++ b/components/brave_rewards/resources/ui/components/contributeBox.tsx @@ -12,12 +12,12 @@ import { Box, TableContribute, DisabledContent, List, ModalContribute, Tokens, N import { Provider } from 'brave-ui/features/rewards/profile' // Utils -import { getLocale } from '../../../common/locale' +import { getLocale } from '../../../../common/locale' import * as rewardsActions from '../actions/rewards_actions' import * as utils from '../utils' // Assets -const contributeDisabledIcon = require('../../../img/rewards/contribute_disabled.svg') +const contributeDisabledIcon = require('../../img/contribute_disabled.svg') interface State { modalContribute: boolean diff --git a/components/brave_rewards/ui/components/donationsBox.tsx b/components/brave_rewards/resources/ui/components/donationsBox.tsx similarity index 98% rename from components/brave_rewards/ui/components/donationsBox.tsx rename to components/brave_rewards/resources/ui/components/donationsBox.tsx index 5f79079f739c..1c13cf31a41d 100644 --- a/components/brave_rewards/ui/components/donationsBox.tsx +++ b/components/brave_rewards/resources/ui/components/donationsBox.tsx @@ -12,13 +12,13 @@ import { DisabledContent, Box, TableDonation, List, Tokens, ModalDonation } from import { Provider } from 'brave-ui/features/rewards/profile' // Utils -import { getLocale } from '../../../common/locale' +import { getLocale } from '../../../../common/locale' import * as rewardsActions from '../actions/rewards_actions' import * as utils from '../utils' import { DetailRow } from 'brave-ui/features/rewards/tableDonation' // Assets -const donate = require('../../../img/rewards/donate_disabled.svg') +const donate = require('../../img/donate_disabled.svg') interface Props extends Rewards.ComponentProps { } diff --git a/components/brave_rewards/ui/components/grant.tsx b/components/brave_rewards/resources/ui/components/grant.tsx similarity index 98% rename from components/brave_rewards/ui/components/grant.tsx rename to components/brave_rewards/resources/ui/components/grant.tsx index 3180e07a0c62..3167f4e4c6d7 100644 --- a/components/brave_rewards/ui/components/grant.tsx +++ b/components/brave_rewards/resources/ui/components/grant.tsx @@ -16,7 +16,7 @@ import { // Utils import * as rewardsActions from '../actions/rewards_actions' -import { getLocale } from '../../../common/locale' +import { getLocale } from '../../../../common/locale' import { convertProbiToFixed } from '../utils' import GrantError from 'brave-ui/features/rewards/grantError' diff --git a/components/brave_rewards/ui/components/pageWallet.tsx b/components/brave_rewards/resources/ui/components/pageWallet.tsx similarity index 99% rename from components/brave_rewards/ui/components/pageWallet.tsx rename to components/brave_rewards/resources/ui/components/pageWallet.tsx index 7c12c5c1726c..2af0352aec04 100644 --- a/components/brave_rewards/ui/components/pageWallet.tsx +++ b/components/brave_rewards/resources/ui/components/pageWallet.tsx @@ -18,7 +18,7 @@ import { WalletAddIcon } from 'brave-ui/components/icons' import { AlertWallet } from 'brave-ui/features/rewards/walletWrapper' // Utils -import { getLocale } from '../../../common/locale' +import { getLocale } from '../../../../common/locale' import * as rewardsActions from '../actions/rewards_actions' import * as utils from '../utils' import WalletOff from 'brave-ui/features/rewards/walletOff' diff --git a/components/brave_rewards/ui/components/settingsPage.tsx b/components/brave_rewards/resources/ui/components/settingsPage.tsx similarity index 100% rename from components/brave_rewards/ui/components/settingsPage.tsx rename to components/brave_rewards/resources/ui/components/settingsPage.tsx diff --git a/components/brave_rewards/ui/constants/rewards_types.ts b/components/brave_rewards/resources/ui/constants/rewards_types.ts similarity index 100% rename from components/brave_rewards/ui/constants/rewards_types.ts rename to components/brave_rewards/resources/ui/constants/rewards_types.ts diff --git a/components/brave_rewards/ui/reducers/grant_reducer.ts b/components/brave_rewards/resources/ui/reducers/grant_reducer.ts similarity index 100% rename from components/brave_rewards/ui/reducers/grant_reducer.ts rename to components/brave_rewards/resources/ui/reducers/grant_reducer.ts diff --git a/components/brave_rewards/ui/reducers/index.ts b/components/brave_rewards/resources/ui/reducers/index.ts similarity index 100% rename from components/brave_rewards/ui/reducers/index.ts rename to components/brave_rewards/resources/ui/reducers/index.ts diff --git a/components/brave_rewards/ui/reducers/publishers_reducer.ts b/components/brave_rewards/resources/ui/reducers/publishers_reducer.ts similarity index 100% rename from components/brave_rewards/ui/reducers/publishers_reducer.ts rename to components/brave_rewards/resources/ui/reducers/publishers_reducer.ts diff --git a/components/brave_rewards/ui/reducers/rewards_reducer.ts b/components/brave_rewards/resources/ui/reducers/rewards_reducer.ts similarity index 100% rename from components/brave_rewards/ui/reducers/rewards_reducer.ts rename to components/brave_rewards/resources/ui/reducers/rewards_reducer.ts diff --git a/components/brave_rewards/ui/reducers/wallet_reducer.ts b/components/brave_rewards/resources/ui/reducers/wallet_reducer.ts similarity index 100% rename from components/brave_rewards/ui/reducers/wallet_reducer.ts rename to components/brave_rewards/resources/ui/reducers/wallet_reducer.ts diff --git a/components/brave_rewards/ui/storage.ts b/components/brave_rewards/resources/ui/storage.ts similarity index 96% rename from components/brave_rewards/ui/storage.ts rename to components/brave_rewards/resources/ui/storage.ts index 18567f625a7f..2b8095c3a9fc 100644 --- a/components/brave_rewards/ui/storage.ts +++ b/components/brave_rewards/resources/ui/storage.ts @@ -3,7 +3,7 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ // Utils -import { debounce } from '../../common/debounce' +import { debounce } from '../../../common/debounce' const keyName = 'rewards-data' diff --git a/components/brave_rewards/ui/store.ts b/components/brave_rewards/resources/ui/store.ts similarity index 100% rename from components/brave_rewards/ui/store.ts rename to components/brave_rewards/resources/ui/store.ts diff --git a/components/brave_rewards/ui/utils.ts b/components/brave_rewards/resources/ui/utils.ts similarity index 100% rename from components/brave_rewards/ui/utils.ts rename to components/brave_rewards/resources/ui/utils.ts diff --git a/components/resources/BUILD.gn b/components/resources/BUILD.gn index ed1a71c3edfa..3659c6b6b210 100644 --- a/components/resources/BUILD.gn +++ b/components/resources/BUILD.gn @@ -1,7 +1,7 @@ import("//tools/grit/grit_rule.gni") import("//brave/components/brave_rewards/browser/buildflags/buildflags.gni") -grit("brave_components_resources_grit") { +grit("resources") { source = "brave_components_resources.grd" output_name = "brave_components_resources_new" @@ -11,6 +11,7 @@ grit("brave_components_resources_grit") { "brave_components_resources.pak", ] deps = [ + ":strings", "//brave/components/brave_adblock_ui", "//brave/components/brave_new_tab_ui", "//brave/components/brave_welcome_ui", @@ -19,10 +20,11 @@ grit("brave_components_resources_grit") { if (brave_rewards_enabled) { deps += [ - "//brave/components/brave_rewards/ui", - "//brave/components/brave_rewards/donate", + "//brave/components/brave_rewards/resources", + "//brave/components/brave_rewards/resources/extension:resources", ] } + grit_flags = [ "-E", "root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir), @@ -31,3 +33,13 @@ grit("brave_components_resources_grit") { resource_ids = "//brave/browser/resources/resource_ids" } +grit("strings") { + source = "brave_components_strings.grd" + + outputs = [ + "grit/brave_components_strings.h", + ] + + output_dir = "$root_gen_dir/components" + resource_ids = "//brave/browser/resources/resource_ids" +} diff --git a/components/resources/brave_components_resources.grd b/components/resources/brave_components_resources.grd index 51c1d79c7714..0582d8bee504 100644 --- a/components/resources/brave_components_resources.grd +++ b/components/resources/brave_components_resources.grd @@ -6,62 +6,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -71,10 +19,6 @@ - - - - @@ -122,321 +66,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - Ads Blocked - Trackers Blocked - HTTPS Upgrades - Estimated Time Saved - Thumb Removed. - Undo - Restore All - second - seconds - minute - minutes - hour - hours - day - days - Photo by - Edit Preferences - View and Manage Bookmarks - View your browsing history - - - - Learn more - Done - Search settings - This is a - Private Window - Brave doesn’t remember what you do in a Private Window. Sites you visit won't show up in your history, and cookies vanish when you’re done. Private Windows don’t make you completely anonymous online, though. - Learn more - Private Window with Tor - Brave never remembers what you do in a Private Window. With Tor, your browsing is also hidden from your ISP or employer, and your IP address is hidden from the sites you visit. - Learn more about Private Windows with Tor - Search Privately with - DuckDuckGo - With private search, Brave will use DuckDuckGo for searches in Private Windows. DuckDuckGo doesn’t track your search history, so you can search privately. - In Private Windows with Tor, DuckDuckGo is the default search engine. Some of the other popular search engines are harder to use with Tor. DuckDuckGo doesn’t track your search history; with Tor, they don’t even know your IP address. - Search with DuckDuckGo - Make Private Windows much more private - This Private Window is much more private - with Tor - Tor hides your IP address from the sites you visit, by routing your browsing through several Tor servers before it reaches your destination. These connections are encrypted, so your ISP or employer can’t see which sites you’re visiting either. Tor can slow down browsing and some sites might not work at all. - Using Private Windows only changes what Brave does on your device — it doesn't change anyone else's behavior. Tor hides your IP address from the sites you visit, and hides the sites you visit from your ISP or your employer. Open a Private Window with Tor from the menu, or with {{ key }}. - Learn more about Tor in Brave - - - Total Ads Blocked: - Regional Ad Block: - Enabled - Disabled - - - Welcome to Brave - Brave is so much more than a browser. Let's show you how to make the most of it. - Let's go - Enable Brave Rewards - Brave Rewards is a new way of thinking about how the web works. Get rewarded for viewing privacy-respecting ads, and support your favorite content creators while you’re at it. - Enable Rewards - Import from another browser - Brave makes it easy to setup your usual environment by importing bookmarks and settings from other browsers installed on your computer. - Import Now - Manage your shield settings - Adjust and monitor your level of protection by clicking the Brave logo in the toolbar. Manage your global shield settings in the preferences panel. - Shield Settings - Customize your preferences - Tabs, appearance, extensions and history setting can be configured in the preferences panel. You might even find a dark theme in there ;) - Preferences - Skip welcome tour - Next - Done - - - Ads - Earn tokens by viewing ads in Brave. Ads presented are based on your interests, as inferred from your browsing behavior. No personal data or browsing history ever leaves your browser. - Auto-Contribute - An automatic way to support publishers and content creators. Set a monthly payment and browse normally. The sites you visit receive your contributions automatically, based on your attention as measured by Brave. - - - Monthly Payment - Next contribution date - Supported sites - Tips - Tip content creators directly as you browse or give tips to videos and tweets that you ‘like’. You can also set up recurring monthly tips so you can support sites continuously. - - - Coming soon. - Reward creators for the content you love. - Your monthly payment gets distributed across the sites you visit. - Sites will appear as you browse - Total tips this month - Have you tipped your favorite content creator today? - Add Funds - Manage Funds - tokens - Minimum page time before logging a visit - Minimum visits for publisher relevancy - What should be allowed? - Allow contribution to non-verified sites - Allow contribution to videos - 1 visit - 5 visits - 10 visits - 5 seconds - 8 seconds - 1 minute - Enable ability to give tips on ‘Like’ posts - YouTube - Twitter - Tip on the spot as you find gems. - Send Tips on Twitter, YouTube, and more, to reward posts you ‘Like’. - {{balance}} BAT was recovered. Your wallet key has been verified and loaded successfully. - Wallet restored! - Please re-enter keys or try different keys. - Almost there… - Prove that you are human! - Hmmm…not quite. - The Brave Rewards server is not responding. We will fix this as soon as possible. - Uh oh! - Grant gone! - OK - Sorry, but this grant is already expired. - Ups, something is wrong! - Ok - We detect some problem, please try again later. - - - about - Accept - ©2016–2018 Brave Software. Brave is a registered trademark of Brave Software. Site names may be trademarks or registered trademarks of the site owner. - To protect your privacy, this Brave Rewards statement is not saved, recorded or logged anywhere other than on your device (this computer). It cannot be retrieved from Brave in the event of data loss on your device. - add funds - the FAQ - Reminder: The Brave Wallet is unidirectional and BAT flows to publisher sites. For more information about Brave Rewards, please visit - Show QR Code - Brave makes it easy to transfer funds from your existing crypto-currency wallet to your Brave BAT Wallet. - Add funds to your Brave wallet - Allow tips on - Amount - Get paid to view relevant ads that respect your privacy. - Ads - Support your favorite sites just by browsing – or tip a site any time you like. - Auto-Contribute - Brave Rewards - Creating wallet - Your attention is valuable. Earn by viewing privacy-respecting ads, and pay it forward to support content creators you love. - Yes, I'm In! - Get Rewarded for Browsing! - How it works... - Brave Rewards - Brave Verified Publishers - Cancel - Claim - Closing Balance - Contribute - Auto-Contribute Allocation - Copy - You’re currently sending {{currentDonation}} BAT to this site every month. - Date - Deposit - Deposits - Description - Drag and drop this logo onto the - target - Tip - Tip amount - Tip this site Monthly - Send a Tip… - Done - Set monthly tip - Download as PDF - Earnings from Ads - Enable Tips - Exclude this site - Total number of sites you excluded from Auto-Contribute: - expires on - for - Tokens not used by the expiration date will be automatically returned to the Brave User Growth Pool. - Grant Expiration Date - Grants - import - Include in Auto-Contribute - Make this monthly - Apr - August - December - February - January - July - June - March - May - November - October - September - A free token grant is available. - Free Token Grant - Currently no token grant is available. - No, thank you - Not enough tokens. Please - off - ok - on - One time - One-time Tips - Opening Balance - Payment - Payment made every {{day}}th day in each month. - Payment not made. - When your balance is not enough to cover the combined total of Auto-Contribute and your recurring tips, these payments are skipped for this period. - Please note: - Print - Ready to get started? - Yes I'm Ready - You can start with the - Recovery Key - Recurring - Monthly Tips - Monthly Tips - remove - Restore - Restore All - Backup your Wallet - Keep this recovery key safe. You can always use this key to get your wallet back if something happens to your browser or computer. But make sure to protect it — anyone who gets this key could steal your wallet. It's probably safest to write it down on a piece of paper, or wherever else you keep important info. - You can support this site by sending a tip. It’s a way of thanking them for making great content. Content creators get paid for their tips during the first week of each calendar month. - If you like, you can schedule monthly tips to support this site on a continuous basis. - Auto-Contribute - Attention - Attention - You’re currently supporting - With your old browser, you paid to browse the web by viewing ads with your valuable attention. You spent your valuable time downloading invasive ad technology that transmited your valuable private data to advertisers — - without your consent. - Today, Brave welcomes you to the new internet. - One where your time is valued, your personal data is kept private, and you actually get paid for your attention. - Sadly, no tokens yet. - 3 ways to fill your wallet: - You can add funds. - You can earn tokens from viewing ads. - Occasionally, you'll be offered free token grants from Brave. Be sure to keep an eye out for the alert! - Get Rewarded for Browsing! - Earn tokens for your attention to ads and pay it forward to support content creators you value! - Add, withdraw and manage funds at - Your Brave wallet is managed by - Brave Rewards is built on the Basic Attention Token. Learn more about BAT - here - Restore your Wallet - Use your recovery key to restore your wallet. Restoring with a recovery key will replace your current wallet. Make sure you empty or back up your current wallet before restoring. - Enter your recovery key or - Rewards Summary - Why Brave Rewards? - Save as File - See all {{numItems}} items - See all {{numSites}} sites - Send my Tip - Send my Tip - Settings - site - sites - Thank you - Tip on like - Basic Attention Token (BAT) - BitCoin (BTC) - Ethereum (ETH) - LiteCoin (LTC) - Token Grants Claimed - tokens - Total - Transactions - This enables both ads and automatic contributions. You can turn them on or off separately at any time. - Activate Rewards - Type - Brave Verified Publisher - View Monthly Statement for Details - Wallet Activity - Wallet Address - wallet balance - Try again - Wallet creation failed - Please check your internet connection. - Welcome! - Start Earning Now! - Join Rewards - You can now earn tokens for watching privacy-respecting ads. - Get paid for viewing ads and pay it forward to support your favorite content creators. - Check out what’s improved - Learn More - We’ve given Brave Payments a big upgrade. - Get ready to experience the next Internet. - Why Brave Rewards? - With your old browser, you paid to browse the web by viewing ads with your valuable attention. You spent your valuable time downloading invasive ad technology that transmitted your valuable private data to advertisers — without your consent. - Today, Brave welcomes you to the new Internet. One where your time is valued, your personal data is kept private, and you actually get paid for your attention. - Your wallet - diff --git a/components/resources/brave_components_strings.grd b/components/resources/brave_components_strings.grd new file mode 100644 index 000000000000..7d84a2d045ac --- /dev/null +++ b/components/resources/brave_components_strings.grd @@ -0,0 +1,357 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Ads Blocked + Trackers Blocked + HTTPS Upgrades + Estimated Time Saved + Thumb Removed. + Undo + Restore All + second + seconds + minute + minutes + hour + hours + day + days + Photo by + Edit Preferences + View and Manage Bookmarks + View your browsing history + + + + Learn more + Done + Search settings + This is a + Private Window + Brave doesn’t remember what you do in a Private Window. Sites you visit won't show up in your history, and cookies vanish when you’re done. Private Windows don’t make you completely anonymous online, though. + Learn more + Private Window with Tor + Brave never remembers what you do in a Private Window. With Tor, your browsing is also hidden from your ISP or employer, and your IP address is hidden from the sites you visit. + Learn more about Private Windows with Tor + Search Privately with + DuckDuckGo + With private search, Brave will use DuckDuckGo for searches in Private Windows. DuckDuckGo doesn’t track your search history, so you can search privately. + In Private Windows with Tor, DuckDuckGo is the default search engine. Some of the other popular search engines are harder to use with Tor. DuckDuckGo doesn’t track your search history; with Tor, they don’t even know your IP address. + Search with DuckDuckGo + Make Private Windows much more private + This Private Window is much more private + with Tor + Tor hides your IP address from the sites you visit, by routing your browsing through several Tor servers before it reaches your destination. These connections are encrypted, so your ISP or employer can’t see which sites you’re visiting either. Tor can slow down browsing and some sites might not work at all. + Using Private Windows only changes what Brave does on your device — it doesn't change anyone else's behavior. Tor hides your IP address from the sites you visit, and hides the sites you visit from your ISP or your employer. Open a Private Window with Tor from the menu, or with {{ key }}. + Learn more about Tor in Brave + + + Total Ads Blocked: + Regional Ad Block: + Enabled + Disabled + + + Welcome to Brave + Brave is so much more than a browser. Let's show you how to make the most of it. + Let's go + Enable Brave Rewards + Brave Rewards is a new way of thinking about how the web works. Get rewarded for viewing privacy-respecting ads, and support your favorite content creators while you’re at it. + Enable Rewards + Import from another browser + Brave makes it easy to setup your usual environment by importing bookmarks and settings from other browsers installed on your computer. + Import Now + Manage your shield settings + Adjust and monitor your level of protection by clicking the Brave logo in the toolbar. Manage your global shield settings in the preferences panel. + Shield Settings + Customize your preferences + Tabs, appearance, extensions and history setting can be configured in the preferences panel. You might even find a dark theme in there ;) + Preferences + Skip welcome tour + Next + Done + + + Ads + Earn tokens by viewing ads in Brave. Ads presented are based on your interests, as inferred from your browsing behavior. No personal data or browsing history ever leaves your browser. + Auto-Contribute + An automatic way to support publishers and content creators. Set a monthly payment and browse normally. The sites you visit receive your contributions automatically, based on your attention as measured by Brave. + + + Monthly Payment + Next contribution date + Supported sites + Tips + Tip content creators directly as you browse or give tips to videos and tweets that you ‘like’. You can also set up recurring monthly tips so you can support sites continuously. + + + Coming soon. + Reward creators for the content you love. + Your monthly payment gets distributed across the sites you visit. + Sites will appear as you browse + Total tips this month + Have you tipped your favorite content creator today? + Add Funds + Manage Funds + tokens + Minimum page time before logging a visit + Minimum visits for publisher relevancy + What should be allowed? + Allow contribution to non-verified sites + Allow contribution to videos + 1 visit + 5 visits + 10 visits + 5 seconds + 8 seconds + 1 minute + Enable ability to give tips on ‘Like’ posts + YouTube + Twitter + Tip on the spot as you find gems. + Send Tips on Twitter, YouTube, and more, to reward posts you ‘Like’. + {{balance}} BAT was recovered. Your wallet key has been verified and loaded successfully. + Wallet restored! + Please re-enter keys or try different keys. + Almost there… + Prove that you are human! + Hmmm…not quite. + The Brave Rewards server is not responding. We will fix this as soon as possible. + Uh oh! + Grant gone! + OK + Sorry, but this grant is already expired. + Ups, something is wrong! + Ok + We detect some problem, please try again later. + + + about + Accept + ©2016–2018 Brave Software. Brave is a registered trademark of Brave Software. Site names may be trademarks or registered trademarks of the site owner. + To protect your privacy, this Brave Rewards statement is not saved, recorded or logged anywhere other than on your device (this computer). It cannot be retrieved from Brave in the event of data loss on your device. + add funds + the FAQ + Reminder: The Brave Wallet is unidirectional and BAT flows to publisher sites. For more information about Brave Rewards, please visit + Show QR Code + Brave makes it easy to transfer funds from your existing crypto-currency wallet to your Brave BAT Wallet. + Add funds to your Brave wallet + Allow tips on + Amount + Get paid to view relevant ads that respect your privacy. + Ads + Support your favorite sites just by browsing – or tip a site any time you like. + Auto-Contribute + Brave Rewards + Creating wallet + Your attention is valuable. Earn by viewing privacy-respecting ads, and pay it forward to support content creators you love. + Yes, I'm In! + Get Rewarded for Browsing! + How it works... + Brave Rewards + Brave Verified Publishers + Cancel + Claim + Closing Balance + Contribute + Auto-Contribute Allocation + Copy + You’re currently sending {{currentDonation}} BAT to this site every month. + Date + Deposit + Deposits + Description + Drag and drop this logo onto the + target + Tip + Tip amount + Tip this site Monthly + Send a Tip… + Done + Set monthly tip + Download as PDF + Earnings from Ads + Enable Tips + Exclude this site + Total number of sites you excluded from Auto-Contribute: + expires on + for + Tokens not used by the expiration date will be automatically returned to the Brave User Growth Pool. + Grant Expiration Date + Grants + import + Include in Auto-Contribute + Make this monthly + Apr + August + December + February + January + July + June + March + May + November + October + September + A free token grant is available. + Free Token Grant + Currently no token grant is available. + No, thank you + Not enough tokens. Please + off + ok + on + One time + One-time Tips + Opening Balance + Payment + Payment made every {{day}}th day in each month. + Payment not made. + When your balance is not enough to cover the combined total of Auto-Contribute and your recurring tips, these payments are skipped for this period. + Please note: + Print + Ready to get started? + Yes I'm Ready + You can start with the + Recovery Key + Recurring + Monthly Tips + Monthly Tips + remove + Restore + Restore All + Backup your Wallet + Keep this recovery key safe. You can always use this key to get your wallet back if something happens to your browser or computer. But make sure to protect it — anyone who gets this key could steal your wallet. It's probably safest to write it down on a piece of paper, or wherever else you keep important info. + You can support this site by sending a tip. It’s a way of thanking them for making great content. Content creators get paid for their tips during the first week of each calendar month. + If you like, you can schedule monthly tips to support this site on a continuous basis. + Auto-Contribute + Attention + Attention + You’re currently supporting + With your old browser, you paid to browse the web by viewing ads with your valuable attention. You spent your valuable time downloading invasive ad technology that transmited your valuable private data to advertisers — + without your consent. + Today, Brave welcomes you to the new internet. + One where your time is valued, your personal data is kept private, and you actually get paid for your attention. + Sadly, no tokens yet. + 3 ways to fill your wallet: + You can add funds. + You can earn tokens from viewing ads. + Occasionally, you'll be offered free token grants from Brave. Be sure to keep an eye out for the alert! + Get Rewarded for Browsing! + Earn tokens for your attention to ads and pay it forward to support content creators you value! + Add, withdraw and manage funds at + Your Brave wallet is managed by + Brave Rewards is built on the Basic Attention Token. Learn more about BAT + here + Restore your Wallet + Use your recovery key to restore your wallet. Restoring with a recovery key will replace your current wallet. Make sure you empty or back up your current wallet before restoring. + Enter your recovery key or + Rewards Summary + Why Brave Rewards? + Save as File + See all {{numItems}} items + See all {{numSites}} sites + Send my Tip + Send my Tip + Settings + site + sites + Thank you + Tip on like + Basic Attention Token (BAT) + BitCoin (BTC) + Ethereum (ETH) + LiteCoin (LTC) + Token Grants Claimed + tokens + Total + Transactions + This enables both ads and automatic contributions. You can turn them on or off separately at any time. + Activate Rewards + Type + Brave Verified Publisher + View Monthly Statement for Details + Wallet Activity + Wallet Address + wallet balance + Try again + Wallet creation failed + Please check your internet connection. + Welcome! + Start Earning Now! + Join Rewards + You can now earn tokens for watching privacy-respecting ads. + Get paid for viewing ads and pay it forward to support your favorite content creators. + Check out what’s improved + Learn More + We’ve given Brave Payments a big upgrade. + Get ready to experience the next Internet. + Why Brave Rewards? + With your old browser, you paid to browse the web by viewing ads with your valuable attention. You spent your valuable time downloading invasive ad technology that transmitted your valuable private data to advertisers — without your consent. + Today, Brave welcomes you to the new Internet. One where your time is valued, your personal data is kept private, and you actually get paid for your attention. + Your wallet + + + diff --git a/components/test/brave_rewards/donate/utils_test.ts b/components/test/brave_rewards/donate/utils_test.ts index f332cb038e3e..26aa4b10817a 100644 --- a/components/test/brave_rewards/donate/utils_test.ts +++ b/components/test/brave_rewards/donate/utils_test.ts @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ -import { convertBalance, convertProbiToFixed } from '../../../brave_rewards/donate/utils' +import { convertBalance, convertProbiToFixed } from '../../../brave_rewards/resources/donate/utils' describe('Rewards Panel extension - Utils', () => { describe('convertBalance', () => { diff --git a/components/test/brave_rewards/extension/brave_rewards/utils_test.ts b/components/test/brave_rewards/extension/brave_rewards/utils_test.ts index cab6ebfc3bf3..f86602af5608 100644 --- a/components/test/brave_rewards/extension/brave_rewards/utils_test.ts +++ b/components/test/brave_rewards/extension/brave_rewards/utils_test.ts @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ -import { convertBalance, convertProbiToFixed } from '../../../../brave_rewards/extension/brave_rewards/utils' +import { convertBalance, convertProbiToFixed } from '../../../../brave_rewards/resources/extension/brave_rewards/utils' describe('Rewards Panel extension - Utils', () => { describe('convertBalance', () => { diff --git a/components/test/brave_rewards/ui/actions/rewards_actions_test.ts b/components/test/brave_rewards/ui/actions/rewards_actions_test.ts index c8fdb0c85dd1..a61c845c43be 100644 --- a/components/test/brave_rewards/ui/actions/rewards_actions_test.ts +++ b/components/test/brave_rewards/ui/actions/rewards_actions_test.ts @@ -2,8 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ -import { types } from '../../../../brave_rewards/ui/constants/rewards_types' -import * as actions from '../../../../brave_rewards/ui/actions/rewards_actions' +import { types } from '../../../../brave_rewards/resources/ui/constants/rewards_types' +import * as actions from '../../../../brave_rewards/resources/ui/actions/rewards_actions' describe('rewards_actions', () => { it('createWallet', () => { diff --git a/components/test/brave_rewards/ui/components/app_test.tsx b/components/test/brave_rewards/ui/components/app_test.tsx index 82c43819c04d..a207b83817f3 100644 --- a/components/test/brave_rewards/ui/components/app_test.tsx +++ b/components/test/brave_rewards/ui/components/app_test.tsx @@ -4,13 +4,13 @@ import * as React from 'react' import { shallow } from 'enzyme' -import { types } from '../../../../brave_rewards/ui/constants/rewards_types' +import { types } from '../../../../brave_rewards/resources/ui/constants/rewards_types' import { rewardsInitialState } from '../../../testData' import { App, mapStateToProps, mapDispatchToProps -} from '../../../../brave_rewards/ui/components/app' +} from '../../../../brave_rewards/resources/ui/components/app' describe('rewardsPage component', () => { describe('mapStateToProps', () => { diff --git a/components/test/brave_rewards/ui/reducers/index_test.ts b/components/test/brave_rewards/ui/reducers/index_test.ts index ebb60214ec95..df102affc0e2 100644 --- a/components/test/brave_rewards/ui/reducers/index_test.ts +++ b/components/test/brave_rewards/ui/reducers/index_test.ts @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ -import reducers from '../../../../brave_rewards/ui/reducers/index' +import reducers from '../../../../brave_rewards/resources/ui/reducers/index' import { rewardsInitialState } from '../../../testData' describe('rewards reducers test', () => { diff --git a/components/test/brave_rewards/ui/reducers/wallet_reducer_test.ts b/components/test/brave_rewards/ui/reducers/wallet_reducer_test.ts index 73cef62b88af..9f1206da762c 100644 --- a/components/test/brave_rewards/ui/reducers/wallet_reducer_test.ts +++ b/components/test/brave_rewards/ui/reducers/wallet_reducer_test.ts @@ -3,10 +3,10 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ /* global chrome */ -import reducers from '../../../../brave_rewards/ui/reducers/index' -import * as actions from '../../../../brave_rewards/ui/actions/rewards_actions' -import { types } from '../../../../brave_rewards/ui/constants/rewards_types' -import { defaultState } from '../../../../brave_rewards/ui/storage' +import reducers from '../../../../brave_rewards/resources/ui/reducers/index' +import * as actions from '../../../../brave_rewards/resources/ui/actions/rewards_actions' +import { types } from '../../../../brave_rewards/resources/ui/constants/rewards_types' +import { defaultState } from '../../../../brave_rewards/resources/ui/storage' describe('wallet reducer', () => { const constantDate = new Date('2018-01-01T12:00:00') diff --git a/components/test/brave_rewards/ui/utils_test.ts b/components/test/brave_rewards/ui/utils_test.ts index 7d74f8fab864..5ee58a263b09 100644 --- a/components/test/brave_rewards/ui/utils_test.ts +++ b/components/test/brave_rewards/ui/utils_test.ts @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ -import { convertBalance, formatConverted, convertProbiToFixed } from '../../../brave_rewards/ui/utils' +import { convertBalance, formatConverted, convertProbiToFixed } from '../../../brave_rewards/resources/ui/utils' describe('Rewards Settings - Utils', () => { describe('convertBalance', () => { diff --git a/components/webpack/dev.config.js b/components/webpack/dev.config.js index 00f93c4f2ba2..efd6a5a2fa05 100644 --- a/components/webpack/dev.config.js +++ b/components/webpack/dev.config.js @@ -7,13 +7,13 @@ module.exports = { entry: { brave_adblock: path.join(__dirname, '../brave_adblock_ui/brave_adblock'), brave_new_tab: path.join(__dirname, '../brave_new_tab_ui/brave_new_tab'), - brave_rewards: path.join(__dirname, '../brave_rewards/ui/brave_rewards'), + brave_rewards: path.join(__dirname, '../brave_rewards/resources/ui/brave_rewards'), brave_welcome: path.join(__dirname, '../brave_welcome_ui/brave_welcome'), brave_webtorrent: path.join(__dirname, '../brave_webtorrent/extension/brave_webtorrent'), brave_webtorrent_background: path.join(__dirname, '../brave_webtorrent/extension/background'), - brave_rewards_panel: path.join(__dirname, '../brave_rewards/extension/brave_rewards/brave_rewards_panel'), - brave_rewards_panel_background: path.join(__dirname, '../brave_rewards/extension/brave_rewards/background'), - brave_donate: path.join(__dirname, '../brave_rewards/donate/brave_donate'), + brave_rewards_panel: path.join(__dirname, '../brave_rewards/resources/extension/brave_rewards/brave_rewards_panel'), + brave_rewards_panel_background: path.join(__dirname, '../brave_rewards/resources/extension/brave_rewards/background'), + brave_donate: path.join(__dirname, '../brave_rewards/resources/donate/brave_donate'), }, output: { path: process.env.TARGET_GEN_DIR, diff --git a/components/webpack/prod.config.js b/components/webpack/prod.config.js index 3be0dcfd4a86..36f5713a1ee7 100644 --- a/components/webpack/prod.config.js +++ b/components/webpack/prod.config.js @@ -7,13 +7,13 @@ module.exports = { entry: { brave_adblock: path.join(__dirname, '../brave_adblock_ui/brave_adblock'), brave_new_tab: path.join(__dirname, '../brave_new_tab_ui/brave_new_tab'), - brave_rewards: path.join(__dirname, '../brave_rewards/ui/brave_rewards'), + brave_rewards: path.join(__dirname, '../brave_rewards/resources/ui/brave_rewards'), brave_welcome: path.join(__dirname, '../brave_welcome_ui/brave_welcome'), brave_webtorrent: path.join(__dirname, '../brave_webtorrent/extension/brave_webtorrent'), brave_webtorrent_background: path.join(__dirname, '../brave_webtorrent/extension/background'), - brave_rewards_panel: path.join(__dirname, '../brave_rewards/extension/brave_rewards/brave_rewards_panel'), - brave_rewards_panel_background: path.join(__dirname, '../brave_rewards/extension/brave_rewards/background'), - brave_donate: path.join(__dirname, '../brave_rewards/donate/brave_donate'), + brave_rewards_panel: path.join(__dirname, '../brave_rewards/resources/extension/brave_rewards/brave_rewards_panel'), + brave_rewards_panel_background: path.join(__dirname, '../brave_rewards/resources/extension/brave_rewards/background'), + brave_donate: path.join(__dirname, '../brave_rewards/resources/donate/brave_donate'), }, output: { path: process.env.TARGET_GEN_DIR, diff --git a/patches/chrome-BUILD.gn.patch b/patches/chrome-BUILD.gn.patch index a01461038337..8c1a6127e823 100644 --- a/patches/chrome-BUILD.gn.patch +++ b/patches/chrome-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn -index 4865a69fe984b428c4b6591d11d778e6c2669d2d..49e92b60ff1cafb14cccf620af09cd517e212f38 100644 +index 4865a69fe984b428c4b6591d11d778e6c2669d2d..2546f30a58ae99bf7754ba46a20bdadf96bbdd4e 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -181,6 +181,10 @@ if (!is_android && !is_mac) { @@ -123,7 +123,15 @@ index 4865a69fe984b428c4b6591d11d778e6c2669d2d..49e92b60ff1cafb14cccf620af09cd51 ] output = "$target_gen_dir/chrome_exe_version.rc" } -@@ -1775,6 +1799,8 @@ if (is_android) { +@@ -1557,6 +1581,7 @@ group("resources") { + "//chrome/browser:resources", + "//chrome/common:resources", + "//chrome/renderer:resources", ++ "//brave:resources", + ] + } + +@@ -1775,6 +1800,8 @@ if (is_android) { "app/android/chrome_main_delegate_android.h", "app/chrome_main_delegate.cc", "app/chrome_main_delegate.h", From 0e21779faf00c19fe0cbb03ad48c00ebfdc2eb7d Mon Sep 17 00:00:00 2001 From: bridiver Date: Wed, 24 Oct 2018 12:10:47 -0700 Subject: [PATCH 2/3] remap strings file for transifex --- script/lib/transifex.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script/lib/transifex.py b/script/lib/transifex.py index d4bda3bd29c7..a8d7dfee916f 100644 --- a/script/lib/transifex.py +++ b/script/lib/transifex.py @@ -16,7 +16,9 @@ def transifex_name_from_filename(source_file_path, filename): ext = os.path.splitext(source_file_path)[1] - if ext == '.grd': + if (filename == 'brave_components_strings.grd') + return 'brave_components_resources.grd' + elif ext == '.grd': return filename elif 'brave_rewards' in source_file_path: return 'rewards_extension' From c99528203f4b14953ea7f8cad5133ed5d7289abd Mon Sep 17 00:00:00 2001 From: bridiver Date: Wed, 24 Oct 2018 13:12:24 -0700 Subject: [PATCH 3/3] output pak file for translations - this should be per-language, but this is what brave_components_resources did so just sticking with that for now --- brave_paks.gni | 2 ++ components/resources/BUILD.gn | 1 + components/resources/brave_components_strings.grd | 1 + 3 files changed, 4 insertions(+) diff --git a/brave_paks.gni b/brave_paks.gni index 058828201ef4..107982a6c842 100644 --- a/brave_paks.gni +++ b/brave_paks.gni @@ -58,6 +58,7 @@ template("brave_extra_paks") { "$root_gen_dir/brave/brave_unscaled_resources.pak", "$root_gen_dir/brave/browser/resources/brave_settings_resources.pak", "$root_gen_dir/components/brave_components_resources.pak", + "$root_gen_dir/components/brave_components_strings.pak", "$root_gen_dir/brave/components/brave_rewards/resources/brave_rewards_resources.pak", "$root_gen_dir/brave/components/brave_rewards/resources/extension/brave_rewards_extension_resources.pak", "$target_gen_dir/browser/resources/brave_extension.pak", @@ -71,6 +72,7 @@ template("brave_extra_paks") { "//brave/components/brave_rewards/resources/extension:resources", "//brave/components/brave_webtorrent:resources", "//brave/components/resources", + "//brave/components/resources:strings", "//brave/browser/resources:brave_extension_grit", "//brave/browser/resources:brave_settings_resources", "//brave/common/extensions/api" diff --git a/components/resources/BUILD.gn b/components/resources/BUILD.gn index 3659c6b6b210..66b4cad70c7c 100644 --- a/components/resources/BUILD.gn +++ b/components/resources/BUILD.gn @@ -38,6 +38,7 @@ grit("strings") { outputs = [ "grit/brave_components_strings.h", + "brave_components_strings.pak", ] output_dir = "$root_gen_dir/components" diff --git a/components/resources/brave_components_strings.grd b/components/resources/brave_components_strings.grd index 7d84a2d045ac..56ce74ebf78a 100644 --- a/components/resources/brave_components_strings.grd +++ b/components/resources/brave_components_strings.grd @@ -4,6 +4,7 @@ +