Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

85 wiersze
2.7 KiB

  1. // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
  2. package main
  3. import (
  4. "golang.org/x/text/language"
  5. "golang.org/x/text/message"
  6. "golang.org/x/text/message/catalog"
  7. )
  8. type dictionary struct {
  9. index []uint32
  10. data string
  11. }
  12. func (d *dictionary) Lookup(key string) (data string, ok bool) {
  13. p := messageKeyToIndex[key]
  14. start, end := d.index[p], d.index[p+1]
  15. if start == end {
  16. return "", false
  17. }
  18. return d.data[start:end], true
  19. }
  20. func init() {
  21. dict := map[string]catalog.Dictionary{
  22. "de": &dictionary{index: deIndex, data: deData},
  23. "en_US": &dictionary{index: en_USIndex, data: en_USData},
  24. "zh": &dictionary{index: zhIndex, data: zhData},
  25. }
  26. fallback := language.MustParse("en-US")
  27. cat, err := catalog.NewFromMap(dict, catalog.Fallback(fallback))
  28. if err != nil {
  29. panic(err)
  30. }
  31. message.DefaultCatalog = cat
  32. }
  33. var messageKeyToIndex = map[string]int{
  34. "%.2[1]f miles traveled (%[1]f)": 8,
  35. "%[1]s is visiting %[3]s!\n": 3,
  36. "%d files remaining!": 5,
  37. "%d more files remaining!": 4,
  38. "%s is out of order!": 7,
  39. "%s is visiting %s!\n": 2,
  40. "Hello %s!\n": 1,
  41. "Hello world!\n": 0,
  42. "Use the following code for your discount: %d\n": 6,
  43. }
  44. var deIndex = []uint32{ // 10 elements
  45. 0x00000000, 0x00000011, 0x00000023, 0x0000003d,
  46. 0x00000057, 0x00000076, 0x00000076, 0x00000076,
  47. 0x00000076, 0x00000076,
  48. } // Size: 64 bytes
  49. const deData string = "" + // Size: 118 bytes
  50. "\x04\x00\x01\x0a\x0c\x02Hallo Welt!\x04\x00\x01\x0a\x0d\x02Hallo %[1]s!" +
  51. "\x04\x00\x01\x0a\x15\x02%[1]s besucht %[2]s!\x04\x00\x01\x0a\x15\x02%[1]" +
  52. "s besucht %[3]s!\x02Noch %[1]d Bestände zu gehen!"
  53. var en_USIndex = []uint32{ // 10 elements
  54. 0x00000000, 0x00000012, 0x00000024, 0x00000042,
  55. 0x00000060, 0x000000a3, 0x000000ba, 0x000000ef,
  56. 0x00000106, 0x00000125,
  57. } // Size: 64 bytes
  58. const en_USData string = "" + // Size: 293 bytes
  59. "\x04\x00\x01\x0a\x0d\x02Hello world!\x04\x00\x01\x0a\x0d\x02Hello %[1]sn" +
  60. "\x04\x00\x01\x0a\x19\x02%[1]s is visiting %[2]s!\x04\x00\x01\x0a\x19\x02" +
  61. "%[1]s is visiting %[3]s!\x14\x01\x81\x01\x00\x02\x14\x02One file remaini" +
  62. "ng!\x00&\x02There are %[1]d more files remaining!\x02%[1]d files remaini" +
  63. "ng!\x04\x00\x01\x0a0\x02Use the following code for your discount: %[1]d" +
  64. "\x02%[1]s is out of order!\x02%.2[1]f miles traveled (%[1]f)"
  65. var zhIndex = []uint32{ // 10 elements
  66. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  67. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  68. 0x00000000, 0x00000000,
  69. } // Size: 64 bytes
  70. const zhData string = ""
  71. // Total table size 603 bytes (0KiB); checksum: 1D2754EE