From c4e2a318d047603865678e7e13ba1f392bef5091 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 21 May 2025 18:06:52 +0600 Subject: [PATCH] Localisation fix --- Makefile | 44 +++++++--------------------- locale/logging_services.pot | 30 ------------------- locale/logging_services_ru.po | 27 ----------------- locale/ubl-settings-logging_ru.po | 48 ------------------------------- 4 files changed, 11 insertions(+), 138 deletions(-) delete mode 100644 locale/logging_services.pot delete mode 100644 locale/logging_services_ru.po diff --git a/Makefile b/Makefile index 0a3fbd6..78b45dd 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,9 @@ PKGNAME = $(MAKEFILE_DIR) FILE_VER = source/${PKGNAME}.h PKGIDENT=$(subst /,-,${PREFIX}) +FILE_MO := $(PKGNAME).mo +LOCALE_DIR := ./locale + default_target: all .PHONY: all init depend debug prepare check build uninstall install clean help @@ -94,7 +97,6 @@ uninstall: done @$(RM) "${DESTDIR}${PREFIX}/bin/${PKGNAME}" @$(RM) "${DESTDIR}${PREFIX}/share/applications/${PKGNAME}.desktop" - @$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/com.ublinux.${PKGNAME}.svg" @$(RM) "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}${PKGIDENT}.policy" @if [ -z ${DESTDIR} ]; then \ [ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ @@ -110,53 +112,29 @@ install: check uninstall file=$$(find ./locale/ -name '*_'"$$lang"'.po'); \ msgfmt $$file -v -f -o ${DESTDIR}/usr/share/locale/$$lang/LC_MESSAGES/$(FILE_MO); \ done + @for SIZE in 16 32 48; do \ install -dm755 "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \ rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data "com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \ done - @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/" "com.ublinux.${PKGNAME}.svg" + @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/apps/" "com.ublinux.${PKGNAME}.svg" @cp ./com.ublinux.${PKGNAME}.policy ./compile/com.ublinux.${PKGNAME}${PKGIDENT}.policy @sed -e 's+/usr/bin+${PREFIX}/bin+' -e 's+.run+${PKGIDENT}.run+g' ./compile/com.ublinux.${PKGNAME}${PKGIDENT}.policy -i @install -Dm755 -t "${DESTDIR}${PREFIX}/bin/" "${CMAKE_BUILD_DIR}/${PKGNAME}" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop" - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/status/" "icons/com.ublinux.${PKGNAME}.checked.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/status/" "icons/com.ublinux.${PKGNAME}.warning.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.view-symbolic.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.play-symbolic.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.stop-symbolic.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.zoom-symbolic.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.back-symbolic.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.increase-symbolic.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.decrease-symbolic.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.profile-symbolic.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.edit-symbolic.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.check-symbolic.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.uncheck-symbolic.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.settings-symbolic.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.trash-symbolic.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.sort-symbolic.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.sync-symbolic.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.funnel-symbolic.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.reset-symbolic.svg" - - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.generic1-symbolic.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.generic2-symbolic.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.generic3-symbolic.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.generic4-symbolic.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.generic5-symbolic.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.generic6-symbolic.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.generic7-symbolic.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/${PKGNAME}/csv/" "journals_list.csv" - @install -Dm644 -t "${DESTDIR}/usr/share/${PKGNAME}/csv/" "logging_services.csv" + @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.checked.svg" + @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.warning.svg" @install -Dm644 -t "${DESTDIR}/usr/share/polkit-1/actions/" "${CMAKE_BUILD_DIR}/com.ublinux.${PKGNAME}${PKGIDENT}.policy" - @install -Dm644 -t "${DESTDIR}/usr/share/polkit-1/actions/" "com.ublinux.${PKGNAME}.auth.policy" + @ldconfig -n /usr/local/lib @if [ -z ${DESTDIR} ]; then \ [ -d "${DESTDIR}/usr/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}/usr/share/icons/hicolor/" &>/dev/null || true; \ update-desktop-database --quiet &>/dev/null || true; \ - [ -d "${DESTDIR}$/usr/share/applications" ] && touch "${DESTDIR}/usr/share/applications" &>/dev/null || true; \ + [ -d "${DESTDIR}/usr/share/applications" ] && touch "${DESTDIR}/usr/share/applications" &>/dev/null || true; \ fi @echo "Install: OK" + + clean: @echo "Clean ..." @$(RM) -rd ${CMAKE_BUILD_DIR} diff --git a/locale/logging_services.pot b/locale/logging_services.pot deleted file mode 100644 index 8c2e07d..0000000 --- a/locale/logging_services.pot +++ /dev/null @@ -1,30 +0,0 @@ -# Language translations for ubl-settings-logging package. -# Copyright (C) 2025, UBTech LLC -# This file is distributed under the same license as the ubl-settings-logging package. -# UBLinux Team , 2025 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: ubl-settings-logging 1.0\n" -"Report-Msgid-Bugs-To: support@ublinux.com\n" -"POT-Creation-Date: 2025-05-20 00:00+0600\n" -"PO-Revision-Date: 2025-05-20 00:00+0600\n" -"Last-Translator: UBLinux Team \n" -"Language-Team: UBLinux Team \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -msgid "System event log" -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 "" \ No newline at end of file diff --git a/locale/logging_services_ru.po b/locale/logging_services_ru.po deleted file mode 100644 index cde67d3..0000000 --- a/locale/logging_services_ru.po +++ /dev/null @@ -1,27 +0,0 @@ -# Russian translations for ubl-settings-logging package. -# Copyright (C) 2025, UBTech LLC -# This file is distributed under the same license as the ubl-settings-logging package. -# UBLinux Team , 2025 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: ubl-settings-logging 1.0\n" -"Report-Msgid-Bugs-To: support@ublinux.com\n" -"POT-Creation-Date: 2025-05-20 00:00+0600\n" -"PO-Revision-Date: 2025-05-20 00:00+0600\n" -"Last-Translator: ublinux \n" -"Language-Team: Russian - UBLinux Team \n" -"Language: Russian\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -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 "Сервис сбора сообщений системных событий активных сетевых устройств" \ No newline at end of file diff --git a/locale/ubl-settings-logging_ru.po b/locale/ubl-settings-logging_ru.po index 648f04c..b216ee0 100644 --- a/locale/ubl-settings-logging_ru.po +++ b/locale/ubl-settings-logging_ru.po @@ -122,54 +122,6 @@ msgstr "Включить автозапуск" msgid "System event log" msgstr "Системный журнал событий" -#: source/ubl-strings.h:34 -msgid "Log of work and requests to Acpid" -msgstr "Журнал работы и обращений к Acpid" - -#: source/ubl-strings.h:35 -msgid "Log of work and requests to the web server" -msgstr "Журнал работы и обращений к веб-серверу" - -#: source/ubl-strings.h:36 -msgid "Audit log" -msgstr "Журнал аудита (audit)" - -#: source/ubl-strings.h:37 -msgid "Log of authorization procedures" -msgstr "Журнал процедур авторизации" - -#: source/ubl-strings.h:38 -msgid "Job scheduler log (cron)" -msgstr "Журнал работы планировщика заданий (cron)" - -#: source/ubl-strings.h:39 -msgid "Log of work and calls to the print server (cups)" -msgstr "Журнал работы и обращений к серверу печати (cups)" - -#: source/ubl-strings.h:40 -msgid "Log of operation and access to system services" -msgstr "Журнал работы и обращения к службам системы" - -#: source/ubl-strings.h:41 -msgid "Log of work and access to Samba" -msgstr "Журнал работы и обращения к Samba" - -#: source/ubl-strings.h:42 -msgid "Postfix mail server log" -msgstr "Журнал почтового сервера Postfix" - -#: source/ubl-strings.h:43 -msgid "System log" -msgstr "Системный журнал" - -#: source/ubl-strings.h:44 -msgid "X.org display server log" -msgstr "Журнал работы дисплейного сервера X.org" - -#: source/ubl-strings.h:45 -msgid "Graphics X session log" -msgstr "Журнал сеансов графической системы X" - #: source/ubl-strings.h:46 msgid "Save" msgstr "Сохранить"