browser: provide localized string from resourcebundle
This commit is contained in:
parent
cb5d79e0df
commit
1585a7a0ad
3 changed files with 9 additions and 29 deletions
32
atom.gyp
32
atom.gyp
|
@ -121,10 +121,6 @@
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
],
|
],
|
||||||
}, { # OS=="mac"
|
|
||||||
'dependencies': [
|
|
||||||
'make_locale_paks',
|
|
||||||
],
|
|
||||||
}], # OS!="mac"
|
}], # OS!="mac"
|
||||||
['OS=="win"', {
|
['OS=="win"', {
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
|
@ -155,6 +151,7 @@
|
||||||
'destination': '<(PRODUCT_DIR)',
|
'destination': '<(PRODUCT_DIR)',
|
||||||
'files': [
|
'files': [
|
||||||
'<@(copied_libraries)',
|
'<@(copied_libraries)',
|
||||||
|
'<(libchromiumcontent_dir)/locales',
|
||||||
'<(libchromiumcontent_dir)/libEGL.dll',
|
'<(libchromiumcontent_dir)/libEGL.dll',
|
||||||
'<(libchromiumcontent_dir)/libGLESv2.dll',
|
'<(libchromiumcontent_dir)/libGLESv2.dll',
|
||||||
'<(libchromiumcontent_dir)/icudtl.dat',
|
'<(libchromiumcontent_dir)/icudtl.dat',
|
||||||
|
@ -203,6 +200,7 @@
|
||||||
'destination': '<(PRODUCT_DIR)',
|
'destination': '<(PRODUCT_DIR)',
|
||||||
'files': [
|
'files': [
|
||||||
'<@(copied_libraries)',
|
'<@(copied_libraries)',
|
||||||
|
'<(libchromiumcontent_dir)/locales',
|
||||||
'<(libchromiumcontent_dir)/icudtl.dat',
|
'<(libchromiumcontent_dir)/icudtl.dat',
|
||||||
'<(libchromiumcontent_dir)/content_shell.pak',
|
'<(libchromiumcontent_dir)/content_shell.pak',
|
||||||
'<(libchromiumcontent_dir)/natives_blob.bin',
|
'<(libchromiumcontent_dir)/natives_blob.bin',
|
||||||
|
@ -434,6 +432,7 @@
|
||||||
'mac_bundle': 1,
|
'mac_bundle': 1,
|
||||||
'mac_bundle_resources': [
|
'mac_bundle_resources': [
|
||||||
'atom/common/resources/mac/MainMenu.xib',
|
'atom/common/resources/mac/MainMenu.xib',
|
||||||
|
'<(libchromiumcontent_dir)/locales',
|
||||||
'<(libchromiumcontent_dir)/content_shell.pak',
|
'<(libchromiumcontent_dir)/content_shell.pak',
|
||||||
'<(libchromiumcontent_dir)/icudtl.dat',
|
'<(libchromiumcontent_dir)/icudtl.dat',
|
||||||
'<(libchromiumcontent_dir)/natives_blob.bin',
|
'<(libchromiumcontent_dir)/natives_blob.bin',
|
||||||
|
@ -546,31 +545,6 @@
|
||||||
},
|
},
|
||||||
}, # target helper
|
}, # target helper
|
||||||
],
|
],
|
||||||
}, { # OS=="mac"
|
|
||||||
'targets': [
|
|
||||||
{
|
|
||||||
'target_name': 'make_locale_paks',
|
|
||||||
'type': 'none',
|
|
||||||
'actions': [
|
|
||||||
{
|
|
||||||
'action_name': 'Make Empty Paks',
|
|
||||||
'inputs': [
|
|
||||||
'tools/make_locale_paks.py',
|
|
||||||
],
|
|
||||||
'outputs': [
|
|
||||||
'<(PRODUCT_DIR)/locales'
|
|
||||||
],
|
|
||||||
'action': [
|
|
||||||
'python',
|
|
||||||
'tools/make_locale_paks.py',
|
|
||||||
'<(PRODUCT_DIR)',
|
|
||||||
'<@(locales)',
|
|
||||||
],
|
|
||||||
'msvs_cygwin_shell': 0,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}], # OS!="mac"
|
}], # OS!="mac"
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "content/public/common/user_agent.h"
|
#include "content/public/common/user_agent.h"
|
||||||
#include "ppapi/shared_impl/ppapi_permissions.h"
|
#include "ppapi/shared_impl/ppapi_permissions.h"
|
||||||
#include "third_party/widevine/cdm/stub/widevine_cdm_version.h"
|
#include "third_party/widevine/cdm/stub/widevine_cdm_version.h"
|
||||||
|
#include "ui/base/l10n/l10n_util.h"
|
||||||
#include "url/url_constants.h"
|
#include "url/url_constants.h"
|
||||||
|
|
||||||
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
|
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
|
||||||
|
@ -175,6 +176,10 @@ std::string AtomContentClient::GetUserAgent() const {
|
||||||
ATOM_PRODUCT_NAME "/" ATOM_VERSION_STRING);
|
ATOM_PRODUCT_NAME "/" ATOM_VERSION_STRING);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
base::string16 AtomContentClient::GetLocalizedString(int message_id) const {
|
||||||
|
return l10n_util::GetStringUTF16(message_id);
|
||||||
|
}
|
||||||
|
|
||||||
void AtomContentClient::AddAdditionalSchemes(
|
void AtomContentClient::AddAdditionalSchemes(
|
||||||
std::vector<url::SchemeWithType>* standard_schemes,
|
std::vector<url::SchemeWithType>* standard_schemes,
|
||||||
std::vector<std::string>* savable_schemes) {
|
std::vector<std::string>* savable_schemes) {
|
||||||
|
|
|
@ -22,6 +22,7 @@ class AtomContentClient : public brightray::ContentClient {
|
||||||
// content::ContentClient:
|
// content::ContentClient:
|
||||||
std::string GetProduct() const override;
|
std::string GetProduct() const override;
|
||||||
std::string GetUserAgent() const override;
|
std::string GetUserAgent() const override;
|
||||||
|
base::string16 GetLocalizedString(int message_id) const override;
|
||||||
void AddAdditionalSchemes(
|
void AddAdditionalSchemes(
|
||||||
std::vector<url::SchemeWithType>* standard_schemes,
|
std::vector<url::SchemeWithType>* standard_schemes,
|
||||||
std::vector<std::string>* savable_schemes) override;
|
std::vector<std::string>* savable_schemes) override;
|
||||||
|
|
Loading…
Reference in a new issue