找回密码
 新注册用户
搜索
查看: 13671|回复: 17

[已完成翻译] [BOINC 开发文档]Web site 部分

[复制链接]
发表于 2006-3-31 12:46:06 | 显示全部楼层 |阅读模式
待翻译的页面列表见:http://boinc.berkeley.edu/create_project.php
http://boinc.equn.com/dev/create_project.html

Web site

  ·Managing the project web site       ——>感谢 chuan_y 翻译!
  ·Add project-specific links to the client GUI       ——>感谢 chuan_y 翻译!
  ·Web site translation       ——>感谢 chuan_y、碧城仙 翻译!
  ·Server status page       ——>感谢 碧城仙 翻译!
回复

使用道具 举报

 楼主| 发表于 2006-3-31 12:49:57 | 显示全部楼层
翻译 Server status page 页面:http://boinc.berkeley.edu/sstatus.php

Server status
服务器状态

  Each project should export its server status in two forms:
每个项目都应该以下面的两种形式来发布其服务状态:

  ·URL/server_status.php: human-readable (web page).
以网页的形式,提供浏览。

  ·URL/server_status.php?xml=1: XML format, as follows:
以 XML 格式存放,如下所示:

       ...................................
          (中间部分省略)

There are two ways to do this:
有两种实现方法:

1、Copy the file server_status.php from html/ops to html/user. This works fine as long as you don't need any customization, and the DB queries in the page only take a few seconds (the page is cached, so they are done infrequently).

从 html/ops 端将 server_status.php 文件复制到 html/user 端。如果您不需要专门定制显示外观,那么仅仅通过复制就可以了,并且网页中数据库调用过程只需要几秒钟而已(页面从缓存中读取,所以数据库调用的频率也很低)。

2、Write a periodic script that generates the 2 pages as files, and put a script in user/server_status.php that echoes one file or the other.
编写一个可周期性执行的脚本,来将状态文件内容生成 2 个网页,然后将脚本放在 user/server_status.php 中,供参与者查看。

评分

参与人数 1维基拼图 +10 收起 理由
霊烏路 空 + 10

查看全部评分

回复

使用道具 举报

 楼主| 发表于 2006-3-31 18:47:25 | 显示全部楼层
翻译 Web site translation 页面:http://boinc.berkeley.edu/translation.php

PS. 终于知道网站内容翻译的源文件是放在哪里的了,请看这里:http://setiathome.berkeley.edu/c ... uages/translations/  ,这里有所有的语言版本的 po 文件,再看这里:http://setiathome.berkeley.edu/c ... anslations/zh_CN.po ,中文的来了,可以下载后修改,如果要上传,是需要发邮件给 translate at boinc.berkeley.edu 的。

Web and GUI translations
网站和图形用户界面的翻译

BOINC has a mechanism for non-English translations of
BOINC 对于非英语语种的翻译包括以下部分:

·The BOINC Manager
BOINC Manager(BOINC 管理程序)菜单界面
·The BOINC-supplied portion of project web sites (e.g. the account-creation pages)
由 BOINC 统一提供给项目网站的其他语言版本(例如:创建帐户页面)
·The project-specific parts of project web sites
项目网站的某些细节内容

We encourage volunteers to do these translations. If you're interested, please see the instructions at the bottom of this page.
我们鼓励志愿者进行这方面的翻译。如果您对此有兴趣,请参阅本页最下面的详细介绍。

Translation files
翻译文件

All translations are based on translation files. Translation files are in PO format, which is described here. These have names like 'da.po' (Danish) and 'en.po' (English). It's very simple. For example:
所有的翻译都是基于文件的翻译。翻译文件采用 PO 格式,对该格式的详细介绍请参阅这里。这些文件的名称类似于“da.po”(丹麦语)和“en.po”(英语)。文件结构很简单。例如:

en.po (English)
以下内容省略.................

da.po (Danish)
以下内容省略.................

Translatable web pages
翻译网页

Translatable web pages must be PHP, and must include
翻译的网页文件必须是 PHP 格式的,而且必须包含以下内容:

require_once("../inc/translation.inc");

Literal text is replaced with tr(TOKEN), where TOKEN is a short string representing the text. For example,
逐字逐句的替换为 tr(TOKEN),其中 TOKEN 是文本字符串的标记符号。例如:

page_head("Current version");

is replaced with   
被替换为

page_head(tr(APPS_VERSION));

For BOINC projects, the directory html/user/translations contains a number of 'translation files'. When a person accesses the page, the browser passes a list of languages. The BOINC PHP code finds the first of these languages for which a translation is available, or English if none. As the page is generated, each call to tr() replaces the token with the corresponding translated text.
In developing web pages, keep in mind that word order differs between languages, so you should avoid breaking a sentence up into multiple translation units. For example, use constructs like

对 BOINC 项目网站而言,在“html/user/translations”目录下包含了许多有待翻译的“翻译文件”。当用户进入该网页后,浏览器将检测已存在的语言文件。BOINC 的 PHP 代码将自动搜寻与计算机系统语言相匹配的语言文件,如果不存在相应的文件,则语言自动选择为英语。在生成页面时,调用 tr() 相应的替换已翻译好的文本。在网页开发过程中,请注意不同语言版本中的命令字的不同,所以您必须避免将一句话分割成多个单元。例如,使用像下面这样的结构:

未完...........

PS. 本帖翻译对应中文页面: http://boinc.equn.com/dev/translation.html

评分

参与人数 2基本分 +90 维基拼图 +70 收起 理由
BiscuiT + 90 + 50
霊烏路 空 + 20

查看全部评分

回复

使用道具 举报

发表于 2006-3-31 19:54:58 | 显示全部楼层
我当时就是发给translate at boinc.berkeley.edu的,结果没有回音....应该是发送到boinc_loc邮件列表:)
回复

使用道具 举报

头像被屏蔽
发表于 2006-5-30 11:12:05 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

头像被屏蔽
发表于 2006-5-30 11:16:53 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

头像被屏蔽
发表于 2006-5-31 18:00:18 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

头像被屏蔽
发表于 2006-6-7 18:48:26 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

头像被屏蔽
发表于 2006-6-7 18:51:45 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

 楼主| 发表于 2006-6-19 12:15:14 | 显示全部楼层
本帖内 4 个页面均已上传。对部分文字做了修改。欢迎访问,欢迎查错。

http://boinc.equn.com/dev/gui_urls.html
http://boinc.equn.com/dev/web.html
http://boinc.equn.com/dev/translation.html
http://boinc.equn.com/dev/sstatus.html
回复

使用道具 举报

头像被屏蔽
发表于 2006-6-19 17:13:59 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

 楼主| 发表于 2006-6-23 10:38:39 | 显示全部楼层
已修改,Web site 页面里的几个小标题总觉得不贴切,但是我也想不出更好的翻译。等其他人的修改建议吧。
回复

使用道具 举报

发表于 2006-6-23 11:27:07 | 显示全部楼层
直接翻译?

管理项目站点
在客户端添加项目网址
网站及客户端翻译
服务器状态页面
回复

使用道具 举报

发表于 2007-3-7 13:58:43 | 显示全部楼层

翻译: 原文:http://boinc.berkeley.edu/make_project.php

原文:http://boinc.berkeley.edu/make_project.php
[english version] last modified at 2007-03-07 13:57


The make_project script  
MAKE_PROJECT 脚本
     

--------------------------------------------------------------------------------

The make_project script creates the server components of a BOINC project. To use it, set up a BOINC server. Then, for example, type:
MAKE_PROJECT脚本用来建立BOINC项目的服务器组件。用它来建立BOINC服务器。例如,输入:
    cd tools/
    ./make_project cplan

creates a project with master URL http://<hostname>/cplan/ whose directory structure is rooted at $HOME/projects/cplan.
建立实际目录在$HOME/projects/cplan,主地址在URL http://<hostname>/cplan/的项目。

More specifically, make_project does the following:

Create the project directory and its subdirectories.
Create the project's encryption keys if necessary. NOTE: before making the project visible to the public, you must move the code-signing private key to a highly secure (preferably non-networked) host, and delete it from the server host.
Create and initialize the MySQL database
Copy source and executable files
Generate the project's configuration file.
具体说明如下:
建立项目目录和子目录。
如果需要,建立项目的加密密钥。注意:在项目被发布之前,你需要将"代码签字私有密钥"存放到高度安全(最好没有网络连接)的主机上,并且从服务器主机上删除。
建立并初始化MYSQL数据库。
考备源文件和可执行文件。
产生项目配置文件。


The script gives further instructions, namely
It generates a template Apache config file that you can insert into /etc/apache/httpd.conf (path varies), or Include directly.
It generates a crontab line to paste.

The command-line syntax is as follows:
make_project [options] project_name [ 'Project Long Name ' ]

此脚本给出了进一步用法说明,换句话说
它产生了直接可以放到/etc/apache/httpd.conf(path varies)中的Apache配置文件,或者直接包含。
命令行语法如下所示:
make_project [options] project_name [ 'Project Long Name ' ]


Options are as follows (normally you don't need to include any of them):
directory options
--project_root Project root directory path. Default: $HOME/projects/PROJECT_NAME
--key_dir Where keys are stored. Default: PROJECT_ROOT/keys
--url_base Determines master URL Default: http://$NODENAME/
--no_query Accept all directories without yes/no query
--delete_prev_inst Delete project-root first (from prev installation)
URL options
--html_user_url User URL. Default: URL_BASE/PROJECT/
--html_ops_url Admin URL. Default: URL_BASE/PROJECT_ops/
--cgi_url CGI URL. Default: URL_BASE/PROJECT_cgi/
database options
--db_host Database host. Default: none (this host)
--db_name Database name. Default: PROJECT
--db_user Database user. Default: current user
--db_passwd Database password. Default: None
--drop_db_first Drop database first (from prev installation)
debugging options
--verbose={0,1,2} default: 1
-v alias for --verbose=2
-h or --help Show options

参数据选项如下(通常不需要包含任何参数):
目录参数
--project_root           指定项目根目录。 缺省为: $HOME/projects/PROJECT_NAME
--key_dir                密钥存储路径。缺省为:PROJECT_ROOT/keys
--url_base               指定主URL地址 缺省为:http://$NODENAME/
--no_query               不提示 yes/no 询问
--delete_prev_inst       首先清空项目根目录(从前一次安装)
URL参数
--html_user_url          用户URL。 缺省为:URL_BASE/PROJECT/
--html_ops_url           管理员URL。缺省为:URL_BASE/PROJECT_ops/
--cgi_url                CGI URL. 缺省为:URL_BASE/PROJECT_cgi/
数据库参数
--db_host                数据库主机。缺省为:当前主机
--db_name                数据库名称。缺省为:项目名称
--db_user                数据库用户。缺省为:当前用户
--db_passwd Database password. Default: None
--drop_db_first          首先删除数据库(从前一次安装)
调试参数
--verbose={0,1,2}     缺省为:1
-v                       参数--verbose=2别名
-h或--help               显示参数

评分

参与人数 2基本分 +40 维基拼图 +32 收起 理由
BiscuiT + 40 + 20
霊烏路 空 + 12

查看全部评分

回复

使用道具 举报

七星瓢虫 该用户已被删除
发表于 2007-4-16 16:05:35 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 新注册用户

本版积分规则

论坛官方淘宝店开业啦~

Archiver|手机版|小黑屋|中国分布式计算总站 ( 沪ICP备05042587号 )

GMT+8, 2024-4-24 14:05

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表