messages.go 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. package views
  2. import (
  3. "github.com/qor5/admin/publish"
  4. )
  5. type Messages struct {
  6. StatusDraft string
  7. StatusOnline string
  8. StatusOffline string
  9. Publish string
  10. Unpublish string
  11. Republish string
  12. Areyousure string
  13. ScheduledStartAt string
  14. ScheduledEndAt string
  15. PublishedAt string
  16. UnPublishedAt string
  17. ActualPublishTime string
  18. SchedulePublishTime string
  19. NotSet string
  20. WhenDoYouWantToPublish string
  21. PublishScheduleTip string
  22. DateTimePickerClearText string
  23. DateTimePickerOkText string
  24. SaveAsNewVersion string
  25. SwitchedToNewVersion string
  26. SuccessfullyCreated string
  27. SuccessfullyRename string
  28. OnlineVersion string
  29. VersionsList string
  30. AllVersions string
  31. NamedVersions string
  32. RenameVersion string
  33. }
  34. var Messages_en_US = &Messages{
  35. StatusDraft: "Draft",
  36. StatusOnline: "Online",
  37. StatusOffline: "Offline",
  38. Publish: "Publish",
  39. Unpublish: "Unpublish",
  40. Republish: "Republish",
  41. Areyousure: "Are you sure?",
  42. ScheduledStartAt: "Start at",
  43. ScheduledEndAt: "End at",
  44. PublishedAt: "Start at",
  45. UnPublishedAt: "End at",
  46. ActualPublishTime: "Actual Publish Time",
  47. SchedulePublishTime: "Schedule Publish Time",
  48. NotSet: "Not set",
  49. WhenDoYouWantToPublish: "When do you want to publish?",
  50. PublishScheduleTip: "After you set the {SchedulePublishTime}, the system will automatically publish/unpublish it.",
  51. DateTimePickerClearText: "Clear",
  52. DateTimePickerOkText: "OK",
  53. SaveAsNewVersion: "Save As New Version",
  54. SwitchedToNewVersion: "Switched To New Version",
  55. SuccessfullyCreated: "Successfully Created",
  56. SuccessfullyRename: "Successfully Rename",
  57. OnlineVersion: "Online Version",
  58. VersionsList: "Versions List",
  59. AllVersions: "All versions",
  60. NamedVersions: "Named versions",
  61. RenameVersion: "Rename Version",
  62. }
  63. var Messages_zh_CN = &Messages{
  64. StatusDraft: "草稿",
  65. StatusOnline: "在线",
  66. StatusOffline: "离线",
  67. Publish: "发布",
  68. Unpublish: "取消发布",
  69. Republish: "重新发布",
  70. Areyousure: "你确定吗?",
  71. ScheduledStartAt: "发布时间",
  72. ScheduledEndAt: "下线时间",
  73. PublishedAt: "发布时间",
  74. UnPublishedAt: "下线时间",
  75. ActualPublishTime: "实际发布时间",
  76. SchedulePublishTime: "计划发布时间",
  77. NotSet: "未设定",
  78. WhenDoYouWantToPublish: "你希望什么时候发布?",
  79. PublishScheduleTip: "设定好 {SchedulePublishTime} 之后, 系统会按照时间自动将它发布/下线。",
  80. DateTimePickerClearText: "清空",
  81. DateTimePickerOkText: "确定",
  82. SaveAsNewVersion: "保存为一个新版本",
  83. SwitchedToNewVersion: "切换到新版本",
  84. SuccessfullyCreated: "成功创建",
  85. SuccessfullyRename: "成功命名",
  86. OnlineVersion: "在线版本",
  87. VersionsList: "版本列表",
  88. AllVersions: "所有版本",
  89. NamedVersions: "已命名版本",
  90. RenameVersion: "命名版本",
  91. }
  92. var Messages_ja_JP = &Messages{
  93. StatusDraft: "下書き",
  94. StatusOnline: "公開中",
  95. StatusOffline: "非公開中",
  96. Publish: "公開する",
  97. Unpublish: "非公開",
  98. Republish: "再公開",
  99. Areyousure: "よろしいですか?",
  100. ScheduledStartAt: "公開開始日時",
  101. ScheduledEndAt: "公開終了日時",
  102. PublishedAt: "開始日時",
  103. UnPublishedAt: "公開終了日時",
  104. ActualPublishTime: "投稿日時",
  105. SchedulePublishTime: "公開日時を設定する",
  106. NotSet: "未セット",
  107. WhenDoYouWantToPublish: "公開日時を設定してください",
  108. PublishScheduleTip: "{SchedulePublishTime} 設定後、システムが自動で当該記事の公開・非公開を行います。",
  109. DateTimePickerClearText: "クリア",
  110. DateTimePickerOkText: "OK",
  111. SaveAsNewVersion: "新規バージョンとして保存する",
  112. SwitchedToNewVersion: "新規バージョンに変更する",
  113. SuccessfullyCreated: "作成に成功しました",
  114. SuccessfullyRename: "名付けに成功しました",
  115. OnlineVersion: "オンラインバージョン",
  116. VersionsList: "バージョンリスト",
  117. AllVersions: "全てのバージョン",
  118. NamedVersions: "名付け済みバージョン",
  119. RenameVersion: "バージョンの名前を変更する",
  120. }
  121. func GetStatusText(status string, msgr *Messages) string {
  122. switch status {
  123. case publish.StatusDraft:
  124. return msgr.StatusDraft
  125. case publish.StatusOnline:
  126. return msgr.StatusOnline
  127. case publish.StatusOffline:
  128. return msgr.StatusOffline
  129. }
  130. return ""
  131. }