mirror of https://github.com/zlatinb/muwire
externalize enum names
parent
a7f58c03f7
commit
fd0e79eb4e
|
@ -485,3 +485,18 @@ SIGN_TEXT=Sign Text
|
|||
ENTER_TEXT_TO_SIGN=Enter text to be signed
|
||||
SIGN=Sign
|
||||
COPY_TO_CLIPBOARD=Copy To Clipboard
|
||||
|
||||
## Enums
|
||||
CONNECTING=Connecting
|
||||
HASHLIST=Hash List
|
||||
FAILED=Failed
|
||||
HOPELESS=Hopeless
|
||||
CANCELLED=Cancelled
|
||||
PAUSED=Paused
|
||||
FINISHED=Finished
|
||||
FETCHING=Fetching
|
||||
DONE=Done
|
||||
SUCCESSFUL=Successful
|
||||
REJECTED=Rejected
|
||||
DISCONNECTED=Disconnected
|
||||
IDLE=Idle
|
||||
|
|
|
@ -52,7 +52,7 @@ class BrowseView {
|
|||
borderLayout()
|
||||
panel (constraints : BorderLayout.NORTH) {
|
||||
label(text: trans("STATUS") + ":")
|
||||
label(text: bind {model.status.toString()})
|
||||
label(text: bind {trans(model.status.name())})
|
||||
label(text : bind {model.totalResults == 0 ? "" : Math.round(model.resultCount * 100 / model.totalResults)+ "%"})
|
||||
}
|
||||
scrollPane (constraints : BorderLayout.CENTER){
|
||||
|
|
|
@ -39,7 +39,7 @@ class ChatServerView {
|
|||
}
|
||||
panel {
|
||||
label(text : trans("CONNECTION_STATUS") + " ")
|
||||
label(text : bind {model.status.toString()})
|
||||
label(text : bind {trans(model.status.name())})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ class FetchCertificatesView {
|
|||
borderLayout()
|
||||
panel(constraints : BorderLayout.NORTH) {
|
||||
label(text : trans("STATUS") + ":")
|
||||
label(text : bind {model.status.toString()})
|
||||
label(text : bind {trans(model.status.name())})
|
||||
label(text : bind {model.certificateCount == 0 ? "" : Math.round(model.certificateCount * 100 / model.totalCertificates)+"%"})
|
||||
}
|
||||
scrollPane(constraints : BorderLayout.CENTER) {
|
||||
|
|
|
@ -219,7 +219,7 @@ class MainFrameView {
|
|||
downloadsTable = table(id : "downloads-table", autoCreateRowSorter : true, rowHeight : rowHeight) {
|
||||
tableModel(list: model.downloads) {
|
||||
closureColumn(header: trans("NAME"), preferredWidth: 300, type: String, read : {row -> row.downloader.file.getName()})
|
||||
closureColumn(header: trans("STATUS"), preferredWidth: 50, type: String, read : {row -> row.downloader.getCurrentState().toString()})
|
||||
closureColumn(header: trans("STATUS"), preferredWidth: 50, type: String, read : {row -> trans(row.downloader.getCurrentState().name())})
|
||||
closureColumn(header: trans("PROGRESS"), preferredWidth: 70, type: Downloader, read: { row -> row.downloader })
|
||||
closureColumn(header: trans("SPEED"), preferredWidth: 50, type:String, read :{row ->
|
||||
DataHelper.formatSize2Decimal(row.downloader.speed(), false) + trans("B_SEC")
|
||||
|
@ -462,7 +462,7 @@ class MainFrameView {
|
|||
closureColumn(header : trans("PUBLISHER"), preferredWidth: 350, type : String, read : {it.getPublisher().getHumanReadableName()})
|
||||
closureColumn(header : trans("FILES"), preferredWidth: 10, type : Integer, read : {model.core.feedManager.getFeedItems(it.getPublisher()).size()})
|
||||
closureColumn(header : trans("LAST_UPDATED"), type : Long, read : {it.getLastUpdated()})
|
||||
closureColumn(header : trans("STATUS"), preferredWidth: 10, type : String, read : {it.getStatus().toString()})
|
||||
closureColumn(header : trans("STATUS"), preferredWidth: 10, type : String, read : {trans(it.getStatus().name())})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue