[Affelio-cvs 546] CVS update: affelio/apps/album

Back to archive index

Yoshihisa Fukuhara higef****@users*****
2005年 7月 6日 (水) 22:33:17 JST


Index: affelio/apps/album/Album.pm
diff -u affelio/apps/album/Album.pm:1.15 affelio/apps/album/Album.pm:1.16
--- affelio/apps/album/Album.pm:1.15	Wed Jul  6 02:12:08 2005
+++ affelio/apps/album/Album.pm	Wed Jul  6 22:33:17 2005
@@ -36,8 +36,7 @@
 our $max_entries = 3000;
 
 ##############################################
-# コンストラクタ
-# AffelioAppを渡します
+# Constructor 
 ##############################################
 
 sub new {
@@ -51,7 +50,7 @@
 	$this->{image_tb}= "album_$afap->{install_name}_images";
 	$this->{comment_tb}= "album_$afap->{install_name}_comments";
 	$this->{dbh} = undef;
-        # 初期化
+	#initialize
 
 	###########################
 	#Locale init
@@ -63,7 +62,7 @@
 	    open(TMP,"> $this->{tmpfile}");
 	    close(TMP); 	    
 	    $this->{dbh} = $afap->get_userdata_dbh();
-		# 日記テーブル
+	    #Album table
 	    my $query;
 	    $query="id INTEGER".get_query_primarykey($this)."
 			title		TEXT,
@@ -77,8 +76,7 @@
 			
 	    $this->{dbh}->do("CREATE TABLE $this->{album_tb} ($query)");
 
-		# コメントテーブル
-
+	    #Comment table
 	    $query="pkey INTEGER".get_query_primarykey($this)."
 			id		INTEGER,
 			user		TEXT,
@@ -90,8 +88,8 @@
 	    $this->{dbh}->do("CREATE TABLE $this->{comment_tb} ($query)");
 
 
-		# 画像テーブル
-#
+
+	    # Image table 
 	    $query="pkey INTEGER".get_query_primarykey($this)."
 			id		INTEGER,
 			image		TEXT,
@@ -104,11 +102,8 @@
 
 	    $this->{dbh}->do("CREATE TABLE $this->{image_tb} ($query)");
 
-#		$this->{dbh}->disconnect;
 	}
 	else {
-#	    $this->{dbh} = DBI->connect("dbi:SQLite:dbname=".$this->{dbpath})
-#			or die("cannot open db: ".$this->{dbpath});
 	    $this->{dbh} = $afap->get_userdata_dbh();
         }
 
@@ -117,8 +112,7 @@
 }
 
 ##############################################
-# デストラクタ
-# DBへの接続を閉じます
+# destructor
 ##############################################
 
 sub DESTROY {
@@ -129,7 +123,6 @@
 
 ##############################################
 # addAlbum
-# 日記に新しいエントリを追加します。
 ##############################################
 
 sub addAlbum {
@@ -144,7 +137,7 @@
 #	$contents = $this->validate_entry($id, $title, $contents);
 	$contents = $this->validate($contents);
 
-	# 二重投稿を防ぐ
+	#
 #	my @same = $this->getall("SELECT id FROM $this->{album_tb} WHERE title = $title AND contents = $contents");
 #	if($#same >= 0) { return; }
 
@@ -164,7 +157,6 @@
 
 ##############################################
 # addImage
-# アルバムDBに新しい画像データを追加します。
 ##############################################
 
 sub addImage {
@@ -177,7 +169,7 @@
 	$image = $this->validate($image);
 	$user = $this->validate($user);
 
-	# 二重投稿を防ぐ
+	#
 #	my @same = $this->getall("SELECT id FROM $this->{image_tb} WHERE title = '$title' AND comment = '$comment'");
 #	if($#same >= 0) { return; }
 	my @same = $this->getall("SELECT id FROM $this->{image_tb} WHERE id = $id AND image = $image");
@@ -192,7 +184,6 @@
 
 ##############################################
 # updateEntry
-# 指定したIDのエントリを更新します
 ##############################################
 
 sub updateEntry {
@@ -205,7 +196,6 @@
 
 ##############################################
 # updateImage
-# 指定した画像情報を更新します
 ##############################################
 
 sub updateImage {
@@ -219,7 +209,6 @@
 
 ##############################################
 # updateTimestamp
-# 指定したIDのupdate_timeを更新します
 ##############################################
 
 sub updateTimestamp {
@@ -231,7 +220,6 @@
 
 ##############################################
 # removeAlbum
-# 指定したIDのエントリとそれに対するコメントを削除します
 ##############################################
 
 sub removeAlbum {
@@ -256,7 +244,6 @@
 
 ##############################################
 # removeImage
-# 指定した画像情報を削除します。
 ##############################################
 
 sub removeImage {
@@ -275,7 +262,6 @@
 
 ##############################################
 # removeComment
-# 指定したコメント情報を削除します。
 ##############################################
 
 sub removeComment {
@@ -288,7 +274,6 @@
 
 ##############################################
 # getEntry
-# 指定したIDのエントリの内容を取得します
 ##############################################
 
 sub getEntry {
@@ -299,7 +284,6 @@
 
 ##############################################
 # getImage
-# 指定したIDとimageの内容を取得します
 ##############################################
 
 sub getImage {
@@ -320,7 +304,6 @@
 
 ##############################################
 # getNewestEntries
-# 日時に関係なく最新のエントリを取得します。
 ##############################################
 
 sub getNewestEntries {
@@ -331,7 +314,6 @@
 
 ##############################################
 # getNewestAlbumId
-# 最新アルバムのIDを取得。
 ##############################################
 
 sub getNewestAlbumId {
@@ -342,7 +324,6 @@
 
 ##############################################
 # getAllEntries
-# すべてのエントリを取得します。
 ##############################################
 
 sub getAllEntries {
@@ -353,7 +334,6 @@
 
 ##############################################
 # addComment
-# 指定したIDのエントリにコメントをつけます
 ##############################################
 
 sub addComment {
@@ -362,7 +342,7 @@
 	$user = $this->validate($user);
 	$comment = $this->validate($comment);
 	
-	# 二重投稿を防ぐ
+	#
 	my @same = $this->getall("SELECT id FROM $this->{comment_tb} WHERE user = $user AND comment = $comment");
 	if($#same >= 0) { return; }
 	
@@ -372,7 +352,6 @@
 
 ##############################################
 # getComments
-# 指定したIDのエントリに対するコメントを取得します
 ##############################################
 
 sub getComments {
@@ -382,7 +361,6 @@
 
 ##############################################
 # getCommentsNo
-# 指定したIDのエントリに対するコメント数を取得します
 ##############################################
 
 sub getCommentsNo {
@@ -409,7 +387,6 @@
 
 ##############################################
 # getRSS
-# 指定したエントリー分のRDFを取得します
 ##############################################
 
 #sub getRSS {
@@ -453,7 +430,6 @@
 
 ##############################################
 # getTrackbacks
-# 指定したエントリーのトラックバックを取得します
 ##############################################
 
 sub getTrackbacks {
@@ -486,7 +462,6 @@
 
 ##############################################
 # getTrackbacksNo
-# 指定したエントリーのトラックバックの数のみ取得します
 ##############################################
 
 sub getTrackbacksNo {
@@ -510,7 +485,6 @@
 
 ##############################################
 # getURLDescription
-# トラックバックURLを知らせるためのRDFを出力します
 ##############################################
 
 sub getURLDescription {
@@ -533,7 +507,7 @@
 	return $tmpl->output;
 }
 
-# 日記に振るユニークなIDを取得する
+# get unique ID
 #sub getID {
 #	local (*F);
 #	my $count = 0;
@@ -550,7 +524,7 @@
 #	return $count;
 #}
 
-# トラックバックPINGを自動的に飛ばす
+# put trackback ping automaticaly
 sub validate_entry {
 	my ($this, $id, $title, $contents) = @_;
 	my @urls = $contents =~ /(s?https?:\/\/[-_.!~*'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/g;
@@ -562,7 +536,7 @@
 				title => $title, 
 				excerpt => $contents, 
 				url => "$this->{afap}->{af}->{site__web_root}/apps/album/show_album.cgi?id=$id",
-				blog_name => "$this->{afap}->{af}->{user__nickname}のAffelioアルバム",
+				blog_name => "$this->{afap}->{af}->{user__nickname}",
 			);
 			my $req = POST($url, [%form]);
 			my $ua = new LWP::UserAgent;
@@ -574,7 +548,7 @@
 	return $this->validate($contents);
 }
 
-# タグ、カンマ、改行の除去
+# validate
 sub validate {
 	my ($this, $str) = @_;
 
@@ -589,7 +563,7 @@
 	return $str;
 }
 
-# クエリに合致するすべてのカラムを取得
+# get all columns
 sub getall {
 	my ($this, $query) = @_;
 
@@ -605,7 +579,7 @@
 	return @ret;
 }
 
-# 指定した月のカレンダーをとってくる
+# get calender
 sub weekly_days {
 	my ($this, $year, $mon) = @_;
 	my @weeks;
@@ -631,8 +605,8 @@
 	return @weeks;
 }
 
-# 張られたURLに対してトラックバックPINGURLを取得します
-# 参考: http://lowlife.jp/yasusii/stories/8.html
+# get trackback ping.
+# refer to http://lowlife.jp/yasusii/stories/8.html
 
 sub discover_tb {
 	my ($this, $url) = @_;
@@ -658,6 +632,7 @@
 	}
 }
 
+# get primary key for DBs
 sub get_query_primarykey {
     my ($this) = @_;
     my $DBConfig = Config::Tiny->new();
Index: affelio/apps/album/add_album.cgi
diff -u affelio/apps/album/add_album.cgi:1.3 affelio/apps/album/add_album.cgi:1.4
--- affelio/apps/album/add_album.cgi:1.3	Fri Jul  1 11:15:25 2005
+++ affelio/apps/album/add_album.cgi	Wed Jul  6 22:33:17 2005
@@ -19,7 +19,7 @@
 our $mymode="owner";
 require './common/header.pl';
 unless ($afap->get_visitor_info("type") eq "self"){
-	&errorExit("あなたはこのページにアクセスする権限がありません")
+	    &errorExit('<AF_M text="Access denied">');
         }
 
 my $tmpl = HTML::Template->new(filename => "./templates/add_album.tmpl");
@@ -32,7 +32,7 @@
 $tmpl->param(TITLE => $title);
 $tmpl->param(CONTENTS => $contents);
 
-# 投稿
+# Add new album
 if($afap->{cgi}->param("submit")) {
 	$tmpl->param(SUBMIT => "1");
 	$album->addAlbum($title, $contents, $user, $afid);
@@ -40,15 +40,16 @@
         $tmpl->param(ID => $ret->{id});
 }
 
-# 確認
+# Confirm
 elsif($afap->{cgi}->param("confirm")) {
 	$tmpl->param(CONFIRM => "1");
 }
 
-# 編集画面
+# Edit mode
 else {
 	$tmpl->param(EDIT => "1");
 }
-print $tmpl->output;
+
+print $album->translate_templateL10N( $tmpl->output );
 
 require './common/footer.pl';
Index: affelio/apps/album/delete_comment.cgi
diff -u affelio/apps/album/delete_comment.cgi:1.5 affelio/apps/album/delete_comment.cgi:1.6
--- affelio/apps/album/delete_comment.cgi:1.5	Fri Jul  1 11:15:25 2005
+++ affelio/apps/album/delete_comment.cgi	Wed Jul  6 22:33:17 2005
@@ -18,23 +18,20 @@
 
 require './common/header.pl';
 unless ($afap->get_visitor_info("type") eq "self"){
-	&errorExit("あなたはこのページにアクセスする権限がありません")
-        }
+    &errorExit('<AF_M text="Access denied">');
+}
 
 my $tmpl = HTML::Template->new(filename => "./templates/delete_comment.tmpl");
 
 my $id = $afap->{cgi}->param("id");
 my @pkey = $afap->{cgi}->param("delete_comment");
 
-#$tmpl->param(ID => $id);
-
-
-# 削除完了
+#Done
 if($afap->{cgi}->param("delete")) {
 	$album->removeComment($id, @ pkey);
-	$tmpl->param(DONE => "1", DONE_LABEL => "削除しました");
+	$tmpl->param(DONE => "1");
 }
 
-print $tmpl->output;
+print $album->translate_templateL10N( $tmpl->output );
 
 require './common/footer.pl';
Index: affelio/apps/album/delete_image.cgi
diff -u affelio/apps/album/delete_image.cgi:1.5 affelio/apps/album/delete_image.cgi:1.6
--- affelio/apps/album/delete_image.cgi:1.5	Fri Jul  1 11:15:25 2005
+++ affelio/apps/album/delete_image.cgi	Wed Jul  6 22:33:17 2005
@@ -18,7 +18,7 @@
 
 require './common/header.pl';
 unless ($afap->get_visitor_info("type") eq "self"){
-	&errorExit("あなたはこのページにアクセスする権限がありません")
+    &errorExit('<AF_M text="Access denied">');
         }
 
 my $tmpl = HTML::Template->new(filename => "./templates/delete_image.tmpl");
@@ -29,12 +29,12 @@
 #$tmpl->param(ID => $id);
 
 
-# 削除完了
+# Done
 if($afap->{cgi}->param("delete")) {
 	$album->removeImage($id, @ pkey);
-	$tmpl->param(DONE => "1", DONE_LABEL => "削除しました");
+	$tmpl->param(DONE => "1");
 }
 
-print $tmpl->output;
+print $album->translate_templateL10N( $tmpl->output );
 
 require './common/footer.pl';
Index: affelio/apps/album/edit_album.cgi
diff -u affelio/apps/album/edit_album.cgi:1.5 affelio/apps/album/edit_album.cgi:1.6
--- affelio/apps/album/edit_album.cgi:1.5	Fri Jul  1 11:15:25 2005
+++ affelio/apps/album/edit_album.cgi	Wed Jul  6 22:33:17 2005
@@ -18,7 +18,7 @@
 
 require './common/header.pl';
 unless ($afap->get_visitor_info("type") eq "self"){
-	&errorExit("あなたはこのページにアクセスする権限がありません")
+    &errorExit('<AF_M text="Access denied">');
         }
 
 
@@ -28,24 +28,24 @@
 
 $tmpl->param(ID => $id);
 
-# 編集完了
+# done edit
 if($afap->{cgi}->param("edit")) {
 	$album->updateEntry($id, $afap->{cgi}->param("title"), $afap->{cgi}->param("contents"));
-	$tmpl->param(DONE => "1", DONE_LABEL => "内容を変更しました");
+	$tmpl->param(DONE => "1", DONE_LABEL => '<AF_M text="Information was updated.">');
 }
 
-# 削除完了
+# done delete
 elsif($afap->{cgi}->param("delete")) {
 	$album->removeAlbum($id);
-	$tmpl->param(DONE => "1", DONE_LABEL => "削除しました");
+	$tmpl->param(DONE => "1", DONE_LABEL => '<AF_M text="The album was deleted">');
 }
 
-# 確認
+# confirm
 elsif($afap->{cgi}->param("delete_confirm")) {
 	$tmpl->param(DELETE_CONFIRM => "1");
 }
 
-# コメント編集画面
+# comment edit
 elsif ($afap->{cgi}->param("comment_edit")){
 	$tmpl->param(EDIT => "1");
 	my $entry = $album->getEntry($id);
@@ -57,11 +57,11 @@
 	);
 }
 
-# 画像編集画面
+# image edit
 elsif ($afap->{cgi}->param("image_arrange")){
 	$tmpl->param(ARRANGE => "1");
 
-# サムネイルの表示
+# show thumbnails
 my $col_num=4;
 my @image_files;
 my @image_row;
@@ -89,7 +89,7 @@
 	$tmpl->param(THUMBNAIL => \@image_row);
 }
 
-# コメント
+# comment
 if($album->getCommentsNo($id) > 0) {
 	$tmpl->param(HAS_COMMENTS => 1);
 	my @comments_param;
@@ -110,6 +110,7 @@
 
 
 }
-print $tmpl->output;
+
+print $album->translate_templateL10N( $tmpl->output );
 
 require './common/footer.pl';
Index: affelio/apps/album/edit_comment.cgi
diff -u affelio/apps/album/edit_comment.cgi:1.5 affelio/apps/album/edit_comment.cgi:1.6
--- affelio/apps/album/edit_comment.cgi:1.5	Fri Jul  1 11:15:25 2005
+++ affelio/apps/album/edit_comment.cgi	Wed Jul  6 22:33:17 2005
@@ -20,14 +20,13 @@
 my $id = $afap->{cgi}->param("id");
 my $pkey = $afap->{cgi}->param("pkey");
 
-# 本人(編集可)
-# サイトオーナー(編集可)
+# owner can edit it
 my $image_data = $album->getImage($id,$pkey);
 my $afid = $afap->get_visitor_info("afid");
 
 if($afap->check_access("add_image")){
 	unless($image_data->{afid} eq $afid || $afap->get_visitor_info("type") eq "self") {
-		&errorExit("あなたはこのページにアクセスする権限がありません");
+    &errorExit('<AF_M text="Access denied">');
         }
 }
 
@@ -37,17 +36,18 @@
 $tmpl->param(PKEY => $pkey);
 
 
-# 編集完了
+# done edit
 if($afap->{cgi}->param("edit")) {
 #my $afid = $afap->get_visitor_info("afid");
   
 $album->updateImage($id, $afap->{cgi}->param("title"),
 			$afap->{cgi}->param("comment"),
 			$image_data->{image});
-$tmpl->param(DONE => "1", DONE_LABEL => "内容を変更しました");
+#$tmpl->param(DONE => "1", DONE_LABEL => "<AF_M text="Your comment was updated.">");
+$tmpl->param(DONE => "1");
 }
 
-# コメント編集画面
+# edit comment
 elsif ($afap->{cgi}->param("comment_edit")){
 	$tmpl->param(EDIT => "1");
 	my $entry = $album->getImage($id,$pkey);
@@ -59,6 +59,6 @@
 	);
 }
 
-print $tmpl->output;
+print $album->translate_templateL10N( $tmpl->output );
 
 require './common/footer.pl';
Index: affelio/apps/album/large_image.cgi
diff -u affelio/apps/album/large_image.cgi:1.6 affelio/apps/album/large_image.cgi:1.7
--- affelio/apps/album/large_image.cgi:1.6	Sun Jul  3 22:00:10 2005
+++ affelio/apps/album/large_image.cgi	Wed Jul  6 22:33:17 2005
@@ -24,18 +24,18 @@
 my $image_data = $album->getImage($id,$pkey);
 my $tmpl = HTML::Template->new(filename => "./templates/large_image.tmpl");
 
-# 本人(編集可)
+#Content Owner can edit it
 my $afid = $afap->get_visitor_info("afid");
 if($afap->check_access("add_image") && ($image_data->{afid} eq $afid)) {
     $tmpl->param(EDIT_COMMENT => 1);
 }
-# サイトオーナー(編集可)
+#Site Owner can edit it
 if ($afap->get_visitor_info("type") eq "self"){
     $tmpl->param(EDIT_COMMENT => 1);
 }
 
 
-# アルバム情報
+# Album info
 $tmpl->param(
 	TITLE	=> $entry->{title},
 	ID	=> $id,
@@ -65,7 +65,7 @@
 
 
 
-# 画像表示
+#show image
 my @image_files;
 my @image_row;
 my @image_filelist=$album->getAllImage($id);
@@ -89,6 +89,6 @@
   $i++;
 }      
 
-print $tmpl->output;
+print $album->translate_templateL10N( $tmpl->output );
 
 require './common/footer.pl';
Index: affelio/apps/album/list_album.cgi
diff -u affelio/apps/album/list_album.cgi:1.7 affelio/apps/album/list_album.cgi:1.8
--- affelio/apps/album/list_album.cgi:1.7	Wed Jul  6 02:12:08 2005
+++ affelio/apps/album/list_album.cgi	Wed Jul  6 22:33:17 2005
@@ -21,7 +21,7 @@
 my $edit = 0;
 my $col_num=4;
 
-# 本人(アルバム追加可)
+# Owner can add album
 if ($afap->get_visitor_info("type") eq "self"){
     $edit = 1;
 }
@@ -37,7 +37,7 @@
 if ($afap->{cgi}->param("mode") eq "thumbnail"){
   $tmpl->param(THUMB => 1);
 
-# サムネイルの表示
+#show thumbnails
 my @image_filelist;
 my @image_files;
 my @image_row;
@@ -98,7 +98,7 @@
   $tmpl->param(ENTRIES => \@entries_param);
 }
 
-#print $tmpl->output;
+
 print $album->translate_templateL10N( $tmpl->output );
 
 require("./common/footer.pl");
Index: affelio/apps/album/owner_mode.cgi
diff -u affelio/apps/album/owner_mode.cgi:1.5 affelio/apps/album/owner_mode.cgi:1.6
--- affelio/apps/album/owner_mode.cgi:1.5	Fri Jul  1 11:15:25 2005
+++ affelio/apps/album/owner_mode.cgi	Wed Jul  6 22:33:17 2005
@@ -19,7 +19,7 @@
 our $mymode="owner";
 require './common/header.pl';
 unless ($afap->get_visitor_info("type") eq "self"){
-	&errorExit("あなたはこのページにアクセスする権限がありません")
+    &errorExit('<AF_M text="Access denied">');
         }
 
 my $user = $afap->{cgi}->param("user");
@@ -61,6 +61,6 @@
 
 $tmpl->param(install_title => $afap->get_app_info("install_title"));
 
-print $tmpl->output;
+print $album->translate_templateL10N( $tmpl->output );
 
 require("./common/footer.pl");
Index: affelio/apps/album/show_album.cgi
diff -u affelio/apps/album/show_album.cgi:1.8 affelio/apps/album/show_album.cgi:1.9
--- affelio/apps/album/show_album.cgi:1.8	Sun Jul  3 22:00:10 2005
+++ affelio/apps/album/show_album.cgi	Wed Jul  6 22:33:17 2005
@@ -23,7 +23,7 @@
 my $edit = 0;
 my $save_file=0;
 
-# 本人(編集可)
+# Owner can edit it
 if($afap->check_access("add_image")) {
     $edit = 1;
 }
@@ -39,7 +39,7 @@
 $up_mon+=1;
 $up_year+=1900;
 
-# アルバム情報
+# Album info
 $tmpl->param(
   	YEAR	=> $year,
   	MONTH	=> $mon,
@@ -53,24 +53,22 @@
   	EDITABLE=> $edit,
 );
 
-#画像の登録処理
+# upload image
 if ($afap->{cgi}->param("image_upload")){
- 	my $filehandle=$cgi->param("uploadingfile");#ファイル名(ハンドル)を取得
+    my $filehandle=$cgi->param("uploadingfile"); #Get file handle 
   	if ($filehandle){
-  		fileparse_set_fstype("MSDOS"); #IE対策。うまく動かないかも?!
+  		fileparse_set_fstype("MSDOS"); #For IE user
   		my $basename  = basename($filehandle,"");
-  		if ($basename =~ /^[a-zA-Z0-9\.\-\_]{1,32}$/ ){#ファイル名チェック
+  		if ($basename =~ /^[a-zA-Z0-9\.\-\_]{1,32}$/ ){ #Check Filename
 			my $fname=$afap->get_userdata_dir().'/'.$id.'/'.$basename;
-#保存するファイル名を指定
 			my $thumb_fname=$afap->get_userdata_dir().'/'.$id.'/thumbnail/'.$basename;
-#保存するファイル名を指定
                   	my $chkFile = $album->checkImagefile($id,$basename);
 #                  	if(-e $fname){
-                  	if ($chkFile->{image} eq $basename){#同名ファイルが存在
+                  	if ($chkFile->{image} eq $basename){# 
                           unless ($afap->{cgi}->param("rewrite")){
 				$tmpl->param(EXIST_SAMEFILE => 1);
 		          	$tmpl->param(UPLOAD_IMAGE => $basename);
-                          }else{#上書き (未実装)
+                          }else{#override(not yet)
 				$save_file=2;
                           }
                         }else{
@@ -78,7 +76,7 @@
                         }
 
                   	if ($save_file){
-				#ファイルの保存
+			    # Save file
 				open (OUT,">$fname") or die  "Can't make serverside file!\n";
 	  			while ($bytesread = read($filehandle,$buffer,1024)){
 	    				print OUT $buffer;
@@ -119,7 +117,7 @@
       	}
 }
 
-# サムネイルの表示
+#Show thumbnail
 my @image_files;
 my @image_row;
 @image_filelist=$album->getAllImage($id);
@@ -147,7 +145,7 @@
 	$tmpl->param(THUMBNAIL => \@image_row);
 }
 
-# コメント
+# Comment
 if($album->getCommentsNo($id) > 0) {
 	$tmpl->param(HAS_COMMENTS => 1);
       	my $user_uri;
@@ -176,10 +174,10 @@
 }
 
 
-# トラックバックURLの通知
+#TrackbackURL(NotYet)
 
 print $album->getURLDescription($id);
 
-print $tmpl->output;
+print $album->translate_templateL10N( $tmpl->output );
 
 require './common/footer.pl';
Index: affelio/apps/album/show_image.cgi
diff -u affelio/apps/album/show_image.cgi:1.9 affelio/apps/album/show_image.cgi:1.10
--- affelio/apps/album/show_image.cgi:1.9	Fri Jul  1 11:15:26 2005
+++ affelio/apps/album/show_image.cgi	Wed Jul  6 22:33:17 2005
@@ -24,11 +24,11 @@
 use AffelioApp;
 
 our $cgi = new CGI();
-#AffelioAppを初期化
+
 our $afap = new AffelioApp(ConfigDir => Cwd::getcwd(),
 			   cgi => $cgi);
 
-# 読み込みアクセス権限をチェック
+# Check access
 if ($afap->check_access("DF_access")) {
   my $image = $afap->{cgi}->param('image');
   my $id = $afap->{cgi}->param('id');
@@ -46,16 +46,16 @@
   }
   my $imgtype = 'jpeg';
 
-#// 画像オープン
+# open image file
   open(IMG, "$filepath") or die;
 
-#// イメージ表示
+# show image
   binmode IMG;
   binmode STDOUT;
   print "Content-type: image/$imgtype\n\n";
   print while (<IMG>);
 
-#// 画像クローズ
+# close image
   close(IMG);
 }
   exit(0);
Index: affelio/apps/album/write_comment.cgi
diff -u affelio/apps/album/write_comment.cgi:1.7 affelio/apps/album/write_comment.cgi:1.8
--- affelio/apps/album/write_comment.cgi:1.7	Sun Jul  3 22:00:10 2005
+++ affelio/apps/album/write_comment.cgi	Wed Jul  6 22:33:17 2005
@@ -17,8 +17,7 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 require './common/header.pl';
-
-&errorExit("あなたはこのページに書き込み権限がありません") unless $afap->check_access("write_comment");
+&errorExit('<AF_M text="Access denied">') unless $afap->check_access("write_comment");
 
 my $comment = $afap->{cgi}->param('comment');
 my $tmpl = HTML::Template->new(filename => "./templates/write_comment.tmpl");
@@ -29,7 +28,7 @@
      
      if(!$user){
 	$user = "";
-	$user_uri = 'ななしさん';
+	$user_uri = 'Guest';
        $afid="";
     }
      else{
@@ -37,18 +36,18 @@
     }
 
 
-# コメント確認画面
+# confirm comment
 if($afap->{cgi}->param('comment_confirm')) {
 	$tmpl->param(CONFIRM => "1", COMMENT => $comment, ID => $id, USER_NAME => $user_uri);
 }
 
-# コメントをコミット
+# submit comment
 elsif($afap->{cgi}->param('comment_commit')) {
     $album->addComment($id, $user, $afid, $comment);
     $album->updateTimestamp($id);
     $tmpl->param(COMMIT => "1", ID => $id);
 }
 
-print $tmpl->output;
+print $album->translate_templateL10N( $tmpl->output );
 
 require './common/footer.pl';


Affelio-cvs メーリングリストの案内
Back to archive index