Skip to content

Commit

Permalink
fix i18n: use gettextf and % together
Browse files Browse the repository at this point in the history
  • Loading branch information
shun2wang committed Nov 9, 2024
1 parent 802fd71 commit afd6856
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions R/classicalmetaanalysiscommon.R
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
rmaInput$data$constant <- 1
for (i in seq_along(rmaInput$dist)) {
if (is.matrix(rmaInput$dist[[i]]) && !all(unique(rmaInput[["data"]][[names(rmaInput$dist)[i]]]) %in% rownames(rmaInput$dist[[names(rmaInput$dist)[i]]])))
.quitAnalysis(sprintf(gettext("The loaded distance matrix for '%1$s' does not match the dataset. The following levels are missing: %2$s."),
.quitAnalysis(gettextf("The loaded distance matrix for '%1$s' does not match the dataset. The following levels are missing: %2$s.",
names(rmaInput$dist)[i],
paste0(unique(rmaInput[["data"]][[names(rmaInput$dist)[i]]])[!unique(rmaInput[["data"]][[names(rmaInput$dist)[i]]]) %in% rownames(rmaInput$dist)], collapse = ", ")))
}
Expand All @@ -188,7 +188,7 @@
rmaInput$R <- unlist(lapply(randomFormulaList, attr, which = "R"), recursive = FALSE)
for (i in seq_along(rmaInput$R)) {
if (!all(unique(rmaInput[["data"]][[names(rmaInput$R)[i]]]) %in% rownames(rmaInput$R[[names(rmaInput$R)[i]]])))
.quitAnalysis(sprintf(gettext("The loaded correlation matrix for '%1$s' does not match the dataset. The following levels are missing: %2$s."),
.quitAnalysis(gettextf("The loaded correlation matrix for '%1$s' does not match the dataset. The following levels are missing: %2$s.",
names(rmaInput$R)[i],
paste0(unique(rmaInput[["data"]][[names(rmaInput$R)[i]]])[!unique(rmaInput[["data"]][[names(rmaInput$R)[i]]]) %in% rownames(rmaInput$R)], collapse = ", ")))
}
Expand Down
4 changes: 2 additions & 2 deletions R/classicalmetaanalysismultilevelmultivariate.R
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ ClassicalMetaAnalysisMultilevelMultivariate <- function(jaspResults, dataset = N
.quitAnalysis(gettextf("Error reading the distance matrix file: %1$s", distanceMatrix))

if (nrow(distanceMatrix) != ncol(distanceMatrix))
.quitAnalysis(gettext("The distance matrix must be square. The number of rows (%1$i) does not match the number of columns (%2$i).",
.quitAnalysis(gettextf("The distance matrix must be square. The number of rows (%1$i) does not match the number of columns (%2$i).",
nrow(distanceMatrix), ncol(distanceMatrix)))

# spatial does not require a grouping factor
Expand Down Expand Up @@ -231,7 +231,7 @@ ClassicalMetaAnalysisMultilevelMultivariate <- function(jaspResults, dataset = N
.quitAnalysis(gettextf("Error reading the correlation matrix file: %1$s", correlationMatrix))

if (nrow(correlationMatrix) != ncol(correlationMatrix))
.quitAnalysis(gettext("The distance matrix must be square. The number of rows (%1$i) does not match the number of columns (%2$i).",
.quitAnalysis(gettextf("The distance matrix must be square. The number of rows (%1$i) does not match the number of columns (%2$i).",
nrow(correlationMatrix), ncol(correlationMatrix)))

randomFormulas[[i]] <- as.formula(paste0("~ 1 | ", tempValueOuter), env = parent.frame(1))
Expand Down
2 changes: 1 addition & 1 deletion R/effectsizecomputation.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ EffectSizeComputation <- function(jaspResults, dataset, options, state = NULL) {

# set error message if reported effect sizes cannot be performed
if (effectSizeType[["design"]] == "reportedEffectSizes" && !.escReportedEffectSizesReady(variables, all = TRUE)) {
newDataOutput <- try(stop(gettext("Cannot compute outcomes. Chech that all of the required information is specified via the appropriate arguments (i.e. an Effect Size and either Standard Error, Sampling Variance, or 95% Confidence Interval).")))
newDataOutput <- try(stop(gettextf("Cannot compute outcomes. Chech that all of the required information is specified via the appropriate arguments (i.e. an Effect Size and either Standard Error, Sampling Variance, or 95%% Confidence Interval).")))
} else {
# set escalc input
escalcInput <- c(
Expand Down
12 changes: 6 additions & 6 deletions R/funnelplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -540,9 +540,9 @@ FunnelPlot <- function(jaspResults, dataset = NULL, options, ...) {
metaRegressionTable$addColumnInfo(name = "k", title = gettext("Estimates"), type = "integer")
metaRegressionTable$addColumnInfo(name = "z", title = gettext("z"), type = "number", overtitle = gettext("Asymmetry Test"))
metaRegressionTable$addColumnInfo(name = "p", title = gettext("p"), type = "pvalue", overtitle = gettext("Asymmetry Test"))
metaRegressionTable$addColumnInfo(name = "est", title = gettext("Estimate"), type = "number", overtitle = gettext("Limit Estimate"))
metaRegressionTable$addColumnInfo(name = "lCI", title = gettext("Lower 95% CI"), type = "number", overtitle = gettext("Limit Estimate"))
metaRegressionTable$addColumnInfo(name = "uCI", title = gettext("Upper 95% CI"), type = "number", overtitle = gettext("Limit Estimate"))
metaRegressionTable$addColumnInfo(name = "est", title = gettext("Estimate"), type = "number", overtitle = gettext("Limit Estimate"))
metaRegressionTable$addColumnInfo(name = "lCI", title = gettextf("Lower 95%% CI"), type = "number", overtitle = gettext("Limit Estimate"))
metaRegressionTable$addColumnInfo(name = "uCI", title = gettextf("Upper 95%% CI"), type = "number", overtitle = gettext("Limit Estimate"))

if (.fpReady(options)) {
if (options[["split"]] == "") {
Expand Down Expand Up @@ -595,9 +595,9 @@ FunnelPlot <- function(jaspResults, dataset = NULL, options, ...) {
weightedRegressionTable$addColumnInfo(name = "t", title = gettext("t"), type = "number", overtitle = gettext("Asymmetry Test"))
weightedRegressionTable$addColumnInfo(name = "df", title = gettext("df"), type = "integer", overtitle = gettext("Asymmetry Test"))
weightedRegressionTable$addColumnInfo(name = "p", title = gettext("p"), type = "pvalue", overtitle = gettext("Asymmetry Test"))
weightedRegressionTable$addColumnInfo(name = "est", title = gettext("Estimate"), type = "number", overtitle = gettext("Limit Estimate"))
weightedRegressionTable$addColumnInfo(name = "lCI", title = gettext("Lower 95% CI"), type = "number", overtitle = gettext("Limit Estimate"))
weightedRegressionTable$addColumnInfo(name = "uCI", title = gettext("Upper 95% CI"), type = "number", overtitle = gettext("Limit Estimate"))
weightedRegressionTable$addColumnInfo(name = "est", title = gettext("Estimate"), type = "number", overtitle = gettext("Limit Estimate"))
weightedRegressionTable$addColumnInfo(name = "lCI", title = gettextf("Lower 95%% CI"), type = "number", overtitle = gettext("Limit Estimate"))
weightedRegressionTable$addColumnInfo(name = "uCI", title = gettextf("Upper 95%% CI"), type = "number", overtitle = gettext("Limit Estimate"))

if (.fpReady(options)) {
if (options[["split"]] == "") {
Expand Down
2 changes: 1 addition & 1 deletion po/R-ar.po
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ msgstr ""
msgid ""
"Cannot compute outcomes. Chech that all of the required information is "
"specified via the appropriate arguments (i.e. an Effect Size and either "
"Standard Error, Sampling Variance, or 95% Confidence Interval)."
"Standard Error, Sampling Variance, or 95%% Confidence Interval)."
msgstr ""

msgid "Step"
Expand Down
2 changes: 1 addition & 1 deletion po/R-es.po
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ msgstr "Eventos totales"
msgid ""
"Cannot compute outcomes. Chech that all of the required information is "
"specified via the appropriate arguments (i.e. an Effect Size and either "
"Standard Error, Sampling Variance, or 95% Confidence Interval)."
"Standard Error, Sampling Variance, or 95%% Confidence Interval)."
msgstr ""

msgid "Step"
Expand Down
2 changes: 1 addition & 1 deletion po/R-ja.po
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@ msgstr "イベントの合計数"
msgid ""
"Cannot compute outcomes. Chech that all of the required information is "
"specified via the appropriate arguments (i.e. an Effect Size and either "
"Standard Error, Sampling Variance, or 95% Confidence Interval)."
"Standard Error, Sampling Variance, or 95%% Confidence Interval)."
msgstr ""

msgid "Step"
Expand Down
2 changes: 1 addition & 1 deletion po/R-jaspMetaAnalysis.pot
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ msgstr ""
msgid "Total events"
msgstr ""

msgid "Cannot compute outcomes. Chech that all of the required information is specified via the appropriate arguments (i.e. an Effect Size and either Standard Error, Sampling Variance, or 95% Confidence Interval)."
msgid "Cannot compute outcomes. Chech that all of the required information is specified via the appropriate arguments (i.e. an Effect Size and either Standard Error, Sampling Variance, or 95%% Confidence Interval)."
msgstr ""

msgid "Step"
Expand Down
2 changes: 1 addition & 1 deletion po/R-pl.po
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ msgstr ""
msgid ""
"Cannot compute outcomes. Chech that all of the required information is "
"specified via the appropriate arguments (i.e. an Effect Size and either "
"Standard Error, Sampling Variance, or 95% Confidence Interval)."
"Standard Error, Sampling Variance, or 95%% Confidence Interval)."
msgstr ""

msgid "Step"
Expand Down
2 changes: 1 addition & 1 deletion po/R-pt.po
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ msgstr ""
msgid ""
"Cannot compute outcomes. Chech that all of the required information is "
"specified via the appropriate arguments (i.e. an Effect Size and either "
"Standard Error, Sampling Variance, or 95% Confidence Interval)."
"Standard Error, Sampling Variance, or 95%% Confidence Interval)."
msgstr ""

msgid "Step"
Expand Down
2 changes: 1 addition & 1 deletion po/R-ru.po
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ msgstr ""
msgid ""
"Cannot compute outcomes. Chech that all of the required information is "
"specified via the appropriate arguments (i.e. an Effect Size and either "
"Standard Error, Sampling Variance, or 95% Confidence Interval)."
"Standard Error, Sampling Variance, or 95%% Confidence Interval)."
msgstr ""

msgid "Step"
Expand Down

0 comments on commit afd6856

Please sign in to comment.