ExtractLocaleFiles extracts the locale files from the babel message files.
()
| 224 | |
| 225 | // ExtractLocaleFiles extracts the locale files from the babel message files. |
| 226 | func (js Js) ExtractLocaleFiles() error { |
| 227 | ok, err := target.Dir( |
| 228 | filepath.Join("pkg", "webui", "locales", "en.json"), |
| 229 | filepath.Join(".cache", "messages"), |
| 230 | ) |
| 231 | if err != nil { |
| 232 | return targetError(err) |
| 233 | } |
| 234 | if !ok { |
| 235 | return nil |
| 236 | } |
| 237 | if mg.Verbose() { |
| 238 | fmt.Println("Building frontend locale files") |
| 239 | } |
| 240 | return sh.Run("node", "tools/mage/translations.js", "--ignore-duplicates") |
| 241 | } |
| 242 | |
| 243 | // BackendTranslations builds the backend locale files. |
| 244 | func (js Js) BackendTranslations() error { |
nothing calls this directly
no test coverage detected