Skip to content

Commit bb8eddc

Browse files
committed
Web Notes to Frappe, Frappecloud.com to ERPNext.com
1 parent 01d10aa commit bb8eddc

File tree

14 files changed

+30
-13
lines changed

14 files changed

+30
-13
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
name='translator',
88
version=version,
99
description='Translation Portal for Frappe Apps',
10-
author='Web Notes Technologies',
10+
author='Frappe Technologies',
1111
author_email='[email protected]',
1212
packages=find_packages(),
1313
zip_safe=False,

translator/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
1+
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
22
# MIT License. See license.txt
33

44
from __future__ import unicode_literals

translator/hooks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
app_name = "translator"
22
app_title = "Translator"
3-
app_publisher = "Web Notes Technologies"
3+
app_publisher = "Frappe Technologies"
44
app_description = "Translation Portal for Frappe Apps"
55
app_icon = "icon-comment"
66
app_color = "green"

translator/migrate.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from __future__ import unicode_literals
2+
import frappe
3+
from frappe.frappeclient import FrappeClient
4+
5+
def migrate():
6+
print "connecting..."
7+
remote = FrappeClient("https://frappe.io", "Administrator", frappe.conf.frappe_admin_password)
8+
remote.migrate_doctype("User", exclude=["Guest", "Administrator"], preprocess=remove_undesired_roles)
9+
remote.migrate_doctype("Language")
10+
remote.migrate_doctype("Translator App")
11+
remote.migrate_doctype("Source Message")
12+
remote.migrate_doctype("Translated Message")
13+
remote.migrate_doctype("Translated Message Validation")
14+
15+
def remove_undesired_roles(doc):
16+
doc["user_roles"] = [role for role in (doc.get("user_roles") or [])
17+
if role["role"] not in ("Knowledge Base Contributor", "Knowledge Base Editor", "Restriction Manager")]

translator/translator/doctype/language/language.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2013, Web Notes Technologies and contributors
1+
# Copyright (c) 2015, Frappe Technologies and contributors
22
# For license information, please see license.txt
33

44
from __future__ import unicode_literals

translator/translator/doctype/language/test_language.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2013, Web Notes Technologies and Contributors
1+
# Copyright (c) 2015, Frappe Technologies and Contributors
22
# See license.txt
33

44
import frappe

translator/translator/doctype/source_message/source_message.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2013, Web Notes Technologies and contributors
1+
# Copyright (c) 2015, Frappe Technologies and contributors
22
# For license information, please see license.txt
33

44
from __future__ import unicode_literals

translator/translator/doctype/source_message/test_source_message.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2013, Web Notes Technologies and Contributors
1+
# Copyright (c) 2015, Frappe Technologies and Contributors
22
# See license.txt
33

44
import frappe

translator/translator/doctype/translated_message/test_translated_message.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2013, Web Notes Technologies and Contributors
1+
# Copyright (c) 2015, Frappe Technologies and Contributors
22
# See license.txt
33

44
import frappe

translator/translator/doctype/translated_message/translated_message.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2013, Web Notes Technologies and contributors
1+
# Copyright (c) 2015, Frappe Technologies and contributors
22
# For license information, please see license.txt
33

44
from __future__ import unicode_literals

translator/translator/doctype/translated_message_validation/test_translated_message_validation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2013, Web Notes Technologies and Contributors
1+
# Copyright (c) 2015, Frappe Technologies and Contributors
22
# See license.txt
33

44
import frappe

translator/translator/doctype/translated_message_validation/translated_message_validation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2013, Web Notes Technologies and contributors
1+
# Copyright (c) 2015, Frappe Technologies and contributors
22
# For license information, please see license.txt
33

44
from __future__ import unicode_literals

translator/translator/doctype/translator_app/test_translator_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2013, Web Notes Technologies and Contributors
1+
# Copyright (c) 2015, Frappe Technologies and Contributors
22
# See license.txt
33

44
import frappe

translator/translator/doctype/translator_app/translator_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2013, Web Notes Technologies and contributors
1+
# Copyright (c) 2015, Frappe Technologies and contributors
22
# For license information, please see license.txt
33

44
from __future__ import unicode_literals

0 commit comments

Comments
 (0)