Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cnprog framework for site in English? #28

Open
GoogleCodeExporter opened this issue Mar 19, 2015 · 23 comments
Open

cnprog framework for site in English? #28

GoogleCodeExporter opened this issue Mar 19, 2015 · 23 comments

Comments

@GoogleCodeExporter
Copy link

Hope this is appropriate

Has the cnprog framework been used for any sites in other languages than
Chinese?

Has it been used for other sites than cnprog at all?

I was thinking of having somebody that knows cnprog framework to make a
site in English for me.

Would that be feasible?  I would like to take it over and work with it
without learning Chinese.

Thanks

Original issue reported on code.google.com by [email protected] on 5 May 2009 at 9:09

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

I am also quite interested in this. I could help installing it at your site.

Let's talk privately on email, mine is [email protected]

Thanks,
Bogdan

Original comment by [email protected] on 18 May 2009 at 6:04

@GoogleCodeExporter
Copy link
Author

Please contact me also...

[email protected]

Regards...

Original comment by [email protected] on 22 Jun 2009 at 6:10

@GoogleCodeExporter
Copy link
Author

I posted the question on the site:
http://tinyurl.com/cnprogenglish

Original comment by [email protected] on 22 Jun 2009 at 8:37

@GoogleCodeExporter
Copy link
Author

you know what...if you check the locale folder there is a .po file there which 
can be
opened with kbabel for exaqmple to translate. I am not sure , but probably this 
is
the way to do it! Will post update...


Original comment by [email protected] on 22 Jun 2009 at 11:07

@GoogleCodeExporter
Copy link
Author

here is a first run on it.

localized in english and chinese (javascript, templates, some messages in python
code) definitely needs more work though: e.g. to switch language in javascript 
you
have to hardcode a js variable in templates.

unfortunately I was not able to make chinese locale go live, but it must be some
basic configuration problem.


Original comment by [email protected] on 23 Jun 2009 at 1:58

Attachments:

@GoogleCodeExporter
Copy link
Author

Hmm, for some reason I cannot run the attached script. I get this :
Traceback (most recent call last):

  File "/usr/lib/python2.5/site-packages/django/core/servers/basehttp.py", line 278,
in run
    self.result = application(self.environ, self.start_response)

  File "/usr/lib/python2.5/site-packages/django/core/servers/basehttp.py", line 635,
in __call__
    return self.application(environ, start_response)

  File "/usr/lib/python2.5/site-packages/django/core/handlers/wsgi.py", line 239, in
__call__
    response = self.get_response(request)

  File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py", line 67, in
get_response
    response = middleware_method(request)

  File
"/usr/lib/python2.5/site-packages/django_debug_toolbar-0.7.0-py2.5.egg/debug_too
lbar/middleware.py",
line 66, in process_request
    self.debug_toolbar = DebugToolbar(request)

  File
"/usr/lib/python2.5/site-packages/django_debug_toolbar-0.7.0-py2.5.egg/debug_too
lbar/toolbar/loader.py",
line 27, in __init__
    self.load_panels()

  File
"/usr/lib/python2.5/site-packages/django_debug_toolbar-0.7.0-py2.5.egg/debug_too
lbar/toolbar/loader.py",
line 52, in load_panels
    raise exceptions.ImproperlyConfigured, 'Error importing debug panel %s: "%s"' %
(panel_module, e)

ImproperlyConfigured: Error importing debug panel 
debug_toolbar.panels.profiler: "No
module named profiler"


I am new to django, probably some configuration problem. Will look into it.


Thanks you for youe effort  evgeny.fadeev. As soon as I get it up and running 
will
translate to greek.

Original comment by [email protected] on 23 Jun 2009 at 3:08

@GoogleCodeExporter
Copy link
Author

Solved, updated 

Original comment by [email protected] on 23 Jun 2009 at 3:26

@GoogleCodeExporter
Copy link
Author

 In cnprog-beta2-eng-cn/forum/views.py was getting an error on line 1735:

except Exception as e:
        result = xml_template % ('', _('Error uploading file. Please contact the site
administrator. Thank you. %s' % e), '')


replaced with:
except Exception, e:
        result = xml_template % ('', _('Error uploading file. Please contact the site
administrator. Thank you. %s' % e), '')

Page loaded fine then. Please verify if someone faced this bug also. 

Original comment by [email protected] on 23 Jun 2009 at 11:13

@GoogleCodeExporter
Copy link
Author

probably your upload directory is not writable by server, or you are pointing 
to a
wrong directory.

Original comment by [email protected] on 23 Jun 2009 at 2:28

@GoogleCodeExporter
Copy link
Author

I get this when I try to ask a question and also similar when try to update the 
profile:

Environment:

Request Method: POST
Request URL: http://127.0.0.1:8000/questions/ask/
Django Version: 1.0.2 final
Python Version: 2.5.2
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.admin',
 'django.contrib.humanize',
 'forum',
 'django_authopenid',
 'debug_toolbar']
Installed Middleware:
('django.middleware.gzip.GZipMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.middleware.transaction.TransactionMiddleware',
 'debug_toolbar.middleware.DebugToolbarMiddleware')


Traceback:
File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py" in 
get_response
  81.                 response = middleware_method(request, callback, callback_args,
callback_kwargs)
File
"/usr/lib/python2.5/site-packages/django_debug_toolbar-0.7.0-py2.5.egg/debug_too
lbar/middleware.py"
in process_view
  83.                 response = panel.process_view(request, callback, callback_args,
callback_kwargs)
File
"/usr/lib/python2.5/site-packages/django_debug_toolbar-0.7.0-py2.5.egg/debug_too
lbar/panels/profiler.py"
in process_view
  52.         return self.profiler.runcall(callback, request, *callback_args,
**callback_kwargs)
File "/usr/lib/python2.5/cProfile.py" in runcall
  149.             return func(*args, **kw)
File "/usr/lib/python2.5/site-packages/django/contrib/auth/decorators.py" in 
__call__
  67.             return self.view_func(request, *args, **kwargs)
File "/root/cnprog-beta2-eng-cn/forum/views.py" in ask
  213.             html = sanitize_html(markdowner.convert(form.cleaned_data['text']))
File "/root/cnprog-beta2-eng-cn/utils/html.py" in sanitize_html
  46.     walker = treewalkers.getTreeWalker("dom")
File
"/usr/lib/python2.5/site-packages/html5lib-0.11-py2.5.egg/html5lib/treewalkers/_
_init__.py"
in getTreeWalker
  37.             mod = __import__(treeType, globals())

Exception Type: SyntaxError at /questions/ask/
Exception Value: invalid syntax (_base.py, line 40)

Any help greatly appreciated...

Original comment by [email protected] on 23 Jun 2009 at 6:26

@GoogleCodeExporter
Copy link
Author

may it have something to do with the version of python you are using???

Original comment by [email protected] on 23 Jun 2009 at 9:07

@GoogleCodeExporter
Copy link
Author

pfff...will downgrade to 2.4 maybe...will look into it. Problems...hmmmmm

Original comment by [email protected] on 24 Jun 2009 at 4:53

@GoogleCodeExporter
Copy link
Author

i wouldn't be downgrading, maybe upgrade...

are you sure that some wrong version base python files are not being compiled
together with your django?

if you can write into python installation files you could try finding which 
statement
exactly gives syntax error. is it __import__?

http://docs.python.org/library/functions.html  search for __import__

Original comment by [email protected] on 24 Jun 2009 at 7:19

@GoogleCodeExporter
Copy link
Author

I'd be interested in this myself.

Evgeny: Is there anything else you can tell us about the environment you're 
running
your tarball on? (Version of python, platform, etc.)

I'm going to try get this running on Ubuntu and will post a mini-tutorial if I'm
successful.

Cheers all.

Original comment by [email protected] on 25 Jun 2009 at 10:29

@GoogleCodeExporter
Copy link
Author

 jspittal that will be handly. I am having trouble running it in slackware. Python
version seems to be causing trouble...

Original comment by [email protected] on 25 Jun 2009 at 12:37

@GoogleCodeExporter
Copy link
Author

python 2.6.1
django 1.0.2 final
CentOS release 5.2 (Final)

what other kinds of errors do you get?

Original comment by [email protected] on 25 Jun 2009 at 9:50

@GoogleCodeExporter
Copy link
Author

Getting this error :
ImproperlyConfigured: Error importing debug panel 
debug_toolbar.panels.profiler: "No
module named profiler"

An Idea what the prob is???

Original comment by [email protected] on 28 Jun 2009 at 12:16

@GoogleCodeExporter
Copy link
Author

Oh well just turned off debug...(which is not good at the moment, but anyway 
can see
whats wrong from apache logs.) 

However still: Comment 11  by wezer21, Jun 23 (4 days ago)...

Dont know if this is "proper", anyone take a look what I mean (try to post 
something
or update profile), currenty hxxp://pantofla.webfactional.com/

bb

Original comment by [email protected] on 28 Jun 2009 at 12:48

@GoogleCodeExporter
Copy link
Author

Seems to be working now I guess. Being debugging like hell. Did some strange 
stuff I
guess:

1. html5lib 11.x was giving an error when compiling so I went for html5lib 10

2. Also changed utils/html.py from (about line:28:

class HTMLSanitizer(tokenizer.HTMLTokenizer, HTMLSanitizerMixin):
    def __init__(self, stream, encoding=None, parseMeta=True, useChardet=True,
                 lowercaseElementName=True, lowercaseAttrName=True):
        tokenizer.HTMLTokenizer.__init__(self, stream, encoding, parseMeta,
                                         useChardet, lowercaseElementName,
                                         lowercaseAttrName)


to:

class HTMLSanitizer(tokenizer.HTMLTokenizer, HTMLSanitizerMixin):
    def __init__(self, stream, encoding=None, parseMeta=True, useChardet=True,
                 lowercaseElementName=True, lowercaseAttrName=True):
        tokenizer.HTMLTokenizer.__init__(self, stream, encoding, parseMeta,
                                         useChardet, lowercaseElementName)


Please any guru or experienced do give some answers to what is happenig as I am
learning, and its like try and error all the time.Will further test anyway...

cheers....

Original comment by [email protected] on 28 Jun 2009 at 7:18

@GoogleCodeExporter
Copy link
Author

English version(Globalization) of CNProg is under working..

Please stop continuing not related subjects thread here, if you have other 
issues, go
to create a new one. Thanks.

Original comment by [email protected] on 28 Jun 2009 at 1:26

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

sorry about that ... but I thought this is specifically for the enflish version 
of
cnprog...

Original comment by [email protected] on 28 Jun 2009 at 2:09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant