Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Commit

Permalink
Mark some forget string to be translated
Browse files Browse the repository at this point in the history
  • Loading branch information
Bajoja committed Dec 1, 2016
1 parent 128f3d5 commit ef5cbdb
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 72 deletions.
4 changes: 2 additions & 2 deletions po/indicator-kdeconnect.pot
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ msgstr ""
msgid "cannot connect to KDE Connect DBus service"
msgstr ""

#: src/Device.vala:575
#: src/Device.vala:524
msgid "Encryption information not found"
msgstr ""

Expand Down Expand Up @@ -139,6 +139,6 @@ msgstr ""
msgid "Send"
msgstr ""

#: src/contractor/Contractor.vala:81
#: src/contractor/Contractor.vala:84
msgid "File not found"
msgstr ""
4 changes: 2 additions & 2 deletions po/pt_PT.po
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ msgstr "Desfrute!"
msgid "cannot connect to KDE Connect DBus service"
msgstr "Não foi possível connectar ao serviço DBus do KDE Connect"

#: src/Device.vala:575
#: src/Device.vala:524
msgid "Encryption information not found"
msgstr "Informações de encriptação não encontrada"

Expand Down Expand Up @@ -162,6 +162,6 @@ msgstr "Enviar para"
msgid "Send"
msgstr "Enviar"

#: src/contractor/Contractor.vala:81
#: src/contractor/Contractor.vala:84
msgid "File not found"
msgstr "Ficheiro não encontrado"
4 changes: 2 additions & 2 deletions po/ru_RU.po
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ msgstr "Наслаждайтесь!"
msgid "cannot connect to KDE Connect DBus service"
msgstr "невозможно подключиться к сервису KDE Connect DBus"

#: src/Device.vala:575
#: src/Device.vala:524
msgid "Encryption information not found"
msgstr "Информация о шифровании не найдена"

Expand Down Expand Up @@ -165,6 +165,6 @@ msgstr "Отавить в"
msgid "Send"
msgstr "Отправить"

#: src/contractor/Contractor.vala:81
#: src/contractor/Contractor.vala:84
msgid "File not found"
msgstr "Файл не найден"
106 changes: 53 additions & 53 deletions src/Device.vala
Original file line number Diff line number Diff line change
Expand Up @@ -469,57 +469,6 @@ namespace KDEConnectIndicator {
}
}

public void int32_signal_cb (DBusConnection con, string sender, string object,
string interface, string signal_name, Variant parameter) {
int param = (int)parameter.get_child_value (0).get_int32 ();
switch (signal_name) {
case "chargeChanged" :
charge_changed ((int)param);
break;
}
}

public void void_signal_cb (DBusConnection con, string sender, string object,
string interface, string signal_name, Variant parameter) {
switch (signal_name) {
case "pluginsChanged" :
plugins_changed ();
break;
case "reachableStatusChanged" :
reachable_status_changed ();
break;
case "mounted" :
mounted ();
break;
case "unmounted" :
unmounted ();
break;
}
}

public void boolean_signal_cb (DBusConnection con, string sender, string object,
string interface, string signal_name, Variant parameter) {
bool param = parameter.get_child_value (0).get_boolean ();
switch (signal_name) {
case "stateChanged" :
state_changed (param);
break;
case "trustedChanged" :
trusted_changed (param);
break;
}
}

public void string_signal_cb (DBusConnection con, string sender, string object,
string interface, string signal_name, Variant parameter) {
string param = parameter.get_child_value (0).get_string ();
switch (signal_name) {
case "pairingError" :
pairing_error (param);
break;
}
}

private bool open_file (string path) {
var file = File.new_for_path (path);
try {
Expand All @@ -532,7 +481,7 @@ namespace KDEConnectIndicator {
}
return false;
}

public void find_my_phone (){
try{
conn.call_sync (
Expand Down Expand Up @@ -566,7 +515,7 @@ namespace KDEConnectIndicator {
-1,
null
);

Variant i = return_variant.get_child_value (0);
return _encryption_info = i.dup_string ();
} catch (Error e) {
Expand All @@ -575,6 +524,57 @@ namespace KDEConnectIndicator {
return _encryption_info = _("Encryption information not found");
}
}

public void int32_signal_cb (DBusConnection con, string sender, string object,
string interface, string signal_name, Variant parameter) {
int param = (int)parameter.get_child_value (0).get_int32 ();
switch (signal_name) {
case "chargeChanged" :
charge_changed ((int)param);
break;
}
}

public void void_signal_cb (DBusConnection con, string sender, string object,
string interface, string signal_name, Variant parameter) {
switch (signal_name) {
case "pluginsChanged" :
plugins_changed ();
break;
case "reachableStatusChanged" :
reachable_status_changed ();
break;
case "mounted" :
mounted ();
break;
case "unmounted" :
unmounted ();
break;
}
}

public void boolean_signal_cb (DBusConnection con, string sender, string object,
string interface, string signal_name, Variant parameter) {
bool param = parameter.get_child_value (0).get_boolean ();
switch (signal_name) {
case "stateChanged" :
state_changed (param);
break;
case "trustedChanged" :
trusted_changed (param);
break;
}
}

public void string_signal_cb (DBusConnection con, string sender, string object,
string interface, string signal_name, Variant parameter) {
string param = parameter.get_child_value (0).get_string ();
switch (signal_name) {
case "pairingError" :
pairing_error (param);
break;
}
}

public signal void charge_changed (int charge);
public signal void pairing_error (string error);
Expand Down
26 changes: 16 additions & 10 deletions src/KDEConnectManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ namespace KDEConnectIndicator {
}

private void show_no_service_daemon () {
var msg = new Gtk.MessageDialog (
null, Gtk.DialogFlags.MODAL,
Gtk.MessageType.WARNING,
Gtk.ButtonsType.OK,
"cannot connect to KDE Connect DBus service"
);
var msg = new Gtk.MessageDialog (null,
Gtk.DialogFlags.MODAL,
Gtk.MessageType.WARNING,
Gtk.ButtonsType.OK,
_("cannot connect to KDE Connect DBus service"));

msg.response.connect(()=>{
msg.destroy();
GLib.Application.get_default ().quit_mainloop ();
Expand All @@ -129,12 +129,18 @@ namespace KDEConnectIndicator {

private void run_kdeconnect_binary () {
//TODO: path depends from operating system, for now this will be the way to find it

string std_out;

try{
Process.spawn_sync (null, new string[]{"grep", "Exec", "/etc/xdg/autostart/kdeconnectd.desktop"},
null, SpawnFlags.SEARCH_PATH, null, out std_out, null, null);
Process.spawn_sync (null,
new string[]{"grep",
"Exec",
"/etc/xdg/autostart/kdeconnectd.desktop"},
null,
SpawnFlags.SEARCH_PATH,
null,
out std_out,
null,
null);
} catch (Error e){
message (e.message);
}
Expand Down
11 changes: 8 additions & 3 deletions src/contractor/Contractor.vala
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,13 @@ namespace KDEConnectIndicator {
if (f.get_path() != null // null path means its remote file
&& !f.query_exists ()) {
message ("file doesnt exist");
var msd = new Gtk.MessageDialog (null, Gtk.DialogFlags.MODAL,
Gtk.MessageType.WARNING, Gtk.ButtonsType.OK,
_("File not found"));

var msd = new Gtk.MessageDialog (null,
Gtk.DialogFlags.MODAL,
Gtk.MessageType.WARNING,
Gtk.ButtonsType.OK,
_("File not found"));

msd.destroy.connect (Gtk.main_quit);
msd.show ();
msd.run ();
Expand Down Expand Up @@ -114,6 +118,7 @@ namespace KDEConnectIndicator {
} catch (Error e) {
message (e.message);
}

list_store = new Gtk.ListStore (1,typeof(string));
var device_list = new SList<Device> ();
foreach (string id in id_list) {
Expand Down

0 comments on commit ef5cbdb

Please sign in to comment.