i18n updates to javascript files and related templates

This commit is contained in:
tworrall 2013-06-11 12:25:01 -04:00
parent 57c962e82a
commit d74176f18d
40 changed files with 373 additions and 106 deletions

View file

@ -55,6 +55,9 @@ var proxyContextInfo = {
baseUrl: '${urls.base}',
ajaxUrl: '${formUrls.proxyAjax}'
};
var i18nStrings = {
selectEditorAndProfile: '${i18n().select_editor_and_profile}'
};
</script>
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/autocomplete.css" />',

View file

@ -41,6 +41,12 @@
<p class="requiredHint">* ${i18n().required_fields}</p>
</form>
</section>
<script type="text/javascript">
var i18nStrings = {
pleaseFormatEmail: '${i18n().please_format_email}',
enterValidAddress: '${i18n().or_enter_valid_address}'
};
</script>
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/templates/freemarker/edit/forms/css/customForm.css" />',
'<link rel="stylesheet" href="${urls.base}/css/jquery_plugins/jquery.realperson.css" />')}

View file

@ -51,6 +51,10 @@
reorderUrl: '${reorderUrl}',
positionPredicate: '${positionPredicate}'
};
var i18nStrings = {
dragDropMenus: '${i18n().drag_drop_to_reorder_menus}',
reorderingFailed: '${i18n().reordering_menus_failed}'
};
</script>
${scripts.add('<script type="text/javascript" src="${urls.base}/js/individual/menuManagement.js"></script>')}

View file

@ -69,6 +69,13 @@
var individualRdfUrl = '${rdfUrl}';
</script>
</#if>
<script>
var i18nStringsUriRdf = {
shareProfileUri: '${i18n().share_profile_uri}',
viewRDFProfile: '${i18n().view_profile_in_rdf}',
closeString: '${i18n().close}'
};
</script>
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/individual/individual.css" />')}

View file

@ -55,6 +55,9 @@ var customFormData = {
processingUrl: '${urls.base}/edit/primitiveRdfEdit',
individualUri: '${subjectUri!}'
};
var i18nStrings = {
errorProcessingLabels: '${i18n().error_processing_labels}'
};
</script>
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/js/jquery-ui/css/smoothness/jquery-ui-1.8.9.custom.css" />')}

View file

@ -188,6 +188,9 @@ var proxyContextInfo = {
baseUrl: '${urls.base}',
ajaxUrl: '${formUrls.ajax}'
};
var i18nStrings = {
selectEditorAndProfile: '${i18n().select_editor_and_profile}'
};
</script>
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/account/account.css" />')}

View file

@ -73,7 +73,11 @@
<p style="margin-top:10px">${i18n().use_capitalized} <a id="menuMgmtLink" href="${urls.base}/individual?uri=http%3A%2F%2Fvitro.mannlib.cornell.edu%2Fontologies%2Fdisplay%2F1.1%23DefaultMenu&switchToDisplayModel=true" title="">${i18n().menu_orering}</a> ${i18n().to_order_menu_items}</p>
</section>
<script>
var i18nStrings = {
confirmPageDeletion: '${i18n().confirm_page_deletion}'
};
</script>
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/js/jquery-ui/css/smoothness/jquery-ui-1.8.9.custom.css" />',
'<link rel="stylesheet" href="${urls.base}/css/menupage/pageList.css" />')}

View file

@ -71,6 +71,11 @@ ${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/browseClassGrou
defaultBrowseClassGroupUri: '${firstPopulatedClassGroup.uri!}',
defaultBrowseClassGroupCount: '${firstPopulatedClassGroup.individualCount!}'
};
var i18nStrings = {
browseAllString: '${i18n().browse_all}',
contentString: '${i18n().content}'
};
</script>
${scripts.add('<script type="text/javascript" src="${urls.base}/js/browseClassGroups.js"></script>')}

View file

@ -20,7 +20,7 @@
<#elseif property.localName == "organizationForPosition" && editable >
<h3 id="${property.localName}">${property.name} <@p.addLink property editable /> <@p.verboseDisplay property />
<a id="managePeopleLink" class="manageLinks" href="${urls.base}/managePeople?subjectUri=${subjectUri[1]!}" title="${i18n().manage_affiliated_people}" <#if verbose>style="padding-top:10px"</#if> >
${i18n().manage_affiliated_people}
${i18n().manage_affiliated_people_link}
</a>
</h3>
<#else>

View file

@ -29,6 +29,16 @@
</#if>
defaultBrowseVClassUri: firstBrowseClass //'${firstNonEmptyVClass}'
};
var i18nStrings = {
pageString: '${i18n().page}',
viewPageString: '${i18n().view_page}',
ofTheResults: '${i18n().of_the_results}',
thereAreNo: '${i18n().there_are_no}',
indNamesStartWith: '${i18n().individuals_names_starting_with}',
tryAnotherLetter: '${i18n().try_another_letter}',
indsInSystem: '${i18n().individuals_in_system}',
selectAnotherClass: '${i18n().select_another_class}'
};
</script>

View file

@ -32,6 +32,17 @@
</section>
<script language="javascript" type="text/javascript" >
var json = [${jsonTree!}];
var i18nStrings = {
hideSubclasses: '${i18n().hide_subclasses}',
showSubclasses: '${i18n().show_subclasses}',
classGroup: '${i18n().class_group_all_caps}',
ontologyString: '${i18n().ontology_capitalized}',
subclassesString: '${i18n().subclasses_capitalized}',
expandAll: '${i18n().expand_all}',
collapseAll: '${i18n().collapse_all}',
classesString: '${i18n().classes_capitalized}',
displayRank: '${i18n().display_rank}'
};
</script>
<script language="javascript" type="text/javascript" >

View file

@ -45,6 +45,20 @@
</section>
<script language="javascript" type="text/javascript" >
var json = [${jsonTree!}];
var i18nStrings = {
hideProperties: '${i18n().hide_properties}',
showProperties: '${i18n().show_properties}',
localNameString: '${i18n().local_name}',
groupString: '${i18n().group_capitalized}',
domainClass: '${i18n().domain_class}',
rangeClass: '${i18n().range_class}',
expandAll: '${i18n().expand_all}',
collapseAll: '${i18n().collapse_all}',
subProperties: '${i18n().sub_properties}',
displayRank: '${i18n().display_rank}',
subProperty: '${i18n().subproperty}',
propertiesString: '${i18n().properties_capitalized}'
};
</script>

View file

@ -123,6 +123,11 @@ Also multiple types parameter set to true only if more than one type returned-->
defaultTypeName: '${propertyNameForDisplay}', // used in repair mode to generate button text
baseHref: '${urls.base}/individual?uri='
};
var i18nStrings = {
selectAnExisting: '${i18n().select_an_existing}',
orCreateNewOne: '${i18n().or_create_new_one}',
selectedString: '${i18n().selected}'
};
</script>
<#--
edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AutocompleteObjectPropertyFormGenerator

View file

@ -59,8 +59,8 @@
// theme_advanced_buttons3_add_before : "tablecontrols,separator",
// invalid_elements : "li",
// theme_advanced_styles : "Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1", // Theme specific setting CSS classes
}
};
}
};
</script>
<#-- Script to enable browsing individuals within a class -->

View file

@ -34,6 +34,7 @@ var customForm = {
// Get the custom form data from the page
$.extend(this, customFormData);
$.extend(this, i18nStrings);
},
// On page load, create references for easy access to form elements.
@ -547,7 +548,7 @@ var customForm = {
this.typeName = selectedType.html();
if ( this.editMode == 'edit' ) {
var $acSelect = this.acSelections[acTypeKey];
$acSelect.find('label').html('Selected ' + this.typeName + ':');
$acSelect.find('label').html( customForm.selectedString + ' ' + this.typeName + ':');
}
}
// reset to empty values; may not need
@ -590,12 +591,12 @@ var customForm = {
var typeText;
// First case applies on page load; second case applies when the type gets changed. With multiple
// ac fields there are cases where we also have to check if the help text is already there
if (!$(selectedObj).val() || $(selectedObj).hasClass(this.acHelpTextClass) || $(selectedObj).val().substring(0, 18) == "Select an existing" ) {
if (!$(selectedObj).val() || $(selectedObj).hasClass(this.acHelpTextClass) || $(selectedObj).val().substring(0, 18) == customForm.selectAnExisting ) {
typeText = this.getTypeNameForLabels($(selectedObj));
var helpText = "Select an existing " + typeText + " or create a new one.";
var helpText = customForm.selectAnExisting + " " + typeText + " " + customForm.orCreateNewOne ;
//Different for object property autocomplete
if ( this.acSelectOnly ) {
helpText = "Select an existing " + typeText;
helpText = customForm.selectAnExisting + " " + typeText;
}
$(selectedObj).val(helpText)
.addClass(this.acHelpTextClass);

View file

@ -97,7 +97,17 @@
<p class="requiredHint">* ${i18n().required_fields}</p>
</form>
</section>
<script>
var i18nStrings = {
supplyName: '${i18n().supply_name}',
supplyPrettyUrl: '${i18n().supply_url}',
startUrlWithSlash: '${i18n().start_url_with_slash}',
supplyTemplate: '${i18n().supply_template}',
supplyContentType: '${i18n().supply_content_type}',
selectContentType: '${i18n().select_content_type}',
allCapitalized: '${i18n().all_capitalized}'
};
</script>
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/menupage/menuManagement.css" />')}
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/customForm.css" />')}

View file

@ -57,5 +57,13 @@
</#if>
</section>
</section>
<script>
var i18nStringsBrowseGroups = {
browseClassGroup: '${i18n().browse_class_group}',
allCapitalized: '${i18n().all_capitalized}',
supplyClassGroup: '${i18n().supply_class_group}',
selectClasses: '${i18n().select_classes_to_display}'
};
</script>
<#--Include JavaScript specific to the types of data getters related to this content-->
<#include "pageManagement--browseClassGroupsScripts.ftl">
<#include "pageManagement--browseClassGroupsScripts.ftl">

View file

@ -11,4 +11,13 @@
<span id="cancelContent"> ${i18n().or} <a class="cancel" href="javascript:" id="cancelContentLink" title="${i18n().cancel_title}">${i18n().cancel_link}</a></span>
</#if>
</section>
<script>
var i18nStringsFixedHtml = {
fixedHtml: '${i18n().fixed_html}',
supplyVariableName: '${i18n().supply_variable_name}',
noApostrophes: '${i18n().apostrophe_not_allowed}',
noDoubleQuotes: '${i18n().double_quote_note_allowed}',
supplyHtml: '${i18n().supply_html}'
};
</script>
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processFixedHTMLDataGetterContent.js"></script>')}

View file

@ -13,4 +13,13 @@
<span id="cancelContent"> or <a class="cancel" href="javascript:" id="cancelContentLink" title="${i18n().cancel_title}">${i18n().cancel_link}</a></span>
</#if>
</section>
<script>
var i18nStringsSparqlQuery = {
sparqlResults: '${i18n().sparql_query_results}',
supplyQueryVariable: '${i18n().supply_query_variable}',
noApostrophes: '${i18n().apostrophe_not_allowed}',
noDoubleQuotes: '${i18n().double_quote_note_allowed}',
supplyQuery: '${i18n().supply_sparql_query}'
};
</script>
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processSparqlDataGetterContent.js"></script>')}

View file

@ -152,7 +152,23 @@
<!--Hardcoding for now but should be retrieved from generator: Custom data-->
<#include "pageManagement--customDataScript.ftl">
<script>
var i18nStrings = {
browseClassGroup: '${i18n().browse_class_group}',
fixedHtml: '${i18n().fixed_html}',
sparqlResults: '${i18n().sparql_query_results}',
orString: '${i18n().or}',
deleteString: '${i18n().delete}',
allCapitalized: '${i18n().all_capitalized}',
mapProcessorError: '${i18n().map_processor_error}',
codeProcessingError: '${i18n().code_processing_error}',
supplyName: '${i18n().supply_name}',
supplyPrettyUrl: '${i18n().supply_url}',
startUrlWithSlash: '${i18n().start_url_with_slash}',
supplyTemplate: '${i18n().supply_template}',
selectContentType: '${i18n().select_content_type}'
};
</script>
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/menupage/menuManagement.css" />')}
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/menupage/pageManagement.css" />')}

View file

@ -1,7 +1,11 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Template for scripts that must be loaded in the head -->
<script>
var i18nStrings = {
allCapitalized: '${i18n().all_capitalized}',
};
</script>
<script type="text/javascript" src="${urls.base}/js/jquery.js"></script>
<script type="text/javascript" src="${urls.base}/js/vitroUtils.js"></script>

View file

@ -10,7 +10,7 @@
<#if selectLocale??>
<#list selectLocale.locales as locale>
<li>
<a href="${selectLocale.selectLocaleUrl}?selection=${locale.code}" title="${i18n().select_locale}">
<a href="${selectLocale.selectLocaleUrl}?selection=${locale.code}" title="${i18n().select_locale} -- ${locale.label}">
<img src="${locale.imageUrl}" height="15" style="vertical-align:middle" alt="${locale.label}"/>
</a>
</li>