Changeset 91314 in vbox
- Timestamp:
- Sep 20, 2021 12:29:18 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 146975
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/VirtualBoxClientImpl.cpp
r91312 r91314 198 198 199 199 char szNlsPath[RTPATH_MAX]; 200 rc = RTPathAppPrivateNoArch(szNlsPath, sizeof(szNlsPath)); 201 if (RT_SUCCESS(rc)) 202 rc = RTPathAppend(szNlsPath, sizeof(szNlsPath), "nls" RTPATH_SLASH_STR "VirtualBoxAPI"); 203 204 vrc = mData.m_pVBoxTranslator->registerTranslation(szNlsPath, true, &mData.m_pTrComponent); 200 vrc = RTPathAppPrivateNoArch(szNlsPath, sizeof(szNlsPath)); 205 201 if (RT_SUCCESS(vrc)) 206 { 207 rc = i_reloadApiLanguage(); 208 if (SUCCEEDED(rc)) 209 i_registerEventListener(); /* for updates */ 202 vrc = RTPathAppend(szNlsPath, sizeof(szNlsPath), "nls" RTPATH_SLASH_STR "VirtualBoxAPI"); 203 204 if (RT_SUCCESS(vrc)) 205 { 206 vrc = mData.m_pVBoxTranslator->registerTranslation(szNlsPath, true, &mData.m_pTrComponent); 207 if (RT_SUCCESS(vrc)) 208 { 209 rc = i_reloadApiLanguage(); 210 if (SUCCEEDED(rc)) 211 i_registerEventListener(); /* for updates */ 212 else 213 LogRelFunc(("i_reloadApiLanguage failed: %Rhrc\n", rc)); 214 } 210 215 else 211 LogRelFunc((" i_reloadApiLanguage failed: %Rhrc\n",rc));216 LogRelFunc(("Register translation failed: %Rrc\n", vrc)); 212 217 } 213 218 else 214 LogRelFunc((" Register translationfailed: %Rrc\n", vrc));219 LogRelFunc(("Path constructing failed: %Rrc\n", vrc)); 215 220 #endif 216 221 /* Setting up the VBoxSVC watcher thread. If anything goes wrong here it -
trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
r91312 r91314 599 599 600 600 char szNlsPath[RTPATH_MAX]; 601 rc = RTPathAppPrivateNoArch(szNlsPath, sizeof(szNlsPath)); 602 if (RT_SUCCESS(rc)) 603 rc = RTPathAppend(szNlsPath, sizeof(szNlsPath), "nls" RTPATH_SLASH_STR "VirtualBoxAPI"); 604 605 int vrc = m->pVBoxTranslator->registerTranslation(szNlsPath, true, &m->pTrComponent); 601 int vrc = RTPathAppPrivateNoArch(szNlsPath, sizeof(szNlsPath)); 602 if (RT_SUCCESS(vrc)) 603 vrc = RTPathAppend(szNlsPath, sizeof(szNlsPath), "nls" RTPATH_SLASH_STR "VirtualBoxAPI"); 604 606 605 if (RT_SUCCESS(vrc)) 607 606 { 608 com::Utf8Str strLocale; 609 HRESULT hrc = m->pSystemProperties->getLanguageId(strLocale); 610 if (SUCCEEDED(hrc)) 607 vrc = m->pVBoxTranslator->registerTranslation(szNlsPath, true, &m->pTrComponent); 608 if (RT_SUCCESS(vrc)) 611 609 { 612 vrc = m->pVBoxTranslator->i_loadLanguage(strLocale.c_str()); 613 if (RT_FAILURE(vrc)) 610 com::Utf8Str strLocale; 611 HRESULT hrc = m->pSystemProperties->getLanguageId(strLocale); 612 if (SUCCEEDED(hrc)) 614 613 { 615 hrc = Global::vboxStatusCodeToCOM(vrc); 616 LogRel(("Load language failed (%Rhrc).\n", hrc)); 614 vrc = m->pVBoxTranslator->i_loadLanguage(strLocale.c_str()); 615 if (RT_FAILURE(vrc)) 616 { 617 hrc = Global::vboxStatusCodeToCOM(vrc); 618 LogRel(("Load language failed (%Rhrc).\n", hrc)); 619 } 620 } 621 else 622 { 623 LogRel(("Getting language settings failed (%Rhrc).\n", hrc)); 624 m->pVBoxTranslator->release(); 625 m->pVBoxTranslator = NULL; 626 m->pTrComponent = NULL; 617 627 } 618 628 } 619 629 else 620 630 { 621 LogRel(("Getting language settings failed (%Rhrc).\n", hrc)); 631 HRESULT hrc = Global::vboxStatusCodeToCOM(vrc); 632 LogRel(("Register translation failed (%Rhrc).\n", hrc)); 622 633 m->pVBoxTranslator->release(); 623 634 m->pVBoxTranslator = NULL; … … 628 639 { 629 640 HRESULT hrc = Global::vboxStatusCodeToCOM(vrc); 630 LogRel((" Register translationfailed (%Rhrc).\n", hrc));641 LogRel(("Path constructing failed (%Rhrc).\n", hrc)); 631 642 m->pVBoxTranslator->release(); 632 643 m->pVBoxTranslator = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.