Added languages and minor fixes

This commit is contained in:
Rushabh Mehta 2013-12-26 14:42:26 +05:30
parent e6db449d56
commit 572894b87f
20 changed files with 16106 additions and 6 deletions

View file

@ -86,7 +86,7 @@ def init(site, sites_path=None):
if not sites_path:
sites_path = '.'
local.error_log = []
local.site = site
local.sites_path = sites_path

View file

@ -4,7 +4,7 @@
# MIT License. See license.txt
from __future__ import unicode_literals
import sys
import sys, os
import webnotes
@ -13,9 +13,13 @@ def main():
fn = get_function(parsed_args)
if not parsed_args.get("sites_path"):
parsed_args["sites_path"] = "."
if not parsed_args.get("site"):
print "Site argument required"
return
if not os.path.exists(parsed_args.get("site")):
print "Did not find folder `{}`. Are you in sites folder?".format(parsed_args.get("site"))
return
if parsed_args.get("site")=="all":
for site in get_sites():
args = parsed_args.copy()

View file

@ -19,7 +19,7 @@ class Database:
def __init__(self, host=None, user=None, password=None, ac_name=None, use_default = 0):
self.host = host or webnotes.conf.db_host or 'localhost'
self.user = user or webnotes.conf.db_name
if ac_name:
self.user = self.get_db_login(ac_name) or webnotes.conf.db_name

View file

@ -31,7 +31,7 @@
<header class="container">{{ banner_html or "" }}</header>
{%- endif %}
{% endblock %}
{% block navbar %}{% include "lib/website/templates/includes/navbar.html" %}{% endblock %}
{% block navbar %}{% include "templates/includes/navbar.html" %}{% endblock %}
<div class="page-container" id="page-{{ name }}">
{% block content %}{% endblock %}
</div>

View file

@ -94,10 +94,11 @@ def get_full_dict(lang):
def load_lang(lang, apps=None):
out = {}
for app in (apps or webnotes.get_all_apps(True)):
path = webnotes.get_pymodule_path(app, "translations", lang + ".csv")
path = os.path.join(webnotes.get_pymodule_path(app), "translations", lang + ".csv")
if os.path.exists(path):
cleaned = dict([item for item in dict(read_csv_file(path)).iteritems() if item[1]])
out.update(cleaned)
return out
def clear_cache():
@ -244,7 +245,7 @@ def get_untranslated(lang, untranslated_file):
messages.extend(get_messages_for_app(app))
full_dict = get_full_dict(lang)
for m in messages:
if not full_dict.get(m):
untranslated.append(m)

1073
webnotes/translations/ar.csv Normal file

File diff suppressed because it is too large Load diff

1073
webnotes/translations/el.csv Normal file

File diff suppressed because it is too large Load diff

1073
webnotes/translations/es.csv Normal file

File diff suppressed because it is too large Load diff

1073
webnotes/translations/fr.csv Normal file

File diff suppressed because it is too large Load diff

1073
webnotes/translations/hi.csv Normal file

File diff suppressed because it is too large Load diff

1073
webnotes/translations/hr.csv Normal file

File diff suppressed because it is too large Load diff

1073
webnotes/translations/it.csv Normal file

File diff suppressed because it is too large Load diff

1073
webnotes/translations/nl.csv Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

1073
webnotes/translations/pt.csv Normal file

File diff suppressed because it is too large Load diff

1073
webnotes/translations/sr.csv Normal file

File diff suppressed because it is too large Load diff

1073
webnotes/translations/ta.csv Normal file

File diff suppressed because it is too large Load diff

1073
webnotes/translations/th.csv Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff