Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 65493ad

Browse files
Only call locale_dependency() for locales not included with standard bundle, closes #1686
1 parent 37a2708 commit 65493ad

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

‎R/layout.R

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,15 @@ rangeslider <- function(p, start = NULL, end = NULL, ...) {
134134
config <- function(p, ..., cloud = FALSE, showSendToCloud = cloud, locale = NULL, mathjax = NULL) {
135135

136136
if (!is.null(locale)) {
137-
p$dependencies <- c(
138-
p$dependencies,
139-
list(locale_dependency(locale))
140-
)
141137
p$x$config$locale <- locale
138+
# Plotly.js defaults to US English (en-US) and includes
139+
# British English (en) in the standard bundle.
140+
if (!locale %in% c("en", "en-US")) {
141+
p$dependencies <- c(
142+
p$dependencies,
143+
list(locale_dependency(locale))
144+
)
145+
}
142146
}
143147

144148
if (!is.null(mathjax)) {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /