summaryrefslogtreecommitdiffstats
path: root/l10n/eu
diff options
context:
space:
mode:
authorJenkins for ownCloud <thomas.mueller@tmit.eu>2012-11-09 00:03:49 +0100
committerJenkins for ownCloud <thomas.mueller@tmit.eu>2012-11-09 00:03:49 +0100
commitcb57a20ec27c5716fa52a998babf7e93f64fbe4e (patch)
tree295a961e5571dd050f692023760088a722610fb2 /l10n/eu
parent4c06c25c6cb6ac64f1685222c9cdf35afe80aea6 (diff)
downloadnextcloud-server-cb57a20ec27c5716fa52a998babf7e93f64fbe4e.tar.gz
nextcloud-server-cb57a20ec27c5716fa52a998babf7e93f64fbe4e.zip
[tx-robot] updated from transifex
Diffstat (limited to 'l10n/eu')
-rw-r--r--l10n/eu/core.po20
-rw-r--r--l10n/eu/files.po4
-rw-r--r--l10n/eu/settings.po59
3 files changed, 41 insertions, 42 deletions
diff --git a/l10n/eu/core.po b/l10n/eu/core.po
index 3fd22a906c6..7b6870a4b31 100644
--- a/l10n/eu/core.po
+++ b/l10n/eu/core.po
@@ -9,8 +9,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
-"POT-Creation-Date: 2012-11-08 00:01+0100\n"
-"PO-Revision-Date: 2012-11-07 23:02+0000\n"
+"POT-Creation-Date: 2012-11-09 00:01+0100\n"
+"PO-Revision-Date: 2012-11-08 17:26+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"Language-Team: Basque (http://www.transifex.com/projects/p/owncloud/language/eu/)\n"
"MIME-Version: 1.0\n"
@@ -37,11 +37,11 @@ msgstr "Ezarpenak"
#: js/js.js:687
msgid "seconds ago"
-msgstr ""
+msgstr "segundu"
#: js/js.js:688
msgid "1 minute ago"
-msgstr ""
+msgstr "orain dela minutu 1"
#: js/js.js:689
msgid "{minutes} minutes ago"
@@ -49,11 +49,11 @@ msgstr ""
#: js/js.js:692
msgid "today"
-msgstr ""
+msgstr "gaur"
#: js/js.js:693
msgid "yesterday"
-msgstr ""
+msgstr "atzo"
#: js/js.js:694
msgid "{days} days ago"
@@ -61,19 +61,19 @@ msgstr ""
#: js/js.js:695
msgid "last month"
-msgstr ""
+msgstr "joan den hilabetean"
#: js/js.js:697
msgid "months ago"
-msgstr ""
+msgstr "hilabete"
#: js/js.js:698
msgid "last year"
-msgstr ""
+msgstr "joan den urtean"
#: js/js.js:699
msgid "years ago"
-msgstr ""
+msgstr "urte"
#: js/oc-dialogs.js:126
msgid "Choose"
diff --git a/l10n/eu/files.po b/l10n/eu/files.po
index adcc8eddd65..25107ab1864 100644
--- a/l10n/eu/files.po
+++ b/l10n/eu/files.po
@@ -9,8 +9,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
-"POT-Creation-Date: 2012-11-08 00:01+0100\n"
-"PO-Revision-Date: 2012-11-07 23:02+0000\n"
+"POT-Creation-Date: 2012-11-09 00:01+0100\n"
+"PO-Revision-Date: 2012-11-08 17:25+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"Language-Team: Basque (http://www.transifex.com/projects/p/owncloud/language/eu/)\n"
"MIME-Version: 1.0\n"
diff --git a/l10n/eu/settings.po b/l10n/eu/settings.po
index 8c96b50fa57..033527c8e61 100644
--- a/l10n/eu/settings.po
+++ b/l10n/eu/settings.po
@@ -10,9 +10,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
-"POT-Creation-Date: 2012-10-09 02:03+0200\n"
-"PO-Revision-Date: 2012-10-09 00:04+0000\n"
-"Last-Translator: I Robot <thomas.mueller@tmit.eu>\n"
+"POT-Creation-Date: 2012-11-09 00:01+0100\n"
+"PO-Revision-Date: 2012-11-08 23:02+0000\n"
+"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"Language-Team: Basque (http://www.transifex.com/projects/p/owncloud/language/eu/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -20,70 +20,69 @@ msgstr ""
"Language: eu\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: ajax/apps/ocs.php:23
+#: ajax/apps/ocs.php:20
msgid "Unable to load list from App Store"
msgstr "Ezin izan da App Dendatik zerrenda kargatu"
-#: ajax/creategroup.php:9 ajax/removeuser.php:13 ajax/setquota.php:18
-#: ajax/togglegroups.php:15
-msgid "Authentication error"
-msgstr "Autentifikazio errorea"
-
-#: ajax/creategroup.php:19
+#: ajax/creategroup.php:10
msgid "Group already exists"
msgstr "Taldea dagoeneko existitzenda"
-#: ajax/creategroup.php:28
+#: ajax/creategroup.php:19
msgid "Unable to add group"
msgstr "Ezin izan da taldea gehitu"
-#: ajax/enableapp.php:14
+#: ajax/enableapp.php:12
msgid "Could not enable app. "
msgstr "Ezin izan da aplikazioa gaitu."
-#: ajax/lostpassword.php:14
+#: ajax/lostpassword.php:12
msgid "Email saved"
msgstr "Eposta gorde da"
-#: ajax/lostpassword.php:16
+#: ajax/lostpassword.php:14
msgid "Invalid email"
msgstr "Baliogabeko eposta"
-#: ajax/openid.php:16
+#: ajax/openid.php:13
msgid "OpenID Changed"
msgstr "OpenID aldatuta"
-#: ajax/openid.php:18 ajax/setlanguage.php:20 ajax/setlanguage.php:23
+#: ajax/openid.php:15 ajax/setlanguage.php:17 ajax/setlanguage.php:20
msgid "Invalid request"
msgstr "Baliogabeko eskaria"
-#: ajax/removegroup.php:16
+#: ajax/removegroup.php:13
msgid "Unable to delete group"
msgstr "Ezin izan da taldea ezabatu"
-#: ajax/removeuser.php:22
+#: ajax/removeuser.php:15 ajax/setquota.php:15 ajax/togglegroups.php:12
+msgid "Authentication error"
+msgstr "Autentifikazio errorea"
+
+#: ajax/removeuser.php:24
msgid "Unable to delete user"
msgstr "Ezin izan da erabiltzailea ezabatu"
-#: ajax/setlanguage.php:18
+#: ajax/setlanguage.php:15
msgid "Language changed"
msgstr "Hizkuntza aldatuta"
-#: ajax/togglegroups.php:25
+#: ajax/togglegroups.php:22
#, php-format
msgid "Unable to add user to group %s"
msgstr "Ezin izan da erabiltzailea %s taldera gehitu"
-#: ajax/togglegroups.php:31
+#: ajax/togglegroups.php:28
#, php-format
msgid "Unable to remove user from group %s"
msgstr "Ezin izan da erabiltzailea %s taldetik ezabatu"
-#: js/apps.js:28 js/apps.js:65
+#: js/apps.js:28 js/apps.js:67
msgid "Disable"
msgstr "Ez-gaitu"
-#: js/apps.js:28 js/apps.js:54
+#: js/apps.js:28 js/apps.js:55
msgid "Enable"
msgstr "Gaitu"
@@ -91,7 +90,7 @@ msgstr "Gaitu"
msgid "Saving..."
msgstr "Gordetzen..."
-#: personal.php:47 personal.php:48
+#: personal.php:42 personal.php:43
msgid "__language_name__"
msgstr "Euskera"
@@ -172,7 +171,7 @@ msgstr "Egunkaria"
msgid "More"
msgstr "Gehiago"
-#: templates/admin.php:124
+#: templates/admin.php:124 templates/personal.php:61
msgid ""
"Developed by the <a href=\"http://ownCloud.org/contact\" "
"target=\"_blank\">ownCloud community</a>, the <a "
@@ -214,22 +213,22 @@ msgstr "Fitxategi handien kudeaketa"
msgid "Ask a question"
msgstr "Egin galdera bat"
-#: templates/help.php:23
+#: templates/help.php:22
msgid "Problems connecting to help database."
msgstr "Arazoak daude laguntza datubasera konektatzeko."
-#: templates/help.php:24
+#: templates/help.php:23
msgid "Go there manually."
msgstr "Joan hara eskuz."
-#: templates/help.php:32
+#: templates/help.php:31
msgid "Answer"
msgstr "Erantzun"
#: templates/personal.php:8
#, php-format
-msgid "You have used <strong>%s</strong> of the available <strong>%s<strong>"
-msgstr "Eskuragarri dituzun <strong>%s</strong>etik <strong>%s</strong> erabili duzu"
+msgid "You have used <strong>%s</strong> of the available <strong>%s</strong>"
+msgstr ""
#: templates/personal.php:12
msgid "Desktop and Mobile Syncing Clients"
lass="p">.COMMENT_TAG_WRITER } else if comment.PosterID == issue.PosterID { comment.ShowTag = models.COMMENT_TAG_POSTER } marked[comment.PosterID] = comment.ShowTag isAdded := false for j := range participants { if comment.Poster == participants[j] { isAdded = true break } } if !isAdded && !issue.IsPoster(comment.Poster.Id) { participants = append(participants, comment.Poster) } } } ctx.Data["Participants"] = participants ctx.Data["NumParticipants"] = len(participants) ctx.Data["Issue"] = issue ctx.Data["IsIssueOwner"] = ctx.Repo.IsWriter() || (ctx.IsSigned && (issue.IsPoster(ctx.User.Id) || ctx.User.IsAdmin)) ctx.Data["SignInLink"] = setting.AppSubUrl + "/user/login" ctx.Data["RequireHighlightJS"] = true ctx.HTML(200, ISSUE_VIEW) } func getActionIssue(ctx *middleware.Context) *models.Issue { issue, err := models.GetIssueByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index")) if err != nil { if models.IsErrIssueNotExist(err) { ctx.Error(404, "GetIssueByIndex") } else { ctx.Handle(500, "GetIssueByIndex", err) } return nil } return issue } func UpdateIssueTitle(ctx *middleware.Context) { issue := getActionIssue(ctx) if ctx.Written() { return } if !ctx.IsSigned || (ctx.User.Id != issue.PosterID && !ctx.Repo.IsWriter() && !ctx.User.IsAdmin) { ctx.Error(403) return } issue.Name = ctx.QueryTrim("title") if len(issue.Name) == 0 { ctx.Error(204) return } if err := models.UpdateIssue(issue); err != nil { ctx.Handle(500, "UpdateIssue", err) return } ctx.JSON(200, map[string]interface{}{ "title": issue.Name, }) } func UpdateIssueContent(ctx *middleware.Context) { issue := getActionIssue(ctx) if ctx.Written() { return } if !ctx.IsSigned || (ctx.User.Id != issue.PosterID && !ctx.Repo.IsWriter() && !ctx.User.IsAdmin) { ctx.Error(403) return } issue.Content = ctx.Query("content") if err := models.UpdateIssue(issue); err != nil { ctx.Handle(500, "UpdateIssue", err) return } ctx.JSON(200, map[string]interface{}{ "content": string(markdown.Render([]byte(issue.Content), ctx.Query("context"), ctx.Repo.Repository.ComposeMetas())), }) } func UpdateIssueLabel(ctx *middleware.Context) { issue := getActionIssue(ctx) if ctx.Written() { return } if ctx.Query("action") == "clear" { if err := issue.ClearLabels(); err != nil { ctx.Handle(500, "ClearLabels", err) return } } else { isAttach := ctx.Query("action") == "attach" label, err := models.GetLabelByID(ctx.QueryInt64("id")) if err != nil { if models.IsErrLabelNotExist(err) { ctx.Error(404, "GetLabelByID") } else { ctx.Handle(500, "GetLabelByID", err) } return } if isAttach && !issue.HasLabel(label.ID) { if err = issue.AddLabel(label); err != nil { ctx.Handle(500, "AddLabel", err) return } } else if !isAttach && issue.HasLabel(label.ID) { if err = issue.RemoveLabel(label); err != nil { ctx.Handle(500, "RemoveLabel", err) return } } } ctx.JSON(200, map[string]interface{}{ "ok": true, }) } func UpdateIssueMilestone(ctx *middleware.Context) { issue := getActionIssue(ctx) if ctx.Written() { return } oldMid := issue.MilestoneID mid := ctx.QueryInt64("id") if oldMid == mid { ctx.JSON(200, map[string]interface{}{ "ok": true, }) return } // Not check for invalid milestone id and give responsibility to owners. issue.MilestoneID = mid if err := models.ChangeMilestoneAssign(oldMid, issue); err != nil { ctx.Handle(500, "ChangeMilestoneAssign", err) return } ctx.JSON(200, map[string]interface{}{ "ok": true, }) } func UpdateIssueAssignee(ctx *middleware.Context) { issue := getActionIssue(ctx) if ctx.Written() { return } aid := ctx.QueryInt64("id") if issue.AssigneeID == aid { ctx.JSON(200, map[string]interface{}{ "ok": true, }) return } // Not check for invalid assignee id and give responsibility to owners. issue.AssigneeID = aid if err := models.UpdateIssueUserByAssignee(issue); err != nil { ctx.Handle(500, "UpdateIssueUserByAssignee: %v", err) return } ctx.JSON(200, map[string]interface{}{ "ok": true, }) } func NewComment(ctx *middleware.Context, form auth.CreateCommentForm) { issue, err := models.GetIssueByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index")) if err != nil { if models.IsErrIssueNotExist(err) { ctx.Handle(404, "GetIssueByIndex", err) } else { ctx.Handle(500, "GetIssueByIndex", err) } return } if issue.IsPull { if err = issue.GetPullRequest(); err != nil { ctx.Handle(500, "GetPullRequest", err) return } } var attachments []string if setting.AttachmentEnabled { attachments = form.Attachments } if ctx.HasError() { ctx.Flash.Error(ctx.Data["ErrorMsg"].(string)) ctx.Redirect(fmt.Sprintf("%s/issues/%d", ctx.Repo.RepoLink, issue.Index)) return } var comment *models.Comment defer func() { // Check if issue admin/poster changes the status of issue. if (ctx.Repo.IsWriter() || (ctx.IsSigned && issue.IsPoster(ctx.User.Id))) && (form.Status == "reopen" || form.Status == "close") && !(issue.IsPull && issue.HasMerged) { // Duplication and conflict check should apply to reopen pull request. var pr *models.PullRequest if form.Status == "reopen" && issue.IsPull { pull := issue.PullRequest pr, err = models.GetUnmergedPullRequest(pull.HeadRepoID, pull.BaseRepoID, pull.HeadBranch, pull.BaseBranch) if err != nil { if !models.IsErrPullRequestNotExist(err) { ctx.Handle(500, "GetUnmergedPullRequest", err) return } } // Regenerate patch and test conflict. if pr == nil { if err = issue.UpdatePatch(); err != nil { ctx.Handle(500, "UpdatePatch", err) return } issue.AddToTaskQueue() } } if pr != nil { ctx.Flash.Info(ctx.Tr("repo.pulls.open_unmerged_pull_exists", pr.Index)) } else { if err = issue.ChangeStatus(ctx.User, ctx.Repo.Repository, form.Status == "close"); err != nil { log.Error(4, "ChangeStatus: %v", err) } else { log.Trace("Issue [%d] status changed to closed: %v", issue.ID, issue.IsClosed) } } } // Redirect to comment hashtag if there is any actual content. typeName := "issues" if issue.IsPull { typeName = "pulls" } if comment != nil { ctx.Redirect(fmt.Sprintf("%s/%s/%d#%s", ctx.Repo.RepoLink, typeName, issue.Index, comment.HashTag())) } else { ctx.Redirect(fmt.Sprintf("%s/%s/%d", ctx.Repo.RepoLink, typeName, issue.Index)) } }() // Fix #321: Allow empty comments, as long as we have attachments. if len(form.Content) == 0 && len(attachments) == 0 { return } comment, err = models.CreateIssueComment(ctx.User, ctx.Repo.Repository, issue, form.Content, attachments) if err != nil { ctx.Handle(500, "CreateIssueComment", err) return } notifyWatchersAndMentions(ctx, &models.Issue{ ID: issue.ID, Index: issue.Index, Name: issue.Name, Content: form.Content, }) if ctx.Written() { return } log.Trace("Comment created: %d/%d/%d", ctx.Repo.Repository.ID, issue.ID, comment.ID) } func UpdateCommentContent(ctx *middleware.Context) { comment, err := models.GetCommentByID(ctx.ParamsInt64(":id")) if err != nil { if models.IsErrCommentNotExist(err) { ctx.Error(404, "GetCommentByID") } else { ctx.Handle(500, "GetCommentByID", err) } return } if !ctx.IsSigned || (ctx.User.Id != comment.PosterID && !ctx.Repo.IsAdmin()) { ctx.Error(403) return } else if comment.Type != models.COMMENT_TYPE_COMMENT { ctx.Error(204) return } comment.Content = ctx.Query("content") if len(comment.Content) == 0 { ctx.JSON(200, map[string]interface{}{ "content": "", }) return } if err := models.UpdateComment(comment); err != nil { ctx.Handle(500, "UpdateComment", err) return } ctx.JSON(200, map[string]interface{}{ "content": string(markdown.Render([]byte(comment.Content), ctx.Query("context"), ctx.Repo.Repository.ComposeMetas())), }) } func Labels(ctx *middleware.Context) { ctx.Data["Title"] = ctx.Tr("repo.labels") ctx.Data["PageIsIssueList"] = true ctx.Data["PageIsLabels"] = true ctx.Data["RequireMinicolors"] = true ctx.HTML(200, LABELS) } func NewLabel(ctx *middleware.Context, form auth.CreateLabelForm) { ctx.Data["Title"] = ctx.Tr("repo.labels") ctx.Data["PageIsLabels"] = true if ctx.HasError() { ctx.Flash.Error(ctx.Data["ErrorMsg"].(string)) ctx.Redirect(ctx.Repo.RepoLink + "/labels") return } l := &models.Label{ RepoID: ctx.Repo.Repository.ID, Name: form.Title, Color: form.Color, } if err := models.NewLabel(l); err != nil { ctx.Handle(500, "NewLabel", err) return } ctx.Redirect(ctx.Repo.RepoLink + "/labels") } func UpdateLabel(ctx *middleware.Context, form auth.CreateLabelForm) { l, err := models.GetLabelByID(form.ID) if err != nil { switch { case models.IsErrLabelNotExist(err): ctx.Error(404) default: ctx.Handle(500, "UpdateLabel", err) } return } fmt.Println(form.Title, form.Color) l.Name = form.Title l.Color = form.Color if err := models.UpdateLabel(l); err != nil { ctx.Handle(500, "UpdateLabel", err) return } ctx.Redirect(ctx.Repo.RepoLink + "/labels") } func DeleteLabel(ctx *middleware.Context) { if err := models.DeleteLabel(ctx.Repo.Repository.ID, ctx.QueryInt64("id")); err != nil { ctx.Flash.Error("DeleteLabel: " + err.Error()) } else { ctx.Flash.Success(ctx.Tr("repo.issues.label_deletion_success")) } ctx.JSON(200, map[string]interface{}{ "redirect": ctx.Repo.RepoLink + "/labels", }) return } func Milestones(ctx *middleware.Context) { ctx.Data["Title"] = ctx.Tr("repo.milestones") ctx.Data["PageIsIssueList"] = true ctx.Data["PageIsMilestones"] = true isShowClosed := ctx.Query("state") == "closed" openCount, closedCount := models.MilestoneStats(ctx.Repo.Repository.ID) ctx.Data["OpenCount"] = openCount ctx.Data["ClosedCount"] = closedCount page := ctx.QueryInt("page") if page <= 1 { page = 1 } var total int if !isShowClosed { total = int(openCount) } else { total = int(closedCount) } ctx.Data["Page"] = paginater.New(total, setting.IssuePagingNum, page, 5) miles, err := models.GetMilestones(ctx.Repo.Repository.ID, page, isShowClosed) if err != nil { ctx.Handle(500, "GetMilestones", err) return } for _, m := range miles { m.RenderedContent = string(markdown.Render([]byte(m.Content), ctx.Repo.RepoLink, ctx.Repo.Repository.ComposeMetas())) m.CalOpenIssues() } ctx.Data["Milestones"] = miles if isShowClosed { ctx.Data["State"] = "closed" } else { ctx.Data["State"] = "open" } ctx.Data["IsShowClosed"] = isShowClosed ctx.HTML(200, MILESTONE) } func NewMilestone(ctx *middleware.Context) { ctx.Data["Title"] = ctx.Tr("repo.milestones.new") ctx.Data["PageIsIssueList"] = true ctx.Data["PageIsMilestones"] = true ctx.Data["RequireDatetimepicker"] = true ctx.Data["DateLang"] = setting.DateLang(ctx.Locale.Language()) ctx.HTML(200, MILESTONE_NEW) } func NewMilestonePost(ctx *middleware.Context, form auth.CreateMilestoneForm) { ctx.Data["Title"] = ctx.Tr("repo.milestones.new") ctx.Data["PageIsIssueList"] = true ctx.Data["PageIsMilestones"] = true ctx.Data["RequireDatetimepicker"] = true ctx.Data["DateLang"] = setting.DateLang(ctx.Locale.Language()) if ctx.HasError() { ctx.HTML(200, MILESTONE_NEW) return } if len(form.Deadline) == 0 { form.Deadline = "9999-12-31" } deadline, err := time.ParseInLocation("2006-01-02", form.Deadline, time.Local) if err != nil { ctx.Data["Err_Deadline"] = true ctx.RenderWithErr(ctx.Tr("repo.milestones.invalid_due_date_format"), MILESTONE_NEW, &form) return } if err = models.NewMilestone(&models.Milestone{ RepoID: ctx.Repo.Repository.ID, Name: form.Title, Content: form.Content, Deadline: deadline, }); err != nil { ctx.Handle(500, "NewMilestone", err) return } ctx.Flash.Success(ctx.Tr("repo.milestones.create_success", form.Title)) ctx.Redirect(ctx.Repo.RepoLink + "/milestones") } func EditMilestone(ctx *middleware.Context) { ctx.Data["Title"] = ctx.Tr("repo.milestones.edit") ctx.Data["PageIsMilestones"] = true ctx.Data["PageIsEditMilestone"] = true ctx.Data["RequireDatetimepicker"] = true ctx.Data["DateLang"] = setting.DateLang(ctx.Locale.Language()) m, err := models.GetMilestoneByID(ctx.ParamsInt64(":id")) if err != nil { if models.IsErrMilestoneNotExist(err) { ctx.Handle(404, "GetMilestoneByID", nil) } else { ctx.Handle(500, "GetMilestoneByID", err) } return } ctx.Data["title"] = m.Name ctx.Data["content"] = m.Content if len(m.DeadlineString) > 0 { ctx.Data["deadline"] = m.DeadlineString } ctx.HTML(200, MILESTONE_NEW) } func EditMilestonePost(ctx *middleware.Context, form auth.CreateMilestoneForm) { ctx.Data["Title"] = ctx.Tr("repo.milestones.edit") ctx.Data["PageIsMilestones"] = true ctx.Data["PageIsEditMilestone"] = true ctx.Data["RequireDatetimepicker"] = true ctx.Data["DateLang"] = setting.DateLang(ctx.Locale.Language()) if ctx.HasError() { ctx.HTML(200, MILESTONE_NEW) return } if len(form.Deadline) == 0 { form.Deadline = "9999-12-31" } deadline, err := time.ParseInLocation("2006-01-02", form.Deadline, time.Local) if err != nil { ctx.Data["Err_Deadline"] = true ctx.RenderWithErr(ctx.Tr("repo.milestones.invalid_due_date_format"), MILESTONE_NEW, &form) return } m, err := models.GetMilestoneByID(ctx.ParamsInt64(":id")) if err != nil { if models.IsErrMilestoneNotExist(err) { ctx.Handle(404, "GetMilestoneByID", nil) } else { ctx.Handle(500, "GetMilestoneByID", err) } return } m.Name = form.Title m.Content = form.Content m.Deadline = deadline if err = models.UpdateMilestone(m); err != nil { ctx.Handle(500, "UpdateMilestone", err) return } ctx.Flash.Success(ctx.Tr("repo.milestones.edit_success", m.Name)) ctx.Redirect(ctx.Repo.RepoLink + "/milestones") } func ChangeMilestonStatus(ctx *middleware.Context) { m, err := models.GetMilestoneByID(ctx.ParamsInt64(":id")) if err != nil { if models.IsErrMilestoneNotExist(err) { ctx.Handle(404, "GetMilestoneByID", err) } else { ctx.Handle(500, "GetMilestoneByID", err) } return } switch ctx.Params(":action") { case "open": if m.IsClosed { if err = models.ChangeMilestoneStatus(m, false); err != nil { ctx.Handle(500, "ChangeMilestoneStatus", err) return } } ctx.Redirect(ctx.Repo.RepoLink + "/milestones?state=open") case "close": if !m.IsClosed { m.ClosedDate = time.Now() if err = models.ChangeMilestoneStatus(m, true); err != nil { ctx.Handle(500, "ChangeMilestoneStatus", err) return } } ctx.Redirect(ctx.Repo.RepoLink + "/milestones?state=closed") default: ctx.Redirect(ctx.Repo.RepoLink + "/milestones") } } func DeleteMilestone(ctx *middleware.Context) { if err := models.DeleteMilestoneByID(ctx.QueryInt64("id")); err != nil { ctx.Flash.Error("DeleteMilestoneByID: " + err.Error()) } else { ctx.Flash.Success(ctx.Tr("repo.milestones.deletion_success")) } ctx.JSON(200, map[string]interface{}{ "redirect": ctx.Repo.RepoLink + "/milestones", }) }