Skip to content

Commit

Permalink
Merge pull request #1169 from percussion/438-not-all-areas-of-the-ui-…
Browse files Browse the repository at this point in the history
…are-in-spanish-when-selecting-the-spanish-locale-at-login

 Not all areas of the UI are in Spanish when selecting the Spanish Locale at login #438
  • Loading branch information
natechadwick authored Nov 21, 2023
2 parents fa5ede1 + 09de3c0 commit f04f38d
Show file tree
Hide file tree
Showing 5 changed files with 201 additions and 20 deletions.
11 changes: 5 additions & 6 deletions WebUI/war/views/PercDashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@
var title = $gadget.find(".gadgets-gadget-title");
var titleButtons = $gadget.find(".gadgets-gadget-title-button-bar");
titleButtons.css("float", "right");
var gadgetMenuButton = $("<img tabindex='0' src='../images/images/gadgetMenuButton.png' class='perc-gadget-menu-button' style='cursor:pointer' title='Click to show the Gadget Menu' alt='Gadget menu icon'/>").on('click',function(event)
var gadgetMenuButton = $("<img tabindex='0' src='../images/images/gadgetMenuButton.png' class='perc-gadget-menu-button' style='cursor:pointer' title='" + I18N.message("perc.ui.dashboard@Show Gadget Menu") + "' alt='Gadget menu icon'/>").on('click',function(event)
{
event.stopPropagation();
showMenu(self, titleBar,event);
Expand Down Expand Up @@ -623,7 +623,7 @@
menu.on({
mouseenter: function() { },
mouseleave: function() { menu.hide(); }
})
});

menu.css("top", menuY).css("left", menuX).css("display", "block");
// update the menu items based on the current state of the gadget
Expand Down Expand Up @@ -696,7 +696,7 @@
$(".ui-resizable-handle").on({
mouseenter: function() { },
mouseleave: function() { menu.hide(); }
})
});


}
Expand Down Expand Up @@ -1218,7 +1218,6 @@
return false;
}
var category = $(gadget).data('gadget').category.split(",");
var predefinedCategories = [];
$('.perc-gadget-category-predefined').text(function(i, text)
{
predefinedCategories[i] = text.toLowerCase();
Expand Down Expand Up @@ -1613,8 +1612,8 @@
function getWidthOfCol()
{
var tableWidth = $(window).width() - 27;
$("#col-0").css("width", tableWidth * .33);
$("#col-1").css("width", tableWidth * .67);
$("#col-0").css("width", tableWidth * 0.33);
$("#col-1").css("width", tableWidth * 0.67);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@
<script src="/cm/jslib/profiles/3x/jquery/plugins/jquery-perc-retiredjs/tools.scrollable.mousewheel-1.0.1.js" ></script>
<script src="/cm/jslib/profiles/3x/jquery/plugins/jquery-perc-retiredjs/jquery.text-overflow.js" ></script>
<script src="/cm/jslib/profiles/3x/jquery/plugins/jquery-dynatree/jquery.dynatree.js" ></script>
<script src="/Rhythmyx/tmx/tmx.jsp?mode=js&amp;prefix=perc.ui.&amp;"></script>
<script src="/cm/plugins/perc_utils.js"></script>
<script src="/cm/plugins/perc_path_constants.js"></script>
<script src="/cm/services/PercServiceUtils.js"></script>
Expand Down Expand Up @@ -569,7 +570,7 @@
}
else
{
sitesContainer.append("<table width='100%' cellspacing='0' cellpadding='3'><tr class='odd'><td align='center'>No Sites Found</td></tr></tbody></table>");
sitesContainer.append("<table width='100%' cellspacing='0' cellpadding='3'><tr class='odd'><td align='center'>"+I18N.message("perc.ui.google.setup.gadget@No Sites Found")+"</td></tr></tbody></table>");
}
}
Expand Down Expand Up @@ -796,8 +797,8 @@
{
percJQuery.perc_utils.confirm_dialog({
id: "confirmDelete",
title: 'Warning',
question: 'Please confirm that you wish to remove your Google Analytics credentials from Percussion. Upon next publish, the Google Analytics script code will be removed from all published pages.',
title: I18N.message("perc.ui.role.controller@Warning Title"),
question: I18N.message("perc.ui.google.setup.gadget@Confirm Remove"),
width: 500,
cancel:
function(){},
Expand Down Expand Up @@ -852,6 +853,17 @@
}
}
$(document).ready(function(){
document.getElementById('perc-ga-top-label').innerText=I18N.message("perc.ui.google.setup.gadget@Connect Google");
document.getElementById('perc-email-label').innerText=I18N.message("perc.ui.google.setup.gadget@Google Email");
document.getElementById('perc-credentials-label').innerText=I18N.message("perc.ui.google.setup.gadget@Google Json File");
document.getElementById('perc-ga-connect').title=I18N.message("perc.ui.google.setup.gadget@Credential Test");
document.getElementById('perc-ga-delete').title=I18N.message("perc.ui.google.setup.gadget@Clear Credentials");
document.getElementById('perc-ga-delete').innerText=I18N.message("perc.ui.google.setup.gadget@Clear Credentials");
document.getElementById('perc-ga-site-profile-label').innerText=I18N.message("perc.ui.google.setup.gadget@Select Google Profile");
document.getElementById('perc-ga-save').title=I18N.message("perc.ui.google.setup.gadget@Save Analytics");
document.getElementById('perc-ga-cancel').title=I18N.message("perc.ui.google.setup.gadget@Revert Changes");
// Preload the over images
$.perc_utils.preLoadImages(
"/cm/gadgets/repository/perc_google_setup_gadget/images/buttonSaveOver.png",
Expand Down Expand Up @@ -886,9 +898,9 @@
<div id="perc-ga-provider-creds">
<div id="perc-ga-top-label"><label>Connect to Google:</label></div>
<label>Google Service Account email:</label><br/><input class="perc-ga-textfield" id="perc-ga-user" type="text"/>
<label id="perc-email-label">Google Service Account email:</label><br/><input class="perc-ga-textfield" id="perc-ga-user" type="text"/>
<form class="testConnectionForm" enctype="multipart/form-data">
<label>Google Service Account .json credentials file:</label>
<label id="perc-credentials-label">Google Service Account .json credentials file:</label>
<br/>
<input name="file" class="perc-ga-textfield" id="perc-ga-pwd" type="file" accept=".json"/>
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,18 @@ var PercServiceUtils = percJQuery.PercServiceUtils;
var currentReportType;
var currentReportEndpoint;

const percReportsList = [
{type: 'All Files', endpoint: 'all-files'},
{type: 'All Images', endpoint: 'all-images'},
{type: 'Non-ADA Compliant Files', endpoint: 'non-ada-compliant-files'},
{type: 'Non-ADA Compliant Images', endpoint: 'non-ada-compliant-images'}
];

$(document).ready(function() {
displayAvailableReports();
bindReportEvents();
});

function displayAvailableReports() {
const percReportsList = [
{type: I18N.message("perc.ui.reports.gadget@All Files"), endpoint: 'all-files'},
{type: I18N.message("perc.ui.reports.gadget@All Images"), endpoint: 'all-images'},
{type: I18N.message("perc.ui.reports.gadget@Non-ADA Compliant Files"), endpoint: 'non-ada-compliant-files'},
{type: I18N.message("perc.ui.reports.gadget@Non-ADA Compliant Images"), endpoint: 'non-ada-compliant-images'}
];
var reportListHtml = '';
$(percReportsList).each(function(index, report) {
reportListHtml += `<div class="perc-report-row">
Expand Down Expand Up @@ -67,10 +66,10 @@ function requestReport(path) {

function requestReportCallback(status, result) {
if (status == 'error') {
showReportAlert(`There was an problem creating the report '${currentReportType}'`);
showReportAlert(I18N.message("perc.ui.reports.gadget@Report Problem")+`'${currentReportType}'`);
}
else {
showReportAlert(`Create report request generated Successfully'${currentReportType}'`);
showReportAlert(I18N.message("perc.ui.reports.gadget@Report Successful")+`'${currentReportType}'`);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<link rel="stylesheet" type="text/css" href="/cm/css/perc_default.css" />
<link href="/cm/gadgets/repository/perc_reports_gadget/perc_reports_gadget.css" rel="stylesheet" type="text/css" />
<script src="/cm/gadgets/repository/perc_reports_gadget/perc_reports_gadget.js"></script>
<script src="/Rhythmyx/tmx/tmx.jsp?mode=js&amp;prefix=perc.ui.&amp;"></script>
<div id="percReportGadgetTarget"></div>
<div id="percReportAlertTarget"></div>
]]>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8568,6 +8568,16 @@ Documentación' href='https://help.percussion.com/'&gt;help.percussion.com&lt;/a
<seg>No se puede cargar la lista de gadgets.</seg>
</tuv>
</tu>
<tu tuid="perc.ui.dashboard@Show Gadget Menu">
<prop type="sectionname" xml:lang="en-us">Click to show the Gadget Menu</prop>
<note xml:lang="en-us"></note>
<tuv xml:lang="en-us">
<seg>Click to show the Gadget Menu</seg>
</tuv>
<tuv xml:lang="es">
<seg>Haga clic para mostrar el menú de gadgets</seg>
</tuv>
</tu>
<tu tuid="perc.ui.edit.region.properties.dialog@Enter Width">
<prop type="sectionname" xml:lang="en-us">General</prop>
<note xml:lang="en-us"></note>
Expand Down Expand Up @@ -14968,6 +14978,166 @@ Documentación' href='https://help.percussion.com/'&gt;help.percussion.com&lt;/a
<tuv xml:lang="es">
<seg>Quiero probar Siteimprove</seg>
</tuv>
</tu>
<tu tuid="perc.ui.reports.gadget@All Files">
<prop type="sectionname" xml:lang="en-us">All Files</prop>
<note xml:lang="en-us"></note>
<tuv xml:lang="en-us">
<seg>All Files</seg>
</tuv>
<tuv xml:lang="es">
<seg>Todos los archivos</seg>
</tuv>
</tu>
<tu tuid="perc.ui.reports.gadget@All Images">
<prop type="sectionname" xml:lang="en-us">All Images</prop>
<note xml:lang="en-us"></note>
<tuv xml:lang="en-us">
<seg>All Images</seg>
</tuv>
<tuv xml:lang="es">
<seg>Todas las imágenes</seg>
</tuv>
</tu>
<tu tuid="perc.ui.reports.gadget@Non-ADA Compliant Files">
<prop type="sectionname" xml:lang="en-us">Non-ADA Compliant Files</prop>
<note xml:lang="en-us"></note>
<tuv xml:lang="en-us">
<seg>Non-ADA Compliant Files</seg>
</tuv>
<tuv xml:lang="es">
<seg>Archivos que no cumplen con ADA</seg>
</tuv>
</tu>
<tu tuid="perc.ui.reports.gadget@Non-ADA Compliant Images">
<prop type="sectionname" xml:lang="en-us">Non-ADA Compliant Images</prop>
<note xml:lang="en-us"></note>
<tuv xml:lang="en-us">
<seg>Non-ADA Compliant Images</seg>
</tuv>
<tuv xml:lang="es">
<seg>Imágenes que no cumplen con ADA</seg>
</tuv>
</tu>
<tu tuid="perc.ui.reports.gadget@Report Problem">
<prop type="sectionname" xml:lang="en-us">There was an problem creating the report</prop>
<note xml:lang="en-us"></note>
<tuv xml:lang="en-us">
<seg>There was an problem creating the report</seg>
</tuv>
<tuv xml:lang="es">
<seg>Hubo un problema al crear el informe.</seg>
</tuv>
</tu>
<tu tuid="perc.ui.reports.gadget@Report Successful">
<prop type="sectionname" xml:lang="en-us">Create report request generated Successfully</prop>
<note xml:lang="en-us"></note>
<tuv xml:lang="en-us">
<seg>Create report request generated Successfully</seg>
</tuv>
<tuv xml:lang="es">
<seg>Crear solicitud de informe generada con éxito</seg>
</tuv>
</tu>
<tu tuid="perc.ui.google.setup.gadget@Connect Google">
<prop type="sectionname" xml:lang="en-us">Connect to Google</prop>
<note xml:lang="en-us"></note>
<tuv xml:lang="en-us">
<seg>Connect to Google:</seg>
</tuv>
<tuv xml:lang="es">
<seg>Conéctate a Google:</seg>
</tuv>
</tu>
<tu tuid="perc.ui.google.setup.gadget@Google Email">
<prop type="sectionname" xml:lang="en-us">Google Service Account email</prop>
<note xml:lang="en-us"></note>
<tuv xml:lang="en-us">
<seg>Google Service Account email:</seg>
</tuv>
<tuv xml:lang="es">
<seg>Correo electrónico de la cuenta de servicio de Google:</seg>
</tuv>
</tu>
<tu tuid="perc.ui.google.setup.gadget@Google Json File">
<prop type="sectionname" xml:lang="en-us">Google Service Account .json credentials file</prop>
<note xml:lang="en-us"></note>
<tuv xml:lang="en-us">
<seg>Google Service Account .json credentials file:</seg>
</tuv>
<tuv xml:lang="es">
<seg>Archivo de credenciales .json de la cuenta de servicio de Google:</seg>
</tuv>
</tu>
<tu tuid="perc.ui.google.setup.gadget@Credential Test">
<prop type="sectionname" xml:lang="en-us">Credential Test</prop>
<note xml:lang="en-us"></note>
<tuv xml:lang="en-us">
<seg>Test the credentials by attempting to connect to Google Analytics.If successful the profile lists will be updated.</seg>
</tuv>
<tuv xml:lang="es">
<seg>Pruebe las credenciales intentando conectarse a Google Analytics.Si tiene éxito, las listas de perfiles se actualizarán.</seg>
</tuv>
</tu>
<tu tuid="perc.ui.google.setup.gadget@Clear Credentials">
<prop type="sectionname" xml:lang="en-us">Clear credentials</prop>
<note xml:lang="en-us"></note>
<tuv xml:lang="en-us">
<seg>Clear credentials</seg>
</tuv>
<tuv xml:lang="es">
<seg>Borrar credenciales</seg>
</tuv>
</tu>
<tu tuid="perc.ui.google.setup.gadget@Select Google Profile">
<prop type="sectionname" xml:lang="en-us">Select Google Profile</prop>
<note xml:lang="en-us"></note>
<tuv xml:lang="en-us">
<seg>Select a Google profile for each site:</seg>
</tuv>
<tuv xml:lang="es">
<seg>Seleccione un perfil de Google para cada sitio:</seg>
</tuv>
</tu>
<tu tuid="perc.ui.google.setup.gadget@Save Analytics">
<prop type="sectionname" xml:lang="en-us">Save Analytics</prop>
<note xml:lang="en-us"></note>
<tuv xml:lang="en-us">
<seg>Save analytics settings to the server.</seg>
</tuv>
<tuv xml:lang="es">
<seg>Guarde la configuración de análisis en el servidor.</seg>
</tuv>
</tu>
<tu tuid="perc.ui.google.setup.gadget@Revert Changes">
<prop type="sectionname" xml:lang="en-us">Revert Changes</prop>
<note xml:lang="en-us"></note>
<tuv xml:lang="en-us">
<seg>Revert any unsaved changes.</seg>
</tuv>
<tuv xml:lang="es">
<seg>Revierta los cambios no guardados.</seg>
</tuv>
</tu>
<tu tuid="perc.ui.google.setup.gadget@Confirm Remove">
<prop type="sectionname" xml:lang="en-us">Confirm Remove</prop>
<note xml:lang="en-us"></note>
<tuv xml:lang="en-us">
<seg>Please confirm that you wish to remove your Google Analytics credentials from Percussion. Upon next publish, the Google Analytics script code will be removed from all published pages.</seg>
</tuv>
<tuv xml:lang="es">
<seg>Confirme que desea eliminar sus credenciales de Google Analytics de Percussion. En la próxima publicación, el código de secuencia de comandos de Google Analytics se eliminará de todas las páginas publicadas.</seg>
</tuv>
</tu>
<tu tuid="perc.ui.google.setup.gadget@No Sites Found">
<prop type="sectionname" xml:lang="en-us">No Sites Found</prop>
<note xml:lang="en-us"></note>
<tuv xml:lang="en-us">
<seg>No Sites Found</seg>
</tuv>
<tuv xml:lang="es">
<seg>No se encontraron sitios</seg>
</tuv>
</tu>
</body>
</tmx>

0 comments on commit f04f38d

Please sign in to comment.