Skip to content

Commit

Permalink
Move to embed.FS so we automatically include all
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Jul 16, 2024
1 parent 25a0868 commit 3e89c6e
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 44 deletions.
12 changes: 5 additions & 7 deletions cmd/fyneterm/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
//go:generate fyne bundle -o translation.go ../../translation/

package main

import (
"embed"
"flag"
"image/color"

Expand All @@ -21,6 +20,9 @@ const termOverlay = fyne.ThemeColorName("termOver")

var sizer *termTheme

//go:embed translation
var translations embed.FS

func setupListener(t *terminal.Terminal, w fyne.Window) {
listen := make(chan terminal.Config)
go func() {
Expand Down Expand Up @@ -53,11 +55,7 @@ func main() {
flag.BoolVar(&debug, "debug", false, "Show terminal debug messages")
flag.Parse()

lang.AddTranslations(resourceActiveEnJson)
lang.AddTranslations(resourceActiveFrJson)
lang.AddTranslations(resourceActiveRuJson)
lang.AddTranslations(resourceActiveSkJson)
lang.AddTranslations(resourceActiveUkJson)
lang.AddTranslationsFS(translations, "translation")

a := app.New()
a.SetIcon(data.Icon)
Expand Down
37 changes: 0 additions & 37 deletions cmd/fyneterm/translation.go

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 3e89c6e

Please sign in to comment.