openall_time_applet 0.0.15 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/classes/connection.rb +14 -1
- data/glade/win_main.glade +4 -3
- data/glade/win_sync_overview.glade +2 -2
- data/gui/trayicon.rb +0 -59
- data/gui/win_main.rb +178 -28
- data/lib/openall_time_applet.rb +13 -1
- data/locales/da_DK/LC_MESSAGES/default.mo +0 -0
- data/locales/da_DK/LC_MESSAGES/default.po +237 -155
- data/openall_time_applet.gemspec +2 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.16
|
data/classes/connection.rb
CHANGED
@@ -21,7 +21,20 @@ class Openall_time_applet::Connection
|
|
21
21
|
|
22
22
|
#Verify login by reading dashboard HTML.
|
23
23
|
res = @http.get("index.php?c=Dashboard")
|
24
|
-
|
24
|
+
|
25
|
+
if !res.body.match(/<ul\s*id="webticker"\s*>/)
|
26
|
+
tmp_path = "#{Knj::Os.tmpdir}/openall_login_debug.txt"
|
27
|
+
File.open(tmp_path, "w") do |fp|
|
28
|
+
fp.write(res.body)
|
29
|
+
end
|
30
|
+
|
31
|
+
#Raise custom wrong-username error if login-form is still shown.
|
32
|
+
if res.body.index("<div id=\"loginform\"") != nil
|
33
|
+
raise _("Wrong username and/or password.")
|
34
|
+
end
|
35
|
+
|
36
|
+
raise sprintf(_("Could not log in because of unknown reason. Please check debug-output in '%s'."), tmp_path)
|
37
|
+
end
|
25
38
|
end
|
26
39
|
|
27
40
|
def request(args)
|
data/glade/win_main.glade
CHANGED
@@ -5,12 +5,12 @@
|
|
5
5
|
<object class="GtkImage" id="image1">
|
6
6
|
<property name="visible">True</property>
|
7
7
|
<property name="can_focus">False</property>
|
8
|
-
<property name="stock">gtk-
|
8
|
+
<property name="stock">gtk-info</property>
|
9
9
|
</object>
|
10
10
|
<object class="GtkImage" id="image2">
|
11
11
|
<property name="visible">True</property>
|
12
12
|
<property name="can_focus">False</property>
|
13
|
-
<property name="stock">gtk-
|
13
|
+
<property name="stock">gtk-properties</property>
|
14
14
|
</object>
|
15
15
|
<object class="GtkWindow" id="window">
|
16
16
|
<property name="can_focus">False</property>
|
@@ -277,11 +277,12 @@
|
|
277
277
|
<property name="layout_style">end</property>
|
278
278
|
<child>
|
279
279
|
<object class="GtkButton" id="btnSync">
|
280
|
-
<property name="label" translatable="yes">
|
280
|
+
<property name="label" translatable="yes">_Sync</property>
|
281
281
|
<property name="visible">True</property>
|
282
282
|
<property name="can_focus">True</property>
|
283
283
|
<property name="receives_default">True</property>
|
284
284
|
<property name="use_action_appearance">False</property>
|
285
|
+
<property name="use_underline">True</property>
|
285
286
|
<signal name="clicked" handler="on_btnSync_clicked" swapped="no"/>
|
286
287
|
</object>
|
287
288
|
<packing>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<!-- interface-naming-policy project-wide -->
|
5
5
|
<object class="GtkWindow" id="window">
|
6
6
|
<property name="can_focus">False</property>
|
7
|
-
<property name="title" translatable="yes">
|
7
|
+
<property name="title" translatable="yes">Prepare transfer</property>
|
8
8
|
<property name="window_position">center</property>
|
9
9
|
<property name="default_width">850</property>
|
10
10
|
<property name="default_height">480</property>
|
@@ -91,7 +91,7 @@
|
|
91
91
|
<object class="GtkLabel" id="label2">
|
92
92
|
<property name="visible">True</property>
|
93
93
|
<property name="can_focus">False</property>
|
94
|
-
<property name="label" translatable="yes"><b>Prepare
|
94
|
+
<property name="label" translatable="yes"><b>Prepare transfer</b></property>
|
95
95
|
<property name="use_markup">True</property>
|
96
96
|
</object>
|
97
97
|
</child>
|
data/gui/trayicon.rb
CHANGED
@@ -85,29 +85,7 @@ class Openall_time_applet::Gui::Trayicon
|
|
85
85
|
end
|
86
86
|
|
87
87
|
def on_statusicon_rightclick(tray, button, time)
|
88
|
-
worktime_overview = Gtk::ImageMenuItem.new(Gtk::Stock::HOME)
|
89
|
-
worktime_overview.label = _("Week view")
|
90
|
-
worktime_overview.signal_connect("activate", &self.method(:on_worktimeOverview_activate))
|
91
|
-
|
92
|
-
pref = Gtk::ImageMenuItem.new(Gtk::Stock::PREFERENCES)
|
93
|
-
pref.signal_connect("activate", &self.method(:on_preferences_activate))
|
94
|
-
|
95
|
-
quit = Gtk::ImageMenuItem.new(Gtk::Stock::QUIT)
|
96
|
-
quit.signal_connect("activate", &self.method(:on_quit_activate))
|
97
|
-
|
98
|
-
sync = Gtk::ImageMenuItem.new(Gtk::Stock::HARDDISK)
|
99
|
-
sync.label = _("Synchronize with OpenAll")
|
100
|
-
sync.signal_connect("activate", &self.method(:on_sync_activate))
|
101
|
-
|
102
88
|
menu = Gtk::Menu.new
|
103
|
-
menu.append(worktime_overview)
|
104
|
-
menu.append(Gtk::SeparatorMenuItem.new)
|
105
|
-
menu.append(pref)
|
106
|
-
|
107
|
-
|
108
|
-
#Only add seperator if more than one timelog.
|
109
|
-
timelog_count = @args[:oata].ob.list(:Timelog, {"count" => true})
|
110
|
-
menu.append(Gtk::SeparatorMenuItem.new) if timelog_count > 0
|
111
89
|
|
112
90
|
#Make a list of all timelogs in the menu.
|
113
91
|
@args[:oata].ob.list(:Timelog, {"orderby" => "id"}) do |timelog|
|
@@ -139,9 +117,6 @@ class Openall_time_applet::Gui::Trayicon
|
|
139
117
|
menu.append(label)
|
140
118
|
end
|
141
119
|
|
142
|
-
menu.append(Gtk::SeparatorMenuItem.new)
|
143
|
-
menu.append(sync)
|
144
|
-
menu.append(quit)
|
145
120
|
menu.show_all
|
146
121
|
|
147
122
|
menu.popup(nil, nil, button, time) do |menu, x, y|
|
@@ -153,40 +128,6 @@ class Openall_time_applet::Gui::Trayicon
|
|
153
128
|
@args[:oata].show_main
|
154
129
|
end
|
155
130
|
|
156
|
-
def on_preferences_activate(*args)
|
157
|
-
@args[:oata].show_main
|
158
|
-
end
|
159
|
-
|
160
|
-
def on_worktimeOverview_activate(*args)
|
161
|
-
@args[:oata].show_worktime_overview
|
162
|
-
end
|
163
|
-
|
164
|
-
def on_quit_activate(*args)
|
165
|
-
#Check if a timelog needs to be synced. If so the user needs to confirm he really wants to quit.
|
166
|
-
timelog_found = nil
|
167
|
-
do_destroy = true
|
168
|
-
|
169
|
-
@args[:oata].ob.list(:Timelog) do |timelog|
|
170
|
-
if timelog[:time].to_f > 0 or timelog[:time_transport].to_f > 0 or timelog[:sync_need].to_i == 1
|
171
|
-
timelog_found = timelog
|
172
|
-
break
|
173
|
-
end
|
174
|
-
end
|
175
|
-
|
176
|
-
if timelog_found
|
177
|
-
if Knj::Gtk2.msgbox(sprintf(_("The timelog '%s' has not been synced. Are you sure you want to quit?"), timelog_found[:descr]), "yesno") != "yes"
|
178
|
-
do_destroy = false
|
179
|
-
end
|
180
|
-
end
|
181
|
-
|
182
|
-
@args[:oata].destroy if do_destroy
|
183
|
-
end
|
184
|
-
|
185
|
-
def on_sync_activate(*args)
|
186
|
-
@args[:oata].sync_static
|
187
|
-
@args[:oata].sync
|
188
|
-
end
|
189
|
-
|
190
131
|
def on_stopTracking_activate(*args)
|
191
132
|
@args[:oata].timelog_stop_tracking
|
192
133
|
end
|
data/gui/win_main.rb
CHANGED
@@ -28,15 +28,43 @@ class Openall_time_applet::Gui::Win_main
|
|
28
28
|
|
29
29
|
init_data = @gui["tvTimelogs"].init([
|
30
30
|
_("ID"),
|
31
|
-
_("Description"),
|
32
|
-
_("Timestamp"),
|
33
|
-
_("Time"),
|
34
|
-
_("Transport"),
|
35
|
-
_("Length"),
|
36
|
-
_("Transport descr."),
|
37
|
-
_("Transport costs"),
|
38
31
|
{
|
39
|
-
:title => _("
|
32
|
+
:title => _("Description"),
|
33
|
+
:type => :string,
|
34
|
+
:markup => true
|
35
|
+
},
|
36
|
+
{
|
37
|
+
:title => _("Timestamp"),
|
38
|
+
:type => :string,
|
39
|
+
:markup => true
|
40
|
+
},
|
41
|
+
{
|
42
|
+
:title => _("Time"),
|
43
|
+
:type => :string,
|
44
|
+
:markup => true
|
45
|
+
},
|
46
|
+
{
|
47
|
+
:title => _("Transport"),
|
48
|
+
:type => :string,
|
49
|
+
:markup => true
|
50
|
+
},
|
51
|
+
{
|
52
|
+
:title => _("Length"),
|
53
|
+
:type => :string,
|
54
|
+
:markup => true
|
55
|
+
},
|
56
|
+
{
|
57
|
+
:title => _("Descr."),
|
58
|
+
:type => :string,
|
59
|
+
:markup => true
|
60
|
+
},
|
61
|
+
{
|
62
|
+
:title => _("Costs"),
|
63
|
+
:type => :string,
|
64
|
+
:markup => true
|
65
|
+
},
|
66
|
+
{
|
67
|
+
:title => _("Fixed"),
|
40
68
|
:type => :toggle
|
41
69
|
},
|
42
70
|
{
|
@@ -51,7 +79,8 @@ class Openall_time_applet::Gui::Win_main
|
|
51
79
|
:title => _("Task"),
|
52
80
|
:type => :combo,
|
53
81
|
:model => task_ls,
|
54
|
-
:has_entry => false
|
82
|
+
:has_entry => false,
|
83
|
+
:markup => true
|
55
84
|
}
|
56
85
|
])
|
57
86
|
|
@@ -60,8 +89,16 @@ class Openall_time_applet::Gui::Win_main
|
|
60
89
|
:tv => @gui["tvTimelogs"],
|
61
90
|
:model_class => :Timelog,
|
62
91
|
:renderers => init_data[:renderers],
|
63
|
-
:change_before => proc{
|
64
|
-
|
92
|
+
:change_before => proc{|d|
|
93
|
+
if (d[:col_no] == 3 or d[:col_no] == 2) and @args[:oata].timelog_active and @args[:oata].timelog_active.id == d[:model].id
|
94
|
+
raise _("You cannot edit the time for the active timelog.")
|
95
|
+
end
|
96
|
+
|
97
|
+
@dont_reload = true
|
98
|
+
},
|
99
|
+
:change_after => proc{
|
100
|
+
@dont_reload = false
|
101
|
+
},
|
65
102
|
:cols => {
|
66
103
|
1 => :descr,
|
67
104
|
2 => {:col => :timestamp, :type => :datetime},
|
@@ -90,11 +127,25 @@ class Openall_time_applet::Gui::Win_main
|
|
90
127
|
)
|
91
128
|
|
92
129
|
@gui["tvTimelogs"].columns[0].visible = false
|
130
|
+
|
93
131
|
self.reload_timelogs
|
94
132
|
|
95
133
|
#Reload the treeview if something happened to a timelog.
|
96
134
|
@reload_id = @args[:oata].ob.connect("object" => :Timelog, "signals" => ["add", "update", "delete"], &self.method(:reload_timelogs))
|
97
135
|
|
136
|
+
#Update switch-button.
|
137
|
+
self.update_switch_button
|
138
|
+
|
139
|
+
#Update switch-button when active timelog is changed.
|
140
|
+
@event_timelog_active_changed = @args[:oata].events.connect(:timelog_active_changed) do
|
141
|
+
self.update_switch_button
|
142
|
+
self.check_rows
|
143
|
+
end
|
144
|
+
|
145
|
+
@timeout_id = Gtk.timeout_add(1000) do
|
146
|
+
self.check_rows
|
147
|
+
end
|
148
|
+
|
98
149
|
@gui["window"].show_all
|
99
150
|
end
|
100
151
|
|
@@ -113,12 +164,12 @@ class Openall_time_applet::Gui::Win_main
|
|
113
164
|
@args[:oata].ob.list(:Timelog, {"orderby" => "id"}) do |timelog|
|
114
165
|
@gui["tvTimelogs"].append([
|
115
166
|
timelog.id,
|
116
|
-
timelog[:descr],
|
167
|
+
Knj::Web.html(timelog[:descr]),
|
117
168
|
timelog.timestamp_str,
|
118
169
|
timelog.time_as_human,
|
119
170
|
timelog.time_transport_as_human,
|
120
171
|
Knj::Locales.number_out(timelog[:transportlength], 0),
|
121
|
-
timelog
|
172
|
+
Knj::Web.html(timelog[:transportdescription]),
|
122
173
|
Knj::Locales.number_out(timelog[:transportcosts], 2),
|
123
174
|
Knj::Strings.yn_str(timelog[:travelfixed], true, false),
|
124
175
|
Knj::Strings.yn_str(timelog[:workinternal], true, false),
|
@@ -126,10 +177,30 @@ class Openall_time_applet::Gui::Win_main
|
|
126
177
|
timelog.task_name
|
127
178
|
])
|
128
179
|
end
|
180
|
+
|
181
|
+
#Reset cache of which rows are set to bold.
|
182
|
+
@bold_rows = {}
|
129
183
|
end
|
130
184
|
|
131
185
|
def on_imiQuit_activate
|
132
|
-
|
186
|
+
#Check if a timelog needs to be synced. If so the user needs to confirm he really wants to quit.
|
187
|
+
timelog_found = nil
|
188
|
+
do_destroy = true
|
189
|
+
|
190
|
+
@args[:oata].ob.list(:Timelog) do |timelog|
|
191
|
+
if timelog[:time].to_f > 0 or timelog[:time_transport].to_f > 0 or timelog[:sync_need].to_i == 1
|
192
|
+
timelog_found = timelog
|
193
|
+
break
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
if timelog_found
|
198
|
+
if Knj::Gtk2.msgbox(sprintf(_("The timelog '%s' has not been synced. Are you sure you want to quit?"), timelog_found[:descr]), "yesno") != "yes"
|
199
|
+
do_destroy = false
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
@args[:oata].destroy if do_destroy
|
133
204
|
end
|
134
205
|
|
135
206
|
def on_imiPreferences_activate
|
@@ -143,30 +214,95 @@ class Openall_time_applet::Gui::Win_main
|
|
143
214
|
def on_window_destroy
|
144
215
|
#Unconnect reload-event. Else it will crash on call to destroyed object. Also frees up various ressources.
|
145
216
|
@args[:oata].ob.unconnect("object" => :Timelog, "conn_id" => @reload_id)
|
217
|
+
@args[:oata].events.disconnect(:timelog_active_changed, @event_timelog_active_changed) if @event_timelog_active_changed
|
218
|
+
@event_timelog_active_changed = nil
|
219
|
+
Gtk.timeout_remove(@timeout_id)
|
146
220
|
end
|
147
221
|
|
148
222
|
def on_expOverview_activate(expander)
|
223
|
+
width = @gui["window"].size[0]
|
224
|
+
|
149
225
|
if !expander.expanded?
|
150
|
-
@gui["window"].
|
226
|
+
@gui["window"].resize(width, 480)
|
151
227
|
else
|
152
|
-
|
228
|
+
Gtk.timeout_add(200) do
|
229
|
+
@gui["window"].resize(width, 1)
|
230
|
+
false
|
231
|
+
end
|
153
232
|
end
|
154
233
|
end
|
155
234
|
|
156
235
|
def on_btnSwitch_clicked
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
236
|
+
if @args[:oata].timelog_active
|
237
|
+
@args[:oata].timelog_stop_tracking
|
238
|
+
@gui["txtDescr"].grab_focus
|
239
|
+
else
|
240
|
+
task = @gui["cbTask"].sel
|
241
|
+
if !task.is_a?(Knj::Datarow)
|
242
|
+
task_id = 0
|
243
|
+
else
|
244
|
+
task_id = task.id
|
245
|
+
end
|
246
|
+
|
247
|
+
@timelog = @args[:oata].ob.add(:Timelog, {
|
248
|
+
:task_id => task_id,
|
249
|
+
:descr => @gui["txtDescr"].text
|
250
|
+
})
|
251
|
+
@args[:oata].timelog_active = @timelog
|
252
|
+
@gui["txtDescr"].text = ""
|
253
|
+
@gui["cbTask"].sel = _("Choose:")
|
161
254
|
end
|
162
255
|
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
@gui["
|
169
|
-
@
|
256
|
+
self.update_switch_button
|
257
|
+
end
|
258
|
+
|
259
|
+
#This method updates the switch button to start or stop, based on the if a timelog is tracked or not.
|
260
|
+
def update_switch_button
|
261
|
+
but = @gui["btnSwitch"]
|
262
|
+
tlog_act = @args[:oata].timelog_active
|
263
|
+
|
264
|
+
if tlog_act
|
265
|
+
but.image = Gtk::Image.new(Gtk::Stock::MEDIA_STOP, Gtk::IconSize::BUTTON)
|
266
|
+
but.label = _("Stop")
|
267
|
+
else
|
268
|
+
but.image = Gtk::Image.new(Gtk::Stock::MEDIA_RECORD, Gtk::IconSize::BUTTON)
|
269
|
+
but.label = _("Start")
|
270
|
+
end
|
271
|
+
end
|
272
|
+
|
273
|
+
#This method runs through all rows in the treeview and checks if a row should be marked with bold. It also increases the time in the time-column for the tracked timelog.
|
274
|
+
def check_rows
|
275
|
+
act_timelog = @args[:oata].timelog_active
|
276
|
+
|
277
|
+
if act_timelog
|
278
|
+
act_timelog_id = act_timelog.id
|
279
|
+
else
|
280
|
+
act_timelog_id = nil
|
281
|
+
end
|
282
|
+
|
283
|
+
rows_bold = [1, 2, 3, 4, 5, 6, 7, 11]
|
284
|
+
|
285
|
+
@gui["tvTimelogs"].model.each do |model, path, iter|
|
286
|
+
timelog_id = model.get_value(iter, 0).to_i
|
287
|
+
bold = false
|
288
|
+
iter_id = iter.to_s.to_i
|
289
|
+
|
290
|
+
#Update time tracked.
|
291
|
+
if timelog_id == act_timelog_id
|
292
|
+
secs = act_timelog[:time].to_i + @args[:oata].timelog_active_time_tracked
|
293
|
+
iter[3] = "<b>#{Knj::Strings.secs_to_human_time_str(secs)}</b>"
|
294
|
+
bold = true
|
295
|
+
end
|
296
|
+
|
297
|
+
#Set all columns to bold if not already set.
|
298
|
+
if bold and !@bold_rows.key?(iter_id)
|
299
|
+
rows_bold.each do |row_no|
|
300
|
+
iter[row_no] = "<b>#{model.get_value(iter, row_no)}</b>"
|
301
|
+
end
|
302
|
+
|
303
|
+
@bold_rows[iter_id] = true
|
304
|
+
end
|
305
|
+
end
|
170
306
|
end
|
171
307
|
|
172
308
|
def on_btnSync_clicked
|
@@ -189,7 +325,21 @@ class Openall_time_applet::Gui::Win_main
|
|
189
325
|
end
|
190
326
|
|
191
327
|
def on_btnPlus_clicked
|
192
|
-
|
328
|
+
#Add new timelog to database.
|
329
|
+
timelog = @args[:oata].ob.add(:Timelog)
|
330
|
+
|
331
|
+
#Focus new timelog in treeview and open the in-line-editting for the description.
|
332
|
+
added_id = timelog.id.to_i
|
333
|
+
|
334
|
+
@gui["tvTimelogs"].model.each do |model, path, iter|
|
335
|
+
timelog_id = model.get_value(iter, 0).to_i
|
336
|
+
|
337
|
+
if timelog_id == added_id
|
338
|
+
col = @gui["tvTimelogs"].columns[1]
|
339
|
+
@gui["tvTimelogs"].set_cursor(path, col, true)
|
340
|
+
break
|
341
|
+
end
|
342
|
+
end
|
193
343
|
end
|
194
344
|
|
195
345
|
#Redirects 'enter'-events to 'switch'-click-event.
|
data/lib/openall_time_applet.rb
CHANGED
@@ -55,7 +55,7 @@ class Openall_time_applet
|
|
55
55
|
end
|
56
56
|
|
57
57
|
#Various readable variables.
|
58
|
-
attr_reader :db, :debug, :ob, :ti, :timelog_active, :timelog_active_time
|
58
|
+
attr_reader :db, :debug, :events, :ob, :ti, :timelog_active, :timelog_active_time
|
59
59
|
attr_accessor :reminder_next
|
60
60
|
|
61
61
|
#Config controlling paths and more.
|
@@ -97,6 +97,9 @@ class Openall_time_applet
|
|
97
97
|
_("not set")
|
98
98
|
end
|
99
99
|
|
100
|
+
@events = Knj::Event_handler.new
|
101
|
+
@events.add_event(:name => :timelog_active_changed)
|
102
|
+
|
100
103
|
#Options used to save various information (Openall-username and such).
|
101
104
|
Knj::Opts.init("knjdb" => @db, "table" => "Option")
|
102
105
|
|
@@ -347,6 +350,7 @@ class Openall_time_applet
|
|
347
350
|
@timelog_active = nil
|
348
351
|
@timelog_active_time = nil
|
349
352
|
@ti.update_icon if @ti
|
353
|
+
@events.call(:timelog_active_changed)
|
350
354
|
end
|
351
355
|
|
352
356
|
#Sets a new timelog to track. Stops tracking of previous timelog if already tracking.
|
@@ -374,6 +378,8 @@ class Openall_time_applet
|
|
374
378
|
@timelog_logged_time = @ob.add(:Timelog_logged_time, {:timelog_id => timelog.id})
|
375
379
|
@timelog_active = timelog
|
376
380
|
@timelog_active_time = Time.new
|
381
|
+
|
382
|
+
@events.call(:timelog_active_changed)
|
377
383
|
rescue => e
|
378
384
|
Knj::Gtk2.msgbox("msg" => Knj::Errors.error_str(e), "type" => "warning", "title" => _("Error"), "run" => false)
|
379
385
|
end
|
@@ -381,6 +387,12 @@ class Openall_time_applet
|
|
381
387
|
@ti.update_icon if @ti
|
382
388
|
end
|
383
389
|
|
390
|
+
#Returns the amount of seconds tracked.
|
391
|
+
def timelog_active_time_tracked
|
392
|
+
return 0 if !@timelog_active_time
|
393
|
+
return Time.now.to_i - @timelog_active_time.to_i
|
394
|
+
end
|
395
|
+
|
384
396
|
#Saves tracking-status if tracking. Stops Gtks main loop.
|
385
397
|
def destroy
|
386
398
|
self.timelog_stop_tracking
|
Binary file
|
@@ -1,8 +1,8 @@
|
|
1
1
|
msgid ""
|
2
2
|
msgstr ""
|
3
3
|
"Project-Id-Version: Openall_time_applet\n"
|
4
|
-
"POT-Creation-Date: 2012-06-
|
5
|
-
"PO-Revision-Date: 2012-06-
|
4
|
+
"POT-Creation-Date: 2012-06-27 14:25+0100\n"
|
5
|
+
"PO-Revision-Date: 2012-06-27 14:26+0100\n"
|
6
6
|
"Last-Translator: Kasper Johansen <k@spernj.org>\n"
|
7
7
|
"Language-Team: Kasper Johansen <k@spernj.org>\n"
|
8
8
|
"Language: \n"
|
@@ -16,15 +16,19 @@ msgstr ""
|
|
16
16
|
"X-Poedit-SourceCharset: utf-8\n"
|
17
17
|
"X-Poedit-SearchPath-0: .\n"
|
18
18
|
|
19
|
-
#: classes/connection.rb:
|
20
|
-
msgid "
|
21
|
-
msgstr "
|
19
|
+
#: classes/connection.rb:33
|
20
|
+
msgid "Wrong username and/or password."
|
21
|
+
msgstr "Forkert brugernavn og/eller adgangskode."
|
22
22
|
|
23
|
-
#: classes/connection.rb:
|
23
|
+
#: classes/connection.rb:36
|
24
|
+
msgid "Could not log in because of unknown reason. Please check debug-output in '%s'."
|
25
|
+
msgstr "Kunne ikke logge ind pga. ukendt årsag. Check venligst debug-output i '%s'."
|
26
|
+
|
27
|
+
#: classes/connection.rb:52
|
24
28
|
msgid "Empty body returned from OpenAll."
|
25
29
|
msgstr "Tom body returneret fra OpenAll."
|
26
30
|
|
27
|
-
#: classes/connection.rb:
|
31
|
+
#: classes/connection.rb:58
|
28
32
|
msgid "Could not parse JSON from: %s"
|
29
33
|
msgstr "Kunne ikke oversætte JSON fra: %s"
|
30
34
|
|
@@ -56,68 +60,14 @@ msgstr "Lørday"
|
|
56
60
|
msgid "Sunday"
|
57
61
|
msgstr "Søndag"
|
58
62
|
|
59
|
-
#: gui/trayicon.rb:
|
60
|
-
msgid "New timelog"
|
61
|
-
msgstr "Ny tidslog"
|
62
|
-
|
63
|
-
#: gui/trayicon.rb:91
|
64
|
-
msgid "Timelog list"
|
65
|
-
msgstr "Tidslog liste"
|
66
|
-
|
67
|
-
#: gui/trayicon.rb:95
|
68
|
-
msgid "Week view"
|
69
|
-
msgstr "Uge oversigt"
|
70
|
-
|
71
|
-
#: gui/trayicon.rb:105
|
72
|
-
msgid "Synchronize with OpenAll"
|
73
|
-
msgstr "Synkroniserer med OpenAll"
|
74
|
-
|
75
|
-
#: gui/trayicon.rb:122
|
63
|
+
#: gui/trayicon.rb:92
|
76
64
|
msgid "Track: %s"
|
77
65
|
msgstr "Følg: %s"
|
78
66
|
|
79
|
-
#: gui/trayicon.rb:
|
67
|
+
#: gui/trayicon.rb:116
|
80
68
|
msgid "%s minutes"
|
81
69
|
msgstr "%s minutter"
|
82
70
|
|
83
|
-
#: gui/trayicon.rb:193
|
84
|
-
msgid "The timelog '%s' has not been synced. Are you sure you want to quit?"
|
85
|
-
msgstr "Tidsloggen '%s' er ikke blevet synkroniseret. Er du sikker på, at du vil afslutte?"
|
86
|
-
|
87
|
-
#: gui/win_overview.rb:15
|
88
|
-
#: gui/win_timelog_edit.rb:11
|
89
|
-
msgid "None"
|
90
|
-
msgstr "Ingen"
|
91
|
-
|
92
|
-
#: gui/win_overview.rb:28
|
93
|
-
msgid "ID"
|
94
|
-
msgstr "ID"
|
95
|
-
|
96
|
-
#: gui/win_overview.rb:29
|
97
|
-
msgid "Description"
|
98
|
-
msgstr "Beskrivelse"
|
99
|
-
|
100
|
-
#: gui/win_overview.rb:30
|
101
|
-
msgid "Time"
|
102
|
-
msgstr "Tid"
|
103
|
-
|
104
|
-
#: gui/win_overview.rb:31
|
105
|
-
msgid "Transport"
|
106
|
-
msgstr "Transport"
|
107
|
-
|
108
|
-
#: gui/win_overview.rb:33
|
109
|
-
msgid "Needs sync"
|
110
|
-
msgstr "Behøver sync"
|
111
|
-
|
112
|
-
#: gui/win_overview.rb:37
|
113
|
-
msgid "Task"
|
114
|
-
msgstr "Opgave"
|
115
|
-
|
116
|
-
#: gui/win_overview.rb:66
|
117
|
-
#: gui/win_overview.rb:86
|
118
|
-
msgid "Invalid time entered."
|
119
|
-
msgstr "Ugyldig tid indtastet."
|
120
|
-
|
121
71
|
#: gui/win_preferences.rb:30
|
122
72
|
msgid "Black"
|
123
73
|
msgstr "Sort"
|
@@ -159,8 +109,9 @@ msgid "Got %s tasks."
|
|
159
109
|
msgstr "Hentet %s opgaver."
|
160
110
|
|
161
111
|
#: gui/win_preferences.rb:89
|
162
|
-
#: lib/openall_time_applet.rb:
|
163
|
-
#: lib/openall_time_applet.rb:
|
112
|
+
#: lib/openall_time_applet.rb:301
|
113
|
+
#: lib/openall_time_applet.rb:332
|
114
|
+
#: lib/openall_time_applet.rb:384
|
164
115
|
msgid "Error"
|
165
116
|
msgstr "Fejl"
|
166
117
|
|
@@ -172,69 +123,148 @@ msgstr "Uge %s"
|
|
172
123
|
msgid "No worktimes was found that week."
|
173
124
|
msgstr "Der blev ikke fundet nogle arbejdstimer i denne uge."
|
174
125
|
|
175
|
-
#: gui/
|
176
|
-
|
177
|
-
|
126
|
+
#: gui/win_main.rb:15
|
127
|
+
#: gui/win_sync_overview.rb:14
|
128
|
+
msgid "None"
|
129
|
+
msgstr "Ingen"
|
130
|
+
|
131
|
+
#: gui/win_main.rb:18
|
132
|
+
#: gui/win_main.rb:253
|
133
|
+
#: gui/win_sync_overview.rb:17
|
134
|
+
msgid "Choose:"
|
135
|
+
msgstr "Vælg:"
|
136
|
+
|
137
|
+
#: gui/win_main.rb:30
|
138
|
+
#: gui/win_sync_overview.rb:27
|
139
|
+
msgid "ID"
|
140
|
+
msgstr "ID"
|
141
|
+
|
142
|
+
#: gui/win_main.rb:32
|
143
|
+
#: gui/win_sync_overview.rb:28
|
144
|
+
msgid "Description"
|
145
|
+
msgstr "Beskrivelse"
|
146
|
+
|
147
|
+
#: gui/win_main.rb:37
|
148
|
+
#: gui/win_sync_overview.rb:29
|
149
|
+
msgid "Timestamp"
|
150
|
+
msgstr "Tidsstempel"
|
151
|
+
|
152
|
+
#: gui/win_main.rb:42
|
153
|
+
#: gui/win_sync_overview.rb:30
|
154
|
+
msgid "Time"
|
155
|
+
msgstr "Tid"
|
156
|
+
|
157
|
+
#: gui/win_main.rb:47
|
158
|
+
#: gui/win_sync_overview.rb:31
|
159
|
+
msgid "Transport"
|
160
|
+
msgstr "Transport"
|
161
|
+
|
162
|
+
#: gui/win_main.rb:52
|
163
|
+
#: gui/win_sync_overview.rb:32
|
164
|
+
msgid "Length"
|
165
|
+
msgstr "Længde"
|
166
|
+
|
167
|
+
#: gui/win_main.rb:57
|
168
|
+
msgid "Descr."
|
169
|
+
msgstr "Beskr."
|
170
|
+
|
171
|
+
#: gui/win_main.rb:62
|
172
|
+
msgid "Costs"
|
173
|
+
msgstr "Omkost."
|
174
|
+
|
175
|
+
#: gui/win_main.rb:67
|
176
|
+
msgid "Fixed"
|
177
|
+
msgstr "Fikset"
|
178
178
|
|
179
|
-
#: gui/
|
180
|
-
#: gui/
|
181
|
-
msgid "
|
182
|
-
msgstr "
|
179
|
+
#: gui/win_main.rb:71
|
180
|
+
#: gui/win_sync_overview.rb:40
|
181
|
+
msgid "Int. work"
|
182
|
+
msgstr "Int. arbejde"
|
183
183
|
|
184
|
-
#: gui/
|
185
|
-
|
186
|
-
|
184
|
+
#: gui/win_main.rb:75
|
185
|
+
#: gui/win_sync_overview.rb:44
|
186
|
+
msgid "Sync?"
|
187
|
+
msgstr "Synk?"
|
188
|
+
|
189
|
+
#: gui/win_main.rb:79
|
190
|
+
#: gui/win_sync_overview.rb:48
|
191
|
+
msgid "Task"
|
192
|
+
msgstr "Opgave"
|
193
|
+
|
194
|
+
#: gui/win_main.rb:94
|
195
|
+
msgid "You cannot edit the time for the active timelog."
|
196
|
+
msgstr "Du kan ikke redigere tid for den aktive tidslog."
|
197
|
+
|
198
|
+
#: gui/win_main.rb:198
|
199
|
+
msgid "The timelog '%s' has not been synced. Are you sure you want to quit?"
|
200
|
+
msgstr "Tidsloggen '%s' er ikke blevet synkroniseret. Er du sikker på, at du vil afslutte?"
|
187
201
|
|
188
|
-
#: gui/
|
189
|
-
msgid "
|
190
|
-
msgstr "
|
202
|
+
#: gui/win_main.rb:266
|
203
|
+
msgid "Stop"
|
204
|
+
msgstr "Stop"
|
191
205
|
|
192
|
-
#: gui/
|
193
|
-
msgid "
|
194
|
-
msgstr "
|
206
|
+
#: gui/win_main.rb:269
|
207
|
+
msgid "Start"
|
208
|
+
msgstr "Start"
|
195
209
|
|
196
|
-
#: gui/
|
197
|
-
msgid "
|
198
|
-
msgstr "
|
210
|
+
#: gui/win_main.rb:319
|
211
|
+
msgid "Please choose a timelog to delete."
|
212
|
+
msgstr "Vælg venligst en tidslog at slette."
|
213
|
+
|
214
|
+
#: gui/win_main.rb:323
|
215
|
+
msgid "Do you want to remove this timelog?"
|
216
|
+
msgstr "Vil du fjerne denne tidslogning?"
|
199
217
|
|
200
218
|
#: gui/win_sync_overview.rb:9
|
201
|
-
msgid "
|
202
|
-
msgstr "
|
219
|
+
msgid "Transfer"
|
220
|
+
msgstr "Overfør"
|
221
|
+
|
222
|
+
#: gui/win_sync_overview.rb:33
|
223
|
+
msgid "Transport descr."
|
224
|
+
msgstr "Transport beskr."
|
225
|
+
|
226
|
+
#: gui/win_sync_overview.rb:34
|
227
|
+
msgid "Transport costs"
|
228
|
+
msgstr "Transport omkostninger"
|
229
|
+
|
230
|
+
#: gui/win_sync_overview.rb:36
|
231
|
+
msgid "Fixed travel"
|
232
|
+
msgstr "Fikset rejse"
|
203
233
|
|
204
|
-
#: gui/win_sync_overview.rb:
|
234
|
+
#: gui/win_sync_overview.rb:53
|
235
|
+
msgid "Sync time"
|
236
|
+
msgstr "Synk tid"
|
237
|
+
|
238
|
+
#: gui/win_sync_overview.rb:129
|
205
239
|
msgid "There is nothing to sync at this time."
|
206
240
|
msgstr "Der er intet at synce på nuværende tidspunkt."
|
207
241
|
|
208
|
-
#:
|
209
|
-
msgid "Time was not numeric for: '%s'."
|
210
|
-
msgstr "Tid var ikke numerisk for: '%s'."
|
211
|
-
|
212
|
-
#: lib/openall_time_applet.rb:104
|
242
|
+
#: lib/openall_time_applet.rb:97
|
213
243
|
msgid "not set"
|
214
244
|
msgstr "ikke sat"
|
215
245
|
|
216
|
-
#: lib/openall_time_applet.rb:
|
246
|
+
#: lib/openall_time_applet.rb:202
|
217
247
|
msgid "Tracking task: %s"
|
218
248
|
msgstr "Følger opgave: %s"
|
219
249
|
|
220
|
-
#: lib/openall_time_applet.rb:
|
250
|
+
#: lib/openall_time_applet.rb:282
|
221
251
|
msgid "Updating organisation-cache."
|
222
252
|
msgstr "Opdaterer organisations-cache."
|
223
253
|
|
224
|
-
#: lib/openall_time_applet.rb:
|
254
|
+
#: lib/openall_time_applet.rb:286
|
225
255
|
msgid "Updating task-cache."
|
226
256
|
msgstr "Opdaterer opgave-cache."
|
227
257
|
|
228
|
-
#: lib/openall_time_applet.rb:
|
229
|
-
#: lib/openall_time_applet.rb:
|
258
|
+
#: lib/openall_time_applet.rb:290
|
259
|
+
#: lib/openall_time_applet.rb:324
|
230
260
|
msgid "Updating worktime-cache."
|
231
261
|
msgstr "Opdaterer arbejdstids-cache."
|
232
262
|
|
233
|
-
#: lib/openall_time_applet.rb:
|
263
|
+
#: lib/openall_time_applet.rb:320
|
234
264
|
msgid "Pushing time-updates."
|
235
265
|
msgstr "Sender tids-opdateringer."
|
236
266
|
|
237
|
-
#: lib/openall_time_applet.rb:
|
267
|
+
#: lib/openall_time_applet.rb:328
|
238
268
|
msgid "Done"
|
239
269
|
msgstr "Færdig"
|
240
270
|
|
@@ -246,52 +276,8 @@ msgstr "Uge status"
|
|
246
276
|
msgid "Week"
|
247
277
|
msgstr "Uge"
|
248
278
|
|
249
|
-
#: glade/win_timelog_edit.glade:7
|
250
|
-
msgid "Timelog"
|
251
|
-
msgstr "Tidslog"
|
252
|
-
|
253
|
-
#: glade/win_timelog_edit.glade:135
|
254
|
-
msgid "Should sync"
|
255
|
-
msgstr "Skal synces"
|
256
|
-
|
257
|
-
#: glade/win_timelog_edit.glade:152
|
258
|
-
msgid "Start tracking after saving"
|
259
|
-
msgstr "Starter med at følge efter gem"
|
260
|
-
|
261
|
-
#: glade/win_timelog_edit.glade:185
|
262
|
-
msgid "Transport length"
|
263
|
-
msgstr "Transport længde"
|
264
|
-
|
265
|
-
#: glade/win_timelog_edit.glade:199
|
266
|
-
msgid "Transport costs"
|
267
|
-
msgstr "Transport omkostninger"
|
268
|
-
|
269
|
-
#: glade/win_timelog_edit.glade:247
|
270
|
-
msgid "Transport description"
|
271
|
-
msgstr "Transport beskrivelse"
|
272
|
-
|
273
|
-
#: glade/win_timelog_edit.glade:275
|
274
|
-
msgid "Internal work"
|
275
|
-
msgstr "Internt arbejde"
|
276
|
-
|
277
|
-
#: glade/win_timelog_edit.glade:290
|
278
|
-
msgid "Fixed travel"
|
279
|
-
msgstr "Fikset rejse"
|
280
|
-
|
281
|
-
#: glade/win_timelog_edit.glade:310
|
282
|
-
msgid "Time type"
|
283
|
-
msgstr "Tids type"
|
284
|
-
|
285
|
-
#: glade/win_timelog_edit.glade:336
|
286
|
-
msgid "Timestamp"
|
287
|
-
msgstr "Tidsstempel"
|
288
|
-
|
289
|
-
#: glade/win_timelog_edit.glade:370
|
290
|
-
#: glade/win_sync_overview.glade:40
|
291
|
-
msgid "<b>Timelog</b>"
|
292
|
-
msgstr "<b>Tidslog</b>"
|
293
|
-
|
294
279
|
#: glade/win_preferences.glade:7
|
280
|
+
#: glade/win_main.glade:56
|
295
281
|
msgid "Preferences"
|
296
282
|
msgstr "Indstillinger"
|
297
283
|
|
@@ -343,26 +329,122 @@ msgstr "Tekst farve"
|
|
343
329
|
msgid "Tray"
|
344
330
|
msgstr "Tray"
|
345
331
|
|
332
|
+
#: glade/win_main.glade:17
|
333
|
+
msgid "OpenAll Time Applet"
|
334
|
+
msgstr "OpenAll Tids Applet"
|
335
|
+
|
336
|
+
#: glade/win_main.glade:36
|
337
|
+
msgid "_Tracker"
|
338
|
+
msgstr "_Tracker"
|
339
|
+
|
340
|
+
#: glade/win_main.glade:45
|
341
|
+
msgid "Week view"
|
342
|
+
msgstr "Uge oversigt"
|
343
|
+
|
344
|
+
#: glade/win_main.glade:140
|
345
|
+
msgid "Switch"
|
346
|
+
msgstr "Switch"
|
347
|
+
|
348
|
+
#: glade/win_main.glade:161
|
349
|
+
msgid "<b>Description</b>"
|
350
|
+
msgstr "<b>Beskrivelse</b>"
|
351
|
+
|
352
|
+
#: glade/win_main.glade:222
|
353
|
+
msgid "+"
|
354
|
+
msgstr "+"
|
355
|
+
|
356
|
+
#: glade/win_main.glade:237
|
357
|
+
msgid "-"
|
358
|
+
msgstr "-"
|
359
|
+
|
360
|
+
#: glade/win_main.glade:263
|
361
|
+
msgid "Overview"
|
362
|
+
msgstr "Oversigt"
|
363
|
+
|
364
|
+
#: glade/win_main.glade:280
|
365
|
+
msgid "_Sync"
|
366
|
+
msgstr "_Sync"
|
367
|
+
|
346
368
|
#: glade/win_sync_overview.glade:7
|
347
|
-
msgid "
|
348
|
-
msgstr "
|
369
|
+
msgid "Prepare transfer"
|
370
|
+
msgstr "Forbered overførsel"
|
349
371
|
|
350
|
-
#: glade/win_sync_overview.glade:
|
351
|
-
msgid "<b>
|
352
|
-
msgstr "<b>
|
372
|
+
#: glade/win_sync_overview.glade:94
|
373
|
+
msgid "<b>Prepare transfer</b>"
|
374
|
+
msgstr "<b>Forbered overførsel</b>"
|
353
375
|
|
354
|
-
#: glade/win_sync_overview.glade:
|
355
|
-
msgid "
|
356
|
-
msgstr "
|
376
|
+
#: glade/win_sync_overview.glade:110
|
377
|
+
msgid "[totals]"
|
378
|
+
msgstr "[totaler]"
|
357
379
|
|
358
|
-
#: glade/
|
359
|
-
msgid "
|
360
|
-
msgstr "
|
380
|
+
#: glade/win_overview.glade:8
|
381
|
+
msgid "Timelog list"
|
382
|
+
msgstr "Tidslog liste"
|
361
383
|
|
362
384
|
#: glade/win_overview.glade:55
|
363
385
|
msgid "<b>Timelogs</b>"
|
364
386
|
msgstr "<b>Tidslogs</b>"
|
365
387
|
|
388
|
+
#~ msgid "Could not log in."
|
389
|
+
#~ msgstr "Kunne ikke logge ind."
|
390
|
+
|
391
|
+
#~ msgid "New timelog"
|
392
|
+
#~ msgstr "Ny tidslog"
|
393
|
+
|
394
|
+
#~ msgid "Synchronize with OpenAll"
|
395
|
+
#~ msgstr "Synkroniserer med OpenAll"
|
396
|
+
|
397
|
+
#~ msgid "Needs sync"
|
398
|
+
#~ msgstr "Behøver sync"
|
399
|
+
|
400
|
+
#~ msgid "Invalid time entered."
|
401
|
+
#~ msgstr "Ugyldig tid indtastet."
|
402
|
+
|
403
|
+
#~ msgid "Normal"
|
404
|
+
#~ msgstr "Normal"
|
405
|
+
|
406
|
+
#~ msgid "Overtime %s"
|
407
|
+
#~ msgstr "Overtid %s"
|
408
|
+
|
409
|
+
#~ msgid "You have entered an invalid time-format."
|
410
|
+
#~ msgstr "Du har indtastet et ugyldigt tids-format."
|
411
|
+
|
412
|
+
#~ msgid "You have entered an invalid transport-time-format."
|
413
|
+
#~ msgstr "Du har indtastet et ugyldigt transport-tids-format."
|
414
|
+
|
415
|
+
#~ msgid "You have entered an invalid timestamp."
|
416
|
+
#~ msgstr "Du har indtastet et ugyldigt tidsstempel."
|
417
|
+
|
418
|
+
#~ msgid "Synchronize"
|
419
|
+
#~ msgstr "Synkroniser"
|
420
|
+
|
421
|
+
#~ msgid "Time was not numeric for: '%s'."
|
422
|
+
#~ msgstr "Tid var ikke numerisk for: '%s'."
|
423
|
+
|
424
|
+
#~ msgid "Timelog"
|
425
|
+
#~ msgstr "Tidslog"
|
426
|
+
|
427
|
+
#~ msgid "Should sync"
|
428
|
+
#~ msgstr "Skal synces"
|
429
|
+
|
430
|
+
#~ msgid "Start tracking after saving"
|
431
|
+
#~ msgstr "Starter med at følge efter gem"
|
432
|
+
|
433
|
+
#~ msgid "Transport length"
|
434
|
+
#~ msgstr "Transport længde"
|
435
|
+
|
436
|
+
#~ msgid "Time type"
|
437
|
+
#~ msgstr "Tids type"
|
438
|
+
|
439
|
+
#~ msgid "<b>Timelog</b>"
|
440
|
+
#~ msgstr "<b>Tidslog</b>"
|
441
|
+
|
442
|
+
#~ msgid "<b>Logged time</b>"
|
443
|
+
#~ msgstr "<b>Logget tid</b>"
|
444
|
+
|
445
|
+
#~ msgid "<b>Sync with OpenAll</b>"
|
446
|
+
#~ msgstr "<b>Synk med OpenAll</b>"
|
447
|
+
|
366
448
|
#~ msgid "Time overview"
|
367
449
|
#~ msgstr "Tids oversigt"
|
368
450
|
|
data/openall_time_applet.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{openall_time_applet}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.16"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Kasper Johansen"]
|
12
|
-
s.date = %q{2012-06-
|
12
|
+
s.date = %q{2012-06-28}
|
13
13
|
s.default_executable = %q{openall_time_applet.rb}
|
14
14
|
s.description = %q{Off-line time-tracking for OpenAll with syncing when online.}
|
15
15
|
s.email = %q{k@spernj.org}
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: openall_time_applet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.16
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Kasper Johansen
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-06-
|
13
|
+
date: 2012-06-28 00:00:00 +02:00
|
14
14
|
default_executable: openall_time_applet.rb
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -196,7 +196,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
196
196
|
requirements:
|
197
197
|
- - ">="
|
198
198
|
- !ruby/object:Gem::Version
|
199
|
-
hash:
|
199
|
+
hash: 1131527418909996080
|
200
200
|
segments:
|
201
201
|
- 0
|
202
202
|
version: "0"
|