Skip to content
Permalink
Browse files

WIP

  • Loading branch information...
jesseduffield committed Jun 5, 2019
1 parent 53844b2 commit 5d40c084a5bdd915235d66f4decb0c5cf9b00505
Showing with 186 additions and 1,062 deletions.
  1. +62 −0 getter.rb
  2. +1 −1 pkg/app/app.go
  3. +2 −14 pkg/i18n/dutch.go
  4. +102 −872 pkg/i18n/english.go
  5. +17 −72 pkg/i18n/i18n.go
  6. +0 −91 pkg/i18n/i18n_test.go
  7. +2 −12 pkg/i18n/polish.go
@@ -0,0 +1,62 @@
ids = %w[
AnonymousReportingPrompt
AnonymousReportingTitle
attach
cancel
close
Confirm
confirmPruneImages
ConfirmQuit
ContainersTitle
CustomCommand
Donate
EditConfig
Error
ErrorOccurred
execute
ImagesTitle
menu
mustForceToRemoveContainer
navigate
nextContext
NoContainers
NoImages
NotEnoughSpace
NoViewMachingNewLineFocusedSwitchStatement
OpenConfig
pressEnterToReturn
previousContext
pruneImages
PruningStatus
remove
removeImage
removeService
removeWithoutPrune
removeWithVolumes
RemovingStatus
resizingPopupPanel
restart
RestartingStatus
RunningSubprocess
scroll
ServicesTitle
StatusTitle
stop
StopContainer
StoppingStatus
StopService
viewLogs
]

f = File.read('pkg/i18n/english.go')

f.lines.each_with_index do |line, index|
if line[/ID:/]
stripped = line.strip.gsub(/ID: *"/, '",').gsub('",', '')
if ids.include?(stripped)
key = stripped[0].upcase + stripped[1..-1]
value = f.lines[index+1].strip.gsub(/Other: *"/, '').gsub('",', '')
puts "#{key}: \"#{value}\","
end
end
end
@@ -33,7 +33,7 @@ func NewApp(config *config.AppConfig) (*App, error) {
}
var err error
app.Log = log.NewLogger(config, "23432119147a4367abf7c0de2aa99a2d")
app.Tr = i18n.NewLocalizer(app.Log)
app.Tr := i18n.NewTranslationSet(logger)
app.OSCommand = commands.NewOSCommand(app.Log, config)

// here is the place to make use of the docker-compose.yml file in the current directory
@@ -1,17 +1,5 @@
package i18n

import (
"github.com/nicksnyder/go-i18n/v2/i18n"
"golang.org/x/text/language"
)

// addDutch will add all dutch translations
func addDutch(i18nObject *i18n.Bundle) error {

// add the translations
return i18nObject.AddMessages(language.Dutch,
&i18n.Message{
ID: "NotEnoughSpace",
Other: "Niet genoeg ruimte om de panelen te renderen",
})
func dutchSet() TranslationSet {
return TranslationSet{}
}

0 comments on commit 5d40c08

Please sign in to comment.
You can’t perform that action at this time.