From 5e72d8120c13b4f9bfd100d6143fa38298aab1da Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Mon, 29 Dec 2025 16:30:49 +0000 Subject: [PATCH] Localisation fixes --- Makefile | 6 +++--- locale/applications-list.pot | 9 +++++++++ locale/applications-list_ru.po | 27 +++++++++++++++++++++++++ locale/ubinstall-gtk_ru.po | 5 +---- source/ubinstall-gtk-bootloader.c | 4 ++-- source/ubinstall-gtk-keyboard.c | 2 +- source/ubinstall-gtk-network.c | 8 ++++---- source/ubinstall-gtk-source.c | 6 +++--- source/ubinstall-gtk-startup-apps.c | 2 +- source/ubinstall-gtk-startup-services.c | 2 +- source/ubl-strings.h | 1 - ubinstall-gtk-bootloader-user.glade | 2 +- ubinstall-gtk-keyboard-layouts.glade | 2 +- ubinstall-gtk-keyboard.glade | 2 +- ubinstall-gtk-language.glade | 2 +- ubinstall-gtk-layouts.glade | 2 +- ubinstall-gtk-service-window.glade | 2 +- ubinstall-gtk-source.glade | 2 +- ubinstall-gtk-warning.glade | 2 +- 19 files changed, 60 insertions(+), 28 deletions(-) create mode 100644 locale/applications-list.pot create mode 100644 locale/applications-list_ru.po diff --git a/Makefile b/Makefile index 19140d4..44a203e 100644 --- a/Makefile +++ b/Makefile @@ -112,15 +112,15 @@ uninstall: install: check uninstall @echo "Install ..." @for LANG in $$(find ./locale -iname "*.po" -print | sed -En "s/.+_([[:alpha:]]+)\.po/\1/p" | sort -u); do \ - install -dm755 "${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES"; \ -# PATH_FILE_MO="${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \ + install -dm755 "${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES"; \ +# PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \ PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \ PKGNAME_PO="./locale/${PKGNAME}_$${LANG}.po"; [[ -f "$${PKGNAME_PO}" ]] || PKGNAME_PO= ; \ msgfmt --verbose --use-fuzzy --output-file "$${PATH_FILE_MO}" - < <(msgcat --use-first --no-wrap $${PKGNAME_PO} ./locale/*_$${LANG}.po); \ done @for SIZE in 16 32 48; do \ install -dm755 "${DESTDIR}/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \ - rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data "icons/apps/com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \ + rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data "icons/apps/com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \ done @for FILE_ICON in $(wildcard icons/*/*.svg); do \ SUB_NAME=$${FILE_ICON#*/}; SUB_NAME=$${SUB_NAME%/*}; \ diff --git a/locale/applications-list.pot b/locale/applications-list.pot new file mode 100644 index 0000000..23fb395 --- /dev/null +++ b/locale/applications-list.pot @@ -0,0 +1,9 @@ + +msgid "Universal macOS-style dock-panel" +msgstr "" + +msgid "System monitor" +msgstr "" + +msgid "Check the internet is alive" +msgstr "" diff --git a/locale/applications-list_ru.po b/locale/applications-list_ru.po new file mode 100644 index 0000000..02b2452 --- /dev/null +++ b/locale/applications-list_ru.po @@ -0,0 +1,27 @@ +# Language translations for ubinstal package. +# Copyright (C) 2022, UBTech LLC +# This file is distributed under the same license as the ubinstal package. +# UBLinux Team , 2022 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: ubinstal 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-05-22 16:12+0600\n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "Universal macOS-style dock-panel" +msgstr "Универсальная панель Dock в стиле macOS" + +msgid "System monitor" +msgstr "Системный монитор" + +msgid "Check the internet is alive" +msgstr "Проверка наличия интернет-соединения" diff --git a/locale/ubinstall-gtk_ru.po b/locale/ubinstall-gtk_ru.po index 19e0ab3..eef24fd 100644 --- a/locale/ubinstall-gtk_ru.po +++ b/locale/ubinstall-gtk_ru.po @@ -982,7 +982,6 @@ msgid "Group" msgstr "Группа" #: source/ubl-strings.h:292 -#, fuzzy msgid "Select your language:" msgstr "Выберете язык:" @@ -1321,7 +1320,7 @@ msgstr "секунд" #: source/ubl-strings.h:377 msgid "Default OS:" -msgstr "Щагрузка по умолчанию:" +msgstr "Загрузка по умолчанию:" #: source/ubl-strings.h:378 msgid "Login without password request" @@ -1464,7 +1463,6 @@ msgid "Selecting the system kernel" msgstr "Выбор ядра системы" #: source/ubl-strings.h:413 -#, fuzzy msgid "" "Selecting kernels for installation in the system and selecting the default " "kernel. Internet access is required to install additional kernels" @@ -1473,7 +1471,6 @@ msgstr "" "доступ В Интернет." #: source/ubl-strings.h:414 -#, fuzzy msgid "" "Selecting additional kernel modules from the repository via the Internet" msgstr "" diff --git a/source/ubinstall-gtk-bootloader.c b/source/ubinstall-gtk-bootloader.c index 0ce552e..4a9edcf 100644 --- a/source/ubinstall-gtk-bootloader.c +++ b/source/ubinstall-gtk-bootloader.c @@ -76,12 +76,12 @@ void on_bootloader_user_accept(GtkWidget *, bootloader_user_window *window){ } const char *password = gtk_entry_get_text(GTK_ENTRY(window->PasswordEntry)); if (yon_char_is_empty(username)){ - yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),_EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_highlight_incorrect(window->UsernameEntry); return; } if (yon_char_is_empty(password)){ - yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),_EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_highlight_incorrect(window->PasswordEntry); return; } diff --git a/source/ubinstall-gtk-keyboard.c b/source/ubinstall-gtk-keyboard.c index cdf6cea..af0bc4a 100644 --- a/source/ubinstall-gtk-keyboard.c +++ b/source/ubinstall-gtk-keyboard.c @@ -6,7 +6,7 @@ int yon_keyboard_save(main_window *widgets){ } else { GtkTreeIter iter; if (!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->LayoutsList),&iter)){ - yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),yon_char_get_localised_from_lib(EMPTY_IMPORTANT_LABEL),5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),yon_char_get_localised_from_lib(_EMPTY_IMPORTANT_LABEL),5,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_highlight_incorrect(widgets->KeyboardLayoutTree); return 0; } diff --git a/source/ubinstall-gtk-network.c b/source/ubinstall-gtk-network.c index e57eeda..1461e9b 100644 --- a/source/ubinstall-gtk-network.c +++ b/source/ubinstall-gtk-network.c @@ -152,7 +152,7 @@ int yon_network_save(main_window *widgets){ if (gtk_switch_get_active(GTK_SWITCH(widgets->NetworkDomainSwitch))){ const char *domain_name = gtk_entry_get_text(GTK_ENTRY(widgets->NetworkDomainNameEntry)); if (yon_char_is_empty(domain_name)){ - yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),_EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_highlight_incorrect(widgets->NetworkDomainNameEntry); return 0; } @@ -161,7 +161,7 @@ int yon_network_save(main_window *widgets){ if (!yon_char_is_empty(domain_name)) yon_config_register(DOMAIN_parameter,DOMAIN_parameter_command,(char*)domain_name); else yon_config_remove_by_key(DOMAIN_parameter); if ((!yon_char_is_empty(domain_admin)&&yon_char_is_empty(domain_password))||(yon_char_is_empty(domain_admin)&&!yon_char_is_empty(domain_password))){ - yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),_EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_highlight_incorrect(widgets->NetworkDomainAdminEntry); yon_ubl_status_highlight_incorrect(widgets->NetworkDomainPasswordEntry); return 0; @@ -200,7 +200,7 @@ int yon_network_save(main_window *widgets){ case 4: char *value = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->NetworkNTPEntry)); if (yon_char_is_empty(value)) { - yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),_EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_highlight_incorrect(widgets->NetworkNTPEntry); return 0; } @@ -219,7 +219,7 @@ int yon_network_save(main_window *widgets){ hostname = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->HotnameEntry)); } if (yon_char_is_empty(hostname)){ - yon_ubl_status_box_render(EMPTY_IMPORTANT_LABEL,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_box_render(_EMPTY_IMPORTANT_LABEL,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_highlight_incorrect(widgets->HotnameEntry); return 0; } diff --git a/source/ubinstall-gtk-source.c b/source/ubinstall-gtk-source.c index 17cb9ad..dc4119c 100644 --- a/source/ubinstall-gtk-source.c +++ b/source/ubinstall-gtk-source.c @@ -91,7 +91,7 @@ void yon_source_update(source_window *window){ void on_source_add(GtkWidget *,source_window *window){ const char *path = gtk_widget_get_visible(window->PathEntry)?gtk_entry_get_text(GTK_ENTRY(window->PathEntry)):gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->DeviceCombo)); if (yon_char_is_empty(path)){ - yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),_EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_highlight_incorrect(gtk_widget_get_visible(window->PathEntry)?window->PathEntry:window->DeviceCombo); return; } @@ -176,7 +176,7 @@ void on_source_accept(GtkWidget *,source_window *window){ case 1:{ char *cur = (char*)gtk_entry_get_text(GTK_ENTRY(element->PathEntry)); if (yon_char_is_empty(cur)){ - yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),_EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_highlight_incorrect(element->PathEntry); return; } @@ -219,7 +219,7 @@ void on_source_accept(GtkWidget *,source_window *window){ yon_char_parsed_add_or_create_if_exists(paths,&size,dict->key); } if (!size){ - yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),_EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_highlight_incorrect(window->PathEntry); return; } diff --git a/source/ubinstall-gtk-startup-apps.c b/source/ubinstall-gtk-startup-apps.c index 2f6ae60..dc82b88 100644 --- a/source/ubinstall-gtk-startup-apps.c +++ b/source/ubinstall-gtk-startup-apps.c @@ -51,7 +51,7 @@ void yon_startup_apps_setup(main_window *widgets){ config_str parsed = yon_char_parse(apps[i],&parsed_size,";"); if (parsed_size&&!yon_char_is_empty(parsed[0])){ gtk_list_store_append(widgets->StartupAppsList,&iter); - gtk_list_store_set(widgets->StartupAppsList,&iter,0,1,1,parsed[0],2,yon_char_return_if_exist(parsed[1],""),3,yon_char_return_if_exist(parsed[2],""),-1); + gtk_list_store_set(widgets->StartupAppsList,&iter,0,1,1,parsed[0],2,yon_char_return_if_exist(parsed[1],""),3,yon_char_return_if_exist(_(parsed[2]),""),-1); } } } diff --git a/source/ubinstall-gtk-startup-services.c b/source/ubinstall-gtk-startup-services.c index 2c5ee87..715b68e 100644 --- a/source/ubinstall-gtk-startup-services.c +++ b/source/ubinstall-gtk-startup-services.c @@ -52,7 +52,7 @@ void yon_startup_services_setup(main_window *widgets){ config_str parsed = yon_char_parse(services[i],&parsed_size,";"); if (parsed_size&&!yon_char_is_empty(parsed[0])){ gtk_list_store_append(widgets->StartupList,&iter); - gtk_list_store_set(widgets->StartupList,&iter,0,1,1,parsed[0],2,yon_char_return_if_exist(parsed[1],""),3,yon_char_return_if_exist(parsed[2],""),-1); + gtk_list_store_set(widgets->StartupList,&iter,0,1,1,parsed[0],2,yon_char_return_if_exist(parsed[1],""),3,yon_char_return_if_exist(_(parsed[2]),""),-1); } } } diff --git a/source/ubl-strings.h b/source/ubl-strings.h index f244c3e..2f2c879 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -98,7 +98,6 @@ NULL) #define PASSWORD_TITLE_LABEL _("Password input") #define PASSWORD_MISMATCH_LABEL _("Password mismatch") -#define EMPTY_IMPORTANT_LABEL _("Empty important field") #define PASSWORD_SHORT_LABEL(min_size_char) yon_char_unite(_("Password must be at least")," ", min_size_char," ",_("characters")) #define RESTART_LABEL _("Restart PC") diff --git a/ubinstall-gtk-bootloader-user.glade b/ubinstall-gtk-bootloader-user.glade index 44e507a..5f995f7 100644 --- a/ubinstall-gtk-bootloader-user.glade +++ b/ubinstall-gtk-bootloader-user.glade @@ -195,7 +195,7 @@ - Accept + Ok True True True diff --git a/ubinstall-gtk-keyboard-layouts.glade b/ubinstall-gtk-keyboard-layouts.glade index 7a0cb5a..8bc5236 100644 --- a/ubinstall-gtk-keyboard-layouts.glade +++ b/ubinstall-gtk-keyboard-layouts.glade @@ -103,7 +103,7 @@ - Accept + Ok True True True diff --git a/ubinstall-gtk-keyboard.glade b/ubinstall-gtk-keyboard.glade index 2a1cdae..172e869 100644 --- a/ubinstall-gtk-keyboard.glade +++ b/ubinstall-gtk-keyboard.glade @@ -145,7 +145,7 @@ - Apply + Ok True True True diff --git a/ubinstall-gtk-language.glade b/ubinstall-gtk-language.glade index 848cf11..2b8623e 100644 --- a/ubinstall-gtk-language.glade +++ b/ubinstall-gtk-language.glade @@ -191,7 +191,7 @@ - Apply + Ok True True True diff --git a/ubinstall-gtk-layouts.glade b/ubinstall-gtk-layouts.glade index b359c15..2043f1c 100644 --- a/ubinstall-gtk-layouts.glade +++ b/ubinstall-gtk-layouts.glade @@ -218,7 +218,7 @@ - Apply + Ok True True True diff --git a/ubinstall-gtk-service-window.glade b/ubinstall-gtk-service-window.glade index b10860d..001e566 100644 --- a/ubinstall-gtk-service-window.glade +++ b/ubinstall-gtk-service-window.glade @@ -195,7 +195,7 @@ - Accept + Ok True True True diff --git a/ubinstall-gtk-source.glade b/ubinstall-gtk-source.glade index 86aec8c..8c1482d 100644 --- a/ubinstall-gtk-source.glade +++ b/ubinstall-gtk-source.glade @@ -322,7 +322,7 @@ - Choose + Ok True True True diff --git a/ubinstall-gtk-warning.glade b/ubinstall-gtk-warning.glade index 6dfe131..3ffaf83 100644 --- a/ubinstall-gtk-warning.glade +++ b/ubinstall-gtk-warning.glade @@ -129,7 +129,7 @@ interrupt installation process? - Accept + Ok True True True