diff --git a/core/doctype/communication/locale/_messages_doc.json b/core/doctype/communication/locale/_messages_doc.json
index 985b61d6b4..215b2060c6 100644
--- a/core/doctype/communication/locale/_messages_doc.json
+++ b/core/doctype/communication/locale/_messages_doc.json
@@ -18,11 +18,11 @@
"Email",
"Created Support Ticket",
"File List",
- "No Action",
+ "Keep a track of all communications",
"User",
"Visit",
"Date",
- "Keep a track of all communications",
+ "No Action",
"Job Applicant",
"Opportunity",
"By",
diff --git a/core/doctype/control_panel/locale/_messages_doc.json b/core/doctype/control_panel/locale/_messages_doc.json
index bb87d6e7d7..8fbf5d4d62 100644
--- a/core/doctype/control_panel/locale/_messages_doc.json
+++ b/core/doctype/control_panel/locale/_messages_doc.json
@@ -1,6 +1,5 @@
[
"mm-dd-yyyy",
- "Enter Email Id to receive Error Report sent by users.E.g.: support@iwebnotes.com",
"Banner HTML",
"Title",
"Time Zone",
@@ -12,17 +11,18 @@
"mm/dd/yyyy",
"Password Expires in (days)",
"Date Format",
- "System Defaults",
+ "Enter Email Id to receive Error Report sent by users.\nE.g.: support@iwebnotes.com",
"Default Home Pages",
"dd-mm-yyyy",
"Banner",
"Company Name",
"Currency Format",
- "Format: hh:mm example for one hour expiry set as 01:00. Max expiry will be 72 hours. Default is 24 hours",
+ "System Defaults",
"Country",
"Industry",
"Total SMS Sent",
"Defaults",
+ "Format: hh:mm example for one hour expiry set as 01:00. \nMax expiry will be 72 hours. Default is 24 hours",
"yyyy-mm-dd",
"Home Page",
"Support Email Id",
diff --git a/core/doctype/customize_form_field/locale/_messages_doc.json b/core/doctype/customize_form_field/locale/_messages_doc.json
index 8fc950ef8b..7d8fb61d9b 100644
--- a/core/doctype/customize_form_field/locale/_messages_doc.json
+++ b/core/doctype/customize_form_field/locale/_messages_doc.json
@@ -1,5 +1,6 @@
[
"Perm Level",
+ "For Links, enter the DocType as range\nFor Select, enter list of Options separated by comma",
"Section Break",
"Label",
"Width",
@@ -18,15 +19,14 @@
"Password",
"Data",
"HTML",
- "This field will appear only if the fieldname defined here has value OR the rules are true (examples):
myfieldeval:doc.myfield=='My Value'
eval:doc.age>18",
"Default",
"Button",
"Column Break",
"Report Hide",
+ "This field will appear only if the fieldname defined here has value OR the rules are true (examples):
\nmyfield\neval:doc.myfield=='My Value'
\neval:doc.age>18",
"In List View",
"Time",
"Read Only",
- "For Links, enter the DocType as rangeFor Select, enter list of Options separated by comma",
"Options",
"Description",
"Code",
diff --git a/core/doctype/default_home_page/locale/_messages_doc.json b/core/doctype/default_home_page/locale/_messages_doc.json
index b8a211b0dc..62c79ae022 100644
--- a/core/doctype/default_home_page/locale/_messages_doc.json
+++ b/core/doctype/default_home_page/locale/_messages_doc.json
@@ -1,6 +1,6 @@
[
"Core",
"Home Page",
- "Default Home Page",
- "Role"
+ "Role",
+ "Default Home Page"
]
\ No newline at end of file
diff --git a/core/doctype/docfield/locale/_messages_doc.json b/core/doctype/docfield/locale/_messages_doc.json
index ba0ae10521..0a756e1d7e 100644
--- a/core/doctype/docfield/locale/_messages_doc.json
+++ b/core/doctype/docfield/locale/_messages_doc.json
@@ -1,12 +1,12 @@
[
"Index",
"Perm Level",
- "No Copy",
+ "For Links, enter the DocType as range\nFor Select, enter list of Options separated by comma",
"Section Break",
"Percent",
"Label",
"Text Editor",
- "Report Hide",
+ "No Copy",
"Hidden",
"Type",
"Print Width",
@@ -28,8 +28,8 @@
"Allow on Submit",
"DocField",
"Time",
+ "Report Hide",
"Read Only",
- "For Links, enter the DocType as rangeFor Select, enter list of Options separated by comma",
"Options",
"Description",
"Code",
diff --git a/core/doctype/docperm/locale/_messages_doc.json b/core/doctype/docperm/locale/_messages_doc.json
index fe9aa9f29b..da7669b3a7 100644
--- a/core/doctype/docperm/locale/_messages_doc.json
+++ b/core/doctype/docperm/locale/_messages_doc.json
@@ -7,8 +7,8 @@
"Submit",
"Write",
"Amend",
- "Role",
"DocPerm",
"Cancel",
+ "Role",
"Match"
]
\ No newline at end of file
diff --git a/core/doctype/doctype/locale/_messages_doc.json b/core/doctype/doctype/locale/_messages_doc.json
index 7e76d96753..b262c96a37 100644
--- a/core/doctype/doctype/locale/_messages_doc.json
+++ b/core/doctype/doctype/locale/_messages_doc.json
@@ -1,13 +1,12 @@
[
"Title Case",
- "Permission Rules",
- "\\field:[fieldname] - By Field\\naming_series: - By Naming Series (field called naming_series must be present\\eval:[expression] - Evaluate an expression in python (self is doc)\\Prompt - Prompt user for a name\\[series] - Series by prefix (separated by a dot); for example PRE.#####\\')\">Naming Options",
"System",
+ "Permission Rules",
"Other",
- "Master",
- "Hide Toolbar",
+ "\\\nfield:[fieldname] - By Field\\\nnaming_series: - By Naming Series (field called naming_series must be present\\\neval:[expression] - Evaluate an expression in python (self is doc)\\\nPrompt - Prompt user for a name\\\n[series] - Series by prefix (separated by a dot); for example PRE.#####\\\n')\">Naming Options",
"Hide Copy",
"DocType Details",
+ "User Cannot Search",
"Core",
"Max Attachments",
"Description",
@@ -42,9 +41,10 @@
"Is Single",
"Hide Print",
"Allow Import via Data Import Tool",
- "User Cannot Search",
+ "Master",
"Naming",
"Permissions",
"Document Type",
- "Allow Attach"
+ "Allow Attach",
+ "Hide Toolbar"
]
\ No newline at end of file
diff --git a/core/doctype/event/locale/_messages_doc.json b/core/doctype/event/locale/_messages_doc.json
index 896698d637..6487d56f40 100644
--- a/core/doctype/event/locale/_messages_doc.json
+++ b/core/doctype/event/locale/_messages_doc.json
@@ -10,10 +10,10 @@
"Event Individuals",
"Participants",
"Individuals",
- "Ref Name",
"Details",
"Groups",
"Cancel",
+ "Ref Name",
"Event Type",
"Starts on",
"Event",
diff --git a/core/doctype/field_mapper_detail/locale/_messages_doc.json b/core/doctype/field_mapper_detail/locale/_messages_doc.json
index f5dde18e45..a97cc555d6 100644
--- a/core/doctype/field_mapper_detail/locale/_messages_doc.json
+++ b/core/doctype/field_mapper_detail/locale/_messages_doc.json
@@ -1,16 +1,11 @@
[
"Core",
"Match Id",
- "<=",
- ">=",
"Map",
- "<",
"No",
"Field Mapper Detail",
"To Field",
"Yes",
- "=",
"Checking Operator (To Fld, Operator, From Fld)",
- "From Field",
- ">"
+ "From Field"
]
\ No newline at end of file
diff --git a/core/doctype/file_data/locale/_messages_doc.json b/core/doctype/file_data/locale/_messages_doc.json
index 7de464dbc9..3330bcd7cc 100644
--- a/core/doctype/file_data/locale/_messages_doc.json
+++ b/core/doctype/file_data/locale/_messages_doc.json
@@ -1,7 +1,7 @@
[
"Core",
+ "File URL",
"File Name",
"Module",
- "File URL",
"File Data"
]
\ No newline at end of file
diff --git a/core/doctype/patch_log/locale/_messages_doc.json b/core/doctype/patch_log/locale/_messages_doc.json
index 530efa8cce..ad30f8ff3d 100644
--- a/core/doctype/patch_log/locale/_messages_doc.json
+++ b/core/doctype/patch_log/locale/_messages_doc.json
@@ -1,6 +1,6 @@
[
+ "List of patches executed",
"Core",
"Patch",
- "List of patches executed",
"Patch Log"
]
\ No newline at end of file
diff --git a/core/doctype/profile/locale/_messages_doc.json b/core/doctype/profile/locale/_messages_doc.json
index 95045372de..2f69bc47a6 100644
--- a/core/doctype/profile/locale/_messages_doc.json
+++ b/core/doctype/profile/locale/_messages_doc.json
@@ -1,9 +1,8 @@
[
- "File List",
+ "Check / Uncheck roles assigned to the Profile. Click on the Role to find out what permissions that Role has.",
"Hrvatski",
"Email Password",
"User Image",
- "\u0441\u0440\u043f\u0441\u043a\u0438",
"Email Signature",
"Sunny",
"Set a new password and \"Save\"",
@@ -24,10 +23,12 @@
"Roles Assigned",
"Profile",
"Core",
+ "Enter default value fields (keys) and values. If you add multiple values for a field, the first one will be picked. These defaults are also used to set \"match\" permission rules. To see list of fields, go to Customize Form.",
"Last IP",
"fran\u00e7ais",
"Display Settings",
"Email Host",
+ "Email Login",
"espa\u00f1ol",
"Set New Password",
"Sync Inbox",
@@ -43,22 +44,20 @@
"Id of the profile will be the email.",
"Profile Defaults",
"Language",
- "Check / Uncheck roles assigned to the Profile. Click on the Role to find out what permissions that Role has.",
+ "Bio",
"Language preference for user interface (only if available).",
"Gender",
"Enabled",
"Ocean",
- "\u0939\u093f\u0902\u0926\u0940",
"User Type",
"nederlands",
- "\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",
"Defaults",
"Middle Name (Optional)",
- "Enter default value fields (keys) and values. If you add multiple values for a field, the first one will be picked. These defaults are also used to set \"match\" permission rules. To see list of fields, go to Customize Form.",
+ "Short Bio",
"Male",
- "Email Login",
+ "Bio will be displayed in blog section etc.",
+ "File List",
"Send Invite Email",
- "\u0627\u0644\u0639\u0631\u0628\u064a\u0629",
"Login Before",
"Last Name",
"POP3 Mail Server (e.g. pop.gmail.com)",
diff --git a/core/doctype/report/locale/_messages_doc.json b/core/doctype/report/locale/_messages_doc.json
index 7806a7a005..f8b3b22dc9 100644
--- a/core/doctype/report/locale/_messages_doc.json
+++ b/core/doctype/report/locale/_messages_doc.json
@@ -1,11 +1,16 @@
[
+ "Script Report",
"Core",
"Ref DocType",
- "Is Standard",
+ "Report Name",
"No",
"Disabled",
+ "Report Type",
"JSON",
- "Report",
+ "Report Builder",
+ "Query Report",
"Query",
+ "Report",
+ "Is Standard",
"Yes"
]
\ No newline at end of file
diff --git a/core/doctype/role/locale/_messages_doc.json b/core/doctype/role/locale/_messages_doc.json
index b0e4b26a53..4d0086909c 100644
--- a/core/doctype/role/locale/_messages_doc.json
+++ b/core/doctype/role/locale/_messages_doc.json
@@ -1,6 +1,6 @@
[
"Role Name",
"Core",
- "Role",
- "Module"
+ "Module",
+ "Role"
]
\ No newline at end of file
diff --git a/core/doctype/scheduler_log/locale/_messages_doc.json b/core/doctype/scheduler_log/locale/_messages_doc.json
index 05826edafc..5b55da79d0 100644
--- a/core/doctype/scheduler_log/locale/_messages_doc.json
+++ b/core/doctype/scheduler_log/locale/_messages_doc.json
@@ -1,7 +1,7 @@
[
- "Scheduler Log",
"Core",
+ "Scheduler Log",
+ "Error",
"Log of Scheduler Errors",
- "Method",
- "Error"
+ "Method"
]
\ No newline at end of file
diff --git a/core/doctype/search_criteria/locale/_messages_doc.json b/core/doctype/search_criteria/locale/_messages_doc.json
index 7a3822d774..b9860eb25a 100644
--- a/core/doctype/search_criteria/locale/_messages_doc.json
+++ b/core/doctype/search_criteria/locale/_messages_doc.json
@@ -1,6 +1,7 @@
[
"Custom Query",
"No",
+ "Search Criteria",
"Sort By",
"Doc Type",
"Columns",
@@ -18,12 +19,11 @@
"Parent Doc Type",
"Additional Conditions",
"Client Script",
- "Additional Columns",
"Module",
"Disabled",
"Criteria Name",
"Report Script",
- "Search Criteria",
+ "Additional Columns",
"Filters",
"Yes"
]
\ No newline at end of file
diff --git a/core/doctype/system_console/locale/_messages_doc.json b/core/doctype/system_console/locale/_messages_doc.json
index ef67489bf9..9435b1851a 100644
--- a/core/doctype/system_console/locale/_messages_doc.json
+++ b/core/doctype/system_console/locale/_messages_doc.json
@@ -1,7 +1,7 @@
[
"Core",
"Execute",
- "Error",
"System Console",
- "Script"
+ "Script",
+ "Error"
]
\ No newline at end of file
diff --git a/core/doctype/todo/locale/_messages_doc.json b/core/doctype/todo/locale/_messages_doc.json
index 8bba3d8f95..b9ea826dae 100644
--- a/core/doctype/todo/locale/_messages_doc.json
+++ b/core/doctype/todo/locale/_messages_doc.json
@@ -5,8 +5,8 @@
"Description",
"Assigned By",
"Priority",
- "Role",
"Date",
+ "Role",
"Reference Type",
"ToDo"
]
\ No newline at end of file
diff --git a/core/doctype/userrole/locale/_messages_doc.json b/core/doctype/userrole/locale/_messages_doc.json
index 886b254fd1..e8e546d87b 100644
--- a/core/doctype/userrole/locale/_messages_doc.json
+++ b/core/doctype/userrole/locale/_messages_doc.json
@@ -1,5 +1,5 @@
[
"Core",
- "Role",
- "UserRole"
+ "UserRole",
+ "Role"
]
\ No newline at end of file
diff --git a/core/doctype/workflow/locale/_messages_doc.json b/core/doctype/workflow/locale/_messages_doc.json
index 4c24e3dad6..59482a7013 100644
--- a/core/doctype/workflow/locale/_messages_doc.json
+++ b/core/doctype/workflow/locale/_messages_doc.json
@@ -1,7 +1,7 @@
[
- "Core",
- "Workflow Document States",
"Workflow Name",
+ "Workflow Document States",
+ "Core",
"Rules defining transition of state in the workflow.",
"DocType on which this Workflow is applicable.",
"Different \"States\" this document can exist in. Like \"Open\", \"Pending Approval\" etc.",
diff --git a/core/doctype/workflow_document_state/locale/_messages_doc.json b/core/doctype/workflow_document_state/locale/_messages_doc.json
index 323e4f0a6f..db7121f51a 100644
--- a/core/doctype/workflow_document_state/locale/_messages_doc.json
+++ b/core/doctype/workflow_document_state/locale/_messages_doc.json
@@ -3,10 +3,7 @@
"Update Value",
"State",
"Only Allow Edit For",
- "1",
- "0",
"Represents the states allowed in one document and role assigned to change the state.",
- "2",
"Update Field",
"Doc Status",
"Message",
diff --git a/core/page/permission_manager/locale/_messages_js.json b/core/page/permission_manager/locale/_messages_js.json
index 8c165b09d5..596107e574 100644
--- a/core/page/permission_manager/locale/_messages_js.json
+++ b/core/page/permission_manager/locale/_messages_js.json
@@ -28,11 +28,11 @@
"To restrict a User of a particular Role to documents that are only self-created.",
"Add New Permission Rule",
"Restricting By User",
- "Go to Setup > User Properties to set \\\t\t\t'territory' for diffent Users.",
"Quick Help for Setting Permissions",
"Add A New Rule",
"Select Role",
"Permissions translate to Users based on what Role they are assigned",
+ "Go to Setup > User Properties to set \\\n\t\t\t'territory' for diffent Users.",
"Permission Manager",
"Select Document Type",
"Click on button in the 'Condition' column and select the option 'User is the creator of the document'",
diff --git a/public/build.json b/public/build.json
index 1690ca2391..8fb5c5156d 100644
--- a/public/build.json
+++ b/public/build.json
@@ -58,7 +58,6 @@
"lib/public/js/lib/jquery/jquery.ui.interactions.min.js",
"lib/public/js/lib/mousetrap.min.js",
"lib/public/js/lib/center_image.js",
- "lib/public/js/legacy/utils/printElement.js",
"lib/public/js/lib/bootstrap.min.js",
"lib/public/js/lib/tiny_mce_3.5.7/jquery.tinymce.js:concat",
@@ -161,9 +160,10 @@
"lib/public/js/wn/form/states.js",
"lib/public/js/wn/form/assign_to.js",
"lib/public/js/wn/print/print_table.js",
-
- 'lib/public/js/lib/jquery/jquery.ui.interactions.min.js',
-
+ ]
+ },
+ {
+ "public/js/slickgrid.min.js": [
'lib/public/js/lib/slickgrid/jquery.event.drag.min.js',
'lib/public/js/lib/slickgrid/plugins/slick.cellrangeselector.js',
'lib/public/js/lib/slickgrid/plugins/slick.cellselectionmodel.js',
@@ -175,6 +175,6 @@
'lib/public/js/lib/slickgrid/slick.grid.js',
'lib/public/js/lib/slickgrid/slick.dataview.js',
]
- },
+ }
]
diff --git a/public/js/wn/locale/_messages_js.json b/public/js/wn/locale/_messages_js.json
index 1891fd66c4..2586f84fbe 100644
--- a/public/js/wn/locale/_messages_js.json
+++ b/public/js/wn/locale/_messages_js.json
@@ -8,7 +8,7 @@
"Workflow will start after saving.",
"No records tagged.",
"Download Backup",
- "Report Saved",
+ "Then By (optional)",
"No Communication tagged with this ",
"Send Email",
"Start Report For",
@@ -25,14 +25,11 @@
"Notify By Email",
"Not Found",
"Disabled",
- "Based on",
- "Modified by",
"Select Print Format",
"Subject",
"File Uploaded Sucessfully.",
"Custom Reports",
"Documents",
- "Not allowed",
"Current status",
"Shortcut",
"Priority",
@@ -53,7 +50,6 @@
"Report",
"Drag to sort columns",
"Showing only for",
- "Then By (optional)",
"Send",
"Delete",
"Comment",
@@ -63,7 +59,6 @@
"None: End of Workflow",
"Upload a file",
"Dear",
- "Query",
"Message",
"or",
"Select Attachments",
@@ -77,11 +72,13 @@
"Not Permitted",
"is not allowed.",
"This is PERMANENT action and you cannot undo. Continue?",
+ "No Report Loaded. Please use query-report/[Report Name] to run a report.",
"Report was not saved (there were errors)",
"Select or drag across dates to create a new event.",
"Add to To Do",
"Tags",
"Logout",
+ "To add a tag, open the document and click on \"Add Tag\" on the sidebar",
"Recent",
"Search",
"In response to",
@@ -100,12 +97,9 @@
"Next actions",
"Select All",
"Test Runner",
- "Click on edit button to start a new report.",
"and",
- "For Links, use define linked",
"From Date must be before To Date",
"Sort By",
- "Permissions will be based on this DocType",
"Attach",
"Note: Other permission rules may also apply",
"Complete By",
@@ -118,11 +112,9 @@
"Descending",
"Your download is being built, this may take a few moments...",
"Document is only editable by users of role",
- "Please click on another report from the menu.",
- "To add a tag, open the document and click on \"Add Tag\" on the sidebar",
+ "Modified by",
"About",
"Are you sure you want to delete the attachment?",
- "Report Name",
"Edit",
"Enabled",
"List",
diff --git a/public/js/wn/views/grid_report.js b/public/js/wn/views/grid_report.js
index 9a576e94f8..034353eff3 100644
--- a/public/js/wn/views/grid_report.js
+++ b/public/js/wn/views/grid_report.js
@@ -92,6 +92,8 @@ $.extend(wn.report_dump, {
wn.provide("wn.views");
wn.views.GridReport = Class.extend({
init: function(opts) {
+ wn.require("js/slickgrid.min.js");
+
this.filter_inputs = {};
this.preset_checks = [];
this.tree_grid = {show: false};
diff --git a/public/js/wn/views/query_report.js b/public/js/wn/views/query_report.js
index c996348bd6..89a99a5eb8 100644
--- a/public/js/wn/views/query_report.js
+++ b/public/js/wn/views/query_report.js
@@ -6,6 +6,8 @@ wn.provide("wn.views");
wn.standard_pages["query-report"] = function() {
var wrapper = wn.container.add_page('query-report');
+ wn.require("js/slickgrid.min.js");
+
wn.ui.make_app_page({
parent: wrapper,
title: 'Query Report',
diff --git a/public/js/wn/views/reportview.js b/public/js/wn/views/reportview.js
index a26371b848..cb872b436b 100644
--- a/public/js/wn/views/reportview.js
+++ b/public/js/wn/views/reportview.js
@@ -7,6 +7,8 @@ wn.views.ReportViewPage = Class.extend({
wn.set_route("403");
return;
};
+
+ wn.require("js/slickgrid.min.js");
this.doctype = doctype;
this.docname = docname;
diff --git a/webnotes/auth.py b/webnotes/auth.py
index d621e0a369..78c922b90d 100644
--- a/webnotes/auth.py
+++ b/webnotes/auth.py
@@ -92,14 +92,18 @@ class HTTPRequest:
else:
lang = [lang]
-
for l in lang:
code = l.strip()
- if "-" in code:
- code = code.split("-")[0]
if code in lang_list:
webnotes.lang = code
return
+
+ # check if parent language (pt) is setup, if variant (pt-BR)
+ if "-" in code:
+ code = code.split("-")[0]
+ if code in lang_list:
+ webnotes.lang = code
+ return
def setup_profile(self):
webnotes.user = webnotes.profile.Profile()
diff --git a/webnotes/locale/_messages_py.json b/webnotes/locale/_messages_py.json
index be0640c5e2..8d303dcd5c 100644
--- a/webnotes/locale/_messages_py.json
+++ b/webnotes/locale/_messages_py.json
@@ -11,7 +11,7 @@
"BOM",
"Branch",
"Department",
- "Territory",
+ "SMS Parameter",
"Project Control",
"Item Tax",
"Bin",
@@ -101,6 +101,7 @@
"UOM",
"Supplier Type",
"Serial No",
+ "Territory",
"Landed Cost Purchase Receipt",
"Salary Structure Deduction",
"Home Control",
@@ -185,8 +186,9 @@
"Payment to Invoice Matching Tool Detail",
"Contact Us Settings",
"Expense Claim Detail",
- "Communication Log",
"Stock Ledger Entry",
+ "Communication Log",
+ "Must have report permission to access this report.",
"Bank Reconciliation",
"Salary Slip",
"Delivery Note Packing Item",
@@ -264,9 +266,10 @@
"Salary Structure Earning",
"DocType",
"Holiday Block List Allow",
- "SMS Parameter",
+ "Query must be a SELECT",
"Maintenance Schedule",
"Not allowed for: ",
+ "Must specify a Query to run",
"Event User",
"Stock Reconciliation",
"Purchase Receipt",
diff --git a/webnotes/translate.py b/webnotes/translate.py
index cf218a6b48..e6bb2e5c4b 100644
--- a/webnotes/translate.py
+++ b/webnotes/translate.py
@@ -26,6 +26,7 @@ import webnotes, conf
import os
import codecs
import json
+import re
messages = {}
@@ -178,10 +179,13 @@ def write_messages_file(path, messages, mtype):
os.makedirs(os.path.join(path, 'locale'))
fname = os.path.join(path, 'locale', '_messages_' + mtype + '.json')
- messages = [m.replace("\n", "") for m in filter(None, messages)]
messages = list(set(messages))
+ filtered = []
+ for m in messages:
+ if m and re.search('[a-zA-Z]+', m):
+ filtered.append(m)
with open(fname, 'w') as msgfile:
- msgfile.write(json.dumps(messages, indent=1))
+ msgfile.write(json.dumps(filtered, indent=1))
def export_messages(lang, outfile):
"""get list of all messages"""
@@ -212,6 +216,7 @@ def export_messages(lang, outfile):
keys = messages.keys()
keys.sort()
for m in keys:
+
w.writerow([m.encode('utf-8'), messages.get(m, '').encode('utf-8')])
def import_messages(lang, infile):
@@ -301,6 +306,7 @@ def google_translate(lang, infile, outfile):
"""translate objects using Google API. Add you own API key for translation"""
data = get_all_messages_from_file(infile)
+
import requests
with open(outfile, 'w') as msgfile:
diff --git a/wnf.py b/wnf.py
index 57548403af..f37aa4ea85 100755
--- a/wnf.py
+++ b/wnf.py
@@ -251,7 +251,7 @@ def setup_options():
parser.add_option('--import_messages', nargs=2, metavar="LANG FILENAME",
help="""Import messages for a language and make language files.
- Example, lib/wnf.py --export_messages hi hindi.csv""")
+ Example, lib/wnf.py --import_messages hi hindi.csv""")
parser.add_option('--google_translate', nargs=3, metavar="LANG INFILE OUTFILE",
help="""Auto translate using Google Translate API""")