translation.schema.json 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema#",
  3. "type": "object",
  4. "required": ["meta"],
  5. "description": "Mapping of translation keys to strings.",
  6. "patternProperties": {
  7. "^[a-zA-Z]([a-zA-Z0-9_-]+)?$": {
  8. "type": "string",
  9. "description": "Case sensitive translation key. May only contain letters, numbers, underscores, and hyphens."
  10. }
  11. },
  12. "properties": {
  13. "meta": {
  14. "type": "object",
  15. "description": "Metadata about the translation file.",
  16. "required": [
  17. "langName",
  18. "langNameEnglish",
  19. "countryName",
  20. "authors"
  21. ],
  22. "properties": {
  23. "base": {
  24. "type": "string",
  25. "description": "Optional base locale from which all missing translations are automatically inherited. Must be in the format \"ll-CC\" (language-country), e.g. en-US.",
  26. "pattern": "^[a-z]{2}-[A-Z]{2}$",
  27. "default": "en-US"
  28. },
  29. "langName": {
  30. "type": "string",
  31. "description": "Name of the language in the language itself."
  32. },
  33. "langNameEnglish": {
  34. "type": "string",
  35. "description": "Name of the language and the country (or locale) in English in the format \"Language (Country or Locale)\".",
  36. "pattern": "^[\\w\\s,._\\-&]+ \\([\\w\\s,._\\-&]+\\)$"
  37. },
  38. "countryName": {
  39. "type": "string",
  40. "description": "Name of the country in the language itself."
  41. },
  42. "authors": {
  43. "type": "array",
  44. "description": "Name(s) of the author and contributors of the translation.",
  45. "items": {
  46. "type": "string",
  47. "description": "Name of the author or contributor."
  48. }
  49. }
  50. }
  51. }
  52. }
  53. }