Исправлен .po и pot файл

pull/99/head
Igor Belitskiy 3 years ago
parent 003b8c96b1
commit 064bd52dab

File diff suppressed because it is too large Load Diff

@ -54,34 +54,34 @@ MainWindow::MainWindow(Glib::RefPtr<Gtk::Builder> const& builder) {
}
void MainWindow::settings() {
map_error["xdg-open https://wiki.ublinux.ru/ru/home"] = string(_(": \"xdg-open\""));
map_error["ubconfig --default --source system get clock ZONE"] = string(_(": \"Time Zone\""));
map_error["hwclock --systohc"] = string(_(": \"Hardware time\""));
map_error["ubconfig --default --source system get network NTPSERVERS"] = string(_(": \"NTP\""));
map_error["ubconfig --source=default get NTPSERVERS_DEFAULT"] = string(_(": \"NTP\""));
map_error["ubconfig --default --source system get clock HWCLOCK_SYNC"] = string(_(": \"Hardware time\""));
map_error["ubconfig --default --source global get network NTPSERVERS"] = string(_(": \"NTP\""));
map_error["ubconfig --default --source global get clock ZONE"] = string(_(": \"Time Zone\""));
map_error["ubconfig --default --source global get clock HWCLOCK_SYNC"] = string(_(": \"Hardware time\""));
map_error["ubconfig --source global get clock HWCLOCK_SYNC"] = string(_(": \"Hardware time\""));
map_error["ubconfig --target system set clock ZONE="] = string(_(": \"Time Zone\""));
map_error["ubconfig --target system set network NTPSERVERS=default"] = string(_(": \"NTP\""));
map_error["ubconfig --target system set network NTPSERVERS=dhcp"] = string(_(": \"NTP\""));
map_error["ubconfig --target system set network NTPSERVERS=\""] = string(_(": \"NTP\""));
map_error["ubconfig --target system remove network NTPSERVERS"] = string(_(": \"NTP\""));
map_error["ubconfig --target system set clock HWCLOCK_SYNC=localtime"] = string(_(": \"Hardware time\""));
map_error["ubconfig --target system set clock HWCLOCK_SYNC=utc"] = string(_(": \"Hardware time\""));
map_error["ubconfig --target global set clock ZONE="] = string(_(": \"Time Zone\""));
map_error["ubconfig --target global set network NTPSERVERS=default"] = string(_(": \"NTP\""));
map_error["ubconfig --target global set network NTPSERVERS=dhcp"] = string(_(": \"NTP\""));
map_error["ubconfig --target global set network NTPSERVERS=\""] = string(_(": \"NTP\""));
map_error["ubconfig --target global remove network NTPSERVERS"] = string(_(": \"NTP\""));
map_error["ubconfig --target global set clock HWCLOCK_SYNC=localtime"] = string(_(": \"Hardware time\""));
map_error["ubconfig --target global set clock HWCLOCK_SYNC=utc"] = string(_(": \"Hardware time\""));
map_error["ubconfig --source default get [] NTPSERVERS_DEFAULT"] = string(_(": \"NTP\""));
map_error["date +%Y%m%d -s \""] = string(_(": \"Date\""));
map_error["date +%T -s \""] = string(_(": \"Date\""));
map_error["ubconfig --source default get clock HWCLOCK_SYNC"] = string(_(": \"Hardware time\""));
map_error["xdg-open https://wiki.ublinux.ru/ru/home"] = string(gettext(": \"xdg-open\""));
map_error["ubconfig --default --source system get clock ZONE"] = string(gettext(": \"Time Zone\""));
map_error["hwclock --systohc"] = string(gettext(": \"Hardware time\""));
map_error["ubconfig --default --source system get network NTPSERVERS"] = string(gettext(": \"NTP\""));
map_error["ubconfig --source=default get NTPSERVERS_DEFAULT"] = string(gettext(": \"NTP\""));
map_error["ubconfig --default --source system get clock HWCLOCK_SYNC"] = string(gettext(": \"Hardware time\""));
map_error["ubconfig --default --source global get network NTPSERVERS"] = string(gettext(": \"NTP\""));
map_error["ubconfig --default --source global get clock ZONE"] = string(gettext(": \"Time Zone\""));
map_error["ubconfig --default --source global get clock HWCLOCK_SYNC"] = string(gettext(": \"Hardware time\""));
map_error["ubconfig --source global get clock HWCLOCK_SYNC"] = string(gettext(": \"Hardware time\""));
map_error["ubconfig --target system set clock ZONE="] = string(gettext(": \"Time Zone\""));
map_error["ubconfig --target system set network NTPSERVERS=default"] = string(gettext(": \"NTP\""));
map_error["ubconfig --target system set network NTPSERVERS=dhcp"] = string(gettext(": \"NTP\""));
map_error["ubconfig --target system set network NTPSERVERS=\""] = string(gettext(": \"NTP\""));
map_error["ubconfig --target system remove network NTPSERVERS"] = string(gettext(": \"NTP\""));
map_error["ubconfig --target system set clock HWCLOCK_SYNC=localtime"] = string(gettext(": \"Hardware time\""));
map_error["ubconfig --target system set clock HWCLOCK_SYNC=utc"] = string(gettext(": \"Hardware time\""));
map_error["ubconfig --target global set clock ZONE="] = string(gettext(": \"Time Zone\""));
map_error["ubconfig --target global set network NTPSERVERS=default"] = string(gettext(": \"NTP\""));
map_error["ubconfig --target global set network NTPSERVERS=dhcp"] = string(gettext(": \"NTP\""));
map_error["ubconfig --target global set network NTPSERVERS=\""] = string(gettext(": \"NTP\""));
map_error["ubconfig --target global remove network NTPSERVERS"] = string(gettext(": \"NTP\""));
map_error["ubconfig --target global set clock HWCLOCK_SYNC=localtime"] = string(gettext(": \"Hardware time\""));
map_error["ubconfig --target global set clock HWCLOCK_SYNC=utc"] = string(gettext(": \"Hardware time\""));
map_error["ubconfig --source default get [] NTPSERVERS_DEFAULT"] = string(gettext(": \"NTP\""));
map_error["date +%Y%m%d -s \""] = string(gettext(": \"Date\""));
map_error["date +%T -s \""] = string(gettext(": \"Date\""));
map_error["ubconfig --source default get clock HWCLOCK_SYNC"] = string(gettext(": \"Hardware time\""));
this->get_builder();
this->add_CSS();
ubl_make_plugs(boxSave,boxButton, socket_ext_id_I, socket_trd_id_I);
@ -112,7 +112,7 @@ void MainWindow::settings() {
this->event();
imgInfo->set_from_icon_name("com.ublinux.ubl-settings-datetime.warning", Gtk::ICON_SIZE_MENU);
info_status_app("boxInfoMessError");
lblWarning->set_text(_("The program must be run as root"));
lblWarning->set_text(gettext("The program must be run as root"));
}
}
@ -120,35 +120,35 @@ void MainWindow::lacalization() {
time_t now = time(0);
tm *ltm = localtime(&now);
unsigned int year = 1900+ ltm->tm_year;
string str_authors = string(_("Copyright © UBSoft LLC, 2022 - ")) + to_string(year);
string str_authors = string(gettext("Copyright © UBSoft LLC, 2022 - ")) + to_string(year);
aboutWindows->set_copyright(str_authors);
aboutWindows->set_comments(_("Date and Time"));
aboutWindows->set_website(_("https://wiki.ublinux.com"));
aboutWindows->set_version(_(version_application.c_str()));
aboutWindows->set_website_label(_("Project Home Page"));
lblSave->set_label(_("Save"));
lblLoad->set_label(_("Load"));
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"));
cbDhcp->append(_("Disabled"));
lblDateTimeSetting->set_text(_("Current date and time"));
lblHead->set_text(_("Setting 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:"));
lblSynchronizeBtn->set_text(_("Sync by"));
lblHeader->set_text(_("ubl-settings-datetime"));
windowMessDchp->set_title(_("Warning!"));
lblTimeBios->set_text(_("Synchronize hardware time"));
lblHW->set_text(_("Synchronize hardware time:"));
array_hw_local[0] = _("UTC time");
array_hw_local[1] = _("Local time");
aboutWindows->set_comments(gettext("Date and Time"));
aboutWindows->set_website(gettext("https://wiki.ublinux.com"));
aboutWindows->set_version(gettext(version_application.c_str()));
aboutWindows->set_website_label(gettext("Project Home Page"));
lblSave->set_label(gettext("Save"));
lblLoad->set_label(gettext("Load"));
txtDate->set_tooltip_text(gettext("Date of\nFormat: DD.MM.YYYY"));
txtNtpServer->set_tooltip_text(gettext("Enter the name of the ntp-server or its ip-address.\nWhen entering multiple addresses, separate them with commas."));
lblSynchronizebChkGLob->set_text(gettext("Synchronize via NTP"));
cbDhcp->append(gettext("Default"));
cbDhcp->append(gettext("DHCP"));
cbDhcp->append(gettext("Manual"));
cbDhcp->append(gettext("Disabled"));
lblDateTimeSetting->set_text(gettext("Current date and time"));
lblHead->set_text(gettext("Setting the date and time"));
lblTime->set_text(gettext("Time:"));
lblData->set_text(gettext("Date:"));
lblTimeZone->set_text(gettext("Time zone"));
lblReg->set_text(gettext("Region:"));
lblZone->set_text(gettext("Zone:"));
lblSynchronizeBtn->set_text(gettext("Sync by"));
lblHeader->set_text(gettext("ubl-settings-datetime"));
windowMessDchp->set_title(gettext("Warning!"));
lblTimeBios->set_text(gettext("Synchronize hardware time"));
lblHW->set_text(gettext("Synchronize hardware time:"));
array_hw_local[0] = gettext("UTC time");
array_hw_local[1] = gettext("Local time");
array_hw[0] = "utc";
array_hw[1] = "localtime";
this->bubble_sort(array_hw, array_hw_local, 2);
@ -384,7 +384,7 @@ void MainWindow::event_zone() {
void MainWindow::synopsis_show() {
int start_error = error_info;
string cmd = "xdg-open " + string(_("https://wiki.ublinux.com/ru/Программное_обеспечениерограммы_и_утилиты/Все/")) + app_name;
string cmd = "xdg-open " + string(gettext("https://wiki.ublinux.com/ru/Программное_обеспечениерограммы_и_утилиты/Все/")) + app_name;
if (geteuid() == 0) {
string response_user = getlogin();
cmd = "su -l " + response_user + " -c \" DISPLAY=$DISPLAY " + cmd + " \"";
@ -430,7 +430,7 @@ void MainWindow::load_globl_cfg() {
void MainWindow::save_local_cfg() {
if ((this->check_config("region", 0) && this->check_config("zone", 0) &&
this->check_config("dhcp", 0) && this->check_config("hw", 0))) {
lblWarning->set_text(_("Nothing to save!"));
lblWarning->set_text(gettext("Nothing to save!"));
}
else {
string cmd_zone = "ubconfig --target system set clock ZONE=";
@ -461,7 +461,7 @@ void MainWindow::save_local_cfg() {
void MainWindow::save_global_cfg() {
if ((this->check_config("region", 1) && this->check_config("zone", 1) &&
this->check_config("dhcp", 1) && this->check_config("hw", 1))) {
lblWarning->set_text(_("Nothing to save!"));
lblWarning->set_text(gettext("Nothing to save!"));
}
else {
string cmd = "ubconfig --target global set clock ZONE=";
@ -491,7 +491,7 @@ void MainWindow::save_global_cfg() {
void MainWindow::save_global_local_cfg() {
if ((this->check_config("region", 2) && this->check_config("zone", 2) &&
this->check_config("dhcp", 2) && this->check_config("hw", 2))) {
lblWarning->set_text(_("Nothing to save!"));
lblWarning->set_text(gettext("Nothing to save!"));
}
else {
string cmd = "";
@ -659,23 +659,23 @@ void MainWindow::info_warning_error(int mess) {
warning_info = 0;
string mess_error = "";
if (mess == 0) {
mess_error = string(_("Local configuration reading error")) + cmd_error;
mess_error = string(gettext("Local configuration reading error")) + cmd_error;
lblWarning->set_text(mess_error);
}
else if (mess == 1) {
mess_error = string(_("Global configuration read error")) + cmd_error;
mess_error = string(gettext("Global configuration read error")) + cmd_error;
lblWarning->set_text(mess_error);
}
else if (mess == 2) {
mess_error = string(_("Local configuration write error")) + cmd_error;
mess_error = string(gettext("Local configuration write error")) + cmd_error;
lblWarning->set_text(mess_error);
}
else if (mess == 3) {
mess_error = string(_("Global configuration write error")) + cmd_error;
mess_error = string(gettext("Global configuration write error")) + cmd_error;
lblWarning->set_text(mess_error);
}
else if (mess == 4) {
mess_error = string(_("Error saved local and global configuration")) + cmd_error;
mess_error = string(gettext("Error saved local and global configuration")) + cmd_error;
lblWarning->set_text(mess_error);
}
cmd_error = "";
@ -684,19 +684,19 @@ void MainWindow::info_warning_error(int mess) {
info_status_app("boxInfoMessOK");
imgInfo->set_from_icon_name("com.ublinux.ubl-settings-datetime.checked", Gtk::ICON_SIZE_MENU);//Gtk::IconSize::INHERIT);
if (mess == 0) {
lblWarning->set_text(_("Local configuration downloaded successfully"));
lblWarning->set_text(gettext("Local configuration downloaded successfully"));
}
else if (mess == 1) {
lblWarning->set_text(_("Global configuration downloaded successfully"));
lblWarning->set_text(gettext("Global configuration downloaded successfully"));
}
else if (mess == 2) {
lblWarning->set_text(_("Local configuration successfully written"));
lblWarning->set_text(gettext("Local configuration successfully written"));
}
else if (mess == 3) {
lblWarning->set_text(_("Global configuration successfully written"));
lblWarning->set_text(gettext("Global configuration successfully written"));
}
else if (mess == 4) {
lblWarning->set_text(_("Successfully saved local and global configuration"));
lblWarning->set_text(gettext("Successfully saved local and global configuration"));
}
}
}
@ -788,7 +788,7 @@ void MainWindow::gui_mess_close() {
bool MainWindow::focus_ntp_text() {
if (txtNtpServer->get_text() == "" || txtNtpServer->get_text() == " ") {
lblMessage->set_text(_("Enter DHCP!"));
lblMessage->set_text(gettext("Enter DHCP!"));
windowMessDchp->show();
}
else {
@ -814,11 +814,11 @@ bool MainWindow::focus_ntp_text() {
}
else {
if (flag_error == true) {
lblMessage->set_text(_("An invalid character is entered"));
lblMessage->set_text(gettext("An invalid character is entered"));
windowMessDchp->show();
}
else if (flag_error_check_ntp == true) {
lblMessage->set_text(_("Error in the ntp name"));
lblMessage->set_text(gettext("Error in the ntp name"));
windowMessDchp->show();
}
return false;
@ -1051,7 +1051,7 @@ void MainWindow::entry_dhcp_mess(string cmd_get_dhcp, string cmd_default_get_dhc
// btnUpdateDateTime->set_sensitive(false);
if (str_dhcp == "") {
this->write_config("", "dhcp");
lblMessage->set_text(_("Enter DHCP!"));
lblMessage->set_text(gettext("Enter DHCP!"));
windowMessDchp->show();
}
else if (str_dhcp == "(null)") {
@ -1230,7 +1230,7 @@ void MainWindow::append_region_zone(string region, string zone, Gtk::ComboBoxTex
int size_vec = array_region_local.size();
if (size_vec== 0) {
for (auto& [key, value]: time_reg_map) {
array_region_local.push_back(string(_(key.c_str())));
array_region_local.push_back(string(gettext(key.c_str())));
array_region.push_back(key);
index += 1;
}
@ -1256,7 +1256,7 @@ void MainWindow::append_region_zone(string region, string zone, Gtk::ComboBoxTex
if (size_vec == 0) {
tmpCbReg->append(Glib::ustring(reg));
}
if (reg == string(_(region.c_str()))) {
if (reg == string(gettext(region.c_str()))) {
tmpCbReg->set_active_text(reg);
}
}
@ -1266,7 +1266,7 @@ void MainWindow::append_region_zone(string region, string zone, Gtk::ComboBoxTex
string path_reg_zone = "";
string zone_offest = "";
path_reg_zone = region + "/" + zone;
zone_offest = this->zone_file_read(path_reg_zone) + _(zone.c_str());
zone_offest = this->zone_file_read(path_reg_zone) + gettext(zone.c_str());
if (region == "") {
tmpCbZone->append(" ");
tmpCbZone->set_active(0);
@ -1399,12 +1399,12 @@ void MainWindow::post_entry_data() {
string str_error_clock = this->call(cmd);
size_t index = str_error_clock.find("date:");
if (index != std::string::npos) {
lblMessage->set_text(_("Incorrect date format"));
lblMessage->set_text(gettext("Incorrect date format"));
windowMessDchp->show();
}
}
else {
lblMessage->set_text(_("Incorrect date format"));
lblMessage->set_text(gettext("Incorrect date format"));
windowMessDchp->show();
}
}
@ -1469,7 +1469,7 @@ void MainWindow::read_file() {
string reg_reg_zone = entry_reg_reg_zone.path().filename().string();
zone.push_back(reg_reg_zone);
path_reg_zone=key_reg + "/" + reg_reg_zone;
key_zone_local = this->zone_file_read(path_reg_zone) + _(reg_reg_zone.c_str());
key_zone_local = this->zone_file_read(path_reg_zone) + gettext(reg_reg_zone.c_str());
zone_local.push_back(key_zone_local);
}
in2.close();
@ -1478,7 +1478,7 @@ void MainWindow::read_file() {
else 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());
key_zone_local = this->zone_file_read(path_reg_zone) + gettext(key_zone.c_str());
zone_local.push_back(key_zone_local);
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save