diff --git a/frappe/public/css/desk.css b/frappe/public/css/desk.css
index d323c3118a..0d30030cbf 100644
--- a/frappe/public/css/desk.css
+++ b/frappe/public/css/desk.css
@@ -404,6 +404,11 @@ fieldset[disabled] .form-control {
.awesomplete > ul:before {
display: none;
}
+.awesomplete > ul li[aria-selected="true"] mark,
+.awesomplete > ul mark {
+ padding: 0px;
+ background-color: inherit;
+}
.awesomplete > ul > li {
font-size: 12px;
padding: 9px 11.8px;
diff --git a/frappe/public/js/frappe/views/communication.js b/frappe/public/js/frappe/views/communication.js
index 6b1e376203..12dedfddb7 100755
--- a/frappe/public/js/frappe/views/communication.js
+++ b/frappe/public/js/frappe/views/communication.js
@@ -15,7 +15,7 @@ frappe.views.CommunicationComposer = Class.extend({
title: (this.subject || ""),
no_submit_on_enter: true,
fields: this.get_fields(),
- primary_action_label: "Send",
+ primary_action_label: __("Send"),
primary_action: function() {
me.send_action();
}
@@ -49,7 +49,7 @@ frappe.views.CommunicationComposer = Class.extend({
get_fields: function() {
return [
{label:__("To"), fieldtype:"Data", reqd: 0, fieldname:"recipients"},
- {fieldtype: "Section Break", collapsible: 1, label: "CC & Standard Reply"},
+ {fieldtype: "Section Break", collapsible: 1, label: __("CC & Standard Reply")},
{label:__("CC"), fieldtype:"Data", fieldname:"cc"},
{label:__("Standard Reply"), fieldtype:"Link", options:"Standard Reply",
fieldname:"standard_reply"},
diff --git a/frappe/public/js/legacy/form.js b/frappe/public/js/legacy/form.js
index 55b9c1ee19..16e8668fec 100644
--- a/frappe/public/js/legacy/form.js
+++ b/frappe/public/js/legacy/form.js
@@ -369,7 +369,7 @@ _f.Frm.prototype.show_web_link = function() {
}
_f.Frm.prototype.add_web_link = function(path) {
- this.web_link = this.sidebar.add_user_action("See on Website",
+ this.web_link = this.sidebar.add_user_action(__("See on Website"),
function() {}).attr("href", path || this.doc.route).attr("target", "_blank");
}
diff --git a/frappe/public/less/desk.less b/frappe/public/less/desk.less
index 2e7fe01f79..b723356adc 100644
--- a/frappe/public/less/desk.less
+++ b/frappe/public/less/desk.less
@@ -153,15 +153,15 @@ textarea.form-control {
&--cell {
&.-current- {
color: @brand-primary;
-
+
&.-in-range- {
color: @brand-primary;
}
}
&.-range-from-, &.-range-to- {
- border: 1px solid fade(@brand-primary, 30%);
- background: fade(@brand-primary, 10%);
+ border: 1px solid fade(@brand-primary, 30%);
+ background: fade(@brand-primary, 10%);
}
&.-selected-, &.-current-.-selected- {
@@ -205,6 +205,11 @@ textarea.form-control {
display: none;
}
+ li[aria-selected="true"] mark, mark {
+ padding: 0px;
+ background-color: inherit;
+ }
+
&> li {
font-size: 12px;
padding: 9px 11.8px;
diff --git a/frappe/templates/includes/web_sidebar.html b/frappe/templates/includes/web_sidebar.html
index d4cb904b5b..3e40df8f65 100644
--- a/frappe/templates/includes/web_sidebar.html
+++ b/frappe/templates/includes/web_sidebar.html
@@ -30,7 +30,7 @@
{%- endfor %}
{% if frappe.user != 'Guest' %}
{% endif %}
diff --git a/frappe/utils/data.py b/frappe/utils/data.py
index ca3c9e3aad..54a1164fc0 100644
--- a/frappe/utils/data.py
+++ b/frappe/utils/data.py
@@ -13,7 +13,7 @@ from dateutil import parser
from num2words import num2words
import HTMLParser
from html2text import html2text
-
+from frappe import _
DATE_FORMAT = "%Y-%m-%d"
TIME_FORMAT = "%H:%M:%S.%f"
@@ -510,25 +510,31 @@ def pretty_date(iso_datetime):
# differnt cases
if dt_diff_seconds < 60.0:
- return 'just now'
+ return _('just now')
elif dt_diff_seconds < 120.0:
- return '1 minute ago'
+ return _('1 minute ago')
elif dt_diff_seconds < 3600.0:
- return '%s minutes ago' % cint(math.floor(dt_diff_seconds / 60.0))
+ return _('{0} minutes ago').format(cint(math.floor(dt_diff_seconds / 60.0)))
elif dt_diff_seconds < 7200.0:
- return '1 hour ago'
+ return _('1 hour ago')
elif dt_diff_seconds < 86400.0:
- return '%s hours ago' % cint(math.floor(dt_diff_seconds / 3600.0))
+ return _('{0} hours ago').format(cint(math.floor(dt_diff_seconds / 3600.0)))
elif dt_diff_days == 1.0:
- return 'Yesterday'
+ return _('Yesterday')
elif dt_diff_days < 7.0:
- return '%s days ago' % cint(dt_diff_days)
+ return _('{0} days ago').format(cint(dt_diff_days))
+ elif dt_diff_days < 12:
+ return _('1 weeks ago')
elif dt_diff_days < 31.0:
- return '%s week(s) ago' % cint(math.ceil(dt_diff_days / 7.0))
+ return _('{0} weeks ago').format(cint(math.ceil(dt_diff_days / 7.0)))
+ elif dt_diff_days < 46:
+ return _('1 month ago')
elif dt_diff_days < 365.0:
- return '%s months ago' % cint(math.ceil(dt_diff_days / 30.0))
+ return _('{0} months ago').format(cint(math.ceil(dt_diff_days / 30.0)))
+ elif dt_diff_days < 550.0:
+ return _('1 year ago')
else:
- return 'more than %s year(s) ago' % cint(math.floor(dt_diff_days / 365.0))
+ return '{0} years ago'.format(cint(math.floor(dt_diff_days / 365.0)))
def comma_or(some_list):
return comma_sep(some_list, frappe._("{0} or {1}"))
diff --git a/frappe/website/doctype/contact_us_settings/contact_us_settings.js b/frappe/website/doctype/contact_us_settings/contact_us_settings.js
index 3b36f4f17b..0668c3ab91 100644
--- a/frappe/website/doctype/contact_us_settings/contact_us_settings.js
+++ b/frappe/website/doctype/contact_us_settings/contact_us_settings.js
@@ -1,5 +1,5 @@
frappe.ui.form.on("Contact Us Settings", {
"refresh": function(frm) {
- frm.sidebar.add_user_action("See on Website").attr("href", "/contact").attr("target", "_blank");
+ frm.sidebar.add_user_action(__("See on Website")).attr("href", "/contact").attr("target", "_blank");
}
});
diff --git a/frappe/website/doctype/website_settings/website_settings.py b/frappe/website/doctype/website_settings/website_settings.py
index 843c40d7d3..78e775000c 100644
--- a/frappe/website/doctype/website_settings/website_settings.py
+++ b/frappe/website/doctype/website_settings/website_settings.py
@@ -74,9 +74,9 @@ def get_website_settings():
'top_bar_items': get_items('top_bar_items'),
'footer_items': get_items('footer_items'),
"post_login": [
- {"label": "My Account", "url": "/me"},
+ {"label": _("My Account"), "url": "/me"},
# {"class": "divider"},
- {"label": "Logout", "url": "/?cmd=web_logout"}
+ {"label": _("Logout"), "url": "/?cmd=web_logout"}
]
})
diff --git a/frappe/website/js/website.js b/frappe/website/js/website.js
index d83f4de578..5d7cabc93d 100644
--- a/frappe/website/js/website.js
+++ b/frappe/website/js/website.js
@@ -378,9 +378,10 @@ $(document).ready(function() {
// switch to app link
if(getCookie("system_user")==="yes" && logged_in) {
- $("#website-post-login .dropdown-menu").append('Switch To Desk');
+ $("#website-post-login .dropdown-menu").append(''
+ +__('Switch To Desk')+'');
$(".navbar-header .dropdown:not(.dropdown-submenu) > .dropdown-menu")
- .append('Switch To Desk');
+ .append(''+__('Switch To Desk')+'');
}
frappe.render_user();
diff --git a/frappe/website/render.py b/frappe/website/render.py
index d5cca7e5ae..19a59e5b3a 100644
--- a/frappe/website/render.py
+++ b/frappe/website/render.py
@@ -206,10 +206,10 @@ def set_content_type(response, data, path):
def clear_cache(path=None):
frappe.cache().delete_value("website_generator_routes")
delete_page_cache(path)
+ frappe.cache().delete_value("website_404")
if not path:
clear_sitemap()
frappe.clear_cache("Guest")
- frappe.cache().delete_value("website_404")
frappe.cache().delete_value("portal_menu_items")
frappe.cache().delete_value("home_page")