-
Notifications
You must be signed in to change notification settings - Fork 4
/
localized_ui.R
102 lines (98 loc) · 4.12 KB
/
localized_ui.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
library(shinyBS)
localizedUI <- function(i18n) {
fluidPage(withMathJax(),
tagList(
titlePanel(
title=div(img(src="QuitaUp_logo.svg", height=44, style="margin: 15px 0px 15px 3px;")),
windowTitle = i18n$t("title")
),
sidebarLayout(
sidebarPanel(width=3,
fileInput("file", i18n$t("fileinput"), multiple = TRUE,
buttonLabel = i18n$t("fileinputbut"), placeholder = i18n$t("fileinputph")),
selectInput("langsel", i18n$t("langsel"), selected = "cs",
choices = {
choices = languages
names(choices) = sapply(languages, i18n$t)
choices
}),
selectInput("unit", i18n$t("units"), selected = default_unit,
choices = {
choices = units_available
names(choices) = sapply(units_available, i18n$t)
choices
}),
checkboxInput("punct", i18n$t("punct"), value = TRUE)
),
mainPanel(width=9,
tabsetPanel(selected="about", id="mainpanel",
tabPanel(i18n$t("preview"), value = "preview",
conditionalPanel(condition = "output.checkupload",
h3(i18n$t("uploadedfiles")),
tableOutput("filesOverview"),
h3(i18n$t("controlpreview")),
radioButtons("previewType", i18n$t("previewType"), inline=T,
choices = {
choices = c(1,2)
names(choices) = sapply(c("orig", "vert"), i18n$t)
choices
}),
uiOutput("textPanelsPreview"),
htmlOutput("UDmodel")
),
),
tabPanel(i18n$t("indices"), value = "indices",
uiOutput("textPanelsIndices"),
downloadButton("allindices", i18n$t("indexydwld"))
),
tabPanel(i18n$t("about"), value = "about",
h3(i18n$t("welcome hdln")),
HTML(i18n$t("info text")),
br(),
img(src = i18n$t("logolink"), alt="ESIF logolink", width="780", height="173"),
h3(i18n$t("manual")),
h4(i18n$t("vlozenitextu")),
HTML(i18n$t("vlozenitextutext")),
h4(i18n$t("zpractextu")),
HTML(i18n$t("zpractextutext")),
h4(i18n$t("vystupy")),
p(HTML(i18n$t("out N")), class="vystupy"),
p(HTML(i18n$t("out V")), class="vystupy"),
p(HTML(i18n$t("out TTR")), class="vystupy"),
p(HTML(i18n$t("out h")), class="vystupy"),
p(HTML(i18n$t("out hap")), class="vystupy"),
p(HTML(i18n$t("out haptok")), class="vystupy"),
p(HTML(i18n$t("out entro")), class="vystupy"),
p(HTML(i18n$t("out VD")), class="vystupy"),
p(HTML(i18n$t("out Q")), class="vystupy"),
p(HTML(i18n$t("out D")), class="vystupy"),
p(HTML(i18n$t("out ATL")), class="vystupy"),
p(HTML(i18n$t("out TC")), class="vystupy"),
p(HTML(i18n$t("out STC")), class="vystupy"),
p(HTML(i18n$t("out MATTR")), class="vystupy"),
p(HTML(i18n$t("out zTTR")), class="vystupy"),
p(HTML(i18n$t("out MAMR")), class="vystupy"),
h3(i18n$t("historie")),
p(HTML(i18n$t("historietext"))),
h3(i18n$t("literatura")),
p(HTML(i18n$t("literaturatext"))),
h3(i18n$t("howtocite")),
p(HTML(i18n$t("howtocitetext")))
)
)
)
),
tags$hr(),
tags$p(
tags$small(
i18n$t("title"),
#stringr::str_to_title(appName),
i18n$t("ver"), appVer[1], names(appVer[1]),
HTML("© <a href='https://www.korpus.cz'>"), i18n$t("cnc"), HTML("</a>"), HTML("Václav Cvrček"),
HTML("• <a href='https://kcj.osu.cz/'>"), i18n$t("kcjffou"), HTML("</a>"),
HTML(paste0("• <a href='"), bugReportUrl, "' target='_blank'>"), i18n$t("error"), HTML("</a>")
)
)
)
)
}