Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
WIP 5d40c08 Jun 5, 2019
1 contributor

Users who have contributed to this file

62 lines (60 sloc) 1012 Bytes
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
You can’t perform that action at this time.