diff --git a/dll/cpl/timedate/internettime.c b/dll/cpl/timedate/internettime.c index 88e95ae0f6e..c1ee0294b0f 100644 --- a/dll/cpl/timedate/internettime.c +++ b/dll/cpl/timedate/internettime.c @@ -11,6 +11,7 @@ #include DWORD WINAPI W32TimeSyncNow(LPCWSTR cmdline, UINT blocking, UINT flags); +SYNC_STATUS SyncStatus; static VOID CreateNTPServerList(HWND hwnd) @@ -89,7 +90,7 @@ CreateNTPServerList(HWND hwnd) /* Set the selected server in the registry */ static VOID -SetNTPServer(HWND hwnd) +SetNTPServer(HWND hwnd, BOOL bBeginUpdate) { HKEY hKey; HWND hList; @@ -97,6 +98,7 @@ SetNTPServer(HWND hwnd) WCHAR szSel[4]; LONG lRet; WCHAR buffer[256]; + WCHAR szFormat[BUFSIZE]; hList = GetDlgItem(hwnd, IDC_SERVERLIST); @@ -105,6 +107,15 @@ SetNTPServer(HWND hwnd) SendDlgItemMessageW(hwnd, IDC_SERVERLIST, WM_GETTEXT, _countof(buffer), (LPARAM)buffer); + /* If the condition is true that means the user wants to update (synchronize) the time */ + if (bBeginUpdate) + { + /* Inform the user that the synchronization is about to begin (depending on how reachable the NTP server is) */ + StringCchPrintfW(szFormat, _countof(szFormat), SyncStatus.szSyncWait, buffer); + SyncStatus.lpszSyncStatus = szFormat; + SetDlgItemTextW(hwnd, IDC_SUCSYNC, SyncStatus.lpszSyncStatus); + } + /* If there is new data entered then save it in the registry The same key name of "0" is used to store all user entered values */ @@ -177,6 +188,87 @@ EnableDialogText(HWND hwnd) EnableWindow(GetDlgItem(hwnd, IDC_NEXTSYNC), bChecked); } +static VOID +SyncNTPStatusInit(HWND hwnd) +{ + /* Initialize the Synchronization NTP status members */ + LoadStringW(hApplet, IDS_INETTIMEWELCOME, SyncStatus.szSyncInit, _countof(SyncStatus.szSyncInit)); + LoadStringW(hApplet, IDS_INETTIMESUCSYNC, SyncStatus.szSyncSuc, _countof(SyncStatus.szSyncSuc)); + LoadStringW(hApplet, IDS_INETTIMESYNCING, SyncStatus.szSyncWait, _countof(SyncStatus.szSyncWait)); + LoadStringW(hApplet, IDS_INETTIMEERROR, SyncStatus.szSyncErr, _countof(SyncStatus.szSyncErr)); + LoadStringW(hApplet, IDS_INETTIMESUCFILL, SyncStatus.szSyncType, _countof(SyncStatus.szSyncType)); + + /* + * TODO: XP's and Server 2003's timedate.cpl loads the last successful attempt of the NTP synchronization + * displaying the last time and date of the said sync. I have no idea how does timedate.cpl remember its last + * successful sync so for the time being, we will only load the initial remark string. + */ + SyncStatus.lpszSyncStatus = SyncStatus.szSyncInit; + SetDlgItemTextW(hwnd, IDC_SUCSYNC, SyncStatus.lpszSyncStatus); +} + +static VOID +UpdateNTPStatus(HWND hwnd, DWORD dwReason) +{ + WCHAR szFormat[BUFSIZE]; + WCHAR szNtpServerName[MAX_VALUE_NAME]; + WCHAR szLocalDate[BUFSIZE]; + WCHAR szLocalTime[BUFSIZE]; + HWND hDlgComboList; + + /* Retrieve the server NTP name from the edit box */ + hDlgComboList = GetDlgItem(hwnd, IDC_SERVERLIST); + SendMessageW(hDlgComboList, WM_GETTEXT, _countof(szNtpServerName), (LPARAM)szNtpServerName); + + /* Iterate over the case reasons so we can compute the exact status of the NTP synchronization */ + switch (dwReason) + { + /* The NTP time synchronization has completed successfully */ + case ERROR_SUCCESS: + { + /* Get the current date based on the locale identifier */ + GetDateFormatW(LOCALE_USER_DEFAULT, + DATE_SHORTDATE, + NULL, + NULL, + szLocalDate, + _countof(szLocalDate)); + + /* Get the current time based on the locale identifier */ + GetTimeFormatW(LOCALE_USER_DEFAULT, + TIME_NOSECONDS, + NULL, + NULL, + szLocalTime, + _countof(szLocalTime)); + + /* Format the resource sting with the given NTP server name and the current time data */ + StringCchPrintfW(szFormat, _countof(szFormat), SyncStatus.szSyncSuc, szNtpServerName, szLocalDate, szLocalTime); + SyncStatus.lpszSyncStatus = szFormat; + SetDlgItemTextW(hwnd, IDC_SUCSYNC, SyncStatus.lpszSyncStatus); + break; + } + + /* Empty field data has been caught -- simply tell the user to write the NTP name to continue */ + case ERROR_INVALID_DATA: + { + SyncStatus.lpszSyncStatus = SyncStatus.szSyncType; + SetDlgItemTextW(hwnd, IDC_SUCSYNC, SyncStatus.lpszSyncStatus); + DPRINT("UpdateNTPStatus(): The user didn't submit any NTP server name!\n"); + break; + } + + /* General failure -- the NTP synchronization has failed for whatever reason */ + default: + { + StringCchPrintfW(szFormat, _countof(szFormat), SyncStatus.szSyncErr, szNtpServerName); + SyncStatus.lpszSyncStatus = szFormat; + SetDlgItemTextW(hwnd, IDC_SUCSYNC, SyncStatus.lpszSyncStatus); + DPRINT("UpdateNTPStatus(): Failed to synchronize the time! (Error: %lu).\n", dwReason); + break; + } + } +} static VOID GetSyncSetting(HWND hwnd) @@ -216,6 +308,7 @@ OnInitDialog(HWND hwnd) GetSyncSetting(hwnd); EnableDialogText(hwnd); CreateNTPServerList(hwnd); + SyncNTPStatusInit(hwnd); } static VOID @@ -273,13 +366,10 @@ InetTimePageProc(HWND hwndDlg, { DWORD dwError; - SetNTPServer(hwndDlg); + SetNTPServer(hwndDlg, TRUE); dwError = W32TimeSyncNow(L"localhost", 0, 0); - if (dwError != ERROR_SUCCESS) - { - DPRINT("Failed to synchronize the time! Invalid NTP server name has been caught or no server name could be found (Error: %lu).\n", dwError); - } + UpdateNTPStatus(hwndDlg, dwError); } break; @@ -313,7 +403,7 @@ InetTimePageProc(HWND hwndDlg, switch (lpnm->code) { case PSN_APPLY: - SetNTPServer(hwndDlg); + SetNTPServer(hwndDlg, FALSE); if (SendDlgItemMessageW(hwndDlg, IDC_AUTOSYNC, BM_GETCHECK, 0, 0) == BST_CHECKED) OnAutoSync(TRUE); diff --git a/dll/cpl/timedate/lang/bg-BG.rc b/dll/cpl/timedate/lang/bg-BG.rc index 2ae40c9ed15..98187f865e2 100644 --- a/dll/cpl/timedate/lang/bg-BG.rc +++ b/dll/cpl/timedate/lang/bg-BG.rc @@ -54,4 +54,6 @@ BEGIN IDS_INETTIMENEXTSYNC "Следващо сверяване: %s at %s" IDS_INETTIMESYNCING "Почакайте, докато РеактОС сверява времето с %s" IDS_INETTIMEERROR "Възникна грешка при сверяване на времето %s" + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/cs-CZ.rc b/dll/cpl/timedate/lang/cs-CZ.rc index f4470649051..acc05cb7acb 100644 --- a/dll/cpl/timedate/lang/cs-CZ.rc +++ b/dll/cpl/timedate/lang/cs-CZ.rc @@ -54,4 +54,6 @@ BEGIN IDS_INETTIMENEXTSYNC "Další synchronizace: %s v %s" IDS_INETTIMESYNCING "Prosím čekejte, zatímco systém ReactOS synchronizuje čas s %s" IDS_INETTIMEERROR "Při synchronizaci času s %s nastala chyba" + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/da-DK.rc b/dll/cpl/timedate/lang/da-DK.rc index 59c0d5472bc..47f7207be07 100644 --- a/dll/cpl/timedate/lang/da-DK.rc +++ b/dll/cpl/timedate/lang/da-DK.rc @@ -54,4 +54,6 @@ BEGIN IDS_INETTIMENEXTSYNC "Next synchronization: %s at %s" IDS_INETTIMESYNCING "Please wait while ReactOS synchronizes the time with %s" IDS_INETTIMEERROR "An error occured while ReactOS was synchronizing with %s" + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/de-DE.rc b/dll/cpl/timedate/lang/de-DE.rc index 7afc80ecfcc..29936291053 100644 --- a/dll/cpl/timedate/lang/de-DE.rc +++ b/dll/cpl/timedate/lang/de-DE.rc @@ -54,4 +54,6 @@ BEGIN IDS_INETTIMENEXTSYNC "Nächste Synchronisierung am %s um %s." IDS_INETTIMESYNCING "Bitte warten Sie, während ReactOS die Zeit mit %s synchronisiert." IDS_INETTIMEERROR "Ein Fehler trat beim Synchronisieren mit %s auf." + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/el-GR.rc b/dll/cpl/timedate/lang/el-GR.rc index abc8550b662..ae402546fd4 100644 --- a/dll/cpl/timedate/lang/el-GR.rc +++ b/dll/cpl/timedate/lang/el-GR.rc @@ -54,4 +54,6 @@ BEGIN IDS_INETTIMENEXTSYNC "Next synchronization: %s at %s" IDS_INETTIMESYNCING "Please wait while ReactOS synchronizes the time with %s" IDS_INETTIMEERROR "An error occured while ReactOS was synchronizing with %s" + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/en-US.rc b/dll/cpl/timedate/lang/en-US.rc index 59e83fee61b..84fd7fdfbb7 100644 --- a/dll/cpl/timedate/lang/en-US.rc +++ b/dll/cpl/timedate/lang/en-US.rc @@ -54,4 +54,6 @@ BEGIN IDS_INETTIMENEXTSYNC "Next synchronization: %s at %s" IDS_INETTIMESYNCING "Please wait while ReactOS synchronizes the time with %s" IDS_INETTIMEERROR "An error occured while ReactOS was synchronizing with %s" + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/es-ES.rc b/dll/cpl/timedate/lang/es-ES.rc index bd5a908058d..097bfce12ef 100644 --- a/dll/cpl/timedate/lang/es-ES.rc +++ b/dll/cpl/timedate/lang/es-ES.rc @@ -54,4 +54,6 @@ BEGIN IDS_INETTIMENEXTSYNC "Próxima sincronización: %s a las %s" IDS_INETTIMESYNCING "Por favor espere mientras ReactOS sincroniza la hora con %s" IDS_INETTIMEERROR "Ha ocurrido un error mientras ReactOS se sincronizaba con %s" + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/et-EE.rc b/dll/cpl/timedate/lang/et-EE.rc index b1c465cb1cc..49b1d41c5d9 100644 --- a/dll/cpl/timedate/lang/et-EE.rc +++ b/dll/cpl/timedate/lang/et-EE.rc @@ -61,4 +61,6 @@ BEGIN IDS_INETTIMENEXTSYNC "Next synchronization: %s at %s" IDS_INETTIMESYNCING "Palun oodake, kuni ReactOS sünkroonib serveriga %s" IDS_INETTIMEERROR "ReactOSi sünkroonimisel serveriga %s ilmnes tõrge." + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/eu-ES.rc b/dll/cpl/timedate/lang/eu-ES.rc index 1b7a482b3e5..1ada2669c3b 100644 --- a/dll/cpl/timedate/lang/eu-ES.rc +++ b/dll/cpl/timedate/lang/eu-ES.rc @@ -54,4 +54,6 @@ BEGIN IDS_INETTIMENEXTSYNC "Hurrengo sinkronizatzea: %s-n %s-etan" IDS_INETTIMESYNCING "Mesedez itxoin ReactOSek %s-rekin ordua sinkronizatu arte" IDS_INETTIMEERROR "Errore bat gertatu da ReactOS %s-kin sinkronizatzen zen bitartean" + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/fr-FR.rc b/dll/cpl/timedate/lang/fr-FR.rc index 9cd145884a9..6cc76bcabcd 100644 --- a/dll/cpl/timedate/lang/fr-FR.rc +++ b/dll/cpl/timedate/lang/fr-FR.rc @@ -54,4 +54,6 @@ BEGIN IDS_INETTIMENEXTSYNC "Prochaine synchronisation: %s à %s" IDS_INETTIMESYNCING "Veuillez patienter pendant que ReactOS synchronise l'heure avec %s" IDS_INETTIMEERROR "Une erreur a eu lieu pendant que ReactOS synchronisait avec %s" + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/he-IL.rc b/dll/cpl/timedate/lang/he-IL.rc index f1ebafdc00e..3af8a1fd367 100644 --- a/dll/cpl/timedate/lang/he-IL.rc +++ b/dll/cpl/timedate/lang/he-IL.rc @@ -54,4 +54,6 @@ BEGIN IDS_INETTIMENEXTSYNC "הסנכרון הבא: %s ב %s" IDS_INETTIMESYNCING "Please wait while ReactOS synchronizes the time with %s" IDS_INETTIMEERROR "An error occured while ReactOS was synchronizing with %s" + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/hu-HU.rc b/dll/cpl/timedate/lang/hu-HU.rc index 1a37ed95198..e4c110a43ec 100644 --- a/dll/cpl/timedate/lang/hu-HU.rc +++ b/dll/cpl/timedate/lang/hu-HU.rc @@ -56,4 +56,6 @@ BEGIN IDS_INETTIMENEXTSYNC "A következő szinkronizálás: %s %s-kor" IDS_INETTIMESYNCING "Please wait while ReactOS synchronizes the time with %s" IDS_INETTIMEERROR "An error occured while ReactOS was synchronizing with %s" + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/id-ID.rc b/dll/cpl/timedate/lang/id-ID.rc index 224d5609f82..580febab484 100644 --- a/dll/cpl/timedate/lang/id-ID.rc +++ b/dll/cpl/timedate/lang/id-ID.rc @@ -54,4 +54,6 @@ BEGIN IDS_INETTIMENEXTSYNC "Penyelarasan berikutnya: %s pada %s" IDS_INETTIMESYNCING "Harap menunggu saat ReactOS menyelaraskan waktu dengan %s" IDS_INETTIMEERROR "Kesalahan terjadi ketika ReactOS menyelaraskan dengan %s" + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/it-IT.rc b/dll/cpl/timedate/lang/it-IT.rc index 201ea28496f..7df5e6a2bcc 100644 --- a/dll/cpl/timedate/lang/it-IT.rc +++ b/dll/cpl/timedate/lang/it-IT.rc @@ -54,4 +54,6 @@ BEGIN IDS_INETTIMENEXTSYNC "Prossima sincronizzazione: %s alle %s" IDS_INETTIMESYNCING "Sincronizzazione ora con %s" IDS_INETTIMEERROR "E' stato rilevato un errore mentre ReactOS si stava sincronizzando con %s" + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/ja-JP.rc b/dll/cpl/timedate/lang/ja-JP.rc index 99263dff8e9..17e19ad38f1 100644 --- a/dll/cpl/timedate/lang/ja-JP.rc +++ b/dll/cpl/timedate/lang/ja-JP.rc @@ -54,4 +54,6 @@ BEGIN IDS_INETTIMENEXTSYNC "次回の同期: %s %s" IDS_INETTIMESYNCING "ReactOSが %s と同期する間、お待ちください" IDS_INETTIMEERROR "ReactOSが %s と同期中にエラーが発生しました" + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/nl-NL.rc b/dll/cpl/timedate/lang/nl-NL.rc index dddf6e95763..12b950f4126 100644 --- a/dll/cpl/timedate/lang/nl-NL.rc +++ b/dll/cpl/timedate/lang/nl-NL.rc @@ -54,4 +54,6 @@ BEGIN IDS_INETTIMENEXTSYNC "Volgende synchronisatie: %s om %s" IDS_INETTIMESYNCING "ReactOS voert een synchronisatie met %s uit. Een ogenblik geduld." IDS_INETTIMEERROR "Er is een fout opgetreden bij een poging om een synchronisatie met %s uit te voeren." + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/no-NO.rc b/dll/cpl/timedate/lang/no-NO.rc index 1b43ef6f27f..34808eb71da 100644 --- a/dll/cpl/timedate/lang/no-NO.rc +++ b/dll/cpl/timedate/lang/no-NO.rc @@ -54,4 +54,6 @@ BEGIN IDS_INETTIMENEXTSYNC "Neste synkonisering: %s med %s" IDS_INETTIMESYNCING "Vennligst vent mens ReactOS sykroniserer tiden med %s" IDS_INETTIMEERROR "En feil har oppstatt mens ReactOS ble sykronisert med %s" + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/pl-PL.rc b/dll/cpl/timedate/lang/pl-PL.rc index a2a93d17cb5..e0dc3256b19 100644 --- a/dll/cpl/timedate/lang/pl-PL.rc +++ b/dll/cpl/timedate/lang/pl-PL.rc @@ -63,4 +63,6 @@ BEGIN IDS_INETTIMENEXTSYNC "Następna synchronizacja w dniu %s o %s" IDS_INETTIMESYNCING "Proszę czekać, gdy ReactOS zsynchronizuje czas z %s" IDS_INETTIMEERROR "Wystąpił błąd podczas próby synchronizacji czasu z %s" + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/pt-BR.rc b/dll/cpl/timedate/lang/pt-BR.rc index b84d407bae8..420ceb8169c 100644 --- a/dll/cpl/timedate/lang/pt-BR.rc +++ b/dll/cpl/timedate/lang/pt-BR.rc @@ -54,4 +54,6 @@ BEGIN IDS_INETTIMENEXTSYNC "Próxima sincronização: %s às %s" IDS_INETTIMESYNCING "Aguarde enquanto o ReactOS é sincronizado com %s" IDS_INETTIMEERROR "Erro enquanto o ReactOS estava sincronizando com %s" + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/ro-RO.rc b/dll/cpl/timedate/lang/ro-RO.rc index 308c45c7668..9589fb56d2b 100644 --- a/dll/cpl/timedate/lang/ro-RO.rc +++ b/dll/cpl/timedate/lang/ro-RO.rc @@ -56,4 +56,6 @@ BEGIN IDS_INETTIMENEXTSYNC "Următoarea sincronizare: %s la %s" IDS_INETTIMESYNCING "Așteptați sincronizarea cu %s" IDS_INETTIMEERROR "A survenit o eroare la sincronizarea cu %s" + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/ru-RU.rc b/dll/cpl/timedate/lang/ru-RU.rc index 9ad368508bd..8d2360003a4 100644 --- a/dll/cpl/timedate/lang/ru-RU.rc +++ b/dll/cpl/timedate/lang/ru-RU.rc @@ -54,4 +54,6 @@ BEGIN IDS_INETTIMENEXTSYNC "Следующая синхронизация через: %s в %s" IDS_INETTIMESYNCING "Подождите, пока РеактОС синхронизирует время с %s" IDS_INETTIMEERROR "Возникла ошибка во время синхронизации с %s" + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/sk-SK.rc b/dll/cpl/timedate/lang/sk-SK.rc index cd011f73803..64b9ead94f3 100644 --- a/dll/cpl/timedate/lang/sk-SK.rc +++ b/dll/cpl/timedate/lang/sk-SK.rc @@ -61,4 +61,6 @@ BEGIN IDS_INETTIMENEXTSYNC "Ďalšia synchronizácia: %s o %s" IDS_INETTIMESYNCING "Počkajte prosím, kým ReactOS zosynchronizuje čas s %s" IDS_INETTIMEERROR "Počas synchronizácie systému ReactOS s %s sa vyskytla chyba." + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/sq-AL.rc b/dll/cpl/timedate/lang/sq-AL.rc index 82ab28654cd..053a867ecd8 100644 --- a/dll/cpl/timedate/lang/sq-AL.rc +++ b/dll/cpl/timedate/lang/sq-AL.rc @@ -58,4 +58,6 @@ BEGIN IDS_INETTIMENEXTSYNC "Sinkronizimi tjetër: %s në %s" IDS_INETTIMESYNCING "Ju lutem prisni ndërkohë që ReactOS sinkronizon orën me %s" IDS_INETTIMEERROR "Një gabim ndodhi gjatë sinkronizimit të ReactOS me %s" + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/sv-SE.rc b/dll/cpl/timedate/lang/sv-SE.rc index 129c4457e39..55d81eca4bf 100644 --- a/dll/cpl/timedate/lang/sv-SE.rc +++ b/dll/cpl/timedate/lang/sv-SE.rc @@ -56,4 +56,6 @@ BEGIN IDS_INETTIMENEXTSYNC "Next synchronization: %s at %s" IDS_INETTIMESYNCING "Please wait while ReactOS synchronizes the time with %s" IDS_INETTIMEERROR "An error occured while ReactOS was synchronizing with %s" + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/th-TH.rc b/dll/cpl/timedate/lang/th-TH.rc index f3c8a210ea8..fc643b1e278 100644 --- a/dll/cpl/timedate/lang/th-TH.rc +++ b/dll/cpl/timedate/lang/th-TH.rc @@ -54,4 +54,6 @@ BEGIN IDS_INETTIMENEXTSYNC "การปรับเทียบต่อไป: %s ใน %s" IDS_INETTIMESYNCING "โปรดรอ ReactOS กำลังปรับเทียบเวลาภายใน %s" IDS_INETTIMEERROR "เกิดการผิดพลาดในขณะที่ ReactOS กำลังปรับเทียบเวลาภายใน %s" + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/tr-TR.rc b/dll/cpl/timedate/lang/tr-TR.rc index ebfcfee1461..1b04b964ebe 100644 --- a/dll/cpl/timedate/lang/tr-TR.rc +++ b/dll/cpl/timedate/lang/tr-TR.rc @@ -56,4 +56,6 @@ BEGIN IDS_INETTIMENEXTSYNC "Bir Sonraki Eşleştirme: %s.%s" IDS_INETTIMESYNCING "ReactOS, saati %s ile eşleştirirken lütfen bekleyiniz." IDS_INETTIMEERROR "ReactOS, %s ile eşleştirirken bir yanlışlık oldu." + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/uk-UA.rc b/dll/cpl/timedate/lang/uk-UA.rc index 454e68396b8..18bda28d237 100644 --- a/dll/cpl/timedate/lang/uk-UA.rc +++ b/dll/cpl/timedate/lang/uk-UA.rc @@ -62,4 +62,6 @@ BEGIN IDS_INETTIMENEXTSYNC "Наступна синхронізація: %s в %s" IDS_INETTIMESYNCING "Будь ласка зачекайте, поки ReactOS синхронізує час з %s" IDS_INETTIMEERROR "Помилка під час синхронізації з %s" + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/zh-CN.rc b/dll/cpl/timedate/lang/zh-CN.rc index a83db551000..73e00ff8828 100644 --- a/dll/cpl/timedate/lang/zh-CN.rc +++ b/dll/cpl/timedate/lang/zh-CN.rc @@ -54,4 +54,6 @@ BEGIN IDS_INETTIMENEXTSYNC "下次同步:%s 在 %s" IDS_INETTIMESYNCING "请稍候,ReactOS 正在同步 %s" IDS_INETTIMEERROR "在 ReactOS 同步时发生了一个错误。%s" + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/lang/zh-TW.rc b/dll/cpl/timedate/lang/zh-TW.rc index 7f06777504c..08d3b824afb 100644 --- a/dll/cpl/timedate/lang/zh-TW.rc +++ b/dll/cpl/timedate/lang/zh-TW.rc @@ -56,4 +56,6 @@ BEGIN IDS_INETTIMENEXTSYNC "下次同步:%s 在 %s" IDS_INETTIMESYNCING "請等待,ReactOS 正在同步 %s" IDS_INETTIMEERROR "在 ReactOS 同步時發生了一個錯誤。%s" + IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time" + IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time" END diff --git a/dll/cpl/timedate/resource.h b/dll/cpl/timedate/resource.h index c51bc0b084d..f23b9a4316a 100644 --- a/dll/cpl/timedate/resource.h +++ b/dll/cpl/timedate/resource.h @@ -36,3 +36,5 @@ #define IDS_INETTIMENEXTSYNC 1007 #define IDS_INETTIMESYNCING 1008 #define IDS_INETTIMEERROR 1009 +#define IDS_INETTIMESUCFILL 1010 +#define IDS_INETTIMEWELCOME 1011 diff --git a/dll/cpl/timedate/timedate.h b/dll/cpl/timedate/timedate.h index 500421758b7..306889fe159 100644 --- a/dll/cpl/timedate/timedate.h +++ b/dll/cpl/timedate/timedate.h @@ -17,6 +17,7 @@ #include #include #include +#include #include "resource.h" @@ -34,6 +35,16 @@ typedef struct APPLET_PROC AppletProc; } APPLET, *PAPPLET; +typedef struct +{ + WCHAR szSyncSuc[BUFSIZE]; + WCHAR szSyncWait[BUFSIZE]; + WCHAR szSyncErr[BUFSIZE]; + WCHAR szSyncType[BUFSIZE]; + WCHAR szSyncInit[BUFSIZE]; + LPWSTR lpszSyncStatus; +} SYNC_STATUS, *PSYNC_STATUS; + extern HINSTANCE hApplet;