[google-appengine] Re: decode Chinese in Url

2008-12-16 Thread A . TNG
It seems decode/encode ('utf-8') doesn't work for me.

I tried this and it works. But I don't know why:

self.request.charset = 'GBK'
self.request.get('id') # 这样就OK了


-- 
Best Regards,
TANG Jiyu (Blog: http://jiyu.wordpress.com.cn)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: A newbie's site

2008-12-08 Thread A . TNG

On Mon, Dec 8, 2008 at 10:17 PM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> nice
> a chinese saying--'Bang'!
> XD

I'd like to say very 'Bang'. :-)

-- 
Best Regards,
TANG Jiyu (Blog: http://jiyu.wordpress.com.cn)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: App Engine in China

2008-12-06 Thread A . TNG

On Sat, Dec 6, 2008 at 11:21 AM, kang <[EMAIL PROTECTED]> wrote:
> ch gov blocked it
>

Yes. But there are some IPs blocked, others not. You could try service
from opendns.com. It works well.

-- 
Best Regards,
TANG Jiyu (Blog: http://jiyu.wordpress.com.cn)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: opml parser working in GAE

2008-12-05 Thread A . TNG

On Fri, Dec 5, 2008 at 7:45 PM, Kuber <[EMAIL PROTECTED]> wrote:
>
> This module is based on the opml.py created by Juri Pakaste.
> Due to the restriction on the use of filesystem in GAE, the original
> code doesn't work in GAE.
> I have added a method parseStr(opmlString) to parse xml string with
> xml.sax.parseString().
> The revised file can be download here: 
> http://files.cnblogs.com/kuber/opml.py.zip
>

Thanks for sharing again. Nice work. :-)

-- 
Best Regards,
TANG Jiyu (Blog: http://jiyu.wordpress.com.cn)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Is there any example code about paging?

2008-12-04 Thread A . TNG

On Thu, Dec 4, 2008 at 6:58 PM, lookon <[EMAIL PROTECTED]> wrote:
>
> I've watched Buildding Scalable Web Applications with Google App
> Engine  on Youtube..But I wish there could be some example code about
> the topics. for example paging technique..
>
> And I want to know where could see the code of some big apps using App
> Engine. I need to learn, thanks

Some sample apps you could find here
http://code.google.com/p/google-app-engine-samples/downloads/list.
Some big apps you could find herehttp://appgallery.appspot.com/. But
the big one may not open-source.


-- 
Best Regards,
TANG Jiyu (Blog: http://jiyu.wordpress.com.cn)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: A web tool to create AppEngine project. Comment is appreciated.

2008-12-03 Thread A . TNG

On Thu, Dec 4, 2008 at 3:04 AM, Nick Johnson <[EMAIL PROTECTED]> wrote:
>
> This is really quite neat. I hope we can look forward to seeing more
> modules to choose from in the future!
> You could work around the 1MB limit by providing a command-line tool
> that takes the same settings as the site and downloads the components
> separately. At the 'lots of work' end of the scale, you could even
> provide a virtual Git or SVN repository that people can pull/clone/
> fork to start their project off!
>
> -Nick
>

Thanks for suggestion, Nick.

:-)

-- 
Best Regards,
TANG Jiyu (Blog: http://jiyu.wordpress.com.cn)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] A web tool to create AppEngine project. Comment is appreciated.

2008-12-03 Thread A . TNG

Hi All,

I write a web tool to create AppEngine project. Following is the quick
start. Any comment is appreciated.
Thanks. :-)

=
GAE-Util-Suit Quick Start
=

1. How to access GAE-Util-Suit?
The website is http://gaeutilsuit.appspot.com.

2. What is GAE-Util-Suit?
GAE-Util-Suit is a web tool. It can be used to create AppEngine
project files. The AppEngine developers could choose framework, module
and service, then click button. All you need are ready for you.

3. Where is GAE-Util-Suit from?
GAE-Util-Suit is inspired by ZipMe of Manatlan (http://is.gd/9AXy).
ZipMe is a handy script to download whole AppEngine project files as a
ZIP package.

4. How to use GAE-Util-Suit?
It's very easy. There are only 4 inputs:
* Input the project name.
* Choose framework
* Choose modules
* Choose services
At last, click button "Create Project". There should be a ZIP package
promoting to download. After downloading and extracting, you could
import modules that you've chosen.

5. What are framework, module and service?
I've used AppEngine to create some small tools. With my experience, I
thought an AppEngine project should be divided into three parts:
* At first, you should choose a framework. You could use built-in
framework webapp. It's easy. Otherwise, you could use django or other
popular web frameworks.
* Then, you could choose modules. There are plenty of third party
libraries written in Python. They're always helpful when you develop
some features. In this area, you could choose modules you want. Every
module is in a ZIP file. So, there is no need to worry about 1000-file
restriction.
* At last, you could choose services. AppEngine provides an Admin
Console to help developers to monitor server status, datastore and so
on. Obviously, the Admin Console is not good enough. So some other
nice guys created some handy tools like ZipMe (http://is.gd/9AXy),
appfilesbrowser (http://is.gd/9AY7) and so on. You could add these
services into your project quickly.

6. Need contribution?
Currently, GAE-Util-Suit is a demo. Just show what the idea is. And I
think it could also help the developers who write AppEngine apps. If
you find any framework/module/service will help AppEngine development,
please tell me. I will integrate them into GAE-Util-Suit. It may help
more people.

7. Know issue

If you choose django framework, minimum size of the project package is
775KB. And if you've choosen modules or services, it will be bigger.
When I download ZIP package from AppEngine, I could always download
successfully, but package size is 500KB-600KB. Obviously, the package
is broken. This will happen when you have a slow speed connection with
AppEngine (My downloading speed is lower than 10KB/s).

8. Contact information
My email is tang.jiyu at gmail dot com. (replace at with @ and dot with .)

-- 
Best Regards,
TANG Jiyu (Blog: http://jiyu.wordpress.com.cn)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: how to write code about table in template?

2008-12-01 Thread A . TNG

On Mon, Dec 1, 2008 at 2:27 PM, lookon <[EMAIL PROTECTED]> wrote:
>
> I want to render table in the response. and the template_value is
> objects. Then my question is how to write the template file.
>
> for example,
> {% for obj in objects %}
> 
> 
> code here

{{ obj }} dosen't work?

> 
> 
> {% endfor %}
>
>



-- 
Best Regards,
TANG Jiyu (Blog: http://jiyu.wordpress.com.cn)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Login:admin will cause SystemError on SDK-1.1.7

2008-12-01 Thread A . TNG

Hi,

I tried on another laptop, almost the same environment (WinXP, Python
2.5.2, SDK 1.1.7). It works fine.

I have no idea now.

-- 
Best Regards,
TANG Jiyu (Blog: http://jiyu.wordpress.com.cn)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: New Article on How Index Building Works

2008-11-27 Thread A . TNG

On Wed, Nov 26, 2008 at 5:30 AM, Marzia Niccolai <[EMAIL PROTECTED]> wrote:
> Hi,
>
> There have been a lot of questions on this group about index building and
> Ryan Barrett, the tech lead for the datastore, took some time to write an
> article on how index building works:
> http://code.google.com/appengine/articles/index_building.html
>
> The article describes what happens when you upload new index definitions for
> your application.  It's definitely a worthwhile read if you would like more
> information on how indexes are built to serve queries with App Engine.
>
> -Marzia
>

Really appreciate your hard work. :-)

-- 
Best Regards,
TANG Jiyu (Blog: http://jiyu.wordpress.com.cn)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: failed to connect to localhost

2008-11-24 Thread A . TNG

On Fri, Nov 21, 2008 at 9:37 PM, Brian <[EMAIL PROTECTED]> wrote:
>
> Helloworld.py contents:
>print 'Content-Type: text/plain'
>print ''
>print 'Hello, world!'
>

Hi Brian,

Are you sure your helloworl.py is correct? Check the appengine
installation folder (C:\Program Files\Google\google_appengine). There
is a folder naming "new_project_template".

Just open your command line window and change folder to "C:\Program
Files\Google\google_appengine\new_project_template". Then execute
"dev_appserver.py .". At last, access http://localhost:8080/ with
firefox/IE or whatever. You will get your helloworld.

-- 
Best Regards,
TANG Jiyu (Blog: http://jiyu.wordpress.com.cn)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: aecmd error

2008-11-24 Thread A . TNG

On Fri, Nov 21, 2008 at 10:24 PM, GAEfan <[EMAIL PROTECTED]> wrote:
>
> I recently put all my admin pages within the admin protection.  Now, I
> periodically get this error:
>
>  /Users//GoogleApps//main.py in ()
>5 sys.path = [os.path.abspath(os.path.dirname(__file__)),] +
> sys.path
>6
>7 from aecmd import setup_project
>8 setup_project()
>9
>
> aecmd undefined, setup_project undefined
>
> : No module named aecmd
>
> A Google search turns up nothing.  Please help.
>
> Thank you.

Are you trying app-engine-patch? I find aecmd.py in the
app-engine-patch project. Maybe you could try the sample project.
http://app-engine-patch.googlecode.com/files/appenginepatch-sample-0.9.2.zip

-- 
Best Regards,
TANG Jiyu (Blog: http://jiyu.wordpress.com.cn)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: looking for a project

2008-11-23 Thread A . TNG

Check the frontpage of this group. There are many opensource projects
listing there.

On 11/23/08, JP <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I want to contribute in a GAE open source project, is anybody looking
> for a partner?
>
> Regards,
> JP
> >
>

-- 
Sent from my mobile device

Best Regards,
TANG Jiyu (Blog: http://jiyu.wordpress.com.cn)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: How to open .html in .py file?

2008-11-23 Thread A . TNG

there is a new project template in your appengine installation path.
You could refer to that.

On 11/23/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I just want to call a html file and display it,but I'don't know how to
> do! foe example:
>
> my test.yaml:
> application: test***
> version: 1
> runtime: python
> api_version: 1
>
> handlers:
> - url: /.*
>   script: test.py
>
> I just want display the "index.html" in my root,how to write the
> test.py file?
>
> thanks.
>
> >
>

-- 
Sent from my mobile device

Best Regards,
TANG Jiyu (Blog: http://jiyu.wordpress.com.cn)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: zipimport doesn't work in SDK 1.1.5

2008-11-18 Thread A . TNG

On Wed, Nov 19, 2008 at 1:39 AM, Marzia Niccolai <[EMAIL PROTECTED]> wrote:
> Hi,
>
> This works perfectly for me using the 1.1.5 SDK.  What is your OS?  And what
> is the version of Python you are running?
>
> -Marzia
>

I'm working on Windows XP and Python 2.5.2. I will try it again.
Thanks for help. :-)

-- 
Best Regards,
TANG Jiyu (Blog: http://jiyu.wordpress.com.cn)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: How can I add Timer to my GAE application?

2008-11-17 Thread A . TNG

On Mon, Nov 17, 2008 at 11:48 AM, Alex Cheng <[EMAIL PROTECTED]> wrote:
>
> I want to add a timer to my GAE application, so I can execute certain
> logic at given interval. I tried python's Timer object (http://
> www.python.org/doc/2.5.2/lib/timer-objects.html), but it doesn't seem
> to work properly.
>

If you want cron jobs, you may try this
http://code.google.com/p/gaeutilities/wiki/Cron.
Good luck. :-)

-- 
Best Regards,
TANG Jiyu (Blog: http://jiyu.wordpress.com.cn)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Full Feeds for App Engine Cookbook

2008-11-15 Thread A . TNG

On Sat, Aug 30, 2008 at 8:54 AM, James <[EMAIL PROTECTED]> wrote:
>
> The App Engine cookbook seems like a good resource, but is not nearly
> as useful with the partial RSS feed.
>
> App Engine Team: Please offer a full feed. It shouldn't take long at
> all, and will be a big benefit for developers.

Totally agree. Partial RSS isn't handy. And one more request, could
you add a search input box to help search inside AppEngine cookbook?

-- 
Best Regards,
TANG Jiyu (Blog: http://jiyu.wordpress.com.cn)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: 有个想法,想写 个工具帮助自动生成AppEngine的项目文件

2008-11-13 Thread A . TNG

2008/11/13 A. TNG <[EMAIL PROTECTED]>:
> Hi,
>
> Sorry guys. Make a mistake and send to wrong email address.
>
> --
> Best Regards,
> TANG Jiyu
>

Hi Guys,

I made a mistake and send email to the wrong email address. Please
forget about this thread and do not reply it again.

Thanks in advance.

-- 
Best Regards,
TANG Jiyu (Blog: http://jiyu.wordpress.com.cn)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: 有个想法,想写 个工具帮助自动生成AppEngine的项目文件

2008-11-13 Thread A . TNG

Hi,

Sorry guys. Make a mistake and send to wrong email address.

-- 
Best Regards,
TANG Jiyu

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] 有个想法,想写个工具 帮助自动生成AppEngine的项目文件

2008-11-13 Thread A . TNG
Hi All,

最近练习GAE,写了几个小程序,不过也有一些感受,今天蹦出来个想法,跟大家分享一下。

遇到的问题:
感觉开发GAE的程序,确实比较简单,依靠python得天独厚的语言优势,开发过程也很开心。但是,例如我要重头开始构建一个AppEngine程序,还是有些麻烦。首先我要创建一个app.yaml,如果要自己写,需要记住yaml的语法,其实大多数时候,我都是从以前的一个项目里拷贝过来;要写一个main.py,还需要import一些class,我对那些class不是特别理解,每次也是依葫芦画瓢,或者直接拷贝,当我想实现一个提供简单功能的系统原型的时候,我更希望能立刻从功能函数开始写起。网络的牛牛们写了不少有趣的工具,例如,给appengine提供shell的功能;以及appfilebrowser,提供浏览源代码的功能;还有zipme,可以把整个站点的代码打成zip包,下载下来。这些功能都非常酷,很多时候,为了方便,我希望这些东西都在我的项目文件里面。但是不方便的是,我需要挨个下载,或者从本地的某个文件夹拷贝过来。在我想使用到AppEngine没有带的一些类库,或者想使用http://groups.google.com/group/google-appengine/web/google-app-engine-open-source-projects
提供的工具类库时,都需要手动来做。
我觉得,这个蛮麻烦的,很多都是重复的工作。

受到启发:
最近因为也用到的了YUI(一个js的webframework,
http://developer.yahoo.com/yui/),同样一个很酷的工具,最有意思的莫过于他的YUI Dependency
Configurator。YUI里面包含了各种各样的"控件",每个控件由一些js和css组成,但是开发者们并不是每次都需要使用到所有的控件,而且一些控件之间还有依赖关系,与是YUI
Dependency 
Configurator就提供了一个页面,让用户自己选择需要的控件,然后他生成一段HTML代码,直接把它拷贝到你的页面里面,就可以使用YUI了。
有兴趣的可以看这里 http://developer.yahoo.com/yui/articles/hosting/ 。
于是我想,能不能也做一个类似的工具,功能大体是,页面列出了可以在GAE中用到的各类类库,用户可以根据自己的需求选择一些类库,然后点击一个按钮,从而得到一个zip包,里面包含常用的app.yaml,
main.py等一些默认的文件以及所需要的类库源代码,当然main.py里面已经有了初始的代码,即可立即开始实现原型系统了。

提供的方便:
1. 可以帮助初学者,减少入门AppEngine的门槛。
2. 方便一些有经验的人,节省重复劳动的时间。

暂时想了个名字,可以称为 gae-util-suit

不知道大家怎么看?或者有更好的解决方案?或者,觉得没这必要?
欢迎拍 :)

-- 
Best Regards,
TANG Jiyu

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: How to import data to server datastore

2008-10-30 Thread A . TNG

On Fri, Oct 31, 2008 at 1:05 AM, Marzia Niccolai <[EMAIL PROTECTED]> wrote:
> Hi Jiyu,
>
> Currently, the only tool provided for bulk importing data in to the
> datastore is the bulkloader, available in google.appengine.ext.bulkload.
> Working on better import/export tools for App Engine is definitely on our
> roadmap: http://code.google.com/appengine/docs/roadmap.html
>
> -Marzia

Thanks. This is very helpful.
-- 
Best Regards,
TANG Jiyu

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: How to update script if I don't have code base

2008-10-30 Thread A . TNG

On Thu, Oct 30, 2008 at 4:59 PM, Greg <[EMAIL PROTECTED]> wrote:
>
>> Any other options?
>
> Yes, a USB flash drive.
>
> If you search this group, you will find many messages from people who
> have lost their source code for some reason or other. Using a version
> control system is a great idea even if your app is small and
> insignificant and you are the only person using it.
>
> Personally I use subversion AND back up to a flash drive, and you will
> too after your first hard drive crash/laptop theft.

Thanks all. I realize that version control system is the best solution
for this situation.

-- 
Best Regards,
TANG Jiyu

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: How to update script if I don't have code base

2008-10-30 Thread A . TNG

On Thu, Oct 30, 2008 at 12:36 PM, David Symonds <[EMAIL PROTECTED]> wrote:
>
> On Wed, Oct 29, 2008 at 7:03 PM, A.TNG <[EMAIL PROTECTED]> wrote:
>
>> Usually, we can use "appcfg.py upload " to upload script files
>> and static files. But I meet following situation and I don't know how
>> to deal with it. I develop an app at home on my own laptop. Then, I go
>> to office. I find out something wrong with my script and I want to fix
>> it. But I don't have my code base at office PC.I only have AppEngine
>> local SDK.
>
> You should be using a source control system, especially if you are
> going to work on code from more than one location. Try
> code.google.com/hosting or similar.
>
>

Using a version control system is one solution. But I only have a tiny
app. It looks like there is no need to host a project on googlecode.

Any other options?

-- 
Best Regards,
TANG Jiyu

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: SDK Datastore Viewer gives an error when some StringProperties are None

2008-10-29 Thread A . TNG

On Wed, Oct 29, 2008 at 9:21 AM, djidjadji <[EMAIL PROTECTED]> wrote:
>
> I have found an error in the SDK Datastore Viewer.
> I found the source of the error and fixed it.
> I created an issue for this bug.
> http://code.google.com/p/googleappengine/issues/detail?id=815
>
Thanks. I meet the same error too.

-- 
Best Regards,
TANG Jiyu

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Sample code of i18n on GAE+Django

2008-10-20 Thread A . TNG

On Mon, Oct 20, 2008 at 8:41 AM, Alexander Orlov
<[EMAIL PROTECTED]> wrote:
>
> On Sep 22, 4:00 pm, A.TNG <[EMAIL PROTECTED]> wrote:
>> Originally in Django, locale could be set via session. But GAE cannot
>> work with session in Django. So I tried to set
>> settings.LANGUAGE_CODE='zh-cn' directly to make i18n works
>> dynamically. It works.
>
> I have found some interesting information regarding the "settings
> object":
> "
> *Altering settings at runtime*
> You shouldn't alter settings in your applications at runtime.
> [...] The only place you should assign to settings is in a settings
> file.
> "
> See http://www.djangoproject.com/documentation/0.96/settings/ for more
> information!
>
> Btw Tang, as I have already told you in a mail, I could not set the
> LANGUAGE_CODE *dynamically*.
> E.g.
> settings.LANGUAGE_CODE =  self.request.query_string
> does not work and after I have read the information above, the
> settings should not be set this way.

Oh, I made a mistake. I'm not familiar with Django. So, I thought it
would work at first.

Now, I have no idea how to make i18n work dynamically. If I in a pure
Django Environment, session, cookie are both used to change language.
But, How could it be done in webapp framework?

Do you have any idea? I meet some similar problems in my project too.

>
> Best Regards
> Alex







-- 
Best Regards,
TANG Jiyu

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Sample code of i18n on GAE+Django

2008-09-22 Thread A . TNG

On Mon, Sep 15, 2008 at 11:53 AM, Mathieu <[EMAIL PROTECTED]> wrote:
>
> Hi TNG,
>
> I used your sample code and I have been able to create localization
> files for my application and make them work properly.
>
> The only problem I have now is that I dont know how to switch between
> each languages without hard-coding it in the settings file.
>
> I want users to be able to choose the locale they want to use.
>
> The only way I have read about involves the django middleware, but I
> dont believe I could succceed in making it work. I have failed over
> and over at moving my app to django 1.0

Originally in Django, locale could be set via session. But GAE cannot
work with session in Django. So I tried to set
settings.LANGUAGE_CODE='zh-cn' directly to make i18n works
dynamically. It works.

Maybe there are some other ways.

I never tried Django 1.0. All above is based on GAE built-in Django 0.96.1.


>
> Thanks
>
> On Sep 9, 12:41 am, A.TNG <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I find another way to use django's i18n middleware.
>>
>> The story is that you already have a app based on webapp framework and
>> you want to make it support i18n.
>>
>> 1. you still need to create your .po and .mo files and put them under
>> appproj/locale/{locale, eg: zh_CN}/LC_MESSAGES/
>> 2. add settings.py to appproj/
>> 3. modify your main.py and import several django modules.
>> 4. Now, you could use _() in .py and {% trans "" %} in template. You
>> could follow your webapp way, no need to change to django way.
>>
>> For detail information, you could check attached code sample.  Enjoy :-)
>>
>> --
>> Best Regards,
>> TANG Jiyu
>>
>>  webappi18n.zip
>> 7KViewDownload
>
> >
>



-- 
Best Regards,
TANG Jiyu

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Sample code of i18n on GAE+Django

2008-09-07 Thread A . TNG

On Sun, Sep 7, 2008 at 3:07 PM, Pierre <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I must be a fool. I decompresses your zip then run ./dev_appserver
> i18nsample and it worked 'translated 'Hello' to 'Bonjour' ;-)
>
> So, :
> - I take your setting.py and put it in my application's directory.
> (Note I already have django.po in 'myapp/locale/fr/LC_MESSAGES/
> django.po' and ran compile-messages)
> - run ./dev_appserver
>
> Nothing ... ???/.§?§  No translation.
>
> Any hint ?

I have no idea. Could you send me your project? Maybe I will find any clue.
>
> Pierre
>
> On 7 sep, 04:12, A.TNG <[EMAIL PROTECTED]> wrote:
>> On Sun, Sep 7, 2008 at 5:29 AM, Davide Rognoni <[EMAIL PROTECTED]> wrote:
>>
>> > Yes you can :-) but I don't know where is the [button] to add files.
>> > I'm posting from web...
>>
>> I use Gmail to check this group. So I could send a email to this group
>> with attachments.
>>
>>
>>
>>
>>
>> > On Sep 6, 5:01 pm, A.TNG <[EMAIL PROTECTED]> wrote:
>> >> On 9/6/08, Davide Rognoni <[EMAIL PROTECTED]> wrote:
>>
>> >> > How can you add "i18sample.zip" to the post?
>>
>> >> I just want to share the sample code. Anything wrong? File size is only 
>> >> 9k.
>>
>> >> > On Sep 6, 4:21 pm, A.TNG <[EMAIL PROTECTED]> wrote:
>> >> >> Hi All,
>>
>> >> >> Finally, I could make i18n work on GAE now (with built-in Django
>> >> >> 0.96.1). Please check attached ZIP file. Set LANGUAGE_CODE in
>> >> >> settings.py to get different locale.
>>
>> >> >> Enjoy. :-)
>>
>> >> >> --
>> >> >> Best Regards,
>> >> >> TANG Jiyu
>>
>> >> >>  i18nsample.zip
>> >> >> 9KViewDownload
>>
>> >> --
>> >> Best Regards,
>> >> TANG Jiyu
>>
>> --
>> Best Regards,
>> TANG Jiyu
> >
>



-- 
Best Regards,
TANG Jiyu

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Sample code of i18n on GAE+Django

2008-09-06 Thread A . TNG

On Sun, Sep 7, 2008 at 5:29 AM, Davide Rognoni <[EMAIL PROTECTED]> wrote:
>
> Yes you can :-) but I don't know where is the [button] to add files.
> I'm posting from web...

I use Gmail to check this group. So I could send a email to this group
with attachments.
>
> On Sep 6, 5:01 pm, A.TNG <[EMAIL PROTECTED]> wrote:
>> On 9/6/08, Davide Rognoni <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>> > How can you add "i18sample.zip" to the post?
>>
>> I just want to share the sample code. Anything wrong? File size is only 9k.
>>
>>
>>
>>
>>
>> > On Sep 6, 4:21 pm, A.TNG <[EMAIL PROTECTED]> wrote:
>> >> Hi All,
>>
>> >> Finally, I could make i18n work on GAE now (with built-in Django
>> >> 0.96.1). Please check attached ZIP file. Set LANGUAGE_CODE in
>> >> settings.py to get different locale.
>>
>> >> Enjoy. :-)
>>
>> >> --
>> >> Best Regards,
>> >> TANG Jiyu
>>
>> >>  i18nsample.zip
>> >> 9KViewDownload
>>
>> --
>> Best Regards,
>> TANG Jiyu
> >
>



-- 
Best Regards,
TANG Jiyu

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Sample code of i18n on GAE+Django

2008-09-06 Thread A . TNG

On 9/6/08, Davide Rognoni <[EMAIL PROTECTED]> wrote:
>
> How can you add "i18sample.zip" to the post?

I just want to share the sample code. Anything wrong? File size is only 9k.
>
> On Sep 6, 4:21 pm, A.TNG <[EMAIL PROTECTED]> wrote:
>> Hi All,
>>
>> Finally, I could make i18n work on GAE now (with built-in Django
>> 0.96.1). Please check attached ZIP file. Set LANGUAGE_CODE in
>> settings.py to get different locale.
>>
>> Enjoy. :-)
>>
>> --
>> Best Regards,
>> TANG Jiyu
>>
>>  i18nsample.zip
>> 9KViewDownload
> >
>


-- 
Best Regards,
TANG Jiyu

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: How can I support multilingual interfaces in GAE?

2008-09-06 Thread A . TNG

On Mon, Jun 23, 2008 at 10:31 PM, Takashi Matsuo
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Perhaps you can use django's i18n capability. In my case, it worked perfectly.
>
> Please see:
> http://www.djangoproject.com/documentation/i18n/
> or
> http://www.djangoproject.com/documentation/0.96/i18n/
> according to the django's version.
>
> Happy coding :-)

Hi,

Following is my settings.py:

# Django settings for the example project.

DEBUG = True
TEMPLATE_DEBUG = DEBUG
ROOT_URLCONF = 'urls'

import os
ROOT_PATH = os.path.dirname(__file__)
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or
# "C:/www/django/templates".  Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
ROOT_PATH + '/templates',
)

MIDDLEWARE_CLASSES = (
#'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
)

LANGUAGE_CODE = 'zh-cn'

INSTALLED_APPS = (
#'django_hello.hello',
#'django_hello.newtest'
)

But, Django's i18n module only search .mo under
"google_appengine\lib\django\django\conf\locale". I have created
folder 'locale' under myapp. But it take no effect.

Could I need one more parameter "LOCALE_PATHS" in settings.py? How to
set the value of "LOCALE_PATHS"?

Could you offer a example? Thanks.
>
> -- Takashi
>
> On Mon, Jun 23, 2008 at 11:20 PM, limodou <[EMAIL PROTECTED]> wrote:
>> On Mon, Jun 23, 2008 at 10:11 PM, slizardo <[EMAIL PROTECTED]>
>> wrote:
>>>
>>> The sure-shoot approach might be trough the use of template values
>>> with all the literals.
>>> But I would like to have something similar to a properties file *
>>> (like in Java or PHP), one for each locale.
>>> Any ideas or sample implementations?
>>>
>>> Thank you!
>>>
>>
>> I'm developing a new framework named uliweb, and it has already support i18n
>> now. maybe you can see it for some help. But I have no time to write
>> document about i18n process yet, I'll write the document as soon as I can.
>>
>> --
>> I like python!
>> UliPad <>: http://code.google.com/p/ulipad/
>> UliWeb <>: http://uliwebproject.appspot.com
>> My Blog: (new)http://http://hi.baidu.com/limodou
>> (old)http://www.donews.net/limodou
>> >
>>
>
> >
>



-- 
Best Regards,
TANG Jiyu

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Internationalize GAE webapp

2008-09-06 Thread A . TNG

On Sat, Sep 6, 2008 at 6:11 PM, Pierre <[EMAIL PROTECTED]> wrote:
>
> Cool,
>
> At least no error...
>
> I think both thread :
> http://groups.google.com/group/google-appengine/browse_thread/thread/76d96246c91812a0
>
> and this thread deals with the problem that it will be really cool to
> create a tutorial for i18n to work on gae.
>
> This will be possible if and only if at least one person succeed in
> making i18n work on gae.
>
> Tutorial could explain gae solely and gae + helper  +django i18n
> settings.
>
> For the moment, we'll need to do some more investigations to make it
> work.

Hi Pierre

Funny.

I remove the django.middleware.locale.LocaleMiddleware in
MIDDLEWARE_CLASSES, settings.py.

Now my MIDDLEWARE_CLASSES looks like this:
MIDDLEWARE_CLASSES = (
#'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
)

After that, I refresh my page. I could get the translated text. But,
these texts are only from
"google_appengine\lib\django\django\conf\locale".
Once I use text in django.mo which I defined, I get the original one.

I find I'm in the same situation as you. Interesting...

>
> Cheers,
>
> Pierre
>
> On 6 sep, 12:05, A.TNG <[EMAIL PROTECTED]> wrote:
>> On Sat, Sep 6, 2008 at 5:55 PM, Pierre <[EMAIL PROTECTED]> wrote:
>>
>> > Don't you forget to put "{% load i18n %}" at the top of your
>> > template ?
>>
>> Thanks a lot. Now, there no error message, after I add {% load i18n
>> %}. But I still cannot get translated text. :-(
>>
>>
>>
>>
>>
>> > Pierre
>>
>> > On 6 sep, 11:50, "A.TNG" <[EMAIL PROTECTED]> wrote:
>> >> On Aug 30, 8:32 pm, xavi <[EMAIL PROTECTED]> wrote:
>>
>> >> > I also have the same problem. Did you solve it?
>> >> > I tried what manatlan said, but it didn't help; anyway, it's not only
>> >> > _() that doesn't work as expected but it also happens with the {%
>> >> > trans %} template tag.
>>
>> >> Me too. When I use _(), the page only displays the original text, not
>> >> the translation one. But when I use {% trans %}, I get following error
>> >> message:
>>
>> >> Template error
>>
>> >> In template E:\workspace\django_start_app/templates\tpli.html, error
>> >> at line 1
>> >> Invalid block tag: 'trans'
>> >> 1   {% trans "English" %}
>>
>> >> BTW: I tried this on AppEngine SDK with built-in django 0.96.1.
>>
>> >> Any one could help on this? Thanks in  advance.
>>
>> >> > xavi
>>
>> >> > On Jul 18, 9:52 pm, Pau <[EMAIL PROTECTED]> wrote:
>>
>> >> > > I write the internationalization following the django documentation 
>> >> > > inhttp://www.djangoproject.com/documentation/0.96/i18n/
>>
>> >> > > If I write a "pure" django application, it work correctly. But if I
>> >> > > write a "pure" GAE (webapp) it's not work.
>>
>> >> > > Specifically:
>>
>> >> > > - The default translations writing in ...\django\conf\locale work
>> >> > > correctly. For example:
>> >> > > msg = _("English") is translate ok.
>>
>> >> > > - But I translate my text, for example msg = _("my web is beautiful"),
>> >> > > it's not translating.
>>
>> >> > > I follow the same steps as before: I create the translation files (.mo
>> >> > > nd .po) in my GAE project using make-messages.py and compile-
>> >> > > messages.py and I located them in {project}\locale\{locale}
>> >> > > \LC_MESSAGES directory, but it don't work. It's as if the translation
>> >> > > not existing or not found.
>>
>> >> > > Do you have any idea?
>>
>> >> > > Thanks
>>
>> --
>> Best Regards,
>> TANG Jiyu
> >
>



-- 
Best Regards,
TANG Jiyu

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Internationalize GAE webapp

2008-09-06 Thread A . TNG

On Sat, Sep 6, 2008 at 6:15 PM, Davide Rognoni <[EMAIL PROTECTED]> wrote:
>
> Yes, the message is relevant, because this is the best way to all
> languages translation :-P

It is a cool way. But not exactly what we want.

Still thanks. :-)
>
> On Sep 6, 12:05 pm, Pierre <[EMAIL PROTECTED]> wrote:
>> Sorry,
>>
>> Is your message relevant with the topic ?
>> Est ton message pertinent par rapport au sujet ?
>>
>> Thanks
>> Merci,
>>
>> Pierre
>>
>> On 6 sep, 12:02, Davide Rognoni <[EMAIL PROTECTED]> wrote:
>>
>> > "Le meilleur moteur de 
>> > calibre"http://babelfish.yahoo.com/translate_url?doit=done&tt=url&intl=1&fr=b...
>> > .
>> > .
>> > .
>> > -- Best Template Enginehttp://pyoohtml.appspot.com/best-template-engine
>> > .
>> > .
>> > .
>> > On Jul 18, 9:52 pm, Pau <[EMAIL PROTECTED]> wrote:
>>
>> > > I write the internationalization following the django documentation 
>> > > inhttp://www.djangoproject.com/documentation/0.96/i18n/
>>
>> > > If I write a "pure" django application, it work correctly. But if I
>> > > write a "pure" GAE (webapp) it's not work.
>>
>> > > Specifically:
>>
>> > > - The default translations writing in ...\django\conf\locale work
>> > > correctly. For example:
>> > > msg = _("English") is translate ok.
>>
>> > > - But I translate my text, for example msg = _("my web is beautiful"),
>> > > it's not translating.
>>
>> > > I follow the same steps as before: I create the translation files (.mo
>> > > nd .po) in my GAE project using make-messages.py and compile-
>> > > messages.py and I located them in {project}\locale\{locale}
>> > > \LC_MESSAGES directory, but it don't work. It's as if the translation
>> > > not existing or not found.
>>
>> > > Do you have any idea?
>>
>> > > Thanks
> >
>



-- 
Best Regards,
TANG Jiyu

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Internationalize GAE webapp

2008-09-06 Thread A . TNG

On Sat, Sep 6, 2008 at 6:11 PM, Pierre <[EMAIL PROTECTED]> wrote:
>
> Cool,
>
> At least no error...
>
> I think both thread :
> http://groups.google.com/group/google-appengine/browse_thread/thread/76d96246c91812a0
>
> and this thread deals with the problem that it will be really cool to
> create a tutorial for i18n to work on gae.
>
> This will be possible if and only if at least one person succeed in
> making i18n work on gae.
>
> Tutorial could explain gae solely and gae + helper  +django i18n
> settings.
>
> For the moment, we'll need to do some more investigations to make it
> work.

Totally agree with you.  :-)

One friend send me a link about appenginepatch. It seems I would find
some useful information there.

> Cheers,
>
> Pierre
>
> On 6 sep, 12:05, A.TNG <[EMAIL PROTECTED]> wrote:
>> On Sat, Sep 6, 2008 at 5:55 PM, Pierre <[EMAIL PROTECTED]> wrote:
>>
>> > Don't you forget to put "{% load i18n %}" at the top of your
>> > template ?
>>
>> Thanks a lot. Now, there no error message, after I add {% load i18n
>> %}. But I still cannot get translated text. :-(
>>
>>
>>
>>
>>
>> > Pierre
>>
>> > On 6 sep, 11:50, "A.TNG" <[EMAIL PROTECTED]> wrote:
>> >> On Aug 30, 8:32 pm, xavi <[EMAIL PROTECTED]> wrote:
>>
>> >> > I also have the same problem. Did you solve it?
>> >> > I tried what manatlan said, but it didn't help; anyway, it's not only
>> >> > _() that doesn't work as expected but it also happens with the {%
>> >> > trans %} template tag.
>>
>> >> Me too. When I use _(), the page only displays the original text, not
>> >> the translation one. But when I use {% trans %}, I get following error
>> >> message:
>>
>> >> Template error
>>
>> >> In template E:\workspace\django_start_app/templates\tpli.html, error
>> >> at line 1
>> >> Invalid block tag: 'trans'
>> >> 1   {% trans "English" %}
>>
>> >> BTW: I tried this on AppEngine SDK with built-in django 0.96.1.
>>
>> >> Any one could help on this? Thanks in  advance.
>>
>> >> > xavi
>>
>> >> > On Jul 18, 9:52 pm, Pau <[EMAIL PROTECTED]> wrote:
>>
>> >> > > I write the internationalization following the django documentation 
>> >> > > inhttp://www.djangoproject.com/documentation/0.96/i18n/
>>
>> >> > > If I write a "pure" django application, it work correctly. But if I
>> >> > > write a "pure" GAE (webapp) it's not work.
>>
>> >> > > Specifically:
>>
>> >> > > - The default translations writing in ...\django\conf\locale work
>> >> > > correctly. For example:
>> >> > > msg = _("English") is translate ok.
>>
>> >> > > - But I translate my text, for example msg = _("my web is beautiful"),
>> >> > > it's not translating.
>>
>> >> > > I follow the same steps as before: I create the translation files (.mo
>> >> > > nd .po) in my GAE project using make-messages.py and compile-
>> >> > > messages.py and I located them in {project}\locale\{locale}
>> >> > > \LC_MESSAGES directory, but it don't work. It's as if the translation
>> >> > > not existing or not found.
>>
>> >> > > Do you have any idea?
>>
>> >> > > Thanks
>>
>> --
>> Best Regards,
>> TANG Jiyu
> >
>



-- 
Best Regards,
TANG Jiyu

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Internationalize GAE webapp

2008-09-06 Thread A . TNG

On Sat, Sep 6, 2008 at 5:55 PM, Pierre <[EMAIL PROTECTED]> wrote:
>
> Don't you forget to put "{% load i18n %}" at the top of your
> template ?

Thanks a lot. Now, there no error message, after I add {% load i18n
%}. But I still cannot get translated text. :-(

>
> Pierre
>
> On 6 sep, 11:50, "A.TNG" <[EMAIL PROTECTED]> wrote:
>> On Aug 30, 8:32 pm, xavi <[EMAIL PROTECTED]> wrote:
>>
>> > I also have the same problem. Did you solve it?
>> > I tried what manatlan said, but it didn't help; anyway, it's not only
>> > _() that doesn't work as expected but it also happens with the {%
>> > trans %} template tag.
>>
>> Me too. When I use _(), the page only displays the original text, not
>> the translation one. But when I use {% trans %}, I get following error
>> message:
>>
>> Template error
>>
>> In template E:\workspace\django_start_app/templates\tpli.html, error
>> at line 1
>> Invalid block tag: 'trans'
>> 1   {% trans "English" %}
>>
>> BTW: I tried this on AppEngine SDK with built-in django 0.96.1.
>>
>> Any one could help on this? Thanks in  advance.
>>
>> > xavi
>>
>> > On Jul 18, 9:52 pm, Pau <[EMAIL PROTECTED]> wrote:
>>
>> > > I write the internationalization following the django documentation 
>> > > inhttp://www.djangoproject.com/documentation/0.96/i18n/
>>
>> > > If I write a "pure" django application, it work correctly. But if I
>> > > write a "pure" GAE (webapp) it's not work.
>>
>> > > Specifically:
>>
>> > > - The default translations writing in ...\django\conf\locale work
>> > > correctly. For example:
>> > > msg = _("English") is translate ok.
>>
>> > > - But I translate my text, for example msg = _("my web is beautiful"),
>> > > it's not translating.
>>
>> > > I follow the same steps as before: I create the translation files (.mo
>> > > nd .po) in my GAE project using make-messages.py and compile-
>> > > messages.py and I located them in {project}\locale\{locale}
>> > > \LC_MESSAGES directory, but it don't work. It's as if the translation
>> > > not existing or not found.
>>
>> > > Do you have any idea?
>>
>> > > Thanks
> >
>



-- 
Best Regards,
TANG Jiyu

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---