You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.3 KiB

  1. # ===============================================
  2. # LOCALIZATION
  3. # ===============================================
  4. extend type Query {
  5. localization: LocalizationQuery
  6. }
  7. extend type Mutation {
  8. localization: LocalizationMutation
  9. }
  10. # -----------------------------------------------
  11. # QUERIES
  12. # -----------------------------------------------
  13. type LocalizationQuery {
  14. locales: [LocalizationLocale]
  15. config: LocalizationConfig
  16. translations(locale: String!, namespace: String!): [Translation]
  17. }
  18. # -----------------------------------------------
  19. # MUTATIONS
  20. # -----------------------------------------------
  21. type LocalizationMutation {
  22. downloadLocale(
  23. locale: String!
  24. ): DefaultResponse @auth(requires: ["manage:system"])
  25. updateLocale(
  26. locale: String!
  27. autoUpdate: Boolean!
  28. namespacing: Boolean!
  29. namespaces: [String]!
  30. ): DefaultResponse @auth(requires: ["manage:system"])
  31. }
  32. # -----------------------------------------------
  33. # TYPES
  34. # -----------------------------------------------
  35. type LocalizationLocale {
  36. code: String!
  37. createdAt: Date!
  38. installDate: Date
  39. isInstalled: Boolean!
  40. isRTL: Boolean!
  41. name: String!
  42. nativeName: String!
  43. updatedAt: Date!
  44. }
  45. type LocalizationConfig {
  46. locale: String!
  47. autoUpdate: Boolean!
  48. namespacing: Boolean!
  49. namespaces: [String]!
  50. }
  51. type Translation {
  52. key: String!
  53. value: String!
  54. }