Commit 0cbe8d43 authored by jlopez's avatar jlopez
Browse files

Add locales in wicopa, #22

parent d048b502
......@@ -274,6 +274,18 @@ function generate_container() {
nrow += 1;
}
PREVIEW += "\n";
var locale = document.getElementById("localePreview").value;
if(isSingularity) {
PREVIEW += "\t"+ locale + "\n";
nrow += 1;
}
else {
PREVIEW += "RUN " + locale + "\n";
nrow += 1;
}
PREVIEW += "\n";
if(isSingularity) {
PREVIEW += "\t" + manager + " update\n";
......@@ -327,6 +339,24 @@ function generate_container() {
PREVIEW += "\t&& make install "+ "\n";
}
nrow += 8;
var localeR = document.getElementById("localeR").value;
if(localeR != "") {
localeR = "echo 'Sys.setlocale(\"LC_ALL\", \"" + localeR + "\")' | R --slave";
if(isSingularity) {
PREVIEW += "\t"+ localeR + "\n";
nrow += 1;
}
else {
PREVIEW += "RUN " + localeR + "\n";
nrow += 1;
}
PREVIEW += "\n";
}
}
for(var i = 0; i < SELECTED_PACKAGES["CRAN"].length; i++) {
......@@ -545,7 +575,20 @@ function generate_container() {
PREVIEW += "\nRUN curl -L https://cpanmin.us | perl - App::cpanminus\n";
}
var localePerl = document.getElementById("localePerl").value;
if(localePerl != "") {
if(isSingularity) {
PREVIEW += "\t"+ localePerl + "\n";
nrow += 1;
}
else {
PREVIEW += "RUN " + localePerl + "\n";
nrow += 1;
}
PREVIEW += "\n";
}
nrow += 3;
......
......@@ -16,6 +16,15 @@ function printSection($name, $db) {
</div>
';
printPanel($name);
} else if($name == "CPAN") {
echo '
<div class="form-group">
<label for="localePerl" class="font-weight-bold">Perl locale :</label>
<input type="text" class="form-control" id="localePerl" value="locale-gen en_US.UTF-8 && update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 LANGUAGE=en_US:en">
</div>
';
printPanel($name);
} else if($name == "R") {
$subsection = $db->getNameSectionWhithParent("R");
......@@ -29,6 +38,11 @@ function printSection($name, $db) {
<option value="3.5">3.5</option>
</select>
</div>
<div class="form-group">
<label for="localeR" class="font-weight-bold">R locale :</label>
<input type="text" class="form-control" id="localeR" value="en_US.UTF-8">
</div>
<nav>
<div class="nav nav-tabs" id="nav-tab-R" role="tablist">
......
......@@ -230,6 +230,20 @@ require_once "./inc/php/buildHeader.php";
<br/>
<br/>
<div class="col-12">
<div class="card border border-dark">
<div class="card-header bg-dark text-light">
Locale :
</div>
<div class="card-body">
<input type="text" class="form-control" id="localePreview" value="sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen && echo 'LANG=&quot;en_US.UTF-8&quot;' >> /etc/default/locale">
</div>
</div>
</div>
<br/>
<div class="col-12">
<div class="card border border-dark">
<div class="card-header bg-dark text-light">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment