[ i18n sprint ] autoCompleteObjectPropForm and lib-properties fixes from fr_CA (#336)
* Apply fixes from french lib properties * Apply fixes from fr_CA autoCompleteObjectPropForm * fixed for fr_CA and other languages * fixes from fr_CA * fix for autoCompleteObjectPropForm.ftl * fixed wrong call for i18n bundle
This commit is contained in:
parent
a6a480986f
commit
0b99cab654
4 changed files with 17 additions and 12 deletions
|
@ -58,7 +58,7 @@
|
|||
|
||||
<#---This section should become autocomplete instead-->
|
||||
<p>
|
||||
<label for="object"> ${propertyNameForDisplay?capitalize} ${i18n().name_capitalized}<span class='requiredHint'> *</span></label>
|
||||
<label for="object"> ${i18n().name_capitalized?cap_first} <span class='requiredHint'> *</span></label>
|
||||
<input class="acSelector" size="50" type="text" id="object" name="objectLabel" acGroupName="object" value="${objectLabel}" />
|
||||
</p>
|
||||
|
||||
|
@ -109,18 +109,18 @@ Also multiple types parameter set to true only if more than one type returned-->
|
|||
var customFormData = {
|
||||
acUrl: '${urls.base}/autocomplete?tokenize=true',
|
||||
<#if objectTypesExist = true>
|
||||
acTypes: {object: '${objectTypes}'},
|
||||
acTypes: {object: '${objectTypes?js_string}'},
|
||||
</#if>
|
||||
<#if multipleTypes = true>
|
||||
acMultipleTypes: 'true',
|
||||
</#if>
|
||||
editMode: '${editMode}',
|
||||
typeName:'${propertyNameForDisplay}',
|
||||
typeName:'${propertyNameForDisplay?js_string}',
|
||||
acSelectOnly: 'true',
|
||||
sparqlForAcFilter: '${sparqlForAcFilter}',
|
||||
sparqlQueryUrl: '${sparqlQueryUrl}',
|
||||
acFilterForIndividuals: ${acFilterForIndividuals},
|
||||
defaultTypeName: '${propertyNameForDisplay}', // used in repair mode to generate button text
|
||||
sparqlForAcFilter: '${sparqlForAcFilter?js_string}',
|
||||
sparqlQueryUrl: '${sparqlQueryUrl?js_string}',
|
||||
acFilterForIndividuals: ${acFilterForIndividuals?js_string},
|
||||
defaultTypeName: '${propertyNameForDisplay?js_string}', // used in repair mode to generate button text
|
||||
baseHref: '${urls.base}/individual?uri='
|
||||
};
|
||||
var i18nStrings = {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<#-- $This file is distributed under the terms of the license in LICENSE$ -->
|
||||
|
||||
<#assign formTitle>
|
||||
"${editConfiguration.propertyPublicDomainTitle}" entry for ${editConfiguration.subjectName}
|
||||
${i18n().new_entry_for(editConfiguration.propertyPublicDomainTitle, editConfiguration.subjectName)}
|
||||
</#assign>
|
||||
<#if editConfiguration.objectUri?has_content>
|
||||
<#assign formTitle>${i18n().edit_capitalized} ${formTitle} </#assign>
|
||||
|
|
|
@ -630,7 +630,8 @@ var customForm = {
|
|||
if ( this.templateDefinedAcTypes && !this.defaultAcType.length ) {
|
||||
this.defaultAcType = this.acTypes[acTypeKey];
|
||||
}
|
||||
if (selectedType.val().length) {
|
||||
var selectedTypeLength = selectedType.val().length;
|
||||
if ( selectedTypeLength !== 'undefined') {
|
||||
this.acTypes[acTypeKey] = selectedType.val();
|
||||
this.typeName = selectedType.html();
|
||||
if ( this.editMode == 'edit' ) {
|
||||
|
@ -744,5 +745,9 @@ var customForm = {
|
|||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
customForm.onLoad();
|
||||
try{
|
||||
customForm.onLoad();
|
||||
} catch(error){
|
||||
console.log(error.message);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -149,7 +149,7 @@ name will be used as the label. -->
|
|||
<a class="add-${propertyLocalName}" href="${url}" title="${i18n().manage_list_of} ${label?lower_case}">
|
||||
<img class="add-individual" data-domain="${domainUri}" data-range="${rangeUri}" src="${urls.images}/individual/manage-icon.png" alt="${i18n().manage}" /></a>
|
||||
<#else>
|
||||
<a class="add-${propertyLocalName}" href="${url}" title="${i18n().add_new} ${label?lower_case} ${i18n().entry}">
|
||||
<a class="add-${propertyLocalName}" href="${url}" title="${i18n().add_new_entry_for} ${label?lower_case}">
|
||||
<img class="add-individual" data-domain="${domainUri}" data-range="${rangeUri}" src="${urls.images}/individual/addIcon.gif" alt="${i18n().add}" /></a>
|
||||
</#if>
|
||||
</#macro>
|
||||
|
@ -353,5 +353,5 @@ name will be used as the label. -->
|
|||
</#function>
|
||||
|
||||
<#function capitalizeGroupName propertyGroupName>
|
||||
<#return propertyGroupName?capitalize>
|
||||
<#return propertyGroupName?cap_first>
|
||||
</#function>
|
||||
|
|
Loading…
Add table
Reference in a new issue