translation

This commit is contained in:
wlx 2013-11-10 15:08:12 +00:00
parent 10008f2245
commit d51e7a38ff
1 changed files with 32 additions and 32 deletions

View File

@ -28,7 +28,7 @@ class MetadataPDF extends PDF_Unicode
$this->Image('http://westdc.westgis.ac.cn/images/westdc_logo_white.gif',80,30,0,0,'','http://westdc.westgis.ac.cn/'); $this->Image('http://westdc.westgis.ac.cn/images/westdc_logo_white.gif',80,30,0,0,'','http://westdc.westgis.ac.cn/');
$this->SetFont('uGB','B',20); $this->SetFont('uGB','B',20);
$this->setXY(0,70); $this->setXY(0,70);
$this->Cell(0,0,'寒区旱区科学数据中心',0,2,'C',false,'http://westdc.westgis.ac.cn/'); $this->Cell(0,0,'Cold and Arid Regions Science Data Center',0,2,'C',false,'http://card.westgis.ac.cn/');
$imgurl='http://'.$_SERVER['SERVER_NAME'].'/service/bigthumb/uuid/'.$this->metadata['uuid']; $imgurl='http://'.$_SERVER['SERVER_NAME'].'/service/bigthumb/uuid/'.$this->metadata['uuid'];
$imgsize=getimagesize($imgurl); $imgsize=getimagesize($imgurl);
if ($this->metadata['filetype'] && $imgsize) if ($this->metadata['filetype'] && $imgsize)
@ -44,7 +44,7 @@ class MetadataPDF extends PDF_Unicode
//$this->setFont('Arial','',12); //$this->setFont('Arial','',12);
$this->ln(10); $this->ln(10);
$this->SetFont('uGB','B',12); $this->SetFont('uGB','B',12);
$this->Cell(0,0,'UUID: '.$this->metadata['uuid'],0,2,'C',false,'http://westdc.westgis.ac.cn/data/'.$this->metadata['uuid']); $this->Cell(0,0,'UUID: '.$this->metadata['uuid'],0,2,'C',false,'http://card.westgis.ac.cn/data/'.$this->metadata['uuid']);
} }
function DrawContent() function DrawContent()
@ -61,46 +61,46 @@ class MetadataPDF extends PDF_Unicode
$this->ln(10); $this->ln(10);
$this->setfont('uGB','',10); $this->setfont('uGB','',10);
$this->setFillColor(200,200,200); $this->setFillColor(200,200,200);
$this->Cell(0,8,' 摘要',0,1,'L',true); $this->Cell(0,8,' Abstract',0,1,'L',true);
//$this->write(5,$this->metadata['description']); //$this->write(5,$this->metadata['description']);
$this->DrawTable($this->metadata['description']); $this->DrawTable($this->metadata['description']);
//todo: table in abstract //todo: table in abstract
$this->ln(5); $this->ln(5);
$this->Cell(0,8,' 关键词',0,1,'L',true); $this->Cell(0,8,' Keywords',0,1,'L',true);
$this->write(5,'主题:'.$this->metadata['keyword']['theme']); $this->write(5,'Theme: '.$this->metadata['keyword']['theme']);
$this->ln(5); $this->ln(5);
$this->write(5,'位置:'.$this->metadata['keyword']['place']); $this->write(5,'Place: '.$this->metadata['keyword']['place']);
$this->ln(5); $this->ln(5);
$this->write(5,'时间:'.$this->metadata['keyword']['temporal']); $this->write(5,'Temporal: '.$this->metadata['keyword']['temporal']);
$this->ln(5); $this->ln(5);
$this->write(5,'学科:'.$this->metadata['keyword']['discipline']); $this->write(5,'Discipline: '.$this->metadata['keyword']['discipline']);
$this->ln(5); $this->ln(5);
$this->write(5,'地层:'.$this->metadata['keyword']['stratum']); $this->write(5,'Statrum: '.$this->metadata['keyword']['stratum']);
$this->ln(5); $this->ln(5);
$this->Cell(0,8,' 数据分类',0,1,'L',true); $this->Cell(0,8,' ISO 19115 Category',0,1,'L',true);
$this->write(5,'分类:'.$this->metadata['category'].' '.$this->metadata['category_zh']); $this->write(5,'Category: '.$this->metadata['category']);
$this->ln(5); $this->ln(5);
$this->Cell(0,8,' 数据细节',0,1,'L',true); $this->Cell(0,8,' Detail',0,1,'L',true);
if ($this->metadata['rfdenom']) if ($this->metadata['rfdenom'])
{ {
$this->write(5,'比例尺:'.$this->metadata['rfdenom']); $this->write(5,'Scale: '.$this->metadata['rfdenom']);
$this->ln(5); $this->ln(5);
} }
if ($this->metadata['resolution']) if ($this->metadata['resolution'])
{ {
$this->write(5,'分辨率:'.$this->metadata['resolution']); $this->write(5,'Resolution: '.$this->metadata['resolution']);
$this->ln(5); $this->ln(5);
} }
$this->write(5,'投影:'.$this->metadata['projection']); $this->write(5,'Project: '.$this->metadata['projection']);
$this->ln(5); $this->ln(5);
$this->write(5,'数据大小(MB)'.$this->metadata['filesize']); $this->write(5,'Data Volume(MB): '.$this->metadata['filesize']);
$this->ln(5); $this->ln(5);
$this->write(5,'数据格式:'.$this->metadata['fileformat']); $this->write(5,'Data Format: '.$this->metadata['fileformat']);
$this->ln(5); $this->ln(5);
$this->Cell(0,8,' 缩略图和空间范围',0,1,'L',true); $this->Cell(0,8,' Position and Thumbnail',0,1,'L',true);
$this->ln(5); $this->ln(5);
$x=$this->getX();$y=$this->getY(); $x=$this->getX();$y=$this->getY();
$w=50*abs(($this->metadata['north']-$this->metadata['south'])/($this->metadata['west']-$this->metadata['east'])); $w=50*abs(($this->metadata['north']-$this->metadata['south'])/($this->metadata['west']-$this->metadata['east']));
@ -116,46 +116,46 @@ class MetadataPDF extends PDF_Unicode
$this->write(5,'S:'.$this->metadata['south']); $this->write(5,'S:'.$this->metadata['south']);
$this->ln(5); $this->ln(5);
$this->Cell(0,8,' 时间范围',0,1,'L',true); $this->Cell(0,8,' Temporal Range',0,1,'L',true);
$this->write(5,'开始时间:'.$this->metadata['timebegin']); $this->write(5,'Start: '.$this->metadata['timebegin']);
$this->ln(5); $this->ln(5);
$this->write(5,'结束时间:'.$this->metadata['timeend']); $this->write(5,'End: '.$this->metadata['timeend']);
$this->ln(5); $this->ln(5);
$this->Cell(0,8,' 本数据引用方式',0,1,'L',true); $this->Cell(0,8,' Citation',0,1,'L',true);
$this->write(5,$this->metadata['citation']); $this->write(5,$this->metadata['citation']);
$this->ln(5); $this->ln(5);
$this->Cell(0,8,' 建议参考文献',0,1,'L',true); $this->Cell(0,8,' Recommended Publications',0,1,'L',true);
$this->write(5,$this->metadata['reference']); $this->write(5,$this->metadata['reference']);
//$this->ln(5); //$this->ln(5);
$this->Cell(0,8,' 数据DOI',0,1,'L',true); $this->Cell(0,8,' DOI',0,1,'L',true);
$this->write(5,$this->metadata['doi']); $this->write(5,$this->metadata['doi']);
$this->ln(5); $this->ln(5);
$this->Cell(0,8,' 项目支持信息',0,1,'L',true); $this->Cell(0,8,' Funding',0,1,'L',true);
$this->write(5,$this->metadata['suppinfo']); $this->write(5,$this->metadata['suppinfo']);
$this->ln(5); $this->ln(5);
$this->Cell(0,8,' 使用声明',0,1,'L',true); $this->Cell(0,8,' Limitation',0,1,'L',true);
$this->write(5,$this->metadata['uselimits']); $this->write(5,$this->metadata['uselimits']);
$this->Cell(0,8,' 相关链接',0,1,'L',true); $this->Cell(0,8,' Online Resources',0,1,'L',true);
foreach($this->metadata['resources'] as $k=>$r) foreach($this->metadata['resources'] as $k=>$r)
{ {
$this->write(5,($k+1).'. '.$r['name'].' '.$r['linkage'],$r['linkage']); $this->write(5,($k+1).'. '.$r['name'].' '.$r['linkage'],$r['linkage']);
$this->ln(5); $this->ln(5);
} }
$this->Cell(0,8,' 相关联系人',0,1,'L',true); $this->Cell(0,8,' Contacts',0,1,'L',true);
$party_zh=array('resourceProvider'=>'资源提供者','custodian'=>'维护者','owner'=>'拥有者','user'=>'用户','distributor'=>'数据服务联系人','originator'=>'创建者','pointOfContact'=>'联系人','principalInvestigator'=>'数据调查与处理者','processor'=>'处理者','publisher'=>'元数据发布者','author'=>'元数据作者'); $party_zh=array('resourceProvider'=>'Resource Provider','custodian'=>'Custodian','owner'=>'Owner','user'=>'User','distributor'=>'Distributor','originator'=>'Originator','pointOfContact'=>'Point of Contact','principalInvestigator'=>'Principal Investigator','processor'=>'Process','publisher'=>'Publisher','author'=>'Author');
foreach($this->metadata['contacts'] as $k=>$c) foreach($this->metadata['contacts'] as $k=>$c)
{ {
$this->write(5,($k+1).'. '.$party_zh[$c['role']]);$this->ln(5); $this->write(5,($k+1).'. '.$party_zh[$c['role']]);$this->ln(5);
$this->write(5,$c['individual'].' 单位:'.$c['organisation']);$this->ln(5); $this->write(5,$c['individual'].' Organization: '.$c['organisation']);$this->ln(5);
$this->write(5,'地址:'.$c['country'].' '.$c['administractive'].' '.$c['city'].' '.$c['delivery']);$this->ln(5); $this->write(5,'Address: '.$c['country'].' '.$c['administractive'].' '.$c['city'].' '.$c['delivery']);$this->ln(5);
$this->write(5,'邮编:'.$c['postal'].' 电话:'.$c['phone'].' 邮件:'.$c['email']); $this->write(5,'Zip code: '.$c['postal'].' Phone: '.$c['phone'].' Email: '.$c['email']);
$this->ln(5); $this->ln(5);
$this->ln(5); $this->ln(5);
} }