messages.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. package presets
  2. import (
  3. "strings"
  4. )
  5. type Messages struct {
  6. SuccessfullyUpdated string
  7. Search string
  8. New string
  9. Update string
  10. Delete string
  11. Edit string
  12. FormTitle string
  13. OK string
  14. Cancel string
  15. Clear string
  16. Create string
  17. DeleteConfirmationTextTemplate string
  18. CreatingObjectTitleTemplate string
  19. EditingObjectTitleTemplate string
  20. ListingObjectTitleTemplate string
  21. DetailingObjectTitleTemplate string
  22. FiltersClear string
  23. FiltersAdd string
  24. FilterApply string
  25. FilterByTemplate string
  26. FiltersDateInTheLast string
  27. FiltersDateEquals string
  28. FiltersDateBetween string
  29. FiltersDateIsAfter string
  30. FiltersDateIsAfterOrOn string
  31. FiltersDateIsBefore string
  32. FiltersDateIsBeforeOrOn string
  33. FiltersDateDays string
  34. FiltersDateMonths string
  35. FiltersDateAnd string
  36. FiltersDateTo string
  37. FiltersNumberEquals string
  38. FiltersNumberBetween string
  39. FiltersNumberGreaterThan string
  40. FiltersNumberLessThan string
  41. FiltersNumberAnd string
  42. FiltersStringEquals string
  43. FiltersStringContains string
  44. FiltersMultipleSelectIn string
  45. FiltersMultipleSelectNotIn string
  46. PaginationRowsPerPage string
  47. ListingNoRecordToShow string
  48. ListingSelectedCountNotice string
  49. ListingClearSelection string
  50. BulkActionNoAvailableRecords string
  51. BulkActionSelectedIdsProcessNoticeTemplate string
  52. ConfirmDialogPromptText string
  53. Language string
  54. Colon string
  55. NotFoundPageNotice string
  56. }
  57. func (msgr *Messages) DeleteConfirmationText(id string) string {
  58. return strings.NewReplacer("{id}", id).
  59. Replace(msgr.DeleteConfirmationTextTemplate)
  60. }
  61. func (msgr *Messages) CreatingObjectTitle(modelName string) string {
  62. return strings.NewReplacer("{modelName}", modelName).
  63. Replace(msgr.CreatingObjectTitleTemplate)
  64. }
  65. func (msgr *Messages) EditingObjectTitle(label string, name string) string {
  66. return strings.NewReplacer("{id}", name, "{modelName}", label).
  67. Replace(msgr.EditingObjectTitleTemplate)
  68. }
  69. func (msgr *Messages) ListingObjectTitle(label string) string {
  70. return strings.NewReplacer("{modelName}", label).
  71. Replace(msgr.ListingObjectTitleTemplate)
  72. }
  73. func (msgr *Messages) DetailingObjectTitle(label string, name string) string {
  74. return strings.NewReplacer("{id}", name, "{modelName}", label).
  75. Replace(msgr.DetailingObjectTitleTemplate)
  76. }
  77. func (msgr *Messages) BulkActionSelectedIdsProcessNotice(ids string) string {
  78. return strings.NewReplacer("{ids}", ids).
  79. Replace(msgr.BulkActionSelectedIdsProcessNoticeTemplate)
  80. }
  81. func (msgr *Messages) FilterBy(filter string) string {
  82. return strings.NewReplacer("{filter}", filter).
  83. Replace(msgr.FilterByTemplate)
  84. }
  85. var Messages_en_US = &Messages{
  86. SuccessfullyUpdated: "Successfully Updated",
  87. Search: "Search",
  88. New: "New",
  89. Update: "Update",
  90. Delete: "Delete",
  91. Edit: "Edit",
  92. FormTitle: "Form",
  93. OK: "OK",
  94. Cancel: "Cancel",
  95. Clear: "Clear",
  96. Create: "Create",
  97. DeleteConfirmationTextTemplate: "Are you sure you want to delete object with id: {id}?",
  98. CreatingObjectTitleTemplate: "New {modelName}",
  99. EditingObjectTitleTemplate: "Editing {modelName} {id}",
  100. ListingObjectTitleTemplate: "Listing {modelName}",
  101. DetailingObjectTitleTemplate: "{modelName} {id}",
  102. FiltersClear: "Clear Filters",
  103. FiltersAdd: "Add Filters",
  104. FilterApply: "Apply",
  105. FilterByTemplate: "Filter by {filter}",
  106. FiltersDateInTheLast: "is in the last",
  107. FiltersDateEquals: "is equal to",
  108. FiltersDateBetween: "is between",
  109. FiltersDateIsAfter: "is after",
  110. FiltersDateIsAfterOrOn: "is on or after",
  111. FiltersDateIsBefore: "is before",
  112. FiltersDateIsBeforeOrOn: "is before or on",
  113. FiltersDateDays: "days",
  114. FiltersDateMonths: "months",
  115. FiltersDateAnd: "and",
  116. FiltersDateTo: "to",
  117. FiltersNumberEquals: "is equal to",
  118. FiltersNumberBetween: "between",
  119. FiltersNumberGreaterThan: "is greater than",
  120. FiltersNumberLessThan: "is less than",
  121. FiltersNumberAnd: "and",
  122. FiltersStringEquals: "is equal to",
  123. FiltersStringContains: "contains",
  124. FiltersMultipleSelectIn: "in",
  125. FiltersMultipleSelectNotIn: "not in",
  126. PaginationRowsPerPage: "Rows per page: ",
  127. ListingNoRecordToShow: "No records to show",
  128. ListingSelectedCountNotice: "{count} records are selected. ",
  129. ListingClearSelection: "clear selection",
  130. BulkActionNoAvailableRecords: "None of the selected records can be executed with this action.",
  131. BulkActionSelectedIdsProcessNoticeTemplate: "Partially selected records cannot be executed with this action: {ids}.",
  132. ConfirmDialogPromptText: "Are you sure?",
  133. Language: "Language",
  134. Colon: ":",
  135. NotFoundPageNotice: "Sorry, the requested page cannot be found. Please check the URL.",
  136. }
  137. var Messages_zh_CN = &Messages{
  138. SuccessfullyUpdated: "成功更新了",
  139. Search: "搜索",
  140. New: "新建",
  141. Update: "更新",
  142. Delete: "删除",
  143. Edit: "编辑",
  144. FormTitle: "表单",
  145. OK: "确定",
  146. Cancel: "取消",
  147. Clear: "清空",
  148. Create: "创建",
  149. DeleteConfirmationTextTemplate: "你确定你要删除这个对象吗,对象ID: {id}?",
  150. CreatingObjectTitleTemplate: "新建{modelName}",
  151. EditingObjectTitleTemplate: "编辑{modelName} {id}",
  152. ListingObjectTitleTemplate: "{modelName}列表",
  153. DetailingObjectTitleTemplate: "{modelName} {id}",
  154. FiltersClear: "清空筛选器",
  155. FiltersAdd: "添加筛选器",
  156. FilterApply: "应用",
  157. FilterByTemplate: "按{filter}筛选",
  158. FiltersDateInTheLast: "过去",
  159. FiltersDateEquals: "等于",
  160. FiltersDateBetween: "之间",
  161. FiltersDateIsAfter: "之后",
  162. FiltersDateIsAfterOrOn: "当天或之后",
  163. FiltersDateIsBefore: "之前",
  164. FiltersDateIsBeforeOrOn: "当天或之前",
  165. FiltersDateDays: "天",
  166. FiltersDateMonths: "月",
  167. FiltersDateAnd: "和",
  168. FiltersDateTo: "至",
  169. FiltersNumberEquals: "等于",
  170. FiltersNumberBetween: "之间",
  171. FiltersNumberGreaterThan: "大于",
  172. FiltersNumberLessThan: "小于",
  173. FiltersNumberAnd: "和",
  174. FiltersStringEquals: "等于",
  175. FiltersStringContains: "包含",
  176. FiltersMultipleSelectIn: "包含",
  177. FiltersMultipleSelectNotIn: "不包含",
  178. PaginationRowsPerPage: "每页: ",
  179. ListingNoRecordToShow: "没有可显示的记录",
  180. ListingSelectedCountNotice: "{count}条记录被选中。",
  181. ListingClearSelection: "清除选择",
  182. BulkActionNoAvailableRecords: "所有选中的记录均无法执行这个操作。",
  183. BulkActionSelectedIdsProcessNoticeTemplate: "部分选中的记录无法被执行这个操作: {ids}。",
  184. ConfirmDialogPromptText: "你确定吗?",
  185. Language: "语言",
  186. Colon: ":",
  187. NotFoundPageNotice: "很抱歉,所请求的页面不存在,请检查URL。",
  188. }
  189. var Messages_ja_JP = &Messages{
  190. SuccessfullyUpdated: "更新に成功しました",
  191. Search: "検索する",
  192. New: "新規",
  193. Update: "更新する",
  194. Delete: "削除する",
  195. Edit: "編集する",
  196. FormTitle: "フォーム",
  197. OK: "OK",
  198. Cancel: "キャンセル",
  199. Create: "新規作成",
  200. DeleteConfirmationTextTemplate: ": {id}を削除して本当によろしいですか?",
  201. CreatingObjectTitleTemplate: "{modelName} を作る",
  202. EditingObjectTitleTemplate: "{modelName} {id} を編集する",
  203. ListingObjectTitleTemplate: "リスティング {modelName} ",
  204. DetailingObjectTitleTemplate: "{modelName} {id} ",
  205. FiltersClear: "フィルターをクリアする",
  206. FiltersAdd: "フィルターを追加する",
  207. FilterApply: "適用する",
  208. FilterByTemplate: "{filter} でフィルターする",
  209. FiltersDateInTheLast: "がサイト",
  210. FiltersDateEquals: "と同等",
  211. FiltersDateBetween: "の間",
  212. FiltersDateIsAfter: "が後",
  213. FiltersDateIsAfterOrOn: "が同時または後",
  214. FiltersDateIsBefore: "が前",
  215. FiltersDateIsBeforeOrOn: "が前または同時",
  216. FiltersDateDays: "日間",
  217. FiltersDateMonths: "月数",
  218. FiltersDateAnd: "&",
  219. FiltersDateTo: "から",
  220. FiltersNumberEquals: "と同等",
  221. FiltersNumberBetween: "間",
  222. FiltersNumberGreaterThan: "より大きい",
  223. FiltersNumberLessThan: "より少ない",
  224. FiltersNumberAnd: "&",
  225. FiltersStringEquals: "と同等",
  226. FiltersStringContains: "を含む",
  227. FiltersMultipleSelectIn: "中",
  228. FiltersMultipleSelectNotIn: "以外",
  229. PaginationRowsPerPage: "行 / ページ",
  230. ListingNoRecordToShow: "表示できるデータはありません",
  231. ListingSelectedCountNotice: "{count} レコードが選択されています",
  232. ListingClearSelection: "選択をクリア",
  233. BulkActionNoAvailableRecords: "この機能はご利用いただけません",
  234. BulkActionSelectedIdsProcessNoticeTemplate: "この一部の機能はご利用いただけません: {ids}",
  235. ConfirmDialogPromptText: "よろしいですか?",
  236. Language: "言語",
  237. Colon: ":",
  238. NotFoundPageNotice: "申し訳ありませんが、リクエストされたページは見つかりませんでした。URLを確認してください。",
  239. }