template.go.gotext 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. // This file is generated by the "kurzd generate-translations" command. DO NOT EDIT.
  2. package translations
  3. import (
  4. "github.com/nicksnyder/go-i18n/v2/i18n"
  5. "golang.org/x/text/language"
  6. )
  7. func init() {
  8. loadMessages = func(b *i18n.Bundle) error {
  9. // These are the messages extracted from all the messages.<lang>.yaml files.
  10. m := make(MessageMap)
  11. {{- range $tag, $messagesByTag := . }}
  12. m[language.Make("{{$tag}}")] = []*i18n.Message{
  13. {{- range $message := $messagesByTag }}
  14. {
  15. {{- if ne $message.ID "" }}
  16. ID: "{{$message.ID}}",{{ end }}
  17. {{- if ne $message.Hash "" }}
  18. Hash: "{{$message.Hash}}",{{end }}
  19. {{- if ne $message.Description "" }}
  20. Description: "{{$message.Description}}",{{ end }}
  21. {{- if ne $message.LeftDelim "" }}
  22. LeftDelim: "{{$message.LeftDelim}}",{{ end }}
  23. {{- if ne $message.RightDelim "" }}
  24. RightDelim: "{{$message.RightDelim}}",{{ end }}
  25. {{- if ne $message.Zero "" }}
  26. Zero: "{{$message.Zero}}",{{ end }}
  27. {{- if ne $message.One "" }}
  28. One: "{{$message.One}}",{{ end }}
  29. {{- if ne $message.Two "" }}
  30. Two: "{{$message.Two}}",{{ end }}
  31. {{- if ne $message.Few "" }}
  32. Few: "{{$message.Few}}",{{ end }}
  33. {{- if ne $message.Many "" }}
  34. Many: "{{$message.Many}}",{{ end }}
  35. {{- if ne $message.Other "" }}
  36. Other: "{{$message.Other}}",{{ end }}
  37. },{{ end }}
  38. }{{ end }}
  39. for tag, messagesByTag := range m {
  40. err := b.AddMessages(tag, messagesByTag...)
  41. if err != nil {
  42. b = &i18n.Bundle{}
  43. return err
  44. }
  45. }
  46. return nil
  47. }
  48. }
  49. /* vim: set tabstop=4 : */