diff --git a/.gitignore b/.gitignore index 33f5078..45460e9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,9 @@ main.cpp ubl-settings-datetime.glade~ test.cpp ubl-settings-datetime -a.out \ No newline at end of file +a.out +compile/ +source/**/ubl_settings_datetime +source/**/main.o +source/**/ubl_settings_datetime.o +reg/ \ No newline at end of file diff --git a/Makefile b/Makefile index 1c75de6..af79dbe 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,17 @@ #!/usr/bin/make -f +#!/usr/bin/make -f +#SHELL := /bin/bash MAKEFILE_FILEPATH := $(abspath $(lastword $(MAKEFILE_LIST))) MAKEFILE_DIR := $(notdir $(patsubst %/,%,$(dir $(MAKEFILE_FILEPATH)))) MAKEFILE_PATH := $(dir $(MAKEFILE_FILEPATH)) CMAKE_COMMAND = cmake +#CMAKE_SOURCE_DIR = $(MAKEFILE_PATH)source +#CMAKE_BUILD_DIR = $(MAKEFILE_PATH)compile CMAKE_SOURCE_DIR = ./source CMAKE_BUILD_DIR = ./compile DEPENDS = cmake - PKGNAME = $(MAKEFILE_DIR) #PKGNAME = ubl-settings-datetime @@ -55,7 +58,6 @@ build: depend prepare @echo "Build ..."; \ make --directory=${CMAKE_BUILD_DIR}; \ echo "Build: OK" -# g++ -O2 -std=c++20 -lstdc++ -o ubl-settings-datetime ubl-settings-datetime.cpp `pkg-config --cflags --libs gtkmm-3.0` -Wl,-export-dynamic -g uninstall: @echo "Uninstall ..." @@ -102,11 +104,12 @@ install: check uninstall @install -Dm755 -t /usr/bin/ ${CMAKE_BUILD_DIR}/${PKGNAME} @install -Dm644 -t /usr/share/applications/ ${PKGNAME}.desktop @install -Dm644 -t /usr/share/polkit-1/actions/ ru.ublinux.pkexec.${PKGNAME}.exec.policy - @install -dm755 /usr/share/${PKGNAME}/{ui,images,reg} + @install -dm755 /usr/share/${PKGNAME}/{ui,images,css} @install -Dm644 -t /usr/share/${PKGNAME}/ui/ ${PKGNAME}.glade + @install -Dm644 -t /usr/share/${PKGNAME}/css/ style.css @install -Dm644 -t /usr/share/${PKGNAME}/images/ ${PKGNAME}.svg @install -Dm644 -t /usr/share/${PKGNAME}/images/ ${PKGNAME}.png - @cp -afr reg/* /usr/share/${PKGNAME}/reg/ + @install -Dm644 -t /usr/share/${PKGNAME}/images/ bg_top.png @gtk-update-icon-cache -fiq /usr/share/icons/hicolor/ @update-desktop-database --quiet 2>/dev/null @touch /usr/share/applications @@ -130,4 +133,4 @@ help: @echo "... compile" @echo "... install" @echo "... uninstall" - @echo "... clean" + @echo "... clean" \ No newline at end of file diff --git a/README.md b/README.md index 145e396..aa70440 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,41 @@ # ubl-settings-datetime +# Настройки даты и времени +[RU] Утилита для настройки даты и времени + +Utility for setting the date and time ![alt text](screenshot/screenshot.png) -- [ ] Локализация -- [x] Makefile -- [ ] Парсинг TimeZone C++ +# Build +In order to build ubl-settings-datetime you will need: + +- CMake +- C compiler +- GTK+ 3 & dependencies + +Once you have all the necessary dependencies, you can use: +```sh +$ make +``` + +# Installation +After a successful build, just use: +```sh +$ sudo make install clean +``` +# Uninstallation +After a successful build, just use: +```sh +$ sudo make uninstall +``` +# Usage +```sh +$ ubl-settings-datetime --help +Usage: ubl-settings-datetime [--lock-timezone] [--lock-ntp] [--lock-datetime] [--lock-update] +Options: + --lock-timezone Disable timezone field editing + --lock-ntp Disable ntp field editing + --lock-datetime Disable datetime field editing + --lock-update Disable save changes +``` diff --git a/bg_top.png b/bg_top.png new file mode 100644 index 0000000..8eb67cb Binary files /dev/null and b/bg_top.png differ diff --git a/messages.pot b/messages.pot new file mode 100644 index 0000000..df07366 --- /dev/null +++ b/messages.pot @@ -0,0 +1,123 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-01-25 12:51+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ubl-settings-datetime.glade:7 +msgid "Внимание!" +msgstr "" + +#: ubl-settings-datetime.glade:45 +msgid "Введите DHCP !" +msgstr "" + +#: ubl-settings-datetime.glade:62 +msgid "OK" +msgstr "" + +#. Date and Time Settings +#: ubl-settings-datetime.glade:84 +msgctxt "Settings the date and time" +msgid "Настройки даты и времени" +msgstr "" + +#. Setting the date and time +#: ubl-settings-datetime.glade:125 ubl-settings-datetime.glade:531 +msgctxt "Setting the date and time" +msgid "Настройка даты и времени" +msgstr "" + +#. Time +#: ubl-settings-datetime.glade:204 +msgctxt "Time" +msgid "Время" +msgstr "" + +#: ubl-settings-datetime.glade:238 +msgid ":" +msgstr "" + +#. Date +#: ubl-settings-datetime.glade:287 +msgctxt "Date" +msgid "Дата" +msgstr "" + +#. Date of +#. Format: DD.MM.YYYY +#: ubl-settings-datetime.glade:302 +msgctxt "" +"Date of\n" +"Format: DD.MM.YYYY" +msgid "" +"Дата\n" +"Формат: ДД.ММ.ГГГГ" +msgstr "" + +#. Interactive date picker +#: ubl-settings-datetime.glade:321 +msgctxt "Interactive date picker" +msgid "Интерактивный выбор даты" +msgstr "" + +#. time zone +#: ubl-settings-datetime.glade:364 +msgctxt "time zone" +msgid "Часовой пояс" +msgstr "" + +#. Region +#: ubl-settings-datetime.glade:389 ubl-settings-datetime.glade:396 +#: ubl-settings-datetime.glade:687 +msgctxt "Region" +msgid "Регион" +msgstr "" + +#. Zone +#: ubl-settings-datetime.glade:426 ubl-settings-datetime.glade:433 +#: ubl-settings-datetime.glade:721 +msgctxt "Zone" +msgid "Зона" +msgstr "" + +#: ubl-settings-datetime.glade:501 +msgid "Синхронизировать" +msgstr "" + +#. Automatic time synchronization +#: ubl-settings-datetime.glade:580 +msgctxt "Automatic time synchronization" +msgid "Автоматическая синхронизация времени" +msgstr "" + +#. Synchronize via NTP +#: ubl-settings-datetime.glade:591 +msgctxt "Synchronize via NTP" +msgid "Синхронизировать через NTP" +msgstr "" + +#. Time zone +#: ubl-settings-datetime.glade:655 +msgctxt "Time zone" +msgid "Часовой пояс" +msgstr "" + +#. Setting date and time in global configuration +#: ubl-settings-datetime.glade:776 +msgctxt "Setting date and time in global configuration" +msgid "Настройка даты и времени в глобальной конфигурации" +msgstr "" diff --git a/reg/Africa b/reg/Africa deleted file mode 100644 index 6afdb1c..0000000 --- a/reg/Africa +++ /dev/null @@ -1,54 +0,0 @@ -(UTC +00) Lome -(UTC +00) Bissau -(UTC +00) Sao_Tome -(UTC +00) Abidjan -(UTC +00) Accra -(UTC +00) Banjul -(UTC +00) Conakry -(UTC +00) Ouagadougou -(UTC +00) Nouakchott -(UTC +00) Timbuktu -(UTC +00) Dakar -(UTC +00) Monrovia -(UTC +00) Freetown -(UTC +00) Bamako -(UTC +01) El_Aaiun -(UTC +01) Lagos -(UTC +01) Porto-Novo -(UTC +01) Algiers -(UTC +01) Douala -(UTC +01) Brazzaville -(UTC +01) Libreville -(UTC +01) Casablanca -(UTC +01) Niamey -(UTC +01) Tunis -(UTC +01) Luanda -(UTC +01) Malabo -(UTC +01) Ceuta -(UTC +01) Kinshasa -(UTC +01) Bangui -(UTC +01) Ndjamena -(UTC +02) Juba -(UTC +02) Maseru -(UTC +02) Khartoum -(UTC +02) Lubumbashi -(UTC +02) Tripoli -(UTC +02) Mbabane -(UTC +02) Kigali -(UTC +02) Gaborone -(UTC +02) Windhoek -(UTC +02) Maputo -(UTC +02) Cairo -(UTC +02) Johannesburg -(UTC +02) Bujumbura -(UTC +02) Lusaka -(UTC +02) Harare -(UTC +02) Blantyre -(UTC +03) Djibouti -(UTC +03) Dar_es_Salaam -(UTC +03) Kampala -(UTC +03) Addis_Ababa -(UTC +03) Mogadishu -(UTC +03) Asmera -(UTC +03) Asmara -(UTC +03) Nairobi diff --git a/reg/America b/reg/America deleted file mode 100644 index 4eac7b5..0000000 --- a/reg/America +++ /dev/null @@ -1,147 +0,0 @@ -(UTC -10) Atka -(UTC -10) Adak -(UTC -09) Anchorage -(UTC -09) Metlakatla -(UTC -09) Juneau -(UTC -09) Sitka -(UTC -09) Nome -(UTC -09) Yakutat -(UTC -08) Tijuana -(UTC -08) Santa_Isabel -(UTC -08) Vancouver -(UTC -08) Ensenada -(UTC -08) Los_Angeles -(UTC -07) Ciudad_Juarez -(UTC -07) Dawson -(UTC -07) Hermosillo -(UTC -07) Phoenix -(UTC -07) Whitehorse -(UTC -07) Edmonton -(UTC -07) Creston -(UTC -07) Inuvik -(UTC -07) Mazatlan -(UTC -07) Shiprock -(UTC -07) Yellowknife -(UTC -07) Fort_Nelson -(UTC -07) Denver -(UTC -07) Boise -(UTC -07) Dawson_Creek -(UTC -07) Cambridge_Bay -(UTC -06) North_Dakota -(UTC -06) Knox_IN -(UTC -06) Costa_Rica -(UTC -06) Menominee -(UTC -06) El_Salvador -(UTC -06) Regina -(UTC -06) Guatemala -(UTC -06) Resolute -(UTC -06) Monterrey -(UTC -06) Chicago -(UTC -06) Winnipeg -(UTC -06) Indiana -(UTC -06) Rankin_Inlet -(UTC -06) Merida -(UTC -06) Tegucigalpa -(UTC -06) Managua -(UTC -06) Belize -(UTC -06) Rainy_River -(UTC -06) Bahia_Banderas -(UTC -06) Ojinaga -(UTC -06) Chihuahua -(UTC -06) Swift_Current -(UTC -06) Mexico_City -(UTC -06) Matamoros -(UTC -05) Jamaica -(UTC -05) Montreal -(UTC -05) Havana -(UTC -05) Grand_Turk -(UTC -05) Iqaluit -(UTC -05) Louisville -(UTC -05) Guayaquil -(UTC -05) Lima -(UTC -05) Coral_Harbour -(UTC -05) Detroit -(UTC -05) Port-au-Prince -(UTC -05) Fort_Wayne -(UTC -05) Eirunepe -(UTC -05) Indianapolis -(UTC -05) Rio_Branco -(UTC -05) Cancun -(UTC -05) Nipigon -(UTC -05) Toronto -(UTC -05) Panama -(UTC -05) Indiana -(UTC -05) New_York -(UTC -05) Kentucky -(UTC -05) Pangnirtung -(UTC -05) Thunder_Bay -(UTC -05) Bogota -(UTC -05) Cayman -(UTC -05) Atikokan -(UTC -05) Porto_Acre -(UTC -05) Nassau -(UTC -04) Anguilla -(UTC -04) Guadeloupe -(UTC -04) Puerto_Rico -(UTC -04) Porto_Velho -(UTC -04) Guyana -(UTC -04) Lower_Princes -(UTC -04) St_Lucia -(UTC -04) Port_of_Spain -(UTC -04) Dominica -(UTC -04) Manaus -(UTC -04) Thule -(UTC -04) St_Vincent -(UTC -04) St_Barthelemy -(UTC -04) Grenada -(UTC -04) Marigot -(UTC -04) Goose_Bay -(UTC -04) Martinique -(UTC -04) La_Paz -(UTC -04) Cuiaba -(UTC -04) Tortola -(UTC -04) Virgin -(UTC -04) Santo_Domingo -(UTC -04) Antigua -(UTC -04) Curacao -(UTC -04) Barbados -(UTC -04) Blanc-Sablon -(UTC -04) Aruba -(UTC -04) Kralendijk -(UTC -04) Montserrat -(UTC -04) Campo_Grande -(UTC -04) Caracas -(UTC -04) St_Thomas -(UTC -04) Glace_Bay -(UTC -04) St_Kitts -(UTC -04) Moncton -(UTC -04) Boa_Vista -(UTC -04) Halifax -(UTC -03) Buenos_Aires -(UTC -03) Santarem -(UTC -03) Araguaina -(UTC -03) Belem -(UTC -03) St_Johns -(UTC -03) Nuuk -(UTC -03) Cordoba -(UTC -03) Catamarca -(UTC -03) Rosario -(UTC -03) Jujuy -(UTC -03) Montevideo -(UTC -03) Punta_Arenas -(UTC -03) Cayenne -(UTC -03) Sao_Paulo -(UTC -03) Santiago -(UTC -03) Paramaribo -(UTC -03) Miquelon -(UTC -03) Godthab -(UTC -03) Maceio -(UTC -03) Fortaleza -(UTC -03) Argentina -(UTC -03) Mendoza -(UTC -03) Recife -(UTC -03) Bahia -(UTC -03) Asuncion -(UTC -02) Noronha -(UTC -01) Scoresbysund -(UTC +00) Danmarkshavn diff --git a/reg/Antarctica b/reg/Antarctica deleted file mode 100644 index 2f99849..0000000 --- a/reg/Antarctica +++ /dev/null @@ -1,12 +0,0 @@ -(UTC -03) Rothera -(UTC -03) Palmer -(UTC +00) Troll -(UTC +03) Syowa -(UTC +05) Mawson -(UTC +06) Vostok -(UTC +07) Davis -(UTC +10) DumontDUrville -(UTC +11) Casey -(UTC +11) Macquarie -(UTC +13) McMurdo -(UTC +13) South_Pole diff --git a/reg/Arctic b/reg/Arctic deleted file mode 100644 index feba77b..0000000 --- a/reg/Arctic +++ /dev/null @@ -1 +0,0 @@ -(UTC +01) Longyearbyen diff --git a/reg/Asia b/reg/Asia deleted file mode 100644 index 57ce91b..0000000 --- a/reg/Asia +++ /dev/null @@ -1,99 +0,0 @@ -(UTC +02) Beirut -(UTC +02) Famagusta -(UTC +02) Nicosia -(UTC +02) Hebron -(UTC +02) Tel_Aviv -(UTC +02) Jerusalem -(UTC +02) Gaza -(UTC +03) Amman -(UTC +03) Bahrain -(UTC +03) Tehran -(UTC +03) Baghdad -(UTC +03) Istanbul -(UTC +03) Kuwait -(UTC +03) Riyadh -(UTC +03) Qatar -(UTC +03) Damascus -(UTC +03) Aden -(UTC +04) Yerevan -(UTC +04) Baku -(UTC +04) Dubai -(UTC +04) Kabul -(UTC +04) Muscat -(UTC +04) Tbilisi -(UTC +05) Kathmandu -(UTC +05) Samarkand -(UTC +05) Ashgabat -(UTC +05) Karachi -(UTC +05) Katmandu -(UTC +05) Calcutta -(UTC +05) Tashkent -(UTC +05) Yekaterinburg -(UTC +05) Oral -(UTC +05) Dushanbe -(UTC +05) Atyrau -(UTC +05) Aqtobe -(UTC +05) Aqtau -(UTC +05) Qyzylorda -(UTC +05) Ashkhabad -(UTC +05) Colombo -(UTC +05) Kolkata -(UTC +06) Dhaka -(UTC +06) Thimphu -(UTC +06) Rangoon -(UTC +06) Kashgar -(UTC +06) Qostanay -(UTC +06) Almaty -(UTC +06) Urumqi -(UTC +06) Yangon -(UTC +06) Dacca -(UTC +06) Thimbu -(UTC +06) Omsk -(UTC +06) Bishkek -(UTC +07) Ho_Chi_Minh -(UTC +07) Phnom_Penh -(UTC +07) Vientiane -(UTC +07) Bangkok -(UTC +07) Krasnoyarsk -(UTC +07) Novokuznetsk -(UTC +07) Barnaul -(UTC +07) Jakarta -(UTC +07) Saigon -(UTC +07) Hovd -(UTC +07) Novosibirsk -(UTC +07) Tomsk -(UTC +07) Pontianak -(UTC +08) Harbin -(UTC +08) Chungking -(UTC +08) Ulan_Bator -(UTC +08) Brunei -(UTC +08) Singapore -(UTC +08) Choibalsan -(UTC +08) Chongqing -(UTC +08) Macau -(UTC +08) Ujung_Pandang -(UTC +08) Manila -(UTC +08) Kuala_Lumpur -(UTC +08) Makassar -(UTC +08) Kuching -(UTC +08) Macao -(UTC +08) Shanghai -(UTC +08) Taipei -(UTC +08) Ulaanbaatar -(UTC +08) Irkutsk -(UTC +08) Hong_Kong -(UTC +09) Khandyga -(UTC +09) Seoul -(UTC +09) Jayapura -(UTC +09) Chita -(UTC +09) Pyongyang -(UTC +09) Yakutsk -(UTC +09) Tokyo -(UTC +09) Dili -(UTC +10) Vladivostok -(UTC +10) Ust-Nera -(UTC +11) Srednekolymsk -(UTC +11) Sakhalin -(UTC +11) Magadan -(UTC +12) Anadyr -(UTC +12) Kamchatka diff --git a/reg/Atlantic b/reg/Atlantic deleted file mode 100644 index 57a99bf..0000000 --- a/reg/Atlantic +++ /dev/null @@ -1,12 +0,0 @@ -(UTC -04) Bermuda -(UTC -03) Stanley -(UTC -02) South_Georgia -(UTC -01) Cape_Verde -(UTC -01) Azores -(UTC +00) Faeroe -(UTC +00) Faroe -(UTC +00) St_Helena -(UTC +00) Reykjavik -(UTC +00) Canary -(UTC +00) Madeira -(UTC +01) Jan_Mayen diff --git a/reg/Australia b/reg/Australia deleted file mode 100644 index d762891..0000000 --- a/reg/Australia +++ /dev/null @@ -1,23 +0,0 @@ -(UTC +08) Perth -(UTC +08) Eucla -(UTC +08) West -(UTC +09) Darwin -(UTC +09) North -(UTC +10) Yancowinna -(UTC +10) South -(UTC +10) Lindeman -(UTC +10) Broken_Hill -(UTC +10) Adelaide -(UTC +10) Queensland -(UTC +10) Brisbane -(UTC +11) Victoria -(UTC +11) Hobart -(UTC +11) ACT -(UTC +11) Tasmania -(UTC +11) LHI -(UTC +11) Currie -(UTC +11) Canberra -(UTC +11) Sydney -(UTC +11) Melbourne -(UTC +11) Lord_Howe -(UTC +11) NSW diff --git a/reg/Brazil b/reg/Brazil deleted file mode 100644 index 79213f9..0000000 --- a/reg/Brazil +++ /dev/null @@ -1,4 +0,0 @@ -(UTC -05) Acre -(UTC -04) West -(UTC -03) East -(UTC -02) DeNoronha diff --git a/reg/Chile b/reg/Chile deleted file mode 100644 index c72cae0..0000000 --- a/reg/Chile +++ /dev/null @@ -1,2 +0,0 @@ -(UTC -05) EasterIsland -(UTC -03) Continental diff --git a/reg/Europe b/reg/Europe deleted file mode 100644 index a6a7a52..0000000 --- a/reg/Europe +++ /dev/null @@ -1,64 +0,0 @@ -(UTC +00) Jersey -(UTC +00) Dublin -(UTC +00) Belfast -(UTC +00) Guernsey -(UTC +00) London -(UTC +00) Lisbon -(UTC +00) Isle_of_Man -(UTC +01) Ljubljana -(UTC +01) Stockholm -(UTC +01) Skopje -(UTC +01) Oslo -(UTC +01) Sarajevo -(UTC +01) Tirane -(UTC +01) Zagreb -(UTC +01) Vienna -(UTC +01) Andorra -(UTC +01) Madrid -(UTC +01) Podgorica -(UTC +01) Copenhagen -(UTC +01) Monaco -(UTC +01) Belgrade -(UTC +01) Budapest -(UTC +01) Brussels -(UTC +01) Amsterdam -(UTC +01) Berlin -(UTC +01) Zurich -(UTC +01) Bratislava -(UTC +01) Prague -(UTC +01) Malta -(UTC +01) Rome -(UTC +01) Luxembourg -(UTC +01) Vaduz -(UTC +01) Paris -(UTC +01) Warsaw -(UTC +01) Vatican -(UTC +01) Busingen -(UTC +01) Gibraltar -(UTC +01) San_Marino -(UTC +02) Sofia -(UTC +02) Vilnius -(UTC +02) Helsinki -(UTC +02) Mariehamn -(UTC +02) Riga -(UTC +02) Bucharest -(UTC +02) Kyiv -(UTC +02) Kiev -(UTC +02) Athens -(UTC +02) Zaporozhye -(UTC +02) Tallinn -(UTC +02) Kaliningrad -(UTC +02) Uzhgorod -(UTC +02) Chisinau -(UTC +02) Nicosia -(UTC +02) Tiraspol -(UTC +03) Simferopol -(UTC +03) Istanbul -(UTC +03) Moscow -(UTC +03) Kirov -(UTC +03) Minsk -(UTC +03) Volgograd -(UTC +04) Ulyanovsk -(UTC +04) Samara -(UTC +04) Astrakhan -(UTC +04) Saratov diff --git a/reg/Indian b/reg/Indian deleted file mode 100644 index cbb5827..0000000 --- a/reg/Indian +++ /dev/null @@ -1,11 +0,0 @@ -(UTC +03) Comoro -(UTC +03) Antananarivo -(UTC +03) Mayotte -(UTC +04) Mauritius -(UTC +04) Reunion -(UTC +04) Mahe -(UTC +05) Maldives -(UTC +05) Kerguelen -(UTC +06) Chagos -(UTC +06) Cocos -(UTC +07) Christmas diff --git a/reg/Mexico b/reg/Mexico deleted file mode 100644 index af4773f..0000000 --- a/reg/Mexico +++ /dev/null @@ -1,3 +0,0 @@ -(UTC -08) BajaNorte -(UTC -07) BajaSur -(UTC -06) General diff --git a/reg/US b/reg/US deleted file mode 100644 index 7c1cbd3..0000000 --- a/reg/US +++ /dev/null @@ -1,12 +0,0 @@ -(UTC -11) Samoa -(UTC -10) Aleutian -(UTC -10) Hawaii -(UTC -09) Alaska -(UTC -08) Pacific -(UTC -07) Mountain -(UTC -07) Arizona -(UTC -06) Indiana-Starke -(UTC -06) Central -(UTC -05) East-Indiana -(UTC -05) Michigan -(UTC -05) Eastern diff --git a/ru.ublinux.pkexec.ubl-settings-datetime.exec.policy b/ru.ublinux.pkexec.ubl-settings-datetime.exec.policy index f657711..3aa3714 100644 --- a/ru.ublinux.pkexec.ubl-settings-datetime.exec.policy +++ b/ru.ublinux.pkexec.ubl-settings-datetime.exec.policy @@ -21,4 +21,4 @@ true - + \ No newline at end of file diff --git a/screenshot/screenshot.png b/screenshot/screenshot.png index 39c88a4..e5addb2 100644 Binary files a/screenshot/screenshot.png and b/screenshot/screenshot.png differ diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index e4f8297..13840d1 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -7,18 +7,20 @@ pkg_check_modules(GTK REQUIRED gtkmm-3.0) include_directories(${GTK_INCLUDE_DIRS}) link_directories(${GTK_LIBRARY_DIRS}) add_definitions(${GTK_CFLAGS_OTHER}) +find_package(ICU REQUIRED COMPONENTS uc dt in io) #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always -std=c++2a") -#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -fdiagnostics-color=always") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always") set(SOURCE_FILES - ubl-settings-datetime.cpp) + main.cc + ubl-settings-datetime.cc + ubl-settings-datetime.h) set(LIBRARIES ${GTK_LIBRARIES} pthread) add_executable(ubl-settings-datetime ${SOURCE_FILES}) -target_link_libraries(ubl-settings-datetime ${LIBRARIES}) -install(TARGETS ubl-settings-datetime DESTINATION bin) +target_link_libraries(ubl-settings-datetime ${LIBRARIES} ${ICU_LIBRARIES}) +install(TARGETS ubl-settings-datetime DESTINATION bin) \ No newline at end of file diff --git a/source/main.cc b/source/main.cc new file mode 100644 index 0000000..ec8c69f --- /dev/null +++ b/source/main.cc @@ -0,0 +1,68 @@ +#include +#include +#include +#include +#include "ubl-settings-datetime.h" +int main(int argc, char* argv[]) { + string str_argv=""; + string str_cmd_argv = ""; + for (int i=1; i1){ + str_argv = argv[1]; + } + if ((str_argv.find("--lock")!=std::string::npos || argc==1)){ + int len_argv = 1; + auto app = Gtk::Application::create(len_argv, argv, "org.gtkmm.example.plug"); + auto builder = Gtk::Builder::create_from_file(path_glade + "ubl-settings-datetime.glade"); + for (int i=0; iget_widget_derived("window", wnd); + auto r = app->run(*wnd); + delete wnd; + return r; + } + else{ + auto app = Gtk::Application::create(argc, argv, "org.gtkmm.example.plug"); + auto builder = Gtk::Builder::create_from_file(path_glade + "ubl-settings-datetime.glade"); + Glib::init(); + Glib::OptionContext context; + CmdArgParser parser{ + "Socket ID", + "Command line argument for socket ID communication.", + "No help available, sorry" + }; + context.set_main_group(parser); + context.parse(argc, argv); + ::Window socketID = parser.GetSocketID(); + SettingsPlug plug{socketID, builder}; + plug.show(); + app->run(plug); + return 0; + } +} \ No newline at end of file diff --git a/source/ubl-settings-datetime.cc b/source/ubl-settings-datetime.cc new file mode 100644 index 0000000..9639378 --- /dev/null +++ b/source/ubl-settings-datetime.cc @@ -0,0 +1,892 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "unicode/utypes.h" +#include "unicode/utext.h" + +#include +#include +#include +#include "ubl-settings-datetime.h" +using namespace std; + +string path_app= "/usr/bin/"; +string path_glade= "/usr/share/ubl-settings-datetime/ui/"; +string app_name = "ubl-settings-datetime"; +string path_locale = "/usr/share/locale/"; +string path_css = "/usr/share/ubl-settings-datetime/css/style.css"; +bool flag_datetime = false; +bool flag_timezone = false; +bool flag_ntp = false; +bool flag_update = false; + +CmdArgParser::CmdArgParser(const std::string& p_name, const std::string& p_description, const std::string& p_help) +: Glib::OptionGroup{p_name, p_description, p_help} +{ + Glib::OptionEntry socketIDArg; + socketIDArg.set_long_name("socket-id"); + socketIDArg.set_short_name('s'); + socketIDArg.set_flags(Glib::OptionEntry::FLAG_IN_MAIN); + socketIDArg.set_description("Settings manager socket"); + add_entry(socketIDArg, m_socketID); +} + +::Window CmdArgParser::GetSocketID() const { + return m_socketID; +} + +MainWindow::MainWindow(BaseObjectType* obj, Glib::RefPtr const& builder) + : Gtk::ApplicationWindow(obj) + , builder{builder} { + this->settings(); +} + +MainWindow::MainWindow(Glib::RefPtr const& builder) { + this->builder = builder; + this->settings(); +} + +void MainWindow::settings(){ + year=0, month=0, day=0; + this->get_builder(); + this->event(); + this->lacalization(); + if (this->check_root()==0){ + numTimeHrs->set_range(0,23); + numTimeMin->set_range(0,59); + numTimeHrs->set_increments(1.0,1.0); + numTimeMin->set_increments(1.0,1.0); + this->get_config(); + this->flag_block_gui(); + this->parse_text_date(); + } + else{ + numTimeHrs->set_sensitive(false); + numTimeMin->set_sensitive(false); + lblTime->set_sensitive(false); + lblData->set_sensitive(false); + txtDate->set_sensitive(false); + btnChooseDate->set_sensitive(false); + btnUpdateDateTime->set_sensitive(false); + btnHardwareTime->set_sensitive(false); + cbRegion->set_sensitive(false); + cbZone->set_sensitive(false); + lblReg->set_sensitive(false); + lblZone->set_sensitive(false); + lblTimeZone->set_sensitive(false); + lblDateTimeSettingGlob->set_sensitive(false); + cbxSynchronizeNtpGlob->set_sensitive(false); + lblSynchronizebChkGLob->set_sensitive(false); + cbDhcp->set_sensitive(false); + txtNtpServer->set_sensitive(false); + lblTimeZoneGlob->set_sensitive(false); + lblRegGlob->set_sensitive(false); + lblZone1Glob->set_sensitive(false); + lblDateTimeSetting->set_sensitive(false); + + } +} + +int MainWindow::check_root(){ + if (geteuid()!=0){ + lblMessageSudo->set_text(_("The program must be run with \nsuperuser privileges!")); + mess_sudo->show(); + return 1; + } + return 0; +} +void MainWindow::lacalization(){ + txtDate->set_tooltip_text(_("Date of\nFormat: DD.MM.YYYY")); + txtNtpServer->set_tooltip_text(_("Enter the name of the ntp-server or its ip-address.\nWhen entering multiple addresses, separate them with commas.")); + lblSynchronizebChkGLob->set_text(_("Synchronize via NTP")); + cbDhcp->append(_("Default")); + cbDhcp->append(_("DHCP")); + cbDhcp->append(_("Manual")); + lblDateTimeSetting->set_text(_("Local Configuration")); + lblHead->set_text(_("Settings the date and time")); + lblTime->set_text(_("Time")); + lblData->set_text(_("Date")); + lblTimeZone->set_text(_("Time zone")); + lblReg->set_text(_("Region")); + lblZone->set_text(_("Zone")); + lblRegGlob->set_text(_("Region")); + lblZone1Glob->set_text(_("Zone")); + lblTimeZoneGlob->set_text(_("Time zone")); + lblSynchronizeBtn->set_text(_("Sync by")); + lblDateTimeSettingGlob->set_text(_("Global customization")); + this->set_title(_("ubl-settings-datetime")); + windowsNnpClose->set_title(_("Warning!")); + mess_sudo->set_title(_("Warning!")); + mess_dchp->set_title(_("Warning!")); + lblTimeBios->set_text(_("Synchronize hardware time")); + lblBanerStopNtp->set_text(_("Active service detected\nAutomatic time and date synchronization service detected")); + lblNtpStop->set_text(_("Stop the synchronization service")); + lblNtpClose->set_text(_("Close")); + //_lblSynchronizebChk->set_text(_("Synchronize via NTP")); +} + +void MainWindow::flag_block_gui(){ + if (flag_datetime==true){ + //numTimeHrs->set_sensitive(false); + //numTimeMin->set_sensitive(false); + //txtDate->set_sensitive(false); + btnUpdateDateTime->set_sensitive(false); + numTimeHrs->set_sensitive(false); + numTimeMin->set_sensitive(false); + btnChooseDate->set_sensitive(false); + txtDate->set_sensitive(false); + lblTimeBios->set_sensitive(false); + btnHardwareTime->set_sensitive(false); + lblTime->set_sensitive(false); + lblData->set_sensitive(false); + //cbxSynchronizeNtpGlob->set_sensitive(false); + } + if (flag_timezone==true){ + cbRegion->set_sensitive(false); + cbZone->set_sensitive(false); + cbRegionGlob->set_sensitive(false); + cbZoneGlob->set_sensitive(false); + //btnChooseDate->set_sensitive(false); + cbDhcp->set_sensitive(false); + } + if (flag_ntp==true){ + cbxSynchronizeNtpGlob->set_sensitive(false); + cbDhcp->set_sensitive(false); + txtNtpServer->set_sensitive(false); + } + if (flag_update==true){ + lblDateTimeSettingGlob->set_sensitive(false); + //lblSynchronizebChkGLob->set_sensitive(false); + cbxSynchronizeNtpGlob->set_sensitive(false); + lblTimeZoneGlob->set_sensitive(false); + lblRegGlob->set_sensitive(false); + cbRegionGlob->set_sensitive(false); + lblZone1Glob->set_sensitive(false); + cbZoneGlob->set_sensitive(false); + txtNtpServer->set_sensitive(false); + cbDhcp->set_sensitive(false); + } +} + +void MainWindow::add_CSS(){ + Glib::RefPtr cssProvider = Gtk::CssProvider::create(); + cssProvider->load_from_path(path_css); + Glib::RefPtr styleContext = Gtk::StyleContext::create(); + Glib::RefPtr screen = Gdk::Screen::get_default();//get default screen + styleContext->add_provider_for_screen(screen, cssProvider, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);//add provider for screen in all application + Glib::RefPtr context = boxColor->get_style_context(); + Glib::RefPtr context_lbl_head = lblHead->get_style_context(); + context->add_class("cssboxColor1"); + context_lbl_head->add_class("textHead"); +} + +void MainWindow::get_builder(){ + builder->set_translation_domain(path_app); + builder->get_widget("boxColor", boxColor); + builder->get_widget("btnUpdateDateTime", btnUpdateDateTime); + builder->get_widget("btnChooseDate", btnChooseDate); + builder->get_widget("btnMessClose", btnMessClose); + builder->get_widget("cbxSynchronizeNtpGlob", cbxSynchronizeNtpGlob); + builder->get_widget("popCalendar", popCalendar); + builder->get_widget("numTimeHrs", numTimeHrs); + builder->get_widget("numTimeMin", numTimeMin); + builder->get_widget("cbDhcp", cbDhcp); + builder->get_widget("txtDate", txtDate); + builder->get_widget("cbRegion", cbRegion); + builder->get_widget("cbRegionGlob", cbRegionGlob); + builder->get_widget("cbZone", cbZone); + builder->get_widget("cbZoneGlob", cbZoneGlob); + builder->get_widget("txtNtpServer", txtNtpServer); + builder->get_widget("cldrDate", cldrDate); + builder->get_widget("mess_dchp", mess_dchp); + builder->get_widget("lblMessage", lblMessage); + builder->get_widget("lblDateTimeSetting",lblDateTimeSetting); + builder->get_widget("lblHead",lblHead); + builder->get_widget("lblTime",lblTime); + builder->get_widget("lblData",lblData); + builder->get_widget("lblTimeZone",lblTimeZone); + builder->get_widget("lblReg",lblReg); + builder->get_widget("lblZone",lblZone); + builder->get_widget("lblRegGlob",lblRegGlob); + builder->get_widget("lblZone1Glob",lblZone1Glob); + builder->get_widget("lblTimeZoneGlob",lblTimeZoneGlob); + //builder->get_widget("lblSynchronizebChk",_lblSynchronizebChk); + builder->get_widget("lblSynchronizebChkGLob",lblSynchronizebChkGLob); + builder->get_widget("lblSynchronizeBtn",lblSynchronizeBtn); + builder->get_widget("lblDateTimeSettingGlob",lblDateTimeSettingGlob); + builder->get_widget("lblTimeBios",lblTimeBios); + builder->get_widget("btnHardwareTime",btnHardwareTime); + builder->get_widget("mess_sudo",mess_sudo); + builder->get_widget("lblMessageSudo",lblMessageSudo); + builder->get_widget("btnMessCloseSudo",btnMessCloseSudo); + builder->get_widget("windowsNnpClose",windowsNnpClose); + builder->get_widget("btnNtpStop",btnNtpStop); + builder->get_widget("btnNtpWinClose",btnNtpWinClose); + builder->get_widget("lblNtpStop",lblNtpStop); + builder->get_widget("lblNtpClose",lblNtpClose); + builder->get_widget("lblBanerStopNtp",lblBanerStopNtp); + + //builder->get_widget("cbxSynchronizeNtp",cbxSynchronizeNtp); + + this->add_CSS(); +} +void MainWindow::gui_exit(){ + exit(1); +} + +bool MainWindow::gui_exit_2(GdkEventAny* event){ + if (event!=NULL){} + exit(1); + return true; +} + +void MainWindow::event(){ + //cbxSynchronizeNtpGlob->signal_toggled().connect(sigc::mem_fun(*this, &MainWindow::set_ntp_toggle)); + btnHardwareTime->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::hardware_clock)); + btnMessClose->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::gui_mess_close)); + btnMessCloseSudo->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::gui_exit)); + //cldrDate->signal_day_selected().connect(sigc::mem_fun(*this, &MainWindow::get_calendar)); + cbxSynchronizeNtpGlob->signal_toggled().connect(sigc::mem_fun(*this, &MainWindow::set_ntp_toggle_glob)); + btnUpdateDateTime->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::wrapper_update_time_date)); + btnChooseDate->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::calendar_show)); + cbDhcp->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::event_entry_cbDhcp)); + cbRegion->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::append_zone)); + cbRegionGlob->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::append_zone_glob)); + cbZone->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::enter_zone)); + cbZoneGlob->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::enter_zone_glob)); + txtNtpServer->signal_focus_out_event().connect(sigc::mem_fun(*this, &MainWindow::focus_ntp)); + cldrDate->signal_day_selected_double_click().connect(sigc::mem_fun(*this, &MainWindow::get_calendar)); + mess_sudo->signal_delete_event().connect(sigc::mem_fun(*this, &MainWindow::gui_exit_2)); + btnNtpWinClose->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::wind_close_ntp)); + btnNtpStop->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::stop_ntp)); +} +void MainWindow::wind_close_ntp(){ + windowsNnpClose->hide(); +} + +void MainWindow::stop_ntp(){ + windowsNnpClose->hide(); + string cmd = "SEL_SERVICE=\"systemd-timesyncd\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service; "; + system(cmd.c_str()); + cmd ="SEL_SERVICE=\"ntpd\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ${SEL_SERVICE}; "; + system(cmd.c_str()); + cmd ="SEL_SERVICE=\"ntpdate\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ${SEL_SERVICE}; "; + system(cmd.c_str()); + cmd = "SEL_SERVICE=\"chronyd\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ${SEL_SERVICE}; "; + system(cmd.c_str()); + cmd ="SEL_SERVICE=\"openntpd\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ntpd; "; + system(cmd.c_str()); + cmd ="SEL_SERVICE=\"ptp4l\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ${SEL_SERVICE}; "; + system(cmd.c_str()); + cmd ="SEL_SERVICE=\"phc2sys\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ${SEL_SERVICE} "; + system(cmd.c_str()); + + this->update_time_date(); + +} + +void MainWindow::hardware_clock(){ + string cmd = "hwclock --systohc"; + system(cmd.c_str()); +} + +void MainWindow::gui_mess_close(){ + mess_dchp->hide(); +} + +bool MainWindow::focus_ntp(GdkEventFocus* event){ + if (event!=NULL){} + if (txtNtpServer->get_text()=="" || txtNtpServer->get_text()==" "){ + lblMessage->set_text(_("Enter DHCP!")); + mess_dchp->show(); + } + else{ + string cmd = ""; + string array_simvol[]={ + "!","\"","#","$","%","^","'","*","(",")","+",":",";","=","<",">","?", + "@","[","]","\\","{","}","|","~", " " + }; + bool flag_error = false; + string str_ntp = txtNtpServer->get_text(); + for (const auto &simvol: array_simvol){ + if (str_ntp.find(simvol)!=std::string::npos){ + cout << simvol << 2222 << endl; + flag_error=true; + break; + + } + } + if (flag_error==false){ + cmd = "/usr/bin/ubconfig set network NTPSERVERS=\"" + str_ntp + "\""; + this->call(cmd.c_str()); + } + else{ + lblMessage->set_text(_("An invalid character is entered")); + mess_dchp->show(); + } + } + + return true; +} + +void MainWindow::event_entry_cbDhcp(){ + Glib::ustring str_dhcp = cbDhcp->get_active_text(); + int activ_index = cbDhcp->get_active_row_number(); + if (str_dhcp.length()!=0){ + if (activ_index==0){ + string cmd = "/usr/bin/ubconfig set network NTPSERVERS=default"; + system(cmd.c_str()); + txtNtpServer->set_sensitive(false); + cbDhcp->set_active(activ_index); + string response = this->call("/usr/bin/ubconfig --source=default get NTPSERVERS_DEFAULT"); + this->str_remove(response, "\n"); + txtNtpServer->set_text(response); + } + else if (activ_index==1){ + string cmd = "/usr/bin/ubconfig set network NTPSERVERS=dhcp"; + system(cmd.c_str()); + txtNtpServer->set_sensitive(false); + cbDhcp->set_active(activ_index); + txtNtpServer->set_text(""); + } + else if (activ_index==2){ + txtNtpServer->set_sensitive(true); + if (txtNtpServer->get_text().find("default")!=std::string::npos){ + txtNtpServer->set_text(""); + } + string str_dhcp = this->call("/usr/bin/ubconfig get network NTPSERVERS"); + if ((str_dhcp!="") && (str_dhcp!="(null)") && (str_dhcp.find("default")==std::string::npos)){ + str_dhcp = str_dhcp.substr(str_dhcp.find("=")+1,str_dhcp.length()); + str_dhcp = str_dhcp.substr(0,str_dhcp.find("\n")); + if (str_dhcp!="dhcp" && str_dhcp!="(null)"){ + txtNtpServer->set_text(""); + } + cbDhcp->set_active(activ_index); + } + } + } + else{ + string cmd = "/usr/bin/ubconfig set network NTPSERVERS=dhcp"; + system(cmd.c_str()); + cbDhcp->set_active(0); + } +} + +string MainWindow::str_remove(std::string& source, const std::string to_remove){ + auto begin = source.find(to_remove); + if (begin!=std::string::npos){ + int len_to_remove = to_remove.length(); + source.erase(begin, begin+len_to_remove); + } + return source; +} + +void MainWindow::get_calendar(){ + string str_month = ""; + string str_day = ""; + cldrDate->get_date(year, month, day); + if (month <10){ + str_month = "0"+to_string(month+1); + } + else{ + str_month = to_string(month+1); + } + if (day <10){ + str_day = "0"+to_string(day); + } + else{ + str_day = to_string(day); + } + string date = str_day + '.' + str_month + '.' + to_string(year); + txtDate->set_text(date); + popCalendar->hide(); +} + +void MainWindow::calendar_show(){ + if (year==0){ + time_t now = time(0); + tm *ltm = localtime(&now); + unsigned int y=1900+ ltm->tm_year; + unsigned int m=ltm->tm_mon; + unsigned int d=ltm->tm_mday; + cldrDate->select_month(m,y); + cldrDate->select_day(d); + } + else{ + cldrDate->select_month(month,year); + cldrDate->select_day(day); + + } + popCalendar->show(); +} + +void MainWindow::enry_dhcp_mess(){ + string str_dhcp = this->call("/usr/bin/ubconfig get network NTPSERVERS"); + if ((str_dhcp!="") && (str_dhcp!="(null)")){ + this->set_ntp_toggle_glob(); + cbxSynchronizeNtpGlob->set_active(1); + str_dhcp = str_dhcp.substr(str_dhcp.find("=")+1,str_dhcp.length()); + str_dhcp = str_dhcp.substr(0,str_dhcp.find("\n")); + if (str_dhcp=="dhcp"){ + cbDhcp->set_active(1); + txtNtpServer->set_text(""); + txtNtpServer->set_sensitive(false); + } + else if (str_dhcp=="default"){ + cbDhcp->set_active(0); + txtNtpServer->set_text(""); + txtNtpServer->set_sensitive(false); + } + else{ + if (str_dhcp==""){ + lblMessage->set_text(_("Enter DHCP!")); + mess_dchp->show(); + } + else if (str_dhcp=="(null)"){ + cbDhcp->set_active(0); + txtNtpServer->set_text(""); + } + else{ + cbDhcp->set_active(2); + txtNtpServer->set_text(str_dhcp); + txtNtpServer->set_sensitive(true); + } + } + } + else{ + cbxSynchronizeNtpGlob->set_active(0); + cbDhcp->set_sensitive(0); + txtNtpServer->set_sensitive(0); + } +} + +void MainWindow::get_config(){ + this->read_file(); + this->update_hour_minute(); + this->update_calendar(); + this->enry_dhcp_mess(); + string read_reg_zon_cfg = this->call("/usr/bin/ubconfig get clock ZONE"); + if ((read_reg_zon_cfg != "") && (strstr(read_reg_zon_cfg.c_str() ,"(null)")==NULL)){ + read_reg_zon_cfg = read_reg_zon_cfg.substr(read_reg_zon_cfg.find("=")+1,read_reg_zon_cfg.length()); + read_reg_zon_cfg = read_reg_zon_cfg.substr(0,read_reg_zon_cfg.find("\n")); + string str_filling_reg = read_reg_zon_cfg.substr(0,read_reg_zon_cfg.find("/")); + string str_filling_zon = read_reg_zon_cfg.substr(read_reg_zon_cfg.find("/")+1,read_reg_zon_cfg.length()); + str_filling_zon = str_filling_zon.substr(0,str_filling_zon.find("\n")); + string str_zone_check = ""; + this->append_region_zone(str_filling_reg,str_filling_zon); + //this->append_region_zone("Africa","Abidjan"); + } + else { + this->append_region_zone("Africa","Abidjan"); + } +} + +void MainWindow::enter_zone(){ + int activ_index_reg = cbRegion->get_active_row_number(); + string reg_text=array_region[activ_index_reg]; + int activ_index = cbZone->get_active_row_number(); + string zone_text = ""; + if(!(reg_text.empty())){ + int index=0; + for (const auto &zone :time_reg_map.at(reg_text)){ + if (index==activ_index){ + zone_text=zone; + } + index+=1; + } + if (!(zone_text.empty())){ + str_zone=zone_text; + str_region=reg_text; + string cmd = "rm -f /etc/localtime"; + system(cmd.c_str()); + string cmd1 = "ln -s /usr/share/zoneinfo/" + str_region + "/" + str_zone+" /etc/localtime"; + system(cmd1.c_str()); + } + else{ + str_zone=""; + str_region=""; + } + } + else{ + str_zone=""; + str_region=""; + } +} + +void MainWindow::parse_text_date(){ + string data = txtDate->get_text(); + if (data.length()==10){ + string day = data.substr(0,2); + string month1 = data.substr(3,2); + string year = data.substr(6,data.length()); + } +} + +void MainWindow::enter_zone_glob(){ + int activ_index_reg = cbRegionGlob->get_active_row_number(); + string reg_text=array_region[activ_index_reg]; + int activ_index = cbZoneGlob->get_active_row_number(); + string zone_text=""; + if(!(reg_text.empty())){ + int index=0; + for (const auto &zone :time_reg_map.at(reg_text)){ + if (index==activ_index){ + zone_text=zone; + } + index+=1; + } + if (!(zone_text.empty())){ + //str_zoneGlob = zone_text.substr(zone_text.find(") ")+2,zone_text.length()); + string cmd = "/usr/bin/ubconfig set clock ZONE=" +reg_text +"/" + zone_text; + system(cmd.c_str()); + } + else{ + str_zoneGlob=""; + str_region_glob=""; + } + } + else{ + str_zoneGlob=""; + str_region_glob=""; + } +} + +void MainWindow::set_ntp_toggle_glob(){ + bool flag = cbxSynchronizeNtpGlob->get_active(); + if (flag==false){ + system("/usr/bin/ubconfig remove network NTPSERVERS"); + cbDhcp->set_sensitive(false); + txtNtpServer->set_sensitive(false); + } + else{ + cbDhcp->set_sensitive(true); + txtNtpServer->set_sensitive(true); + } + +} + +void MainWindow::append_region_zone(string region, string zone){ + str_region=region; + str_region_glob=region; + int index = 0; + Glib::ustring reg_local = ""; + for (const auto &text : array_region) { + reg_local = text; + reg_local = string(_(reg_local.c_str())); + cbRegion->append(Glib::ustring(reg_local)); + cbRegionGlob->append(Glib::ustring(reg_local)); + if (text == region){ + cbRegionGlob->set_active_text(reg_local); + cbRegion->set_active_text(reg_local); + } + index+=1; + } + + index = 0; + string zone_mixing = ""; + string path_reg_zone = ""; + string zone_offest = ""; + path_reg_zone=region+"/"+zone; + zone_offest = this->zone_file_read(path_reg_zone) + _(zone.c_str()); + for (string &_str_zone : time_reg_map_local.at(region)){ + cbZone->append(zone_mixing); + cbZoneGlob->append(zone_mixing); + if (_str_zone!=""){ + if (zone_offest == _str_zone){ + cbZone->set_active(index); + cbZoneGlob->set_active(index); + } + } + index+=1; + } + +} +string MainWindow::call(string cmd){ + FILE *fp; + int status; + char path[PATH_MAX]={0}; + fp = popen(cmd.c_str(), "r"); + if (fp == NULL){ + exit(1); + } + while (fgets(path, PATH_MAX, fp) != NULL){ + //printf("%s", path); + break; + } + status = pclose(fp); + if (status == -1) { + exit(1); + } + + return path; +} + +void MainWindow::append_zone(){ + //int length_zone = time_reg_map.at(str_region).size(); + cbZone->remove_all(); + int index = cbRegion->get_active_row_number(); + string str_region = array_region[index]; + string zone_mixing=""; + string path_dir=""; + if(str_region.length()!=0){ + for (const auto &_str_zone : time_reg_map_local.at(str_region)){ + cbZone->append(Glib::ustring(_str_zone)); + } + } + cbZone->set_active(0); +} + +void MainWindow::append_zone_glob(){ + cbZoneGlob->remove_all(); + int index = cbRegionGlob->get_active_row_number(); + string str_region_glob = array_region[index]; + string zone_mixing=""; + string path_dir=""; + + if(str_region_glob.length()!=0){ + for (const auto &_str_zone : time_reg_map_local.at(str_region_glob)){ + cbZoneGlob->append(Glib::ustring(_str_zone)); + } + } + cbZoneGlob->set_active(0); +} +void MainWindow::wrapper_update_time_date(){ + string cmd = "pidof systemd-timesyncd ntpd chronyd ntpdate openntpd ptp4l phc2sys"; + string response = this->call(cmd); + if (response.length()==0){ + this->update_time_date(); + } + else{ + windowsNnpClose->show(); + } + +} + +void MainWindow::update_time_date(){ + //this->enter_zone(); + string cmd = ""; + if ((year!=0) && (month !=0) && (day !=0)){ + string str_month = ""; + string str_day = ""; + month+=2; + if (month <10){ + str_month = "0"+to_string(month); + } + else{ + str_month = to_string(month); + } + if (day <10){ + str_day = "0"+to_string(day); + } + else{ + str_day = to_string(day); + } + string str_data = ""; + str_data = str_day+"." + str_month+"." + to_string(year); + string str_data_entry = txtDate->get_text(); + if (str_data==str_data_entry){ + cmd = "date +%Y%m%d -s \"" + to_string(year)+ + str_month+str_day+"\""; + system(cmd.c_str()); + txtDate->set_text(str_data); + year=0; + month=0; + day=0; + } + else{ + this->post_entry_data(); + } + } + else{ + this->post_entry_data(); + } + hour = numTimeHrs->get_value_as_int(); + minute = numTimeMin->get_value_as_int(); + time_t now = time(0); + tm *ltm = localtime(&now); + cmd = "date +%T -s \""+ + to_string(hour) + ":" + to_string(minute) + + ":" + to_string(ltm->tm_sec) +"\""; + system(cmd.c_str()); +} + +void MainWindow::post_entry_data(){ + string cmd = ""; + string data = txtDate->get_text(); + if (data.length()==10){ + string str_day = data.substr(0,2); + string str_month = data.substr(3,2); + string str_year = data.substr(6,data.length()); + cmd = "date +%Y%m%d -s \"" + str_year+ + str_month+str_day+"\""; + string str_error_clock = this->call(cmd); + size_t index = str_error_clock.find("date: "); + if (index==std::string::npos){ + } + } + else{ + lblMessage->set_text(_("Incorrect date format")); + mess_dchp->show(); + } +} + +void MainWindow::update_hour_minute(){ + time_t now = time(0); + tm *ltm = localtime(&now); + numTimeHrs->set_value(ltm->tm_hour); + numTimeMin->set_value(ltm->tm_min); +} + +void MainWindow::update_calendar(){ + time_t now = time(0); + tm *ltm = localtime(&now); + int year1 = 1900 + (int)ltm->tm_year; + string str_month = ""; + string str_day = ""; + unsigned int month, day; + month=ltm->tm_mon+1; + day=ltm->tm_mday; + if (month <=10){ + str_month = "0"+to_string(month); + } + else{ + str_month = to_string(month); + } + if (day <10){ + str_day = "0"+to_string(day); + } + else{ + str_day = to_string(day); + } + string date = str_day + '.' + str_month + '.' + to_string(year1); + txtDate->set_text(date); +} + +void MainWindow::read_file(){ + std::string line; + string key_zone_local = ""; + string path_reg_zone = ""; + namespace fs = std::filesystem; + for (const auto & entry : fs::directory_iterator("/usr/share/zoneinfo/")){ + std::ifstream in(entry.path()); // окрываем файл для чтения + if (in.is_open()){ + string key_reg = entry.path().filename().string(); + string path_dir = "/usr/share/zoneinfo/"+key_reg; + if (fs::is_directory(path_dir)){ + if (key_reg!="Pacific"){ + if (key_reg!="posix"){ + if (key_reg!="Etc"){ + if (key_reg!="right"){ + vector zone; + vector zone_local; + //zone.push_back(""); + for (const auto & entry_zone : fs::directory_iterator(path_dir)){ + std::ifstream in1(entry_zone.path()); // окрываем файл для чтения + if (in1.is_open()){ + string key_zone = entry_zone.path().filename().string(); + if (key_zone.length()!=0 || key_zone!=" "){ + zone.push_back(key_zone); + path_reg_zone=key_reg + "/" + key_zone; + key_zone_local = this->zone_file_read(path_reg_zone) +_(key_zone.c_str()); + zone_local.push_back(key_zone_local); + } + } + in1.close(); + } + time_reg_map.insert({key_reg, zone}); + time_reg_map_local.insert({key_reg, zone_local}); + }}}} + } + } + in.close(); + } +} + +string MainWindow::zone_file_read(string zone){ + if (zone.length()==1){ + return ""; + } + UErrorCode success = U_ZERO_ERROR; + UDate curDate; + int32_t stdOffset,dstOffset; + U_ICU_NAMESPACE::TimeZone *tzWest = U_ICU_NAMESPACE::TimeZone::createTimeZone(zone.c_str()); + U_ICU_NAMESPACE::Calendar* calendar = U_ICU_NAMESPACE::Calendar::createInstance(success); + curDate = calendar->getNow(); + tzWest->getOffset(curDate,true,stdOffset,dstOffset,success); + int offset = stdOffset/(1000*60*60); + string str_utc = ""; + if (offset>=0){ + if (offset<=9){ + str_utc = "(UTC +0" + to_string(offset) + ") "; + } + else{ + str_utc = "(UTC +" + to_string(offset) + ") "; + } + + } + else{ + if (offset>=-9){ + offset*=-1; + str_utc = "(UTC -0" + to_string(offset) + ") "; + } + else{ + str_utc = "(UTC " + to_string(offset) + ") "; + } + } + delete calendar; + delete tzWest; + return str_utc; +} + +vector MainWindow::split(const std::string &s, char delim){ + std::stringstream ss(s); + std::string item; + std::vector elems; + while (std::getline(ss, item, delim)) { + elems.push_back(item); + } + return elems; +} + +SettingsPlug::SettingsPlug(::Window p_socketID, Glib::RefPtr builder) +: Gtk::Plug{p_socketID} +{ + builder->get_widget("plugBox", plugBox); + plugBox->get_parent()->remove(*plugBox); + add(*plugBox); + show_all_children(); +} + +void help(){ + g_print("Usage: ubl-settings-datetime [--lock-timezone] [--lock-ntp] [--lock-datetime] [--lock-update]\n"); + g_print("Options:\n"); + g_print(" --lock-timezone Disable timezone field editing\n"); + g_print(" --lock-ntp Disable ntp field editing\n"); + g_print(" --lock-datetime Disable datetime field editing\n"); + g_print(" --lock-update Disable save changes\n"); +} \ No newline at end of file diff --git a/source/ubl-settings-datetime.cpp b/source/ubl-settings-datetime.cpp deleted file mode 100644 index 6c05d25..0000000 --- a/source/ubl-settings-datetime.cpp +++ /dev/null @@ -1,684 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -using namespace std; - -string path_app= "/usr/bin/"; -string path_glade= "/usr/share/ubl-settings-datetime/ui/"; -string app_name = "ubl-settings-datetime"; -bool flag_datetime = false; -bool flag_timezone = false; -bool flag_ntp = false; -bool flag_update = false; - - -class CmdArgParser : public Glib::OptionGroup -{ - -public: - - CmdArgParser(const std::string& p_name, const std::string& p_description, const std::string& p_help) - : Glib::OptionGroup{p_name, p_description, p_help} - { - // Define the 'socket ID' argument options: - Glib::OptionEntry socketIDArg; - socketIDArg.set_long_name("socket-id"); - socketIDArg.set_short_name('s'); - socketIDArg.set_flags(Glib::OptionEntry::FLAG_IN_MAIN); - socketIDArg.set_description("Settings manager socket"); - - // Register it in the parser. It value will be recorded in m_socketID for later usage. - add_entry(socketIDArg, m_socketID); - } - - // Override this to handle errors. I skipped it for simplicity. - // void on_error(Glib::OptionContext& context, const Glib::Error& error) override; - - ::Window GetSocketID() const - { - return m_socketID; - } - -private: - - int m_socketID = 0; - -}; - - - -class MainWindow : public Gtk::ApplicationWindow { -public: - MainWindow(BaseObjectType* obj, Glib::RefPtr const& builder) - : Gtk::ApplicationWindow(obj) - , builder{builder} - { - this->settings(); - - } - MainWindow(Glib::RefPtr const& builder) { - this->builder = builder; - this->settings(); - } - - virtual ~MainWindow() = default; - - void settings(){ - this->get_builder(); - _numTimeHrs->set_range(0,23); - _numTimeMin->set_range(0,59); - _numTimeHrs->set_increments(1.0,1.0); - _numTimeMin->set_increments(1.0,1.0); - _txtDate->set_sensitive(false); - this->get_config(); - this->flag_block_gui(); - this->event(); - } - - void flag_block_gui(){ - if (flag_datetime==true){ - _numTimeHrs->set_sensitive(false); - _numTimeMin->set_sensitive(false); - } - else if (flag_timezone==true){ - _cbRegion->set_sensitive(false); - _cbZone->set_sensitive(false); - _cbRegionGlob->set_sensitive(false); - _cbZoneGlob->set_sensitive(false); - _btnChooseDate->set_sensitive(false); - } - else if (flag_ntp==true){ - _cbxSynchronizeNtp->set_sensitive(false); - _cbDhcp->set_sensitive(false); - _txtNtpServer->set_sensitive(false); - } - else if (flag_update==true){ - _btnUpdateDateTime->set_sensitive(false); - } - } - void add_CSS(){ - Glib::RefPtr cssProvider = Gtk::CssProvider::create(); - cssProvider->load_from_path("style.css"); - Glib::RefPtr styleContext = Gtk::StyleContext::create(); - Glib::RefPtr screen = Gdk::Screen::get_default();//get default screen - styleContext->add_provider_for_screen(screen, cssProvider, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);//add provider for screen in all application - Glib::RefPtr context = _btnUpdateDateTime->get_style_context(); - context->add_class("myButton"); - } - - void get_builder(){ - builder->set_translation_domain(app_name); - - builder->get_widget("btnUpdateDateTime", _btnUpdateDateTime); - builder->get_widget("btnChooseDate", _btnChooseDate); - builder->get_widget("btnMessClose", _btnMessClose); - builder->get_widget("cbxSynchronizeNtp", _cbxSynchronizeNtp); - builder->get_widget("popCalendar", _popCalendar); - builder->get_widget("numTimeHrs", _numTimeHrs); - builder->get_widget("numTimeMin", _numTimeMin); - builder->get_widget("cbDhcp", _cbDhcp); - builder->get_widget("txtDate", _txtDate); - builder->get_widget("cbRegion", _cbRegion); - builder->get_widget("cbRegionGlob", _cbRegionGlob); - builder->get_widget("cbZone", _cbZone); - builder->get_widget("cbZoneGlob", _cbZoneGlob); - builder->get_widget("txtNtpServer", _txtNtpServer); - builder->get_widget("cldrDate", _cldrDate); - builder->get_widget("mess_dchp", _mess_dchp); - //this->add_CSS(); - } - void event(){ - _btnMessClose->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::gui_mess_close)); - _cldrDate->signal_day_selected().connect(sigc::mem_fun(*this, &MainWindow::get_calendar)); - _cbxSynchronizeNtp->signal_toggled().connect(sigc::mem_fun(*this, &MainWindow::set_ntp_toggle)); - _btnUpdateDateTime->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::update_time_date)); - _btnChooseDate->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::calendar_show)); - _cbDhcp->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::event_entry_cbDhcp)); - _cbRegion->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::append_zone)); - _cbRegionGlob->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::append_zone_glob)); - _cbZone->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::enter_zone)); - _cbZoneGlob->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::enter_zone_glob)); - _txtNtpServer->signal_focus_out_event().connect(sigc::mem_fun(*this, &MainWindow::focus_ntp)); - //_txtNtpServer->grab_focus(); - } - - void gui_mess_close(){ - _mess_dchp->hide(); - } - - bool focus_ntp(GdkEventFocus* event){ - if (_txtNtpServer->get_text()=="" || _txtNtpServer->get_text()==" "){ - _mess_dchp->show(); - } - else{ - string cmd = ""; - cmd = "/usr/bin/ubconfig set network NTPSERVERS=" + _txtNtpServer->get_text(); - this->call(cmd.c_str()); - } - - return true; - } - - - - - void event_entry_cbDhcp(){ - Glib::ustring str_dhcp = _cbDhcp->get_active_text(); - if (str_dhcp.length()!=0){ - if (str_dhcp=="DHCP"){ - string cmd = "/usr/bin/ubconfig set network NTPSERVERS=dhcp"; - system(cmd.c_str()); - _txtNtpServer->set_sensitive(false); - _cbDhcp->set_active(0); - _txtNtpServer->set_text(""); - } - else{ - string str_dhcp = this->call("/usr/bin/ubconfig get network NTPSERVERS"); - - if ((str_dhcp!="") && (str_dhcp!="(null)") ){ - str_dhcp = str_dhcp.substr(str_dhcp.find("=")+1,str_dhcp.length()); - str_dhcp = str_dhcp.substr(0,str_dhcp.find("\n")); - if (str_dhcp!="dhcp"){ - - - _txtNtpServer->set_text(str_dhcp); - } - _txtNtpServer->set_sensitive(true); - _cbDhcp->set_active(1); - } - } - } - else{ - string cmd = "/usr/bin/ubconfig set network NTPSERVERS=dhcp"; - system(cmd.c_str()); - //_txtNtpServer->set_sensitive(false); - _cbDhcp->set_active(0); - } - } - - void get_calendar(){ - _cldrDate->get_date(year, month, day); - string str_month = ""; - string str_day = ""; - month+=1; - if (month <10){ - str_month = "0"+to_string(month); - } - else{ - str_month = to_string(month); - } - if (day <10){ - str_day = "0"+to_string(day); - } - else{ - str_day = to_string(day); - } - string date = str_day + '.' + str_month + '.' + to_string(year); - _txtDate->set_text(date); - } - - - void calendar_show(){ - time_t now = time(0); - tm *ltm = localtime(&now); - unsigned int y=1900+ ltm->tm_year; - unsigned int m=ltm->tm_mon; - unsigned int d=ltm->tm_mday; - - - _cldrDate->select_month(m,y); - _cldrDate->select_day(d); - _popCalendar->show(); - } - - void enry_dhcp_mess(){ - string str_dhcp = this->call("/usr/bin/ubconfig get network NTPSERVERS"); - if ((str_dhcp!="") && (str_dhcp!="(null)")){ - _cbxSynchronizeNtp->set_active(1); - str_dhcp = str_dhcp.substr(str_dhcp.find("=")+1,str_dhcp.length()); - str_dhcp = str_dhcp.substr(0,str_dhcp.find("\n")); - if (str_dhcp=="dhcp"){ - _cbDhcp->set_active(0); - _txtNtpServer->set_sensitive(false); - //_cbxSynchronizeNtp->set_sensitive(true); - } - else{ - if (str_dhcp==""){ - _mess_dchp->show(); - } - else{ - _cbDhcp->set_active(1); - //_txtNtpServer->set_sensitive(true); - //_cbxSynchronizeNtp->set_sensitive(false); - _txtNtpServer->set_text(str_dhcp); - } - } - - - //_cbxDhcp->set_active(true); - this->set_ntp_toggle(); - } - else{ - _cbxSynchronizeNtp->set_active(0); - _cbDhcp->set_sensitive(0); - _txtNtpServer->set_sensitive(0); - - } - } - void get_config(){ - this->read_file(); - this->update_hour_minute(); - this->update_calendar(); - //this->event_entry_cbDhcp(); - this->enry_dhcp_mess(); - - string str_ntp = this->call("systemctl status ntpd.service systemd-timesyncd.service | grep \"Active: active\""); - if (str_ntp.length()<50) { - _cbxSynchronizeNtp->set_active(false); - } - else{ - _cbxSynchronizeNtp->set_active(true); - } - - string read_reg_zon_cfg = this->call("/usr/bin/ubconfig get clock ZONE"); - if ((read_reg_zon_cfg != "") && (read_reg_zon_cfg !="(null)")){ - read_reg_zon_cfg = read_reg_zon_cfg.substr(read_reg_zon_cfg.find("=")+1,read_reg_zon_cfg.length()); - read_reg_zon_cfg = read_reg_zon_cfg.substr(0,read_reg_zon_cfg.find("\n")); - string str_filling_reg = read_reg_zon_cfg.substr(0,read_reg_zon_cfg.find("/")); - string str_filling_zon = read_reg_zon_cfg.substr(read_reg_zon_cfg.find("/")+1,read_reg_zon_cfg.length()); - str_filling_zon = str_filling_zon.substr(0,str_filling_zon.find("\n")); - string str_zone_check = ""; - this->append_region_zone(str_filling_reg,str_filling_zon); - } - else { - this->append_region_zone("Asia","Omsk"); - - } - - } - - void enter_zone(){ - Glib::ustring zone_text = _cbZone->get_active_text(); - Glib::ustring reg_text = _cbRegion->get_active_text(); - if(!(zone_text.empty()) && !(reg_text.empty())){ - str_zone=zone_text.substr(zone_text.find(") ")+2,zone_text.length()); - str_region=reg_text; - string cmd = "timedatectl set-timezone '" + str_region +"/" + str_zone+"'"; - system(cmd.c_str()); - } - else{ - str_zone=""; - str_region=""; - } - } - - void enter_zone_glob(){ - Glib::ustring zone_text = _cbZoneGlob->get_active_text(); - Glib::ustring reg_text = _cbRegionGlob->get_active_text(); - if(!(zone_text.empty()) && !(reg_text.empty())){ - str_zoneGlob = zone_text.substr(zone_text.find(") ")+2,zone_text.length()); - str_region_glob = reg_text; - string cmd = "/usr/bin/ubconfig set clock ZONE=" +str_region_glob +"/" + str_zoneGlob; - system(cmd.c_str()); - } - else{ - str_zoneGlob=""; - str_region_glob=""; - } - } - - void set_ntp_toggle(){ - bool flag = _cbxSynchronizeNtp->get_active(); - if (flag_datetime==true){ - - } - else { - _numTimeHrs->set_sensitive(!flag); - _numTimeMin->set_sensitive(!flag); - _btnChooseDate->set_sensitive(!flag); - } - - //_txtDate->set_sensitive(!flag); - - //_btnUpdateDateTime->set_sensitive(!flag); - if (flag==false){ - system("systemctl --now disable systemd-timesyncd.service ntpd.service"); - } - else { - system("systemctl --now enable systemd-timesyncd.service"); - } - - } - - void append_region_zone(string region, string zone){ - int index = 0; - for ( const auto &text : time_reg_map ) { - _cbRegion->append(text.first); - _cbRegionGlob->append(text.first); - if (text.first == region){ - _cbRegionGlob->set_active(index); - _cbRegion->set_active(index); - - } - index+=1; - } - index = 0; - string cheek_zone = ""; - for (const auto &_str_zone : time_reg_map.at(region)){ - _cbZone->append(_str_zone); - _cbZoneGlob->append(_str_zone); - if (_str_zone!=""){ - cheek_zone = _str_zone.substr(_str_zone.find(") ")+2,_str_zone.length()); - if (cheek_zone == zone){ - _cbZone->set_active(index); - _cbZoneGlob->set_active(index); - } - } - index+=1; - } - } - string call(string cmd){ - FILE *fp; - int status; - char path[PATH_MAX]; - fp = popen(cmd.c_str(), "r"); - if (fp == NULL){ - //return ""; - } - - while (fgets(path, PATH_MAX, fp) != NULL){ - printf("%s", path); - break; - - } - - status = pclose(fp); - if (status == -1) { - //return ""; - } - else { - //return ""; - } - return path; - } - - void append_zone(){ - Glib::ustring text = _cbRegion->get_active_text(); - _cbZone->remove_all(); - - if(!(text.empty())){ - str_region = text; - for (const auto &_str_zone : time_reg_map.at(str_region)){ - _cbZone->append(_str_zone); - } - } - - } - - void append_zone_glob(){ - Glib::ustring text = _cbRegionGlob->get_active_text(); - _cbZoneGlob->remove_all(); - if(!(text.empty())){ - str_region_glob = text; - for (const auto &_str_zone : time_reg_map.at(str_region_glob)){ - _cbZoneGlob->append(_str_zone); - } - } - - } - void update_time_date(){ - this->enter_zone(); - bool flag = _cbxSynchronizeNtp->get_active(); - if (flag==false){ - hour = _numTimeHrs->get_value_as_int(); - minute = _numTimeMin->get_value_as_int(); - time_t now = time(0); - tm *ltm = localtime(&now); - string cmd = "timedatectl set-time \""+ - to_string(hour) + ":" + to_string(minute) - + ":" + to_string(ltm->tm_sec) +"\""; - system(cmd.c_str()); - if ((year==0) && (month == 0) && (day == 0)){ - time_t now = time(0); - tm *ltm = localtime(&now); - year=1900+ ltm->tm_year; - month=ltm->tm_mon; - day=ltm->tm_mday; - } - string str_month = ""; - string str_day = ""; - if (month <10){ - str_month = "0"+to_string(month+1); - } - else{ - str_month = to_string(month); - } - if (day <10){ - str_day = "0"+to_string(day); - } - else{ - str_day = to_string(day); - } - string cmd1 = "date --set=\"" +to_string(year)+ - str_month+str_day + " " +to_string(hour) + ":" + - to_string(minute)+"\""; - system(cmd1.c_str()); - } - - - } - void update_hour_minute(){ - time_t now = time(0); - tm *ltm = localtime(&now); - _numTimeHrs->set_value(ltm->tm_hour); - _numTimeMin->set_value(ltm->tm_min); - } - - void update_calendar(){ - time_t now = time(0); - tm *ltm = localtime(&now); - int year = 1900 + (int)ltm->tm_year; - string str_month = ""; - string str_day = ""; - unsigned int month, day; - month=ltm->tm_mon+1; - day=ltm->tm_mday; - if (month <=10){ - str_month = "0"+to_string(month); - } - else{ - str_month = to_string(month); - } - if (day <10){ - str_day = "0"+to_string(day); - } - else{ - str_day = to_string(day); - } - string date = str_day + '.' + str_month + '.' + to_string(year); - _txtDate->set_text(date); - } - void read_file(){ - std::string line; - namespace fs = std::filesystem; - for (const auto & entry : fs::directory_iterator("/usr/share/ubl-settings-datetime/reg/")){ - std::ifstream in(entry.path()); // окрываем файл для чтения - if (in.is_open()) - { - vector zone; - zone.push_back(""); - while (getline(in, line)) - { - zone.push_back(string(gettext(line.c_str()))); - } - string key_reg = entry.path().filename().string(); - key_reg = string(gettext(key_reg.c_str())); - time_reg_map.insert({key_reg, zone}); - } - in.close(); - } - } - -private: - Glib::RefPtr builder; - Gtk::Button *_btnUpdateDateTime; - Gtk::Button *_btnChooseDate; - Gtk::Button *_btnMessClose; - Gtk::ComboBoxText *_cbDhcp; - Gtk::SpinButton *_numTimeHrs; - Gtk::SpinButton *_numTimeMin; - Gtk::CheckButton *_cbxSynchronizeNtp; - - Gtk::Entry *_txtDate; - Gtk::ComboBoxText *_cbRegion; - Gtk::ComboBoxText *_cbRegionGlob; - Gtk::ComboBoxText *_cbZone; - Gtk::ComboBoxText *_cbZoneGlob; - Gtk::Entry *_txtNtpServer; - Gtk::MessageDialog *_mess_dchp; - Gtk::Popover *_popCalendar; - Gtk::Calendar *_cldrDate; - unsigned int year, month, day; - int hour; - int minute; - string str_region=""; - string str_region_glob=""; - string str_txtDate; - string str_txtNtpServer; - string str_zone=""; - string str_zoneGlob; - std::map > time_reg_map; - -}; - -class SettingsPlug : public Gtk::Plug -{ - -public: - Gtk::Window *window; - SettingsPlug(::Window p_socketID, Glib::RefPtr builder) - : Gtk::Plug{p_socketID} - { - - //MainWindow* wnd = nullptr; - //builder->get_widget_derived("window", wnd); - builder->get_widget("plugBox", plugBox); - plugBox->get_parent()->remove(*plugBox); - add(*plugBox); - - show_all_children(); - } - -private: - - Gtk::Widget *plugBox; - Gtk::Widget *parent; -}; - -void help(){ - g_print("Usage: ubl-settings-datetime [--lock-timezone] [--lock-ntp] [--lock-datetime] [--lock-update]\n"); - g_print("Options:\n"); - g_print(" --lock-timezone Disable timezone field editing\n"); - g_print(" --lock-ntp Disable ntp field editing\n"); - g_print(" --lock-datetime Disable datetime field editing\n"); - g_print(" --lock-update Disable save changes\n"); - cout << "Параметры командной строки --lock-datetime\n --lock-timezone\n --lock-ntp\n --lock-update\n" << endl; -} - - -int main(int argc, char* argv[]) { - - //path_app=filesystem::current_path(); - //path_app+="/"; - //cout << *argv[0] << endl; - //app_name=to_string(*argv[0]); - //app_name=app_name.substr(1, app_name.length()); - string str_cmd_argv = ""; - for (int i=1; iget_widget_derived("window", wnd); - auto r = app->run(*wnd); - - delete wnd; - return r; - } - else{ - Glib::init(); - setlocale(LC_ALL, ""); - Glib::OptionContext context; - - CmdArgParser parser{ - "Socket ID", - "Command line argument for socket ID communication.", - "No help available, sorry" - }; - - context.set_main_group(parser); - context.parse(argc, argv); - - ::Window socketID = parser.GetSocketID(); - - // Handle plug: - SettingsPlug plug{socketID, builder}; - plug.show(); - - app->run(plug); - - } - - -} \ No newline at end of file diff --git a/source/ubl-settings-datetime.h b/source/ubl-settings-datetime.h new file mode 100644 index 0000000..c71a2ec --- /dev/null +++ b/source/ubl-settings-datetime.h @@ -0,0 +1,163 @@ +#ifndef UBL_SETTINGS_DATETIME_H +#define UBL_SETTINGS_DATETIME_H +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +using namespace std; + +extern string path_app; +extern string path_glade; +extern string app_name; +extern string path_locale; +extern string path_css; +extern bool flag_datetime; +extern bool flag_timezone; +extern bool flag_ntp; +extern bool flag_update; + +class CmdArgParser : public Glib::OptionGroup +{ +public: + CmdArgParser(const std::string& p_name, const std::string& p_description, const std::string& p_help); + ::Window GetSocketID() const; +private: + int m_socketID = 0; +}; + +class MainWindow : public Gtk::ApplicationWindow { + public: + MainWindow(BaseObjectType* obj, Glib::RefPtr const& builder); + MainWindow(Glib::RefPtr const& builder); + virtual ~MainWindow() = default; + void post_entry_data(); + void lacalization(); + void settings(); + void flag_block_gui(); + void add_CSS(); + void get_builder(); + void event(); + void gui_mess_close(); + bool focus_ntp(GdkEventFocus* event); + void event_entry_cbDhcp(); + void get_calendar(); + void calendar_show(); + void enry_dhcp_mess(); + void get_config(); + void enter_zone(); + void enter_zone_glob(); + void set_ntp_toggle(); + void append_region_zone(string region, string zone); + string call(string cmd); + void append_zone(); + void append_zone_glob(); + void update_time_date(); + void update_hour_minute(); + void update_calendar(); + void read_file(); + void parse_text_date(); + void hardware_clock(); + void set_ntp_toggle_glob(); + int check_root(); + void gui_exit(); + bool gui_exit_2(GdkEventAny* event); + void stop_ntp(); + void wind_close_ntp(); + void wrapper_update_time_date(); + string zone_file_read(string zone); + string str_remove(std::string& source, const std::string to_remove); + vector split(const std::string &s, char delim); + private: + Glib::RefPtr builder; + Gtk::Button *btnUpdateDateTime; + Gtk::Button *btnChooseDate; + Gtk::Button *btnMessCloseSudo; + Gtk::Button *btnMessClose; + Gtk::ComboBoxText *cbDhcp; + Gtk::SpinButton *numTimeHrs; + Gtk::SpinButton *numTimeMin; + Gtk::CheckButton *cbxSynchronizeNtpGlob; + Gtk::Box *boxColor; + Gtk::ComboBoxText *cbRegion; + Gtk::ComboBoxText *cbRegionGlob; + Gtk::ComboBoxText *cbZone; + Gtk::ComboBoxText *cbZoneGlob; + Gtk::Window *mess_dchp; + Gtk::Window *mess_sudo; + Gtk::Popover *popCalendar; + Gtk::Calendar *cldrDate; + Gtk::Label *lblMessage; + Gtk::Label *lblMessageSudo; + Gtk::Label *lblDateTimeSetting; + Gtk::Label *lblHead; + Gtk::Label *lblTime; + Gtk::Label *lblData; + Gtk::Label *lblTimeZone; + Gtk::Label *lblReg; + Gtk::Label *lblZone; + Gtk::Label *lblRegGlob; + Gtk::Label *lblZone1Glob; + Gtk::Label *lblTimeZoneGlob; + Gtk::Label *lblSynchronizebChk; + Gtk::Label *lblSynchronizebChkGLob; + Gtk::Label *lblSynchronizeBtn; + Gtk::Label *lblDateTimeSettingGlob; + Gtk::Label *lblTimeBios; + Gtk::Label *lblBanerStopNtp; + Gtk::Button *btnHardwareTime; + Gtk::CheckButton *cbxSynchronizeNtp; + Gtk::Window *windowsNnpClose; + Gtk::Button *btnNtpStop; + Gtk::Button *btnNtpWinClose; + Gtk::Label *lblNtpStop; + Gtk::Label *lblNtpClose; + Gtk::Entry *txtNtpServer; + Gtk::Entry *txtDate; + std::map > time_reg_map; + std::map > time_reg_map_local; + unsigned int year=0; + unsigned int month=0; + unsigned int day=0; + int hour; + int minute; + string str_region=""; + string str_region_glob=""; + string str_txtDate; + string strtxtNtpServer; + string str_zone=""; + string str_zoneGlob; + string array_region[14]={ + "Africa", + "America", + "Antarctica", + "Arctic", + "Asia", + "Atlantic", + "Australia", + "Brazil", + "Canada", + "Chile", + "Europe", + "Indian", + "Mexico", + "US"}; +}; + +class SettingsPlug : public Gtk::Plug +{ +public: + Gtk::Window *window; + SettingsPlug(::Window p_socketID, Glib::RefPtr builder); +private: + Gtk::Widget *plugBox; + Gtk::Widget *parent; +}; +void help(); +#endif diff --git a/style.css b/style.css new file mode 100644 index 0000000..8c5d210 --- /dev/null +++ b/style.css @@ -0,0 +1,6 @@ +.cssboxColor1{ + background: url("/usr/share/ubl-settings-datetime/images/bg_top.png") no-repeat; +} +.textHead{ + text-shadow: 1px 1px #ffffff; +} \ No newline at end of file diff --git a/test b/test new file mode 100755 index 0000000..cd1ec71 Binary files /dev/null and b/test differ diff --git a/ubl-settings-datetime.desktop b/ubl-settings-datetime.desktop index 2225ea4..87d86f7 100644 --- a/ubl-settings-datetime.desktop +++ b/ubl-settings-datetime.desktop @@ -7,7 +7,7 @@ GenericName[ru]=Настройка даты и времени Comment=Date time settings Comment[ru]=Приложение для настройки даты и времени Type=Application -Exec=ubl-settings-datetime +Exec=pkexec ubl-settings-datetime Icon=ubl-settings-datetime Terminal=false Categories=XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-SystemSettings; \ No newline at end of file diff --git a/ubl-settings-datetime.glade b/ubl-settings-datetime.glade index 6087d6f..32570d0 100644 --- a/ubl-settings-datetime.glade +++ b/ubl-settings-datetime.glade @@ -2,32 +2,31 @@ - - False - - - - - + False + Внимание! dialog - + + True False vertical - 2 - - + + + True False - True - end - - - btnMessClose + True - True - True + False + 5 + 5 + 5 + 5 + 6 + 6 + 50 + gtk-dialog-warning True @@ -36,15 +35,61 @@ - + + 160 + True + False + start + center + 6 + 6 + Enter DHCP ! + + + True + True + 1 + False - False - 0 + True + 1 + + + + + OK + True + True + True + 5 + 5 + 5 + 5 + 3 + 3 + + + False + True + 1 + + + + + False + Внимание! + center + dialog + + + True + False + vertical True @@ -53,23 +98,38 @@ True False + 5 + 5 + 5 + 5 + 6 + 6 50 gtk-dialog-warning - False + True True 0 - + + 160 True False - Введите DHCP + start + center + 5 + 5 + 5 + 5 + 6 + 6 + Enter DHCP ! - False + True True 1 @@ -78,7 +138,26 @@ False True - 2 + 1 + + + + + OK + True + True + True + 5 + 5 + 5 + 5 + 3 + 3 + + + False + True + 1 @@ -87,14 +166,13 @@ False Настройки даты и времени - /usr/share/ubl-settings-datetime/images/ubl-settings-datetime.png True False vertical - + True False @@ -108,7 +186,8 @@ 5 6 6 - /usr/share/ubl-settings-datetime/images/ubl-settings-datetime.png + 69 + ubl-settings-datetime False @@ -117,44 +196,69 @@ - - 145 + True False - Изменить параметр NTPSERVERS - 5 - 5 - 5 - 5 - 3 - 6 - Настройка даты и времени - True - 28 - 0 + + + True + False + + + True + False + vertical + + + 255 + True + False + Date and time settings + + + + + + + + + True + True + 0 + + + + + False + True + 0 + + + + + True + True + 0 + + + + + True + False + + + False + True + 1 + + - False + True True 1 - - - 100 - True - False - 15 - 5 - 15 - 5 - - - False - True - 2 - - False @@ -166,13 +270,12 @@ True False - 10 vertical True False - 5 + 6 5 5 5 @@ -182,8 +285,9 @@ True False - 5 + 6 5 + 5 vertical @@ -191,7 +295,7 @@ False - 145 + 160 True False 5 @@ -200,7 +304,7 @@ 5 6 6 - Время + Time True 0 @@ -214,7 +318,6 @@ True True - Часы 5 5 5 @@ -247,7 +350,6 @@ True True - Минуты 5 5 5 @@ -275,8 +377,8 @@ True False - - 145 + + 160 True False 5 @@ -285,7 +387,7 @@ 5 6 6 - Дата + Date True 0 @@ -297,12 +399,13 @@ - 221 + 191 True True - Дата -Формат: ДД.ММ.ГГГГ + Date +Format: DD.MM.YYYY 5 + 5 5 5 6 @@ -352,20 +455,54 @@ True False - - 145 + True - False - Изменить параметр зоны + True + True 5 5 5 5 6 6 - Временная зона - True - 0 + + + True + False + center + center + + + True + False + 5 + 5 + 5 + 5 + media-playlist-repeat + + + False + True + 0 + + + + + True + False + center + center + Sync by + + + False + True + 1 + + + + False @@ -385,18 +522,9 @@ - + True False - Регион - 5 - 5 - 5 - 5 - 6 - 6 - Регион - 0 False @@ -405,123 +533,174 @@ - + True - False + True + True 5 5 5 - 5 + 10 6 6 + + + True + False + center + center + Synchronize hardware time + + - False + True True 3 + + + False + True + 3 + + + + + True + False + 5 + 5 + 5 + 10 + 6 + 0.019999999552965164 + in - + True False - Зона - 5 - 5 - 5 - 5 - 6 - 6 - Зона - 0 + + + True + False + + + False + True + 1 + + + + + True + False + 5 + 5 + 8 + 5 + 6 + 13 + Region + 0 + + + False + True + 2 + + + + + True + False + 5 + 5 + 5 + 5 + 6 + 13 + + + False + True + 3 + + + + + True + False + 5 + 5 + 10 + 5 + 6 + 13 + Area + 0 + + + False + True + 4 + + + + + True + False + 5 + 5 + 5 + 5 + 6 + 13 + + + False + True + 5 + + + + + 5 + True + False + + + False + True + 6 + + + + + True + False + + + False + True + 7 + + - - False - True - 4 - - - + + True False - 5 - 5 - 5 - 5 - 6 - 6 + Time Zone - - False - True - 5 - - - - - 5 - True - False - - - False - True - 6 - - - - - True - True - True - end - 5 - 5 - 6 - 6 - - - True - False - - - True - False - media-playlist-repeat - - - False - True - 0 - - - - - True - False - Синхронизировать - - - False - True - 1 - - - - - - - False - True - 7 - - True + False True - 3 + 5 @@ -530,7 +709,7 @@ True False - Настройка даты и времени + Local Configuration @@ -551,7 +730,6 @@ True False - 10 vertical @@ -567,72 +745,34 @@ True False - 5 + 6 5 + 5 vertical - + True - False + True + False + Автоматическая синхронизация времени + 5 + 5 + 5 + 5 + 6 + True - - Синхронизировать через NTP - True - True - False - Автоматическая синхронизация времени - 5 - 5 - 5 - 5 - 6 - 6 - True - - - False - True - 0 - - - - + True False - Способ синхронизации - 6 - 6 - - DHCP - Вручную - - - - False - True - 1 - - - - - -1 - True - True - Ввод сервера для синхронизации даты и времени: -Локальный (DHCP) или произвольный - center 5 5 5 5 6 6 + Synchronize via NTP - - True - True - 3 - @@ -646,32 +786,15 @@ True False - - 145 + True False - Изменить параметр зоны 5 5 5 5 6 - 6 - Временная зона - True - 28 - 0 - - - False - True - 0 - - - - - True - False + 5 False @@ -680,107 +803,171 @@ - - True - False - Регион - 5 - 5 - 5 - 5 - 6 - 6 - Регион - 0 - - - False - True - 2 - - - - + + -1 True - False + True + Enter the name of the ntp server or its ip address. When entering multiple addresses, separate them with spaces. + center 5 5 5 - 5 + 10 6 - 6 + 5 - False + True True 3 + + + False + True + 1 + + + + + True + False + 5 + 5 + 5 + 10 + 6 + 0.019999999552965164 + in - - True - False - Зона - 5 - 5 - 5 - 5 - Зона - 0 - - - False - True - 4 - - - - + True False - 5 - 5 - 5 - 5 - 6 - 6 + + + True + False + + + False + True + 1 + + + + + True + False + 8 + 5 + 8 + 5 + 6 + 13 + Region + 0 + + + False + True + 2 + + + + + True + False + 5 + 5 + 5 + 5 + 6 + 13 + + + False + True + 3 + + + + + True + False + 10 + 5 + 10 + 5 + 5 + 13 + Area + 0 + + + False + True + 4 + + + + + True + False + 5 + 5 + 5 + 5 + 6 + 13 + + + False + True + 5 + + + + + 5 + True + False + 15 + 5 + 15 + 5 + 5 + 5 + + + False + True + 6 + + - - False - True - 5 - - - - 5 + + True False - 15 - 5 - 15 - 5 + Часовой пояс - - False - True - 6 - - True + False True - 1 + 2 - + True False - Настройка даты и времени в глобальной конфигурации + Global customization @@ -823,4 +1010,178 @@ + + False + + + True + False + vertical + + + True + False + + + True + False + 5 + 5 + 5 + 5 + 6 + 6 + 50 + emblem-important + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 6 + 6 + Active service detected +Automatic time and date synchronization service detected + + + True + True + 1 + + + + + True + True + 0 + + + + + True + False + + + True + True + True + 5 + 5 + 5 + 5 + 6 + 6 + + + True + False + + + True + False + 5 + 5 + 5 + 5 + media-playback-stop + + + False + True + 0 + + + + + True + False + Stop the synchronization service + + + False + True + 1 + + + + + + + True + True + 0 + + + + + True + True + True + 5 + 5 + 5 + 5 + 6 + 6 + + + True + False + + + True + False + 6 + 5 + 5 + 5 + window-close + + + False + True + 0 + + + + + True + False + Close + + + False + True + 1 + + + + + + + True + True + 1 + + + + + False + True + 1 + + + + + diff --git a/ubl-settings-datetime_ru.po b/ubl-settings-datetime_ru.po index 902df90..caecef2 100644 --- a/ubl-settings-datetime_ru.po +++ b/ubl-settings-datetime_ru.po @@ -1,1540 +1,1601 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# Russian translations for PACKAGE package. +# Copyright (C) 2023 THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. +# Automatically generated, 2023. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-14 18:29+0600\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#. Ok -#: ubconfig_date_time.glade:26 -msgctxt "Ok" -msgid "Oк" -msgstr "" -#. Enter DHCP -#: ubconfig_date_time.glade:68 -msgctxt "Enter DHCP" -msgid "Введите DHCP" -msgstr "" +msgid "An invalid character is entered" +msgstr "Введён недопустимый символ" -#. Date and time settings -#: ubconfig_date_time.glade:88 -msgctxt "Date and time settings" -msgid "Настройки даты и времени" -msgstr "" +msgid "Longyearbyen" +msgstr "Лонгйир" -#: ubconfig_date_time.glade:123 -msgid "Изменить параметр NTPSERVERS" -msgstr "" +msgid "Stop the synchronization service" +msgstr "Остановить сервис синхронизации" -#. Setting the date and time -#: ubconfig_date_time.glade:130 ubconfig_date_time.glade:553 -msgctxt "Setting the date and time" -msgid "Настройка даты и времени" -msgstr "" +msgid "Close" +msgstr "Закрыть" -#. Time -#: ubconfig_date_time.glade:204 -msgctxt "Time" -msgid "Время" -msgstr "" +msgid "Active service detected\nAutomatic time and date synchronization service detected" +msgstr "Обнаружен активный сервис\nавтоматической синхронизации времени и даты" -#. Clock -#: ubconfig_date_time.glade:218 -msgctxt "Clock" -msgid "Часы" -msgstr "" +msgid "Default" +msgstr "По умолчанию" -#: ubconfig_date_time.glade:239 -msgid ":" -msgstr "" +msgid "The program must be run with \nsuperuser privileges!" +msgstr "Программа должна быть запущена с правами \nсуперпользователя!" -#. Minutes -#: ubconfig_date_time.glade:251 -msgctxt "Minutes" -msgid "Минуты" -msgstr "" +msgid "Manual" +msgstr "Вручную" -#. Date -#: ubconfig_date_time.glade:289 -msgctxt "Date" -msgid "Дата" -msgstr "" +msgid "Enter DHCP!" +msgstr "Введите DHCP!" -#. Date of -#. Format: DD.MM.YYYY -#: ubconfig_date_time.glade:304 -msgctxt "" -"Date of\n" -"Format: DD.MM.YYYY" -msgid "" -"Дата\n" -"Формат: ДД.ММ.ГГГГ" -msgstr "" +msgid "OK" +msgstr "OK" -#. Interactive date picker -#: ubconfig_date_time.glade:323 -msgctxt "Interactive date picker" -msgid "Интерактивный выбор даты" -msgstr "" +msgid "Settings the date and time" +msgstr "Настройки даты и времени" -#. Change zone setting -#: ubconfig_date_time.glade:360 ubconfig_date_time.glade:679 -msgctxt "Change zone setting" -msgid "Изменить параметр зоны" -msgstr "" +msgid "Local Configuration" +msgstr "Локальная настройка" -#. time zone -#: ubconfig_date_time.glade:367 -msgctxt "time zone" -msgid "Временная зона" -msgstr "" +msgid "Global customization" +msgstr "Глобальная настройка" -#. Region -#: ubconfig_date_time.glade:393 ubconfig_date_time.glade:400 -#: ubconfig_date_time.glade:712 ubconfig_date_time.glade:719 -msgctxt "Region" -msgid "Регион" -msgstr "" +msgid "Change the NTPSERVERS parameter" +msgstr "Изменить параметр NTPSERVERS" -#. Zone -#: ubconfig_date_time.glade:430 ubconfig_date_time.glade:437 -#: ubconfig_date_time.glade:749 ubconfig_date_time.glade:756 -msgctxt "Zone" -msgid "Зона" -msgstr "" +msgid "ubl-settings-datetime" +msgstr "Настройки даты и времени" -#. Update date and time -#: ubconfig_date_time.glade:516 ubconfig_date_time.glade:523 -msgctxt "Update date and time" -msgid "Обновить дату и время" -msgstr "" +msgid "Time" +msgstr "Время" -#. Synchronize via NTP -#: ubconfig_date_time.glade:601 -msgctxt "Synchronize via NTP" -msgid "Синхронизировать через NTP" -msgstr "" +msgid "Clock" +msgstr "Часы" -#. Automatic time synchronization -#: ubconfig_date_time.glade:605 -msgctxt "Automatic time synchronization" -msgid "Автоматическая синхронизация времени" -msgstr "" +msgid ":" +msgstr ":" -#. Synchronization method -#: ubconfig_date_time.glade:625 -msgctxt "Synchronization method" -msgid "Способ синхронизации" -msgstr "" +msgid "Minutes" +msgstr "Минуты" -#. DHCP -#: ubconfig_date_time.glade:633 -msgctxt "DHCP" -msgid "DHCP" -msgstr "" +msgid "Date" +msgstr "Дата" -#. Manually -#: ubconfig_date_time.glade:634 -msgctxt "Manually" -msgid "Вручную" -msgstr "" +msgid "Date of\nFormat: DD.MM.YYYY" +msgstr "Дата\nФормат: ДД.ММ.ГГГГ" -#. Server input for date and time synchronization: -#. Local (DHCP) or arbitrary -#: ubconfig_date_time.glade:647 -msgctxt "" -"Server input for date and time synchronization:\n" -"Local (DHCP) or arbitrary" -msgid "" -"Ввод сервера для синхронизации даты и времени:\n" -"Локальный (DHCP) или произвольный" -msgstr "" +msgid "Interactive date picker" +msgstr "Интерактивный выбор даты" -#. Time zone -#: ubconfig_date_time.glade:686 -msgctxt "Time zone" -msgid "Временная зона" -msgstr "" +msgid "Change zone setting" +msgstr "Изменить параметр зоны" -#. Setting date and time in global configuration -#: ubconfig_date_time.glade:811 -msgctxt "Setting date and time in global configuration" -msgid "Настройка даты и времени в глобальной конфигурации" -msgstr "" +msgid "Region" +msgstr "Регион" -msgid "Mexico" -msgstr "Мексика" +msgid "Zone" +msgstr "Зона" -msgid "BajaNorte" -msgstr "" +msgid "Sync by" +msgstr "Синхронизировать" -msgid "BajaSur" -msgstr "Южная Нижняя Калифорния" +msgid "Automatic time synchronization" +msgstr "Автоматическая синхронизация времени" -msgid "General" -msgstr "" +msgid "Synchronize via NTP" +msgstr "Синхронизировать через NTP" -msgid "Arctic" -msgstr "" +msgid "Time zone" +msgstr "Часовой пояс" -msgid "Longyearbyen" -msgstr "" +msgid "Setting date and time in global configuration" +msgstr "Настройка даты и времени в глобальной конфигурации" -msgid "Indian" -msgstr "" +msgid "Incorrect date format" +msgstr "Не верный формат даты" -msgid "Comoro" -msgstr "" +msgid "Synchronize hardware time" +msgstr "Синхронизировать аппаратное время" -msgid "Antananarivo" -msgstr "" +msgid "Warning!" +msgstr "Внимание!" -msgid "Mayotte" -msgstr "" +msgid "America" +msgstr "Америка" -msgid "Mauritius" -msgstr "" +msgid "Brazil" +msgstr "Бразилия" -msgid "Reunion" -msgstr "" +msgid "Aruba" +msgstr "Аруба" -msgid "Mahe" -msgstr "" +msgid "Asia" +msgstr "Азия" -msgid "Maldives" -msgstr "" +msgid "Mexico_City" +msgstr "Мехико" -msgid "Kerguelen" -msgstr "" +msgid "Antarctica" +msgstr "Антарктида" -msgid "Chagos" -msgstr "" +msgid "Dubai" +msgstr "Дубай" -msgid "Cocos" -msgstr "" +msgid "Antigua" +msgstr "Антигуа" -msgid "Christmas" -msgstr "" +msgid "Lima" +msgstr "Лима" -msgid "Europe" -msgstr "" +msgid "Manaus" +msgstr "Манаус" -msgid "Jersey" -msgstr "" +msgid "Africa" +msgstr "Африка" -msgid "Dublin" -msgstr "" +msgid "Chicago" +msgstr "Чикаго" -msgid "Belfast" -msgstr "" +msgid "Punta_Arenas" +msgstr "Пунта_Аренас" -msgid "Guernsey" -msgstr "" +msgid "Europe" +msgstr "Европа" -msgid "London" -msgstr "" +msgid "Djibouti" +msgstr "Джибути" -msgid "Lisbon" -msgstr "" +msgid "Pyongyang" +msgstr "Пхеньян" -msgid "Isle_of_Man" -msgstr "" +msgid "Australia" +msgstr "Австралия" -msgid "Ljubljana" -msgstr "" +msgid "Mazatlan" +msgstr "Масатлан" -msgid "Stockholm" -msgstr "" +msgid "Macau" +msgstr "Макао" -msgid "Skopje" -msgstr "" +msgid "Denver" +msgstr "Денвер" -msgid "Oslo" -msgstr "" +msgid "Yakutat" +msgstr "Якутат" -msgid "Sarajevo" -msgstr "" +msgid "Currie" +msgstr "Карри" -msgid "Tirane" -msgstr "" +msgid "Dar_es_Salaam" +msgstr "Дар-эс-Салам" -msgid "Zagreb" -msgstr "" +msgid "Thunder_Bay" +msgstr "Тандер-Бей" -msgid "Vienna" -msgstr "" +msgid "Los_Angeles" +msgstr "Лос-Анджелес" -msgid "Andorra" -msgstr "" +msgid "Nome" +msgstr "Ном" -msgid "Madrid" -msgstr "" +msgid "Colombo" +msgstr "Коломбо" -msgid "Podgorica" -msgstr "" +msgid "Nairobi" +msgstr "Найроби" -msgid "Copenhagen" -msgstr "" +msgid "Prague" +msgstr "Прага" -msgid "Monaco" -msgstr "" +msgid "Metlakatla" +msgstr "Метлакатла" -msgid "Belgrade" -msgstr "" +msgid "Vostok" +msgstr "Восток" -msgid "Budapest" -msgstr "" +msgid "Blanc-Sablon" +msgstr "Блан-Саблон" -msgid "Brussels" -msgstr "" +msgid "Port_Moresby" +msgstr "Порт_Морсби" -msgid "Amsterdam" -msgstr "" +msgid "US" +msgstr "США" -msgid "Berlin" -msgstr "" +msgid "Ouagadougou" +msgstr "Уагадугу" -msgid "Zurich" -msgstr "" +msgid "Tashkent" +msgstr "Ташкент" -msgid "Bratislava" -msgstr "" +msgid "Maputo" +msgstr "Мапуту" -msgid "Prague" -msgstr "" +msgid "Qatar" +msgstr "Катар" -msgid "Malta" -msgstr "" +msgid "Chita" +msgstr "Чита" -msgid "Rome" -msgstr "" +msgid "Caracas" +msgstr "Каракас" -msgid "Luxembourg" -msgstr "" +msgid "Central" +msgstr "Центральный" -msgid "Vaduz" -msgstr "" +msgid "Chatham" +msgstr "Чатем" -msgid "Paris" -msgstr "" +msgid "Brussels" +msgstr "Брюссель" -msgid "Warsaw" -msgstr "" +msgid "Zaporozhye" +msgstr "Запорожье" -msgid "Vatican" -msgstr "" +msgid "Cambridge_Bay" +msgstr "Кембридж Бэй" -msgid "Busingen" -msgstr "" +msgid "Guayaquil" +msgstr "Гуаякиль" -msgid "Gibraltar" -msgstr "" +msgid "Coral_Harbour" +msgstr "Корал Харбор" -msgid "San_Marino" -msgstr "" +msgid "Kigali" +msgstr "Кигали" -msgid "Sofia" -msgstr "" +msgid "Zagreb" +msgstr "Загреб" -msgid "Vilnius" -msgstr "" +msgid "Maseru" +msgstr "Масеру" -msgid "Helsinki" -msgstr "" +msgid "Belgrade" +msgstr "Белград" -msgid "Mariehamn" -msgstr "" +msgid "Goose_Bay" +msgstr "Гуз-Бей" -msgid "Riga" -msgstr "" +msgid "Monterrey" +msgstr "Монтеррей" -msgid "Bucharest" -msgstr "" +msgid "Luxembourg" +msgstr "Люксембург" -msgid "Kyiv" -msgstr "" +msgid "Cayman" +msgstr "Кайман" -msgid "Kiev" -msgstr "" +msgid "Alaska" +msgstr "Аляска" -msgid "Athens" -msgstr "" +msgid "Skopje" +msgstr "Скопье" -msgid "Zaporozhye" -msgstr "" +msgid "St_Kitts" +msgstr "Сент-Китс" -msgid "Tallinn" -msgstr "" +msgid "Kampala" +msgstr "Кампала" -msgid "Kaliningrad" -msgstr "" +msgid "Rankin_Inlet" +msgstr "Ранкин-Инлет" -msgid "Uzhgorod" -msgstr "" +msgid "Kolkata" +msgstr "Калькутта" -msgid "Chisinau" -msgstr "" +msgid "Canada" +msgstr "Канада" -msgid "Nicosia" -msgstr "" +msgid "Dominica" +msgstr "Доминика" -msgid "Tiraspol" -msgstr "" +msgid "Bucharest" +msgstr "Бухарест" -msgid "Simferopol" -msgstr "" +msgid "Zurich" +msgstr "Цюрих" -msgid "Istanbul" -msgstr "" +msgid "Queensland" +msgstr "Квинсленд" -msgid "Moscow" -msgstr "" +msgid "Atikokan" +msgstr "Атикокан" -msgid "Kirov" -msgstr "" +msgid "Mbabane" +msgstr "Мбабане" -msgid "Minsk" -msgstr "" +msgid "Kathmandu" +msgstr "Катманду" -msgid "Volgograd" -msgstr "" +msgid "Indian" +msgstr "Индиана" -msgid "Ulyanovsk" -msgstr "" +msgid "Khandyga" +msgstr "Хандыга" -msgid "Samara" -msgstr "" +msgid "Guernsey" +msgstr "Гернси" -msgid "Astrakhan" -msgstr "" +msgid "Yerevan" +msgstr "Ереван" -msgid "Saratov" -msgstr "" +msgid "Buenos_Aires" +msgstr "Буэнос Айрес" -msgid "Africa" -msgstr "" +msgid "Tunis" +msgstr "Тунис" -msgid "Lome" -msgstr "" +msgid "Easter" +msgstr "Пасха" -msgid "Bissau" -msgstr "" +msgid "Matamoros" +msgstr "Матаморос" -msgid "Sao_Tome" -msgstr "" +msgid "East-Indiana" +msgstr "Восточная Индиана" -msgid "Abidjan" -msgstr "" +msgid "Singapore" +msgstr "Сингапур" -msgid "Accra" -msgstr "" +msgid "Atlantic" +msgstr "Атлантика" -msgid "Banjul" -msgstr "" +msgid "Canary" +msgstr "Канари" -msgid "Conakry" -msgstr "" +msgid "Fort_Nelson" +msgstr "Форт Нельсон" -msgid "Ouagadougou" -msgstr "" +msgid "Recife" +msgstr "Ресифи" -msgid "Nouakchott" -msgstr "" +msgid "Malta" +msgstr "Мальта" -msgid "Timbuktu" -msgstr "" +msgid "Eucla" +msgstr "Евкла" -msgid "Dakar" -msgstr "" +msgid "Azores" +msgstr "Азорские острова" -msgid "Monrovia" -msgstr "" +msgid "Santiago" +msgstr "Сантьяго" -msgid "Freetown" -msgstr "" +msgid "Aden" +msgstr "Аден" -msgid "Bamako" -msgstr "" +msgid "Merida" +msgstr "Мерида" -msgid "El_Aaiun" -msgstr "" +msgid "Baku" +msgstr "Баку" -msgid "Lagos" -msgstr "" +msgid "Belem" +msgstr "Белен" -msgid "Porto-Novo" -msgstr "" +msgid "Ceuta" +msgstr "Сеута" -msgid "Algiers" -msgstr "" +msgid "San_Marino" +msgstr "Сан Марино" -msgid "Douala" -msgstr "" +msgid "Barnaul" +msgstr "Барнаул" -msgid "Brazzaville" -msgstr "" +msgid "Damascus" +msgstr "Дамаск" -msgid "Libreville" -msgstr "" +msgid "Fakaofo" +msgstr "Факаофо" -msgid "Casablanca" -msgstr "" +msgid "Dawson" +msgstr "Доусон" -msgid "Niamey" -msgstr "" +msgid "Irkutsk" +msgstr "Иркутск" -msgid "Tunis" -msgstr "" +msgid "Anguilla" +msgstr "Ангилья" -msgid "Luanda" -msgstr "" +msgid "Tijuana" +msgstr "Тихуана" -msgid "Malabo" -msgstr "" +msgid "Warsaw" +msgstr "Варшава" -msgid "Ceuta" -msgstr "" +msgid "Adak" +msgstr "Адак" -msgid "Kinshasa" -msgstr "" +msgid "London" +msgstr "Лондон" -msgid "Bangui" -msgstr "" +msgid "Jayapura" +msgstr "Джаяпура" -msgid "Ndjamena" -msgstr "" +msgid "St_Vincent" +msgstr "Сент-Винсент" -msgid "Juba" -msgstr "" +msgid "Darwin" +msgstr "Дарвин" -msgid "Maseru" -msgstr "" +msgid "Cayenne" +msgstr "Кайенна" + +msgid "St_Johns" +msgstr "Сент-Джонс" msgid "Khartoum" -msgstr "" +msgstr "Хартум" -msgid "Lubumbashi" -msgstr "" +msgid "Rainy_River" +msgstr "Рейни-Ривер" -msgid "Tripoli" -msgstr "" +msgid "Samara" +msgstr "Самара" -msgid "Mbabane" -msgstr "" +msgid "Vienna" +msgstr "Вена" -msgid "Kigali" -msgstr "" +msgid "Ndjamena" +msgstr "Нджамена" -msgid "Gaborone" -msgstr "" +msgid "Vladivostok" +msgstr "Владивосток" -msgid "Windhoek" -msgstr "" +msgid "Saratov" +msgstr "Саратов" -msgid "Maputo" -msgstr "" +msgid "Nuuk" +msgstr "Нуук" -msgid "Cairo" -msgstr "" +msgid "Chongqing" +msgstr "Чунцин" -msgid "Johannesburg" -msgstr "" +msgid "North" +msgstr "Север" -msgid "Bujumbura" -msgstr "" +msgid "Atka" +msgstr "Атка" -msgid "Lusaka" -msgstr "" +msgid "Swift_Current" +msgstr "Суифт-Каррент" -msgid "Harare" -msgstr "" +msgid "Bangkok" +msgstr "Бангкок" msgid "Blantyre" -msgstr "" +msgstr "Блантайр" -msgid "Djibouti" -msgstr "" +msgid "Algiers" +msgstr "Алжир" -msgid "Dar_es_Salaam" -msgstr "" +msgid "Freetown" +msgstr "Фритаун" -msgid "Kampala" -msgstr "" +msgid "GMT-1" +msgstr "ГМТ-1" -msgid "Addis_Ababa" -msgstr "" +msgid "Detroit" +msgstr "Детройт" -msgid "Mogadishu" -msgstr "" +msgid "Johannesburg" +msgstr "Йоханнесбург" -msgid "Asmera" -msgstr "" +msgid "Shanghai" +msgstr "Шанхай" -msgid "Asmara" -msgstr "" +msgid "Novokuznetsk" +msgstr "Новокузнецк" -msgid "Nairobi" -msgstr "" +msgid "Dawson_Creek" +msgstr "Доусон Крик" -msgid "Antarctica" -msgstr "" +msgid "Srednekolymsk" +msgstr "Среднеколымск" -msgid "Rothera" -msgstr "" +msgid "Grenada" +msgstr "Гренада" -msgid "Palmer" -msgstr "" +msgid "Samoa" +msgstr "Самоа" + +msgid "Rarotonga" +msgstr "Раротонга" + +msgid "Broken_Hill" +msgstr "Брокен-Хилл" + +msgid "Winnipeg" +msgstr "Виннипег" + +msgid "Tripoli" +msgstr "Триполи" + +msgid "Perth" +msgstr "Перт" + +msgid "Comoro" +msgstr "Коморо" + +msgid "Tarawa" +msgstr "Тарава" + +msgid "DeNoronha" +msgstr "Фернанду-ди-Норонья" + +msgid "Rio_Branco" +msgstr "Рио_Бранко" + +msgid "St_Helena" +msgstr "Сент-Хелина" + +msgid "Famagusta" +msgstr "Фамагуста" + +msgid "Noronha" +msgstr "Норонья" + +msgid "Rangoon" +msgstr "Рангун" + +msgid "Hermosillo" +msgstr "Эрмосильо" + +msgid "Bahia" +msgstr "Баия" + +msgid "Tortola" +msgstr "Тортола" + +msgid "Sao_Paulo" +msgstr "Сан-Паулу" + +msgid "Dakar" +msgstr "Дакар" + +msgid "Jan_Mayen" +msgstr "Ян_Майен" + +msgid "Acre" +msgstr "Акр" + +msgid "Choibalsan" +msgstr "Чойбалсан" + +msgid "Sitka" +msgstr "Ситка" + +msgid "Arizona" +msgstr "Аризона" + +msgid "Jersey" +msgstr "Джерси" + +msgid "Juneau" +msgstr "Джуно" + +msgid "Brisbane" +msgstr "Брисбен" + +msgid "Rome" +msgstr "Рим" msgid "Troll" -msgstr "" +msgstr "Тролль" -msgid "Syowa" -msgstr "" +msgid "Ashkhabad" +msgstr "Ашхабад" -msgid "Mawson" -msgstr "" +msgid "Guatemala" +msgstr "Гватемала" -msgid "Vostok" -msgstr "" +msgid "Dublin" +msgstr "Дублин" -msgid "Davis" -msgstr "" +msgid "Barbados" +msgstr "Барбадос" -msgid "DumontDUrville" -msgstr "" +msgid "Conakry" +msgstr "Конакри" -msgid "Casey" -msgstr "" +msgid "Montserrat" +msgstr "Монтсеррат" -msgid "Macquarie" -msgstr "" +msgid "Sarajevo" +msgstr "Сараево" -msgid "McMurdo" -msgstr "" +msgid "Abidjan" +msgstr "Абиджан" -msgid "South_Pole" -msgstr "" +msgid "Scoresbysund" +msgstr "Скорсбисунд" -msgid "locali" -msgstr "" +msgid "Cancun" +msgstr "Канкун" -msgid "America" -msgstr "" +msgid "Pohnpei" +msgstr "Понпеи" -msgid "Atka" -msgstr "" +msgid "Pacific" +msgstr "Тихий океан" -msgid "Adak" -msgstr "" +msgid "Chungking" +msgstr "Чунцин" + +msgid "Greenwich" +msgstr "Гринвич" msgid "Anchorage" -msgstr "" +msgstr "Анкоридж" -msgid "Metlakatla" -msgstr "" +msgid "Chihuahua" +msgstr "Чихуахуа" -msgid "Juneau" -msgstr "" +msgid "Porto-Novo" +msgstr "Порто-Ново" -msgid "Sitka" -msgstr "" +msgid "Boise" +msgstr "Бойсе" -msgid "Nome" -msgstr "" +msgid "Chile" +msgstr "Чили" -msgid "Yakutat" -msgstr "" +msgid "Bratislava" +msgstr "Братислава" -msgid "Tijuana" -msgstr "" +msgid "Bahrain" +msgstr "Бахрейн" -msgid "Santa_Isabel" -msgstr "" +msgid "Athens" +msgstr "Афины" -msgid "Vancouver" -msgstr "" +msgid "Ulaanbaatar" +msgstr "Улан-Батор" -msgid "Ensenada" -msgstr "" +msgid "Maceio" +msgstr "Масейо" -msgid "Los_Angeles" -msgstr "" +msgid "Mawson" +msgstr "Моусон" -msgid "Ciudad_Juarez" -msgstr "" +msgid "Newfoundland" +msgstr "Ньюфаундленд" -msgid "Dawson" -msgstr "" +msgid "Tiraspol" +msgstr "Тирасполь" -msgid "Hermosillo" -msgstr "" +msgid "Aqtau" +msgstr "Актау" -msgid "Phoenix" -msgstr "" +msgid "Bujumbura" +msgstr "Бужумбура" + +msgid "Saskatchewan" +msgstr "Саскачеван" + +msgid "Norfolk" +msgstr "Норфолк" + +msgid "Pontianak" +msgstr "Понтианак" + +msgid "Panama" +msgstr "Панама" + +msgid "Kuala_Lumpur" +msgstr "Куала-Лумпур" + +msgid "Ashgabat" +msgstr "Ашхабад" msgid "Whitehorse" -msgstr "" +msgstr "Уайтхорс" -msgid "Edmonton" -msgstr "" +msgid "Busingen" +msgstr "Бузинген" -msgid "Creston" -msgstr "" +msgid "Lower_Princes" +msgstr "Лоуэр-Принс-Куотер" -msgid "Inuvik" -msgstr "" +msgid "Niamey" +msgstr "Ниамей" -msgid "Mazatlan" -msgstr "" +msgid "El_Aaiun" +msgstr "Эль_Аайун" -msgid "Shiprock" -msgstr "" +msgid "Ulyanovsk" +msgstr "Ульяновск" -msgid "Yellowknife" -msgstr "" +msgid "Minsk" +msgstr "Минск" -msgid "Fort_Nelson" -msgstr "" +msgid "Asmara" +msgstr "Асмэра" -msgid "Denver" -msgstr "" +msgid "Taipei" +msgstr "Тайбэй" -msgid "Boise" -msgstr "" +msgid "Danmarkshavn" +msgstr "Данмарксхавн" -msgid "Dawson_Creek" -msgstr "" +msgid "Casey" +msgstr "Кейси" -msgid "Cambridge_Bay" -msgstr "" +msgid "Tbilisi" +msgstr "Тбилиси" + +msgid "Beirut" +msgstr "Бейрут" + +msgid "Stockholm" +msgstr "Стокгольм" + +msgid "Santa_Isabel" +msgstr "Санта_Изабель" + +msgid "Ho_Chi_Minh" +msgstr "Хо_Чи_Мин" + +msgid "Funafuti" +msgstr "Фунафути" + +msgid "Lubumbashi" +msgstr "Лубумбаши" + +msgid "Tahiti" +msgstr "Таити" + +msgid "Toronto" +msgstr "Торонто" + +msgid "Hebron" +msgstr "Хеврон" + +msgid "Lisbon" +msgstr "Лиссабон" + +msgid "Mogadishu" +msgstr "Могадишо" + +msgid "Edmonton" +msgstr "Эдмонтон" + +msgid "Chisinau" +msgstr "Кишинев" + +msgid "Grand_Turk" +msgstr "Гранд_Турк" + +msgid "Antananarivo" +msgstr "Антананариву" -msgid "North_Dakota" -msgstr "" +msgid "Dushanbe" +msgstr "Душанбе" -msgid "Knox_IN" -msgstr "" +msgid "McMurdo" +msgstr "МакМердо" -msgid "Costa_Rica" -msgstr "" +msgid "Truk" +msgstr "Трук" -msgid "Menominee" -msgstr "" +msgid "Cordoba" +msgstr "Кордова" -msgid "El_Salvador" -msgstr "" +msgid "Indianapolis" +msgstr "Индианаполис" -msgid "Regina" -msgstr "" +msgid "Wake" +msgstr "Уэйко" -msgid "Guatemala" -msgstr "" +msgid "Qostanay" +msgstr "Костанай" -msgid "Resolute" -msgstr "" +msgid "Syowa" +msgstr "Сёва" -msgid "Monterrey" -msgstr "" +msgid "Managua" +msgstr "Манагуа" -msgid "Chicago" -msgstr "" +msgid "Fortaleza" +msgstr "Форталеза" -msgid "Winnipeg" -msgstr "" +msgid "Ponape" +msgstr "Понапе" -msgid "Indiana" -msgstr "" +msgid "Havana" +msgstr "Гавана" -msgid "Rankin_Inlet" -msgstr "" +msgid "Yukon" +msgstr "Юкон" -msgid "Merida" -msgstr "" +msgid "Copenhagen" +msgstr "Копенгаген" -msgid "Tegucigalpa" -msgstr "" +msgid "Kamchatka" +msgstr "Камчатка" -msgid "Managua" -msgstr "" +msgid "Amman" +msgstr "Амман" -msgid "Belize" -msgstr "" +msgid "Pitcairn" +msgstr "Питкэрн" -msgid "Rainy_River" -msgstr "" +msgid "Yancowinna" +msgstr "Янковина" -msgid "Bahia_Banderas" -msgstr "" +msgid "Mexico" +msgstr "Мексика" -msgid "Ojinaga" -msgstr "" +msgid "Harare" +msgstr "Хараре" -msgid "Chihuahua" -msgstr "" +msgid "Riyadh" +msgstr "Эр-Рияд" -msgid "Swift_Current" -msgstr "" +msgid "Lord_Howe" +msgstr "Лорд_Хау" -msgid "Mexico_City" -msgstr "" +msgid "Apia" +msgstr "Апиа" -msgid "Matamoros" -msgstr "" +msgid "Monaco" +msgstr "Монако" -msgid "Jamaica" -msgstr "" +msgid "Aleutian" +msgstr "Алеутский" msgid "Montreal" -msgstr "" +msgstr "Монреаль" -msgid "Havana" -msgstr "" +msgid "Davis" +msgstr "Дэвис" -msgid "Grand_Turk" -msgstr "" +msgid "Efate" +msgstr "Эфате" -msgid "Iqaluit" -msgstr "" +msgid "Honolulu" +msgstr "Гонолулу" -msgid "Louisville" -msgstr "" +msgid "Lagos" +msgstr "Лагос" -msgid "Guayaquil" -msgstr "" +msgid "Shiprock" +msgstr "Шипрок" -msgid "Lima" -msgstr "" +msgid "Volgograd" +msgstr "Волгоград" -msgid "Coral_Harbour" -msgstr "" +msgid "Vilnius" +msgstr "Вильнюс" -msgid "Detroit" -msgstr "" +msgid "Oslo" +msgstr "Осло" -msgid "Port-au-Prince" -msgstr "" +msgid "Vientiane" +msgstr "Вьентьян" -msgid "Fort_Wayne" -msgstr "" +msgid "Dili" +msgstr "Дили" -msgid "Eirunepe" -msgstr "" +msgid "Seoul" +msgstr "Сеул" -msgid "Indianapolis" -msgstr "" +msgid "Kerguelen" +msgstr "Кергелен" -msgid "Rio_Branco" -msgstr "" +msgid "Curacao" +msgstr "Кюрасао" -msgid "Cancun" -msgstr "" +msgid "Jujuy" +msgstr "Жужуй" -msgid "Nipigon" -msgstr "" +msgid "Manila" +msgstr "Манила" -msgid "Toronto" -msgstr "" +msgid "Yap" +msgstr "Яп" -msgid "Panama" -msgstr "" +msgid "Kuwait" +msgstr "Кувейт" -msgid "New_York" -msgstr "" +msgid "Lindeman" +msgstr "Линдеман" -msgid "Kentucky" -msgstr "" +msgid "Vaduz" +msgstr "Вадуц" -msgid "Pangnirtung" -msgstr "" +msgid "Isle_of_Man" +msgstr "Остров Мэн" -msgid "Thunder_Bay" -msgstr "" +msgid "Nassau" +msgstr "Нассау" -msgid "Bogota" -msgstr "" +msgid "Zulu" +msgstr "Зулу" -msgid "Cayman" -msgstr "" +msgid "Campo_Grande" +msgstr "Кампо_Гранде" -msgid "Atikokan" -msgstr "" +msgid "Libreville" +msgstr "Либревиль" -msgid "Porto_Acre" -msgstr "" +msgid "Fiji" +msgstr "Фиджи" -msgid "Nassau" -msgstr "" +msgid "Yakutsk" +msgstr "Якутск" -msgid "Anguilla" -msgstr "" +msgid "Ensenada" +msgstr "Энсенада" -msgid "Guadeloupe" -msgstr "" +msgid "Kiritimati" +msgstr "Киритимати" -msgid "Puerto_Rico" -msgstr "" +msgid "Kaliningrad" +msgstr "Калининград" -msgid "Porto_Velho" -msgstr "" +msgid "Creston" +msgstr "Крестон" -msgid "Guyana" -msgstr "" +msgid "Michigan" +msgstr "Мичиган" -msgid "Lower_Princes" -msgstr "" +msgid "Oral" +msgstr "Уральск" -msgid "St_Lucia" -msgstr "" +msgid "Cocos" +msgstr "Кокос" -msgid "Port_of_Spain" -msgstr "" +msgid "Eastern" +msgstr "Восточный" -msgid "Dominica" -msgstr "" +msgid "BajaNorte" +msgstr "БахаНорте" -msgid "Manaus" -msgstr "" +msgid "Tel_Aviv" +msgstr "Тель-Авив" -msgid "Thule" -msgstr "" +msgid "Sofia" +msgstr "София" -msgid "St_Vincent" -msgstr "" +msgid "Adelaide" +msgstr "Аделаида" -msgid "St_Barthelemy" -msgstr "" +msgid "Vatican" +msgstr "Ватикан" -msgid "Grenada" -msgstr "" +msgid "Calcutta" +msgstr "Калькутта" -msgid "Marigot" -msgstr "" +msgid "Lusaka" +msgstr "Лусака" -msgid "Goose_Bay" -msgstr "" +msgid "St_Barthelemy" +msgstr "Святой Бартелеми" -msgid "Martinique" -msgstr "" +msgid "Bougainville" +msgstr "Бугенвиль" -msgid "La_Paz" -msgstr "" +msgid "Tegucigalpa" +msgstr "Тегусигальпа" -msgid "Cuiaba" -msgstr "" +msgid "Sao_Tome" +msgstr "Сан-Томе" -msgid "Tortola" -msgstr "" +msgid "Moncton" +msgstr "Монктон" -msgid "Virgin" -msgstr "" +msgid "Reykjavik" +msgstr "Рейкьявик" -msgid "Santo_Domingo" -msgstr "" +msgid "St_Thomas" +msgstr "Сент-Томас" -msgid "Antigua" -msgstr "" +msgid "Baghdad" +msgstr "Багдад" -msgid "Curacao" -msgstr "" +msgid "Gibraltar" +msgstr "Гибралтар" -msgid "Barbados" -msgstr "" +msgid "Puerto_Rico" +msgstr "Пуэрто-Рико" -msgid "Blanc-Sablon" -msgstr "" +msgid "Asmera" +msgstr "Асмера" -msgid "Aruba" -msgstr "" +msgid "Madrid" +msgstr "Мадрид" -msgid "Kralendijk" -msgstr "" +msgid "Sakhalin" +msgstr "Сахалин" -msgid "Montserrat" -msgstr "" +msgid "Porto_Acre" +msgstr "Порту_Акр" -msgid "Campo_Grande" -msgstr "" +msgid "General" +msgstr "Генерал-Сантос" -msgid "Caracas" -msgstr "" +msgid "Macao" +msgstr "Макао" -msgid "St_Thomas" -msgstr "" +msgid "Martinique" +msgstr "Мартиника" -msgid "Glace_Bay" -msgstr "" +msgid "Mountain" +msgstr "Маунтин-Вью" -msgid "St_Kitts" -msgstr "" +msgid "Nipigon" +msgstr "Нипигон" -msgid "Moncton" -msgstr "" +msgid "Vancouver" +msgstr "Ванкувер" -msgid "Boa_Vista" -msgstr "" +msgid "Bangui" +msgstr "Банги" -msgid "Halifax" -msgstr "" +msgid "Indiana-Starke" +msgstr "Индиана-Старке" -msgid "Buenos_Aires" -msgstr "" +msgid "Harbin" +msgstr "Харбин" -msgid "Santarem" -msgstr "" +msgid "Istanbul" +msgstr "Стамбул" -msgid "Araguaina" -msgstr "" +msgid "Guadeloupe" +msgstr "Гваделупа" -msgid "Belem" -msgstr "" +msgid "Simferopol" +msgstr "Симферополь" -msgid "St_Johns" -msgstr "" +msgid "Paris" +msgstr "Париж" -msgid "Nuuk" -msgstr "" +msgid "Christmas" +msgstr "Рождество" -msgid "Cordoba" -msgstr "" +msgid "Accra" +msgstr "Аккра" -msgid "Catamarca" -msgstr "" +msgid "Victoria" +msgstr "Виктория" -msgid "Rosario" -msgstr "" +msgid "Faeroe" +msgstr "Фарерские острова" -msgid "Jujuy" -msgstr "" +msgid "Dacca" +msgstr "Дакка" -msgid "Montevideo" -msgstr "" +msgid "Marigot" +msgstr "Мариго" -msgid "Punta_Arenas" -msgstr "" +msgid "Dhaka" +msgstr "Дакка" -msgid "Cayenne" -msgstr "" +msgid "Kralendijk" +msgstr "Кралендейк" -msgid "Sao_Paulo" -msgstr "" +msgid "Aqtobe" +msgstr "Актобе" -msgid "Santiago" -msgstr "" +msgid "Pago_Pago" +msgstr "Паго_Паго" -msgid "Paramaribo" -msgstr "" +msgid "Bahia_Banderas" +msgstr "Баия_Бандерас" -msgid "Miquelon" -msgstr "" +msgid "Continental" +msgstr "Континентальный" -msgid "Godthab" -msgstr "" +msgid "Midway" +msgstr "Мидуэй" -msgid "Maceio" -msgstr "" +msgid "Johnston" +msgstr "Джонстон" -msgid "Fortaleza" -msgstr "" +msgid "Tasmania" +msgstr "Тасмания" -msgid "Argentina" -msgstr "" +msgid "Reunion" +msgstr "Воссоединение" -msgid "Mendoza" -msgstr "" +msgid "South_Pole" +msgstr "Южный полюс" -msgid "Recife" -msgstr "" +msgid "Riga" +msgstr "Рига" -msgid "Bahia" -msgstr "" +msgid "La_Paz" +msgstr "Ла_Пас" -msgid "Asuncion" -msgstr "" +msgid "Niue" +msgstr "Ниуэ" -msgid "Noronha" -msgstr "" +msgid "Nouakchott" +msgstr "Нуакшот" -msgid "Scoresbysund" -msgstr "" +msgid "Berlin" +msgstr "Берлин" -msgid "Danmarkshavn" -msgstr "" +msgid "Kwajalein" +msgstr "Кваджалейн" -msgid "Chile" -msgstr "" +msgid "St_Lucia" +msgstr "Святая Люсия" -msgid "EasterIsland" -msgstr "" +msgid "Jakarta" +msgstr "Джакарта" -msgid "Continental" -msgstr "" +msgid "Chuuk" +msgstr "Чуук" -msgid "Australia" -msgstr "" +msgid "Tallinn" +msgstr "Таллинн" -msgid "Perth" -msgstr "" +msgid "Nicosia" +msgstr "Никосия" -msgid "Eucla" -msgstr "" +msgid "New_York" +msgstr "Нью-Йорк" -msgid "West" -msgstr "" +msgid "Kuching" +msgstr "Кучинг" -msgid "Darwin" -msgstr "" +msgid "Porto_Velho" +msgstr "Порту-Велью" -msgid "North" -msgstr "" +msgid "Canberra" +msgstr "Канберра" -msgid "Yancowinna" -msgstr "" +msgid "Douala" +msgstr "Дуала" -msgid "South" -msgstr "" +msgid "Atyrau" +msgstr "Атырау" -msgid "Lindeman" -msgstr "" +msgid "Madeira" +msgstr "Мадейра" -msgid "Broken_Hill" -msgstr "" +msgid "Phoenix" +msgstr "Феникс" -msgid "Adelaide" -msgstr "" +msgid "Santo_Domingo" +msgstr "Санто-Доминго" -msgid "Queensland" -msgstr "" +msgid "El_Salvador" +msgstr "Сальвадор" -msgid "Brisbane" -msgstr "" +msgid "Anadyr" +msgstr "Анадырь" -msgid "Victoria" -msgstr "" +msgid "Boa_Vista" +msgstr "Боа_Виста" -msgid "Hobart" -msgstr "" +msgid "Godthab" +msgstr "Годтаб" -msgid "ACT" -msgstr "" +msgid "Inuvik" +msgstr "Инувик" -msgid "Tasmania" -msgstr "" +msgid "Cairo" +msgstr "Каир" -msgid "LHI" -msgstr "" +msgid "Ojinaga" +msgstr "Охинага" -msgid "Currie" -msgstr "" +msgid "Samarkand" +msgstr "Самарканд" -msgid "Canberra" -msgstr "" +msgid "Jerusalem" +msgstr "Иерусалим" -msgid "Sydney" -msgstr "" +msgid "Bishkek" +msgstr "Бишкек" -msgid "Melbourne" -msgstr "" +msgid "Karachi" +msgstr "Карачи" -msgid "Lord_Howe" -msgstr "" +msgid "Phnom_Penh" +msgstr "Пномпень" -msgid "NSW" -msgstr "" +msgid "Qyzylorda" +msgstr "Кызылорда" -msgid "Asia" -msgstr "" +msgid "Auckland" +msgstr "Окленд" -msgid "Beirut" -msgstr "" +msgid "Makassar" +msgstr "Макассар" -msgid "Famagusta" -msgstr "" +msgid "Stanley" +msgstr "Стэнли" -msgid "Hebron" -msgstr "" +msgid "Virgin" +msgstr "Виргин" -msgid "Tel_Aviv" -msgstr "" +msgid "Noumea" +msgstr "Нумеа" -msgid "Jerusalem" -msgstr "" +msgid "Budapest" +msgstr "Будапешт" -msgid "Gaza" -msgstr "" +msgid "Tirane" +msgstr "Тиран" -msgid "Amman" -msgstr "" +msgid "Miquelon" +msgstr "Микелон" -msgid "Bahrain" -msgstr "" +msgid "Krasnoyarsk" +msgstr "Красноярск" -msgid "Tehran" -msgstr "" +msgid "Rosario" +msgstr "Росарио" -msgid "Baghdad" -msgstr "" +msgid "LHI" +msgstr "Лхи" -msgid "Kuwait" -msgstr "" +msgid "Bamako" +msgstr "Бамако" -msgid "Riyadh" -msgstr "" +msgid "Lome" +msgstr "Ломе" -msgid "Qatar" -msgstr "" +msgid "Astrakhan" +msgstr "Астрахань" -msgid "Damascus" -msgstr "" +msgid "Addis_Ababa" +msgstr "Аддис-Абеба" -msgid "Aden" -msgstr "" +msgid "GMT-3" +msgstr "ГМТ-3" -msgid "Yerevan" -msgstr "" +msgid "Tokyo" +msgstr "Токио" -msgid "Baku" -msgstr "" +msgid "Saipan" +msgstr "Сайпан" -msgid "Dubai" -msgstr "" +msgid "Katmandu" +msgstr "Катманду" -msgid "Kabul" -msgstr "" +msgid "Monrovia" +msgstr "Монровия" -msgid "Muscat" -msgstr "" +msgid "Casablanca" +msgstr "Касабланка" -msgid "Tbilisi" -msgstr "" +msgid "Nauru" +msgstr "Науру" -msgid "Kathmandu" -msgstr "" +msgid "Guam" +msgstr "Гуам" -msgid "Samarkand" -msgstr "" +msgid "Ust-Nera" +msgstr "Усть-Нера" -msgid "Ashgabat" -msgstr "" +msgid "Arctic" +msgstr "Арктика" -msgid "Karachi" -msgstr "" +msgid "Menominee" +msgstr "Меномини" -msgid "Katmandu" -msgstr "" +msgid "Asuncion" +msgstr "Асунсьон" -msgid "Calcutta" -msgstr "" +msgid "Rothera" +msgstr "Ротера" -msgid "Tashkent" -msgstr "" +msgid "Luanda" +msgstr "Луанда" -msgid "Yekaterinburg" -msgstr "" +msgid "Tomsk" +msgstr "Томск" -msgid "Oral" -msgstr "" +msgid "Guadalcanal" +msgstr "Гуадалканал" -msgid "Dushanbe" -msgstr "" +msgid "Chagos" +msgstr "Чагос" -msgid "Atyrau" -msgstr "" +msgid "Thimphu" +msgstr "Тхимпху" -msgid "Aqtobe" -msgstr "" +msgid "Timbuktu" +msgstr "Тимбукту" -msgid "Aqtau" -msgstr "" +msgid "Glace_Bay" +msgstr "Глейс-Бей" -msgid "Qyzylorda" -msgstr "" +msgid "Marquesas" +msgstr "Маркизские острова" -msgid "Ashkhabad" -msgstr "" +msgid "Brunei" +msgstr "Бруней" -msgid "Colombo" -msgstr "" +msgid "Pangnirtung" +msgstr "Пангниртунг" -msgid "Kolkata" -msgstr "" +msgid "South" +msgstr "Саутф" -msgid "Dhaka" -msgstr "" +msgid "Magadan" +msgstr "Магадан" -msgid "Thimphu" -msgstr "" +msgid "Palau" +msgstr "Палау" -msgid "Rangoon" -msgstr "" +msgid "Yangon" +msgstr "Янгон" -msgid "Kashgar" -msgstr "" +msgid "Tongatapu" +msgstr "Тонгатапу" -msgid "Qostanay" -msgstr "" +msgid "Hobart" +msgstr "Хобарт" -msgid "Almaty" -msgstr "" +msgid "Bogota" +msgstr "Богота" msgid "Urumqi" -msgstr "" +msgstr "Урумчи" -msgid "Yangon" -msgstr "" +msgid "Kinshasa" +msgstr "Киншаса" -msgid "Dacca" -msgstr "" +msgid "Thule" +msgstr "Туле" -msgid "Thimbu" -msgstr "" +msgid "Saigon" +msgstr "Сайгон" -msgid "Omsk" -msgstr "" +msgid "NSW" +msgstr "Новый Южный Уэльс" -msgid "Bishkek" -msgstr "" +msgid "Halifax" +msgstr "Галифакс" -msgid "Ho_Chi_Minh" -msgstr "" +msgid "Araguaina" +msgstr "Арагуайна" -msgid "Phnom_Penh" -msgstr "" +msgid "Muscat" +msgstr "Мускат" -msgid "Vientiane" -msgstr "" +msgid "Kashgar" +msgstr "Кашгар" -msgid "Bangkok" -msgstr "" +msgid "Port-au-Prince" +msgstr "Порт-о-Пренс" -msgid "Krasnoyarsk" -msgstr "" +msgid "Resolute" +msgstr "Резольют" -msgid "Novokuznetsk" -msgstr "" +msgid "Kabul" +msgstr "Кабул" -msgid "Barnaul" -msgstr "" +msgid "Kyiv" +msgstr "Киев" -msgid "Jakarta" -msgstr "" +msgid "Omsk" +msgstr "Омск" -msgid "Saigon" -msgstr "" +msgid "Gaza" +msgstr "Газа" + +msgid "Malabo" +msgstr "Малабо" msgid "Hovd" -msgstr "" +msgstr "Ховд" -msgid "Novosibirsk" -msgstr "" +msgid "Jamaica" +msgstr "Ямайка" -msgid "Tomsk" -msgstr "" +msgid "Faroe" +msgstr "Фарерские острова" -msgid "Pontianak" -msgstr "" +msgid "Mahe" +msgstr "Маэ" -msgid "Harbin" -msgstr "" +msgid "Montevideo" +msgstr "Монтевидео" -msgid "Chungking" -msgstr "" +msgid "Eirunepe" +msgstr "Эйрунепе" -msgid "Ulan_Bator" -msgstr "" +msgid "Catamarca" +msgstr "Катамарка" -msgid "Brunei" -msgstr "" +msgid "Melbourne" +msgstr "Мельбурн" -msgid "Singapore" -msgstr "" +msgid "Hawaii" +msgstr "Гавайи" -msgid "Choibalsan" -msgstr "" +msgid "Macquarie" +msgstr "Маккуори" -msgid "Chongqing" -msgstr "" +msgid "Belfast" +msgstr "Белфаст" -msgid "Macau" -msgstr "" +msgid "Wallis" +msgstr "Уоллис" -msgid "Ujung_Pandang" -msgstr "" +msgid "Moscow" +msgstr "Москва" -msgid "Manila" -msgstr "" +msgid "Gaborone" +msgstr "Габороне" -msgid "Kuala_Lumpur" -msgstr "" +msgid "Port_of_Spain" +msgstr "Порт-оф-Спейн" -msgid "Makassar" -msgstr "" +msgid "Bissau" +msgstr "Бисау" -msgid "Kuching" -msgstr "" +msgid "Universal" +msgstr "Юнивёрсал-Сити" -msgid "Macao" -msgstr "" +msgid "Regina" +msgstr "Реджайна" -msgid "Shanghai" -msgstr "" +msgid "Ulan_Bator" +msgstr "Улан_Батор" -msgid "Taipei" -msgstr "" +msgid "Ujung_Pandang" +msgstr "Уджунг_Панданг" -msgid "Ulaanbaatar" -msgstr "" +msgid "Costa_Rica" +msgstr "Коста_Рика" -msgid "Irkutsk" -msgstr "" +msgid "Galapagos" +msgstr "Галапагос" -msgid "Hong_Kong" -msgstr "" +msgid "Tehran" +msgstr "Тегеран" -msgid "Khandyga" -msgstr "" +msgid "DumontDUrville" +msgstr "Дюмон-д-Юрвиль" -msgid "Seoul" -msgstr "" +msgid "Enderbury" +msgstr "Эндербери" -msgid "Jayapura" -msgstr "" +msgid "Ciudad_Juarez" +msgstr "Сьюдад_Хуарес" -msgid "Chita" -msgstr "" +msgid "Mauritius" +msgstr "Маврикий" -msgid "Pyongyang" -msgstr "" +msgid "Podgorica" +msgstr "Подгорица" -msgid "Yakutsk" -msgstr "" +msgid "Kiev" +msgstr "Киев" -msgid "Tokyo" -msgstr "" +msgid "Hong_Kong" +msgstr "Гонконг" -msgid "Dili" -msgstr "" +msgid "Thimbu" +msgstr "Тимбу" -msgid "Vladivostok" -msgstr "" +msgid "Belize" +msgstr "Белиз" -msgid "Ust-Nera" -msgstr "" +msgid "Gambier" +msgstr "Гамбье" -msgid "Srednekolymsk" -msgstr "" +msgid "Sydney" +msgstr "Сидней" -msgid "Sakhalin" -msgstr "" +msgid "Amsterdam" +msgstr "Амстердам" -msgid "Magadan" -msgstr "" +msgid "Juba" +msgstr "Джуба" -msgid "Anadyr" -msgstr "" +msgid "Helsinki" +msgstr "Хельсинки" -msgid "Kamchatka" -msgstr "" +msgid "Santarem" +msgstr "Сантарен" -msgid "US" -msgstr "" +msgid "Guyana" +msgstr "Гайана" -msgid "Samoa" -msgstr "" +msgid "Maldives" +msgstr "Мальдивы" -msgid "Aleutian" -msgstr "" +msgid "Paramaribo" +msgstr "Парамарибо" -msgid "Hawaii" -msgstr "" +msgid "Fort_Wayne" +msgstr "Форт_Уэйн" -msgid "Alaska" -msgstr "" +msgid "Yellowknife" +msgstr "Йеллоунайф" -msgid "Pacific" -msgstr "" +msgid "West" +msgstr "Запад" -msgid "Mountain" -msgstr "" +msgid "Almaty" +msgstr "Алматы" -msgid "Arizona" -msgstr "" +msgid "Novosibirsk" +msgstr "Новосибирск" -msgid "Indiana-Starke" -msgstr "" +msgid "Mariehamn" +msgstr "Мариехамн" -msgid "Central" -msgstr "" +msgid "Brazzaville" +msgstr "Браззавиль" -msgid "East-Indiana" -msgstr "" +msgid "Majuro" +msgstr "Маджуро" -msgid "Michigan" -msgstr "" +msgid "Uzhgorod" +msgstr "Ужгород" -msgid "Eastern" -msgstr "" +msgid "Ljubljana" +msgstr "Любляна" -msgid "Atlantic" -msgstr "" +msgid "Knox_IN" +msgstr "Нокс_IN" msgid "Bermuda" -msgstr "" - -msgid "Stanley" -msgstr "" +msgstr "Бермуды" -msgid "South_Georgia" -msgstr "" +msgid "Kirov" +msgstr "Киров" -msgid "Cape_Verde" -msgstr "" +msgid "Cuiaba" +msgstr "Куяба" -msgid "Azores" -msgstr "" +msgid "Mendoza" +msgstr "Мендоса" -msgid "Faeroe" -msgstr "" +msgid "Kanton" +msgstr "Кантон" -msgid "Faroe" -msgstr "" +msgid "South_Georgia" +msgstr "Южная Грузия" -msgid "St_Helena" -msgstr "" +msgid "Banjul" +msgstr "Банжул" -msgid "Reykjavik" -msgstr "" +msgid "Louisville" +msgstr "Луисвилл" -msgid "Canary" -msgstr "" +msgid "Indiana" +msgstr "Индианан" -msgid "Madeira" -msgstr "" +msgid "North_Dokota" +msgstr "Северная Докота" -msgid "Jan_Mayen" -msgstr "" +msgid "Palmer" +msgstr "Палмер" -msgid "Brazil" -msgstr "" +msgid "Yekaterinburg" +msgstr "Екатеринбург" -msgid "Acre" -msgstr "" +msgid "Cape_Vepde" +msgstr "Кабо-Верде" msgid "East" -msgstr "" +msgstr "Восток" -msgid "DeNoronha" -msgstr "" +msgid "Easterlsland" +msgstr "Остров Пасхи" + +msgid "Mayotte" +msgstr "Майотта" + +msgid "BajaSur" +msgstr "Южная Нижняя Калифорния" +msgid "Enter the name of the ntp-server or its ip-address.\nWhen entering multiple addresses, separate them with commas." +msgstr "Введите имя ntp-сервера или его ip-адрес.\nПри вводе нескольких адресов, разделяйте их запятыми."