Skip to content

Commit

Permalink
Expand translations
Browse files Browse the repository at this point in the history
  • Loading branch information
xxxserxxx committed Jun 19, 2020
1 parent f599454 commit b6b7541
Show file tree
Hide file tree
Showing 18 changed files with 432 additions and 66 deletions.
3 changes: 2 additions & 1 deletion cmd/gotop/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,8 @@ func main() {
if ec < 2 {
logpath := filepath.Join(conf.ConfigDir.QueryCacheFolder().Path, logging.LOGFILE)
fmt.Println(tr.Value("error.checklog", logpath))
fmt.Println(ioutil.ReadFile(logpath))
bs, _ := ioutil.ReadFile(logpath)
fmt.Println(string(bs))
}
}
os.Exit(ec)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/xxxserxxx/gotop/v4

require (
github.com/cloudfoundry-attic/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
github.com/VictoriaMetrics/metrics v1.11.2
github.com/cloudfoundry-attic/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21
github.com/distatus/battery v0.9.0
github.com/gizak/termui/v3 v3.1.0
github.com/go-ole/go-ole v1.2.4 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ github.com/xxxserxxx/opflag v1.0.5 h1:2H4Qtl1qe+dSkEcGt+fBe2mQ8z14MgkWPqcLaoa6k9
github.com/xxxserxxx/opflag v1.0.5/go.mod h1:GWZtb3/tGGj5W1GE/JTyJAuqgxDxl1+jqDGAGM+P/p4=
golang.org/x/sys v0.0.0-20200316230553-a7d97aace0b0 h1:4Khi5GeNOkZS5DqSBRn4Sy7BE6GuxwOqARPqfurkdNk=
golang.org/x/sys v0.0.0-20200316230553-a7d97aace0b0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 h1:ogLJMz+qpzav7lGMh10LMvAkM/fAoGlaiiHYiFYdm80=
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
Expand Down
95 changes: 94 additions & 1 deletion translations/de_DE.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
configfile="Config file"
usage="Usage: {0} [options]\n\nOptions:\n"
total="Total"


[help]
Expand Down Expand Up @@ -35,10 +36,102 @@ List <devices|layouts|colorschemes|paths|keys>
write="Write out a default config file."


[errors]
[error]
configparse="failed to parse config file: {0}"
cliparse="parsing CLI args: {0}"
logsetup="failed to setup log file: {0}"
unknownopt="Unknown option \"{0}\"; try layouts, colorschemes, keys, paths, or devices\n"
writefail="Failed to write configuration file: {0}"
checklog="errors encountered; from {0}:"
metricsetup="error setting up {0} metrics: {1}"
nometrics="no metrics for {0} {0}"
fatalfetch="fatal error fetching {0} info: {1}"
recovfetch="recoverable error fetching {0} info; skipping {0}: {0}"
nodevfound="no usable {0} found"
setuperr="error setting up {0}: {1}"


[widget.label]
disk=" Disk Usage "
cpu=" CPU Usage "
gauge=" Power Level "
battery=" Battery Status "
batt=" Battery "
temp=" Temperatures "
net=" Network Usage "
netint=" Network Usage: {0} "
mem=" Memory Usage "
help="""
Quit: q or <C-c>
Process navigation:
- k and <Up>: up
- j and <Down>: down
- <C-u>: half page up
- <C-d>: half page down
- <C-b>: full page up
- <C-f>: full page down
- gg and <Home>: jump to top
- G and <End>: jump to bottom
Process actions:
- <Tab>: toggle process grouping
- dd: kill selected process or group of processes with SIGTERM (15)
- d3: kill selected process or group of processes with SIGQUIT (3)
- d9: kill selected process or group of processes with SIGKILL (9)
Process sorting:
- c: CPU
- m: Mem
- p: PID
Process filtering:
- /: start editing filter
- (while editing):
- <Enter>: accept filter
- <C-c> and <Escape>: clear filter
CPU and Mem graph scaling:
- h: scale in
- l: scale out
Network:
- b: toggle between mbps and scaled bytes per second
"""


[widget.net.err]
netactivity="failed to get network activity from gopsutil: {0}"
negvalrecv="error: negative value for recently received network data from gopsutil. recentBytesRecv: {0}"
negvalsent="error: negative value for recently sent network data from gopsutil. recentBytesSent: {0}"


[widget.disk]
disk="Disk"
mount="Mount"
used="Used"
free="Free"
rs="R/s"
ws="W/s"


[widget.proc]
filter=" Filter: "
label=" Processes "
[widget.proc.header]
count="Count"
command="Command"
cpu="CPU%"
mem="Mem%"
pid="PID"
[widget.proc.err]
count="failed to get CPU count from gopsutil: {0}"
retrieve="failed to retrieve processes: {0}"
ps="failed to execute 'ps' command: {0}"
gopsutil="failed to get processes from gopsutil: {0}"
pidconv="failed to convert PID to int: {0}. line: {1}"
cpuconv="failed to convert CPU usage to float: {0}. line: {1}"
memconv="failed to convert Mem usage to float: {0}. line: {1}"
getcmd="failed to get process command from gopsutil: {0}. psProc: {1}. i: {2}. pid: {3}"
cpupercent="failed to get process cpu usage from gopsutil: {0}. psProc: {1}. i: {2}. pid: {3}"
mempercent="failed to get process memeory usage from gopsutil: {0}. psProc: {1}. i: {2}. pid: {3}"
65 changes: 49 additions & 16 deletions translations/en_US.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
configfile="Config file"
usage="Usage: {0} [options]\n\nOptions:\n"
total="Total"


[help]
Expand Down Expand Up @@ -36,26 +37,30 @@ write="Write out a default config file."


[error]
configparse="0: failed to parse config file: {0}"
cliparse="1: parsing CLI args: {0}"
logsetup="2: failed to setup log file: {0}"
unknownopt="3: Unknown option \"{0}\"; try layouts, colorschemes, keys, paths, or devices\n"
writefail="4: Failed to write configuration file: {0}"
checklog="5: errors encountered; from {0}:"
metricsetup="6: error setting up {0} metrics: {1}"
nometrics="7: no metrics for {0} {0}"
fatalfetch="8: fatal error fetching {0} info: {1}"
recovfetch="9: recoverable error fetching {0} info; skipping {0}: {0}"
nodevfound="10: no usable {0} found"
setuperr="11: error setting up {0}: {1}"


[widget]
configparse="failed to parse config file: {0}"
cliparse="parsing CLI args: {0}"
logsetup="failed to setup log file: {0}"
unknownopt="Unknown option \"{0}\"; try layouts, colorschemes, keys, paths, or devices\n"
writefail="Failed to write configuration file: {0}"
checklog="errors encountered; from {0}:"
metricsetup="error setting up {0} metrics: {1}"
nometrics="no metrics for {0} {0}"
fatalfetch="fatal error fetching {0} info: {1}"
recovfetch="recoverable error fetching {0} info; skipping {0}: {0}"
nodevfound="no usable {0} found"
setuperr="error setting up {0}: {1}"


[widget.label]
disk=" Disk Usage "
cpu=" CPU Usage "
gauge=" Power Level "
battery=" Battery Status "
batt=
batt=" Battery "
temp=" Temperatures "
net=" Network Usage "
netint=" Network Usage: {0} "
mem=" Memory Usage "
help="""
Quit: q or <C-c>
Expand Down Expand Up @@ -95,10 +100,38 @@ Network:
"""


[widget.net.err]
netactivity="failed to get network activity from gopsutil: {0}"
negvalrecv="error: negative value for recently received network data from gopsutil. recentBytesRecv: {0}"
negvalsent="error: negative value for recently sent network data from gopsutil. recentBytesSent: {0}"


[widget.disk]
disk="Disk"
mount="Mount"
used="Used"
free="Free"
rs="R/s"
ws="W/s"


[widget.proc]
filter=" Filter: "
label=" Processes "
[widget.proc.header]
count="Count"
command="Command"
cpu="CPU%"
mem="Mem%"
pid="PID"
[widget.proc.err]
count="failed to get CPU count from gopsutil: {0}"
retrieve="failed to retrieve processes: {0}"
ps="failed to execute 'ps' command: {0}"
gopsutil="failed to get processes from gopsutil: {0}"
pidconv="failed to convert PID to int: {0}. line: {1}"
cpuconv="failed to convert CPU usage to float: {0}. line: {1}"
memconv="failed to convert Mem usage to float: {0}. line: {1}"
getcmd="failed to get process command from gopsutil: {0}. psProc: {1}. i: {2}. pid: {3}"
cpupercent="failed to get process cpu usage from gopsutil: {0}. psProc: {1}. i: {2}. pid: {3}"
mempercent="failed to get process memeory usage from gopsutil: {0}. psProc: {1}. i: {2}. pid: {3}"
137 changes: 137 additions & 0 deletions translations/tt_TT.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
configfile="CFG FLE"
usage="egasU: {0} [snoitpo]\n\nsnoitpO:\n"
total="latoT"


[help]
paths="redro ni ,rof dehcraes era ,elif gifnoc eht dna ,stuoyal & semehcsroloc elbadaoL:"
log="ni si elif gol ehT {0}"
written="ot nettirw gifnoC {0}"


[args]
help=".neercs siht wohS"
color=".emehcsroloc a teS"
scale="0> ,rotcaf elacs hparG"
version=".tixe dna noisrev tnirP"
percpu=".tegdiw UPC eht ni UPC hcae wohS"
cpuavg=".tegdiw UPC eht ni UPC egareva wohS"
temp=".tiehnerhaf ni serutarepmet wohS.tiehnerhaf ni serutarepmet wohS"
statusbar=".emit eht htiw rabsutats a wohS"
rate=".sm001 yreve hserfer = \"sm001\" .etunim yreve hserfer = \"m1\" .detpecca stinu emit tsoM .ycneuqerf hserfeR"
layout="Name of layout spec file for the UI. Use \"-\" to pipe."
net="gnisu derongi eb osla nac secafretnI .seulav detarapes ammoc gnisu denifed eb nac secafretni lareveS .ecafretni krowten tceleS \"!\""
export=".trop deificeps eht no tropxe rof scirtem elbanE"
mbps=".spbm sa etar krowten wohS"
test=".edoc eruliaf/sseccus htiw stixe dna stset snuR"
conffile=")TNEMUGRA TSRIF EB TSUM( tluafed fo daetsni esu ot elif gifnoC"
list="""
>syek|shtap|semehcsroloc|stuoyal|secived< tsiL
stegdiw elbaretlif rof seman ecived tuo stnirP :secived
stuoyal ni-dliub stsiL :stuoyal
semehcsroloc ni-tliub stsiL :semehcsroloc
shtap hcraes elif noitarugifnoc tuo tsiL :shtap
tuoyal a ni desu eb nac taht stegdiW :stegdiw
.sgnidnib draobyek eht wohS :syek """
write=".elif gifnoc tluafed a tuo etirW"


[error]
configparse="elif gifnoc esrap ot deliaf: {0}"
cliparse="sgra ILC gnisrap: {0}"
logsetup="elif gol putes ot deliaf: {0}"
unknownopt="noitpo nwonknU \"{0}\"; secived ro ,shtap ,syek ,semehcsroloc ,stuoyal yrt\n"
writefail="elif noitarugifnoc etirw ot deliaF: {0}"
checklog="morf ;deretnuocne srorre {0}:"
metricsetup="pu gnittes rorre {0} scirtem: {1}"
nometrics="rof scirtem on {0} {0}"
fatalfetch="gnihctef rorre lataf {0} ofni: {1}"
recovfetch="gnihctef rorre elbarevocer {0} gnippiks ;ofni {0}: {0}"
nodevfound="elbasu on {0} dnuof"
setuperr="pu gnittes rorre {0}: {1}"


[widget.label]
disk=" egasU ksiD "
cpu=" egasU UPC "
gauge=" leveL rewoP "
battery=" sutatS yrettaB "
batt=" yrettaB "
temp=" serutarepmeT "
net=" egasU krowteN "
netint=" egasU krowteN: {0} "
mem=" egasU yromeM "
help="""
>c-C< ro q :tiuQ
:noitagivan ssecorP
pu :>pU< dna k -
nwod :>nwoD< dna j -
pu egap flah :>u-C< -
nwod egap flah :>d-C< -
pu egap lluf :>b-C< -
nwod egap lluf :>f-C< -
pot ot pmuj :>emoH< dna gg -
mottob ot pmuj :>dnE< dna G -
:snoitca ssecorP
gnipuorg ssecorp elggot :>baT< -
)51( MRETGIS htiw sessecorp fo puorg ro ssecorp detceles llik :dd -
)3( TIUQGIS htiw sessecorp fo puorg ro ssecorp detceles llik :3d -
)9( LLIKGIS htiw sessecorp fo puorg ro ssecorp detceles llik :9d -
:gnitros ssecorP
UPC :c -
meM :m -
DIP :p -
:gniretlif ssecorP
retlif gnitide trats :/ -
:)gnitide elihw( -
retlif tpecca :>retnE< -
retlif raelc :>epacsE< dna >c-C< -
:gnilacs hparg meM dna UPC
ni elacs :h -
tuo elacs :l -
:krowteN
dnoces rep setyb delacs dna spbm neewteb elggot :b -
"""


[widget.net.err]
netactivity="lituspog morf ytivitca krowten teg ot deliaf: {0}"
negvalrecv=":vceRsetyBtnecer .lituspog morf atad krowten deviecer yltnecer rof eulav evitagen :rorre {0}"
negvalsent=":tneSsetyBtnecer .lituspog morf atad krowten tnes yltnecer rof eulav evitagen :rorre {0}"


[widget.disk]
disk="ksiD"
mount="tnuoM"
used="desU"
free="eerF"
rs="s/R"
ws="s/W"


[widget.proc]
filter=" :retliF "
label=" sessecorP "
[widget.proc.header]
count="tnuoC"
command="dnammoC"
cpu="%UPC"
mem="%meM"
pid="DIP"
[widget.proc.err]
count=":lituspog morf tnuoc UPC teg ot deliaf {0}"
retrieve=":sessecorp eveirter ot deliaf {0}"
ps=":dnammoc 'sp' etucexe ot deliaf {0}"
gopsutil=":lituspog morf sessecorp teg ot deliaf {0}"
pidconv=":tni ot DIP trevnoc ot deliaf {0}. enil: {1}"
cpuconv=":taolf ot egasu UPC trevnoc ot deliaf {0}. :enil {1}"
memconv=":taolf ot egasu meM trevnoc ot deliaf {0}. :enil {1}"
getcmd=":lituspog morf dnammoc ssecorp teg ot deliaf {0}. corPsp: {1}. i: {2}. dip: {3}"
cpupercent="lituspog morf egasu upc ssecorp teg ot deliaf: {0}. corPsp: {1}. i: {2}. dip: {3}"
mempercent="spog morf egasu yroemem ssecorp teg ot deliafutil: {0}. corPsp: {1}. i: {2}. dip: {3}"
Loading

0 comments on commit b6b7541

Please sign in to comment.