#kiwi .messages a { text-decoration:none; }
#kiwi .messages .msg { border-bottom: 1px solid #DEDEDE; padding: 1px; font-family:arial; font-size:0.9em; }
-#kiwi .messages .msg .time { width:5em; float:left; color:#777; padding:5px; display:none; }
+#kiwi .messages .msg .time { width:6em; float:left; color:#777; padding:5px; display:none; }
#kiwi .messages .msg .nick { width:11em; float:left; font-size:12px; font-family:Arial; text-align:right; padding: 5px; overflow:hidden; }
#kiwi .messages .msg .text { display:block; margin-left:12em; border-left: 1px solid #DEDEDE; white-space:pre-wrap; word-wrap:break-word; font-family:arial; padding:5px; }
}
#kiwi.timestamps .messages .msg .time { display:block; }
-#kiwi.timestamps .messages .msg .text { margin-left:17em; }
+#kiwi.timestamps .messages .msg .text { margin-left:18em; }
#kiwi .messages .msg.global_nick_highlight,
#kiwi .messages .msg.highlight { transition: background 0.3s; background:#D9D9D9; }
join_part: _kiwi.global.i18n.translate('client_applets_settings_notification_joinpart').fetch(),\r
count_all_activity: _kiwi.global.i18n.translate('client_applets_settings_notification_count_all_activity').fetch(),\r
timestamps: _kiwi.global.i18n.translate('client_applets_settings_timestamp').fetch(),\r
+ timestamp_24: _kiwi.global.i18n.translate('client_applets_settings_timestamp_24_hour').fetch(),\r
mute: _kiwi.global.i18n.translate('client_applets_settings_notification_sound').fetch(),\r
emoticons: _kiwi.global.i18n.translate('client_applets_settings_emoticons').fetch(),\r
scroll_history: _kiwi.global.i18n.translate('client_applets_settings_history_length').fetch(),\r
<%= timestamps %>\r
</label>\r
</div>\r
+ <div class="checkbox">\r
+ <label>\r
+ <input data-setting="use_24_hour_timestamps" type="checkbox">\r
+ <%= timestamp_24 %>\r
+ </label>\r
+ </div>\r
<div class="checkbox">\r
<label>\r
<input data-setting="mute_sounds" type="checkbox">\r
#:
msgid "client_applets_settings_timestamp"
-msgstr "Timestamps"
+msgstr "Show timestamps"
+
+#:
+msgid "client_applets_settings_timestamp_24_hour"
+msgstr "Use 24-hour timestamps"
#:
msgid "client_applets_settings_notification_sound"
msgid "client_views_panel_activity"
msgstr "People are talking!"
+#:
+msgid "client_views_panel_timestamp_am"
+msgstr "%s AM"
+
+#:
+msgid "client_views_panel_timestamp_pm"
+msgstr "%s PM"
+
#: client/assets/src/views/serverselect.js
msgid "client_views_serverselect_form_title"
msgstr "Think of a nickname..."
nick_colour_hex, nick_hex, is_highlight, msg_css_classes = '',
time_difference,
sb = this.model.get('scrollback'),
- prev_msg = sb[sb.length-2];
+ prev_msg = sb[sb.length-2],
+ hour, pm;
// Nick highlight detecting
if ((new RegExp('(^|\\W)(' + escapeRegex(_kiwi.app.connections.active_connection.get('nick')) + ')(\\W|$)', 'i')).test(msg.msg)) {
// Build up and add the line
msg.msg_css_classes = msg_css_classes;
- msg.time_string = msg.time.getHours().toString().lpad(2, "0") + ":" + msg.time.getMinutes().toString().lpad(2, "0") + ":" + msg.time.getSeconds().toString().lpad(2, "0");
+ if (_kiwi.global.settings.get('use_24_hour_timestamps')) {
+ msg.time_string = msg.time.getHours().toString().lpad(2, "0") + ":" + msg.time.getMinutes().toString().lpad(2, "0") + ":" + msg.time.getSeconds().toString().lpad(2, "0");
+ } else {
+ hour = msg.time.getHours();
+ pm = hour > 11;
+ hour = (hour === 0) ? 12 : hour % 12;
+ if (pm) {
+ msg.time_string = _kiwi.global.i18n.translate('client_views_panel_timestamp_pm').fetch(hour + ":" + msg.time.getMinutes().toString().lpad(2, "0") + ":" + msg.time.getSeconds().toString().lpad(2, "0"));
+ } else {
+ msg.time_string = _kiwi.global.i18n.translate('client_views_panel_timestamp_am').fetch(hour + ":" + msg.time.getMinutes().toString().lpad(2, "0") + ":" + msg.time.getSeconds().toString().lpad(2, "0"));
+ }
+ }
line_msg = '<div class="msg <%= type %> <%= msg_css_classes %>"><div class="time"><%- time_string %></div><div class="nick" style="<%= nick_style %>"><%- nick %></div><div class="text" style="<%= style %>"><%= msg %> </div></div>';
this.$messages.append(_.template(line_msg, msg));
scrollback: 250,
show_joins_parts: true,
show_timestamps: false,
+ use_24_hour_timestamps: true,
mute_sounds: false,
show_emoticons: true,
count_all_activity: true