Localisation for new status box messages

pull/62/head
parent df37bfa768
commit 4384f60b57

@ -582,6 +582,7 @@ void on_logrotate_period_check_toggled(GtkToggleButton *self,logrotate_configure
void on_logrotate_save(GtkWidget *self, dictionary *dict){ void on_logrotate_save(GtkWidget *self, dictionary *dict){
logrotate_window *dialog = yon_dictionary_get_data(dict->first,logrotate_window*); logrotate_window *dialog = yon_dictionary_get_data(dict->first,logrotate_window*);
logrotate_configure_window *window = yon_dictionary_get_data(dict->first->next,logrotate_configure_window*); logrotate_configure_window *window = yon_dictionary_get_data(dict->first->next,logrotate_configure_window*);
char *log_name="";
char *paths=""; char *paths="";
char *period=""; char *period="";
char *size=""; char *size="";
@ -618,6 +619,13 @@ void on_logrotate_save(GtkWidget *self, dictionary *dict){
config_str found_paths_list=NULL; config_str found_paths_list=NULL;
int found_paths=0; int found_paths=0;
char *cur_check_paths; char *cur_check_paths;
log_name = (char*)gtk_entry_get_text(GTK_ENTRY(window->LogNameEntry));
if (!strcmp(log_name,"")){
yon_ubl_status_highlight_incorrect(window->LogNameEntry);
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
return;
}
int valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(main_config.logrotate_list),&iter); int valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(main_config.logrotate_list),&iter);
for (;valid;valid=gtk_tree_model_iter_next(GTK_TREE_MODEL(main_config.logrotate_list),&iter)){ for (;valid;valid=gtk_tree_model_iter_next(GTK_TREE_MODEL(main_config.logrotate_list),&iter)){
gtk_tree_model_get(GTK_TREE_MODEL(main_config.logrotate_list),&iter,1,&cur_check_paths,-1); gtk_tree_model_get(GTK_TREE_MODEL(main_config.logrotate_list),&iter,1,&cur_check_paths,-1);
@ -625,6 +633,11 @@ void on_logrotate_save(GtkWidget *self, dictionary *dict){
else found_paths_list = yon_char_parsed_append(found_paths_list,&found_paths,cur_check_paths); else found_paths_list = yon_char_parsed_append(found_paths_list,&found_paths,cur_check_paths);
} }
valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(window->list),&iter); valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(window->list),&iter);
if (!valid) {
yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(window->LogPathsTree));
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
return;
}
for (;valid;valid=gtk_tree_model_iter_next(GTK_TREE_MODEL(window->list),&iter)){ for (;valid;valid=gtk_tree_model_iter_next(GTK_TREE_MODEL(window->list),&iter)){
char *cur_path; char *cur_path;
gtk_tree_model_get(GTK_TREE_MODEL(window->list),&iter,0,&cur_path,-1); gtk_tree_model_get(GTK_TREE_MODEL(window->list),&iter,0,&cur_path,-1);
@ -634,12 +647,13 @@ void on_logrotate_save(GtkWidget *self, dictionary *dict){
path_amount++; path_amount++;
paths = yon_char_unite(paths,strcmp(paths,"") ? "," : "", cur_path,NULL); paths = yon_char_unite(paths,strcmp(paths,"") ? "," : "", cur_path,NULL);
} }
if(!window->paths) if(!window->paths) {
if (matched==path_amount) { if (matched==path_amount) {
yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(window->LogPathsTree)); yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(window->LogPathsTree));
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),REPEATED_PATHS_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),REPEATED_PATHS_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
return; return;
} }
}
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->RotationPeriodCheck))){ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->RotationPeriodCheck))){
int active = gtk_combo_box_get_active(GTK_COMBO_BOX(window->RotationPeriodMainCombo)); int active = gtk_combo_box_get_active(GTK_COMBO_BOX(window->RotationPeriodMainCombo));
switch (active){ switch (active){
@ -789,6 +803,11 @@ void on_logrotate_save(GtkWidget *self, dictionary *dict){
char *endwork = (char*)gtk_entry_get_text(GTK_ENTRY(window->EndworkCommandEntry)); char *endwork = (char*)gtk_entry_get_text(GTK_ENTRY(window->EndworkCommandEntry));
sharedscripts = "sharedscripts"; sharedscripts = "sharedscripts";
if (!yon_char_is_empty(before_once)) { if (!yon_char_is_empty(before_once)) {
if (strcmp(before_once,",")){
yon_ubl_status_highlight_incorrect(window->CommandBeforeOnceEntry);
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
return;
}
before_once = yon_char_replace(before_once,"\"","=--"); before_once = yon_char_replace(before_once,"\"","=--");
before_once = yon_char_replace(before_once,"=--","\\\""); before_once = yon_char_replace(before_once,"=--","\\\"");
firstaction = yon_char_append("firstaction,",before_once); firstaction = yon_char_append("firstaction,",before_once);
@ -834,7 +853,7 @@ void on_logrotate_save(GtkWidget *self, dictionary *dict){
gtk_list_store_append(main_config.logrotate_list,&iter); gtk_list_store_append(main_config.logrotate_list,&iter);
} }
paths=yon_char_replace(paths,",","\n"); paths=yon_char_replace(paths,",","\n");
gtk_list_store_set(main_config.logrotate_list,&iter,0,gtk_entry_get_text(GTK_ENTRY(window->LogNameEntry)),1,paths,2,gtk_entry_get_text(GTK_ENTRY(window->LogDescriptionEntry)),-1); gtk_list_store_set(main_config.logrotate_list,&iter,0,log_name,1,paths,2,gtk_entry_get_text(GTK_ENTRY(window->LogDescriptionEntry)),-1);
on_close_subwindow(window->MainWindow); on_close_subwindow(window->MainWindow);
} }
} }

@ -175,6 +175,7 @@
#define SATURDAY_LABEL _("Saturday") #define SATURDAY_LABEL _("Saturday")
#define SUNDAY_LABEL _("Sunday*") #define SUNDAY_LABEL _("Sunday*")
#define REPEATED_PATHS_LABEL _("Same record already exists") #define REPEATED_PATHS_LABEL _("Same record already exists")
#define EMPTY_IMPORTANT_LABEL _("Empty important field")
//ubl-settings-logging-logrotate-table.glade //ubl-settings-logging-logrotate-table.glade
#define SYSTEM_CONFIGURATION_LABEL _("System configuration") #define SYSTEM_CONFIGURATION_LABEL _("System configuration")

@ -687,71 +687,34 @@ msgstr ""
msgid "Sunday*" msgid "Sunday*"
msgstr "" msgstr ""
#: source/ubl-strings.h:179 #: source/ubl-strings.h:177
msgid "System configuration" msgid "Same record already exists"
msgstr "" msgstr ""
#: source/ubl-strings.h:180 #: source/ubl-strings.h:178
msgid "Applications configuration" msgid "Empty important field"
msgstr "" msgstr ""
#: source/ubl-strings.h:183 #: source/ubl-strings.h:181
msgid "Path (-s):" msgid "System configuration"
msgstr "" msgstr ""
#: source/ubl-strings.h:184 #: source/ubl-strings.h:182
msgid "Control:" msgid "Applications configuration"
msgstr "" msgstr ""
#: source/ubl-strings.h:185 #: source/ubl-strings.h:185
msgid "Log file" msgid "Path (-s):"
msgstr "" msgstr ""
#: source/ubl-strings.h:186 #: source/ubl-strings.h:186
msgid "Name:" msgid "Control:"
msgstr ""
msgid "System event log rotation service"
msgstr ""
msgid "System event log"
msgstr ""
msgid "Service for collecting messages from system events of active network devices"
msgstr ""
msgid "Log of work and requests to Acpid"
msgstr ""
msgid "Log of work and requests to the web server"
msgstr ""
msgid "Audit log"
msgstr ""
msgid "Log of authorization procedures"
msgstr ""
msgid "Job scheduler log (cron)"
msgstr ""
msgid "Log of work and calls to the print server (cups)"
msgstr ""
msgid "Log of operation and access to system services"
msgstr ""
msgid "Log of work and access to Samba"
msgstr ""
msgid "Postfix mail server log"
msgstr ""
msgid "System log"
msgstr "" msgstr ""
msgid "X.org display server log" #: source/ubl-strings.h:187
msgid "Log file"
msgstr "" msgstr ""
msgid "Graphics X session log" #: source/ubl-strings.h:188
msgid "Name:"
msgstr "" msgstr ""

@ -701,72 +701,81 @@ msgstr "Суббота"
msgid "Sunday*" msgid "Sunday*"
msgstr "Воскресенье*" msgstr "Воскресенье*"
#: source/ubl-strings.h:179 #: source/ubl-strings.h:177
msgid "Same record already exists"
msgstr "Журнал с такими путями уже добавлен"
#: source/ubl-strings.h:178
msgid "Empty important field"
msgstr "Важное поле не заполнено"
#: source/ubl-strings.h:181
msgid "System configuration" msgid "System configuration"
msgstr "Настройки системы" msgstr "Настройки системы"
#: source/ubl-strings.h:180 #: source/ubl-strings.h:182
msgid "Applications configuration" msgid "Applications configuration"
msgstr "Настройки приложений" msgstr "Настройки приложений"
#: source/ubl-strings.h:183 #: source/ubl-strings.h:185
msgid "Path (-s):" msgid "Path (-s):"
msgstr "Путь (-и):" msgstr "Путь (-и):"
#: source/ubl-strings.h:184 #: source/ubl-strings.h:186
msgid "Control:" msgid "Control:"
msgstr "Управление:" msgstr "Управление:"
#: source/ubl-strings.h:185 #: source/ubl-strings.h:187
msgid "Log file" msgid "Log file"
msgstr "Файл лога" msgstr "Файл лога"
#: source/ubl-strings.h:186 #: source/ubl-strings.h:188
msgid "Name:" msgid "Name:"
msgstr "Имя:" msgstr "Имя:"
msgid "System event log rotation service" #~ msgid "System event log rotation service"
msgstr "Служба ротации системных журналов событий" #~ msgstr "Служба ротации системных журналов событий"
msgid "System event log" #~ msgid "System event log"
msgstr "Системный журнал событий" #~ msgstr "Системный журнал событий"
msgid "" #~ msgid ""
"Service for collecting messages from system events of active network devices" #~ "Service for collecting messages from system events of active network "
msgstr "Сервис сбора сообщений системных событий активных сетевых устройств" #~ "devices"
#~ msgstr "Сервис сбора сообщений системных событий активных сетевых устройств"
msgid "Log of work and requests to Acpid" #~ msgid "Log of work and requests to Acpid"
msgstr "Журнал работы и обращений к Acpid" #~ msgstr "Журнал работы и обращений к Acpid"
msgid "Log of work and requests to the web server" #~ msgid "Log of work and requests to the web server"
msgstr "Журнал работы и обращений к веб-серверу" #~ msgstr "Журнал работы и обращений к веб-серверу"
msgid "Audit log" #~ msgid "Audit log"
msgstr "Журнал аудита (audit)" #~ msgstr "Журнал аудита (audit)"
msgid "Log of authorization procedures" #~ msgid "Log of authorization procedures"
msgstr "Журнал процедур авторизации" #~ msgstr "Журнал процедур авторизации"
msgid "Job scheduler log (cron)" #~ msgid "Job scheduler log (cron)"
msgstr "Журнал работы планировщика заданий (cron)" #~ msgstr "Журнал работы планировщика заданий (cron)"
msgid "Log of work and calls to the print server (cups)" #~ msgid "Log of work and calls to the print server (cups)"
msgstr "Журнал работы и обращений к серверу печати (cups)" #~ msgstr "Журнал работы и обращений к серверу печати (cups)"
msgid "Log of operation and access to system services" #~ msgid "Log of operation and access to system services"
msgstr "Журнал работы и обращения к службам системы" #~ msgstr "Журнал работы и обращения к службам системы"
msgid "Log of work and access to Samba" #~ msgid "Log of work and access to Samba"
msgstr "Журнал работы и обращения к Samba" #~ msgstr "Журнал работы и обращения к Samba"
msgid "Postfix mail server log" #~ msgid "Postfix mail server log"
msgstr "Журнал почтового сервера Postfix" #~ msgstr "Журнал почтового сервера Postfix"
msgid "System log" #~ msgid "System log"
msgstr "Системный журнал" #~ msgstr "Системный журнал"
msgid "X.org display server log" #~ msgid "X.org display server log"
msgstr "Журнал работы дисплейного сервера X.org" #~ msgstr "Журнал работы дисплейного сервера X.org"
msgid "Graphics X session log" #~ msgid "Graphics X session log"
msgstr "Журнал сеансов графической системы X" #~ msgstr "Журнал сеансов графической системы X"

Loading…
Cancel
Save