MCPcopy Index your code
hub / github.com/TheThingsNetwork/lorawan-stack / ExtractLocaleFiles

Method ExtractLocaleFiles

tools/mage/js.go:226–241  ·  view source on GitHub ↗

ExtractLocaleFiles extracts the locale files from the babel message files.

()

Source from the content-addressed store, hash-verified

224
225// ExtractLocaleFiles extracts the locale files from the babel message files.
226func (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.
244func (js Js) BackendTranslations() error {

Callers

nothing calls this directly

Calls 4

targetErrorFunction · 0.85
DirMethod · 0.80
JoinMethod · 0.65
RunMethod · 0.65

Tested by

no test coverage detected