translations.go 760 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. Package translations contains the generated Go file built by the "kurzd generate-translations"
  3. command.
  4. It MUST NOT be edited by hand.
  5. */
  6. package translations
  7. import (
  8. "github.com/nicksnyder/go-i18n/v2/i18n"
  9. "golang.org/x/text/language"
  10. "log"
  11. )
  12. type MessageMap map[language.Tag][](*i18n.Message)
  13. // Provide a stub loader to allow compilation before the first translations generation.
  14. var loadMessages func(bundle *i18n.Bundle) error = func(bundle *i18n.Bundle) error {
  15. log.Println("Running the stub translations loader. Only useful to run generate-translations.")
  16. return nil
  17. }
  18. func MustLoadMessages(b *i18n.Bundle) {
  19. // This function is created when running kurzd generate-translations.
  20. err := loadMessages(b)
  21. if err != nil {
  22. panic(err)
  23. }
  24. }