Jihan Kim 2013-04-17
apply localization code
@cbf98aee542751973c81f95389569f085274f2d6
app/utils/MenuType.java
--- app/utils/MenuType.java
+++ app/utils/MenuType.java
@@ -2,7 +2,7 @@
 
 public enum MenuType {
 	SITE_HOME(1), NEW_PROJECT(2), PROJECTS(3), HELP(4), SITE_SETTING(5), USER(6),
-    PROJECT_HOME(100), BOARD(101), CODE(102), ISSUE(103), TASK(104), PROJECT_SETTING(105), NONE(0); 
+    PROJECT_HOME(100), BOARD(101), CODE(102), ISSUE(103), TASK(104), PROJECT_SETTING(105), MILESTONE(106), NONE(0); 
     
     private int type;
     
app/views/help/toc.scala.html
--- app/views/help/toc.scala.html
+++ app/views/help/toc.scala.html
@@ -7,7 +7,8 @@
                 <div class="inner">
                     <form action="/project/search" method="get">
                         <span class="labels">FAQ</span><!-- 
-                         --><input name="query" class="text" type="text" placeholder="현재 게시글에서 검색"><button type="submit" class="btn search-btn">SEARCH</button>
+                         --><input name="query" class="text" type="text"><!-- 
+                         --><button type="submit" class="btn search-btn">@Messages("issue.search")</button>
                     </form>
                 </div>
             </div>
app/views/issue/issueList.scala.html
--- app/views/issue/issueList.scala.html
+++ app/views/issue/issueList.scala.html
@@ -40,16 +40,16 @@
 }
 **@
 
-@main(Messages(title), project, utils.MenuType.ISSUE){
+@main(Messages(title) + " (" + project.name + ")", project, utils.MenuType.ISSUE){
 <div class="page">
-	@views.html.prjmenu(project, utils.MenuType.ISSUE, "main-menu-only")
+	@prjmenu(project, utils.MenuType.ISSUE, "main-menu-only")
 	
 	<div class="header-wrap">
 		<div class="stats-wrap">
 			@for(state <- Array(State.ALL, State.OPEN, State.CLOSED)) {
 			<div class="stat stat-issue @if(param.state == state.state) { active }">
 				<a href="@routes.IssueApp.issues(project.owner, project.name, state.state)">
-				<span class="desc"><strong>@state.name</strong> issues</span><!-- 
+				<span class="desc"><strong>@Messages("issue.state." + state.name.toLowerCase())</strong> @Messages("issue.state.unit")</span><!-- 
 				 --><span class="num @state.state">@Issue.countIssues(project.id, state)</span>
 				</a>
 			</div>
@@ -132,7 +132,7 @@
 	             --><span class="date">@agoString(issue.ago)</span></p>
 	        </div>
 	        <div class="right-panel">
-	        	<div class="state @issue.state.toString.toLowerCase">@Messages(issue.state.state)</div>
+	        	<div class="state @issue.state.toString.toLowerCase">@Messages("issue.state." + issue.state.toString.toLowerCase)</div>
 	            <div class="comment-wrap">
 	                <i class="ico ico-comment-bubble"></i><span class="num">@issue.comments.size()</span>
 	            </div>
app/views/milestone/create.scala.html
--- app/views/milestone/create.scala.html
+++ app/views/milestone/create.scala.html
@@ -3,7 +3,7 @@
 @import utils.TemplateHelper._
 @import models.enumeration._
 @project.projectMngMain(title, projectInst) {
-    @prjmenu(projectInst, utils.MenuType.PROJECT_HOME, "")
+    @prjmenu(projectInst, utils.MenuType.MILESTONE, "")
 
     <div class="form-wrap milestone frm-wrap">
         <form class="nm" action="@routes.MilestoneApp.newMilestone(projectInst.owner, projectInst.name)" method="post">
app/views/milestone/edit.scala.html
--- app/views/milestone/edit.scala.html
+++ app/views/milestone/edit.scala.html
@@ -6,7 +6,7 @@
 
 @project.projectMngMain(title, projectInst) {
 
-@prjmenu(projectInst, utils.MenuType.PROJECT_HOME, "")
+@prjmenu(projectInst, utils.MenuType.MILESTONE, "")
 
 <div class="form-wrap milestone frm-wrap">
 	<form class="nm" action="@routes.MilestoneApp.editMilestone(projectInst.owner, projectInst.name, milestoneId)" method="post">
app/views/milestone/list.scala.html
--- app/views/milestone/list.scala.html
+++ app/views/milestone/list.scala.html
@@ -38,7 +38,7 @@
 }
 
 @project.projectMngMain(title, projectInst) {
-    @prjmenu(projectInst, utils.MenuType.PROJECT_HOME, "")
+    @prjmenu(projectInst, utils.MenuType.MILESTONE, "")
     
     <div class="tab-wrap">
         <div class="pull-right btns">
@@ -61,8 +61,8 @@
     
 	<div class="filter-wrap milestone">
 		<div class="filters">
-               <a href="@makeSortLink("dueDate")" class="filter"><i class="ico ico-sort @sortMark("dueDate")"></i>완료일순</a>
-               <a href="@makeSortLink("completionRate")" class="filter active"><i class="ico ico-sort @sortMark("completionRate")"></i>완료율순</a>
+               <a href="@makeSortLink("dueDate")" class="filter"><i class="ico ico-sort @sortMark("dueDate")"></i>@Messages("order.dueDate")</a>
+               <a href="@makeSortLink("completionRate")" class="filter active"><i class="ico ico-sort @sortMark("completionRate")"></i>@Messages("order.completionRate")</a>
            </div>
        	<div class="legend">
        		<i class="orange"></i>완료
app/views/milestone/manage.scala.html
--- app/views/milestone/manage.scala.html
+++ app/views/milestone/manage.scala.html
@@ -27,7 +27,7 @@
 }
 
 @project.projectMngMain(message, projectInst) {
-	@prjmenu(projectInst, utils.MenuType.PROJECT_HOME, "")
+	@prjmenu(projectInst, utils.MenuType.MILESTONE, "")
 	
 	@if(milestones == null || milestones.isEmpty()){
 	
app/views/prjmenu.scala.html
--- app/views/prjmenu.scala.html
+++ app/views/prjmenu.scala.html
@@ -22,23 +22,23 @@
     menuState
 }
 
-<div class="label inline-block" style="border-radius:3px 3px 0px 0px; padding:5px 10px;">
-	<i class="icon-eye-open icon-white" style="vertical-align:bottom;"></i>
+<div class="label user-role">
+	<i class="icon-eye-open icon-white"></i>
      @{
          var role = "guest"; // anonymous
          val loginId = session.contains("loginId")
          if(loginId) {
              var currentUser = User.findByLoginId(session.get("loginId"))
              if(currentUser.isSiteManager) {
-                 role = "site manager"
+                 role = "siteManager"
              } else if(!currentUser.isAnonymous) {
                  val roleOfProject = Role.findRoleByIds(currentUser.id, project.id)
                  if(roleOfProject != null) {
                      role = roleOfProject.name;
                  }
              }
-         }
-         role
+        }
+		Messages("role." + role)
      }
 </div>
 
@@ -53,7 +53,7 @@
 			<li class="sp-line">|</li>
 			<li class="@isActiveMenu(MenuType.ISSUE)"><a href="@routes.IssueApp.issues(project.owner, project.name,"all")">@Messages("menu.issue")</a></li>
 			<li class="sp-line">|</li>
-			<li class=""><a href="@routes.MilestoneApp.milestones(project.owner, project.name)">@Messages("project.milestone")</a></li>
+			<li class="@isActiveMenu(MenuType.MILESTONE)"><a href="@routes.MilestoneApp.milestones(project.owner, project.name)">@Messages("project.milestone")</a></li>
 			<li class="sp-line">|</li>
 			<li class="@isActiveMenu(MenuType.PROJECT_SETTING)"><a href="@routes.ProjectApp.settingForm(project.owner, project.name)">@Messages("menu.admin")</a></li>
 		</ul>
@@ -81,7 +81,6 @@
 		$(".project-menu-wrap a").each(function(n, el){
 			welLink = $(el);
 			if(welLink.attr("href") == document.location.pathname){
-				$(".project-menu-wrap li.highlight").removeClass("highlight");
 				welLink.parent().addClass("highlight");
 			}
 		});
app/views/project/projectHome.scala.html
--- app/views/project/projectHome.scala.html
+++ app/views/project/projectHome.scala.html
@@ -1,74 +1,80 @@
-@(message: String, project: Project) 
-
-@main(message, project, utils.MenuType.PROJECT_HOME) {
-<div class="page">
-	@prjmenu(project, utils.MenuType.PROJECT_HOME, "")
-    
-    <div class="bubble-wrap dark-gray project-home">
-        <div class="inner logo">
-            <div class="logo-wrap">
+@(message: String, project: Project) 
+
+@main(message, project, utils.MenuType.PROJECT_HOME) {
+<div class="page">
+	@prjmenu(project, utils.MenuType.PROJECT_HOME, "")
+    
+    <div class="bubble-wrap dark-gray project-home">
+        <div class="inner logo">
+            <div class="logo-wrap">
               <img src="@defining(Attachment.findByContainer(project.asResource)) @{ files =>
               if (files.size > 0) "/files/" + files.head.id
               else routes.Assets.at("images/bg-default-project.jpg")}"/>
-            </div>
-        </div>
-        <div class="inner project-info">
-            <header>
-                <h3>프로젝트 정보</h3>
-                <!--<div class="project-status">
-                    <i class="ico ico-like"></i>
-                    <span class="num">100</span>
-                    <span class="sp">|</span>
-                    <i class="ico ico-activity high"></i>
-                </div>-->
-            </header>
-            <ul class="infos">
-                <li class="info">
-                    <strong>라이센스 :</strong> GPL v2
-                </li>
-                <li class="info">
+            </div>
+        </div>
+        <div class="inner project-info">
+            <header>
+                <h3>@Messages("project.info")</h3>
+                <!--<div class="project-status">
+                    <i class="ico ico-like"></i>
+                    <span class="num">100</span>
+                    <span class="sp">|</span>
+                    <i class="ico ico-activity high"></i>
+                </div>-->
+            </header>
+            <ul class="infos">
+                <li class="info">
+                    <strong>@Messages("project.license") :</strong> GPL v2
+                </li>
+                <li class="info">
                     <strong>@Messages("project.tags") :</strong>
                     @for(tag <- project.tags) {
-                    <span class='label label-info'>@tag.name</span>
+                    <span class="label">@tag.name</span>
                     }
-                </li>
-                <li class="info">
-                    <strong>프로그래밍 언어 :</strong> PHP, Python, Java
-                </li>
-                <li class="info">
-                    <strong>코드관리 :</strong> @project.vcs
-                </li>
-            </ul>
-        </div>
-        <div class="inner member-info">
-            <header>
-                <h3>개발자 정보</h3>
-            </header>
-            <div class="member-wrap">
-                <ul class="project-members">
-                    @for(member <- User.findUsersByProject(project.id)){
-                    <li class="member">
-                    <a href="@routes.UserApp.userInfo(member.loginId)">
-                        <img src="@member.avatarUrl" alt="@member.loginId" class="user-thumb"></a>
-                        <a href="@routes.UserApp.userInfo(member.loginId)"><strong>@member.loginId</strong></a>
-                    </li>
-                    }
-                </ul>
-            </div>
-        </div>
-    </div>
-    <div class="bubble-wrap dark-gray readme">
-        @if(project.readme == null) {
-            @Messages("project.readme")
-        } else {
-        <div class="readme-wrap">
-           <header><i class="ico ico-readme-book"></i><strong>README.md</strong></header>
-           <div class="readme-body" markdown="true">
-               @project.readme
-           </div>
-        </div>
-        }
-	@markdown()
-    </div>
-</div>
-}
+                </li>
+                <li class="info">
+                    <strong>@Messages("project.codeLanguage") :</strong> Java, JavaScript
+                </li>
+                <li class="info">
+                    <strong>@Messages("project.vcs") :</strong> @project.vcs
+                </li>
+            </ul>
+        </div>
+        <div class="inner member-info">
+            <header>
+                <h3>@Messages("project.members")</h3>
+            </header>
+            <div class="member-wrap">
+                <ul class="project-members">
+                    @for(member <- User.findUsersByProject(project.id)){
+                    <li class="member">
+                    	<a href="@routes.UserApp.userInfo(member.loginId)" class="avatar-wrap img-rounded pull-left small">
+                        	<img src="@member.avatarUrl" alt="@member.loginId" width="24" height="24">
+                        </a>
+                        <a href="@routes.UserApp.userInfo(member.loginId)" class="name">
+                        	<strong>@member.loginId (@member.name)</strong>
+                        </a>
+                    </li>
+                    }
+                </ul>
+            </div>
+        </div>
+    </div>
+    
+    <div class="bubble-wrap dark-gray readme">
+        @if(project.readme == null) {
+        	<p class="default">
+            	@Messages("project.readme")
+            </p>
+        } else {
+        <div class="readme-wrap">
+           <header><i class="ico ico-readme-book"></i><strong>README.md</strong></header>
+           <div class="readme-body" markdown="true">
+               @project.readme
+           </div>
+        </div>
+        }
+		@markdown()
+    </div>
+</div>
+}
conf/messages.en
--- conf/messages.en
+++ conf/messages.en
@@ -103,9 +103,10 @@
 milestone.title.duplicated = Title is duplicated.
 
 #Issue
-issue.stateType.all = All
-issue.stateType.open = Open
-issue.stateType.closed = Closed
+issue.state.unit = issues
+issue.state.all = All
+issue.state.open = Open
+issue.state.closed = Closed
 issue.state.assigned = Assigned
 issue.state.enrolled = Enrolled
 issue.state.solved = Solved
@@ -251,6 +252,7 @@
 project.searchPlaceholder = search at current project
 project.wrongName = Project name is wrong
 project.tags = Tags
+project.license = License
 
 #Site
 site.sidebar = Site Management
@@ -286,6 +288,12 @@
 user.signupId = ID (lower case)
 user.signupBtn = Sign Up
 
+#Role
+role.manager = Manager
+role.member = Member
+role.guest = Guest
+role.siteManager = Site Manager
+
 #Time
 time.just = just now
 time.second = {0} second ago
conf/messages.ko
--- conf/messages.ko
+++ conf/messages.ko
@@ -63,6 +63,8 @@
 order.date = 날짜순
 order.state = 상태순
 order.comments = 댓글순
+order.completionRate = 완료율순
+order.dueDate = 완료일순
 
 button.save = 저장
 button.confirm = 확인
@@ -105,10 +107,15 @@
 milestone.title.duplicated = 마일스톤 제목이 다른것과 중복 됩니다. 다른 제목을 사용하세요.
 
 #Issue
+issue.state.unit = 이슈
 issue.state = 상태
 issue.state.all = 전체
 issue.state.open = 미해결
 issue.state.closed = 해결
+issue.state.assigned = 할당됨
+issue.state.enrolled = 등록
+issue.state.solved = 해결됨
+issue.state.finished = 완료됨
 issue.is.empty = 등록된 이슈가 없습니다.
 issue.menu.searchDefault = 이슈 검색
 issue.menu.milestoneSelectDefault = 마일스톤 선택
@@ -215,7 +222,7 @@
 project.agreement = 이용 약관
 project.name.rule = 이름 규칙
 project.info = 프로젝트 정보
-project.members = 프로젝트 인원
+project.members = 개발자
 project.members.addMember = 새로운 멤버의 아이디를 입력하세요
 project.member.isManager = 프로젝트 관리자 권한이 필요합니다
 project.member.alreadyMember = 이미 프로젝트에 가입되어 있는 멤버입니다.
@@ -249,7 +256,9 @@
 project.readme = 프로젝트에 대한 설명을 README.md 파일로 작성해서 코드저장소에 추가하면 이 곳에 나타납니다.
 project.searchPlaceholder = 현재 프로젝트에서 검색
 project.wrongName = 프로젝트 이름이 올바르지 않습니다.
-project.tags = 태그
+project.tags = 태그
+project.license = 라이센스
+project.codeLanguage = 프로그래밍 언어
 
 #Site
 site.sidebar = 사이트 관리
@@ -285,6 +294,12 @@
 user.signupId = 아이디
 user.signupBtn = 참여하기
 
+#Role
+role.manager = 관리자
+role.member = 참여자
+role.guest = 지나가던 사람
+role.siteManager = 사이트 관리자
+
 #Time
 time.just = 방금 전
 time.second = {0} 초 전
Add a comment
List