diff --git a/locale/pl b/locale/pl index 4e3eca1..11b19b2 100755 --- a/locale/pl +++ b/locale/pl @@ -434,7 +434,7 @@ cp_follow_symlinks = Podążaj za linkami symbolicznymi slog_warning = Ostrzeżenie slog_error = Błąd -slog_error = Informacja +slog_info = Informacja unknown_filesystem = Nieznany system plików no_such_dir = Nie ma takiego katalogu unknown_mount_type = Nieprawidłowy rodzaj punktu montowania diff --git a/notify/notify.cpp b/notify/notify.cpp index 0b0ce31..70e6be6 100755 --- a/notify/notify.cpp +++ b/notify/notify.cpp @@ -110,7 +110,7 @@ void Notify::ActivateAccount(const std::wstring & name, const std::wstring & ema msg.code = WINIX_NOTIFY_CODE_CONFIRM_ACCOUNT; msg.name = name; msg.email = email; - msg.lang = 0; // !! IMPROVE ME a better language can be chose + msg.lang = config->locale_default_id; msg.activate_code = code; msg.template_index = notify_template_activate_account; CreateActivateLink(name, code, msg.item_link); @@ -126,7 +126,7 @@ void Notify::ResetPassword(const std::wstring & name, const std::wstring & email msg.code = WINIX_NOTIFY_CODE_RESET_PASSWORD; msg.name = name; msg.email = email; - msg.lang = 0; // !! IMPROVE ME a better language can be chose + msg.lang = config->locale_default_id; // !! IMPROVE ME a better language can be chose (the same as the user has) msg.activate_code = code; msg.template_index = notify_template_reset_password; CreateResetPasswordLink(name, code, msg.item_link); diff --git a/notify/notifypool.h b/notify/notifypool.h index c5ae222..1c115f1 100755 --- a/notify/notifypool.h +++ b/notify/notifypool.h @@ -65,7 +65,7 @@ struct NotifyUserMsg { std::wstring name; std::wstring email; - size_t lang; + size_t lang; // locale id (not an index) }; diff --git a/notify/notifythread.cpp b/notify/notifythread.cpp index 3718cb5..edc3c12 100755 --- a/notify/notifythread.cpp +++ b/notify/notifythread.cpp @@ -173,16 +173,17 @@ void NotifyThread::SendMail() { notify_stream.Clear(); - size_t lang_index = TemplatesNotifyFunctions::notify_user_msg.lang; + size_t lang_id = TemplatesNotifyFunctions::notify_user_msg.lang; size_t template_index = TemplatesNotifyFunctions::notify_msg.template_index; Lock(); // 'patterns' object can use logger or other stuff so we use Lock() before - Ezc::Pattern * pat = patterns.Get(template_index, lang_index); + Ezc::Pattern * pat = patterns.Get(template_index, lang_id); if( !pat ) log << log1 << "NotifyThread: I don't have a template with index: " << template_index - << " and locale index: " << lang_index << logend; + << " and locale id: " << lang_id << logend; + Unlock();