From f45e8110ee20ff89719bb9c9d3940a0c05a014fa Mon Sep 17 00:00:00 2001 From: hyun lee Date: Tue, 1 Oct 2013 15:09:31 +0900 Subject: [PATCH] Apply string localization Change-Id: I52a7173376ef5269aea40093ec692af703e43cd7 Signed-off-by: hyun lee --- src/controls/FWebCtrl_WebImpl.cpp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/controls/FWebCtrl_WebImpl.cpp b/src/controls/FWebCtrl_WebImpl.cpp index 81e8a04..0e4e6f4 100755 --- a/src/controls/FWebCtrl_WebImpl.cpp +++ b/src/controls/FWebCtrl_WebImpl.cpp @@ -80,6 +80,7 @@ #include #include #include +#include #include #include #include @@ -505,9 +506,12 @@ OnApplicationCachePermissionRequested(Evas_Object* pView, Ewk_Security_Origin* p _WebImpl* pImpl = reinterpret_cast< _WebImpl* >(pUserData); SysAssertf(pImpl , "Failed to request"); + _SystemResource* pSysResource = _SystemResource::GetInstance(); + SysAssertf(pSysResource != null, "Failed to get _SystemResource instance"); + const char* pHostName = ewk_security_origin_host_get(pSecOrigin); String msg; - result r = msg.Format(256, L"Allow %s to use offline application cache?", pHostName); + result r = msg.Format(256, pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BODY_P1SS_HP2SS_IS_REQUESTING_PERMISSION_TO_STORE_DATA_ON_YOUR_DEVICE_FOR_OFFLINE_USE").GetPointer(), _StringConverter::CopyToCharArrayN(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_BODY_THIS_WEBPAGE")), pHostName); SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, EINA_FALSE, r, "[%s] Propagating.", GetErrorMessage(r)); r = pImpl->ShowUserConfirmPopup(USER_CONFIRM_APP_CACHE, pView, msg); @@ -523,9 +527,12 @@ OnIndexedDatabaseQuotaExceeded(Evas_Object* pView, Ewk_Security_Origin* pSecOrig _WebImpl* pImpl = reinterpret_cast< _WebImpl* >(pUserData); SysAssertf(pImpl , "Failed to request"); + _SystemResource* pSysResource = _SystemResource::GetInstance(); + SysAssertf(pSysResource != null, "Failed to get _SystemResource instance"); + const char* pHostName = ewk_security_origin_host_get(pSecOrigin); String msg; - result r = msg.Format(512, L"%s Used %lld of storage. Allow %s to use upto 2GB of indexed db?", pHostName, currentQuota, pHostName); + result r = msg.Format(512, pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BODY_P1SS_HP2SS_IS_ATTEMPTING_TO_STORE_A_LARGE_AMOUNT_OF_DATA_ON_YOUR_DEVICE_FOR_OFFLINE_USE").GetPointer(), _StringConverter::CopyToCharArrayN(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_BODY_THIS_WEBPAGE")), pHostName); SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, EINA_FALSE, r, "[%s] Propagating.", GetErrorMessage(r)); r = pImpl->ShowUserConfirmPopup(USER_CONFIRM_INDEXED_DB_QUOTA_EXCEDED, pView, msg); @@ -541,9 +548,12 @@ OnDatabaseQuotaExceeded(Evas_Object* pView, Ewk_Security_Origin* pSecOrigin, con _WebImpl* pImpl = reinterpret_cast< _WebImpl* >(pUserData); SysAssertf(pImpl , "Failed to request"); + _SystemResource* pSysResource = _SystemResource::GetInstance(); + SysAssertf(pSysResource != null, "Failed to get _SystemResource instance"); + const char* pHostName = ewk_security_origin_host_get(pSecOrigin); String msg; - result r = msg.Format(512, L"Allow %s to open %s use upto %lld of web database?", pHostName, database_name, expectedQuota); + result r = msg.Format(512, pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BODY_P1SS_HP2SS_IS_ATTEMPTING_TO_STORE_A_LARGE_AMOUNT_OF_DATA_ON_YOUR_DEVICE_FOR_OFFLINE_USE").GetPointer(), _StringConverter::CopyToCharArrayN(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_BODY_THIS_WEBPAGE")), pHostName); SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, EINA_FALSE, r, "[%s] Propagating.", GetErrorMessage(r)); r = pImpl->ShowUserConfirmPopup(USER_CONFIRM_DB_QUOTA_EXCEDED, pView, msg); @@ -558,9 +568,12 @@ Eina_Bool OnLocalFileSystemQuotaExceeded(Evas_Object* pView, Ewk_Security_Origin _WebImpl* pImpl = reinterpret_cast< _WebImpl* >(pUserData); SysAssertf(pImpl , "Failed to request"); + _SystemResource* pSysResource = _SystemResource::GetInstance(); + SysAssertf(pSysResource != null, "Failed to get _SystemResource instance"); + const char* pHostName = ewk_security_origin_host_get(pSecOrigin); String msg; - result r = msg.Format(512, L"%s Used %lld of storgae. Allow %s to use upto 2GB of file system?", pHostName, currentQuota, pHostName); + result r = msg.Format(512, pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BODY_P1SS_HP2SS_IS_ATTEMPTING_TO_STORE_A_LARGE_AMOUNT_OF_DATA_ON_YOUR_DEVICE_FOR_OFFLINE_USE").GetPointer(), _StringConverter::CopyToCharArrayN(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_BODY_THIS_WEBPAGE")), pHostName); SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, EINA_FALSE, r, "[%s] Propagating.", GetErrorMessage(r)); r = pImpl->ShowUserConfirmPopup(USER_CONFIRM_LOCAL_FS_QUOTA_EXCEDED, pView, msg); -- 2.7.4