[ 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-->
|
<#---This section should become autocomplete instead-->
|
||||||
<p>
|
<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}" />
|
<input class="acSelector" size="50" type="text" id="object" name="objectLabel" acGroupName="object" value="${objectLabel}" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
@ -109,18 +109,18 @@ Also multiple types parameter set to true only if more than one type returned-->
|
||||||
var customFormData = {
|
var customFormData = {
|
||||||
acUrl: '${urls.base}/autocomplete?tokenize=true',
|
acUrl: '${urls.base}/autocomplete?tokenize=true',
|
||||||
<#if objectTypesExist = true>
|
<#if objectTypesExist = true>
|
||||||
acTypes: {object: '${objectTypes}'},
|
acTypes: {object: '${objectTypes?js_string}'},
|
||||||
</#if>
|
</#if>
|
||||||
<#if multipleTypes = true>
|
<#if multipleTypes = true>
|
||||||
acMultipleTypes: 'true',
|
acMultipleTypes: 'true',
|
||||||
</#if>
|
</#if>
|
||||||
editMode: '${editMode}',
|
editMode: '${editMode}',
|
||||||
typeName:'${propertyNameForDisplay}',
|
typeName:'${propertyNameForDisplay?js_string}',
|
||||||
acSelectOnly: 'true',
|
acSelectOnly: 'true',
|
||||||
sparqlForAcFilter: '${sparqlForAcFilter}',
|
sparqlForAcFilter: '${sparqlForAcFilter?js_string}',
|
||||||
sparqlQueryUrl: '${sparqlQueryUrl}',
|
sparqlQueryUrl: '${sparqlQueryUrl?js_string}',
|
||||||
acFilterForIndividuals: ${acFilterForIndividuals},
|
acFilterForIndividuals: ${acFilterForIndividuals?js_string},
|
||||||
defaultTypeName: '${propertyNameForDisplay}', // used in repair mode to generate button text
|
defaultTypeName: '${propertyNameForDisplay?js_string}', // used in repair mode to generate button text
|
||||||
baseHref: '${urls.base}/individual?uri='
|
baseHref: '${urls.base}/individual?uri='
|
||||||
};
|
};
|
||||||
var i18nStrings = {
|
var i18nStrings = {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<#-- $This file is distributed under the terms of the license in LICENSE$ -->
|
<#-- $This file is distributed under the terms of the license in LICENSE$ -->
|
||||||
|
|
||||||
<#assign formTitle>
|
<#assign formTitle>
|
||||||
"${editConfiguration.propertyPublicDomainTitle}" entry for ${editConfiguration.subjectName}
|
${i18n().new_entry_for(editConfiguration.propertyPublicDomainTitle, editConfiguration.subjectName)}
|
||||||
</#assign>
|
</#assign>
|
||||||
<#if editConfiguration.objectUri?has_content>
|
<#if editConfiguration.objectUri?has_content>
|
||||||
<#assign formTitle>${i18n().edit_capitalized} ${formTitle} </#assign>
|
<#assign formTitle>${i18n().edit_capitalized} ${formTitle} </#assign>
|
||||||
|
|
|
@ -630,7 +630,8 @@ var customForm = {
|
||||||
if ( this.templateDefinedAcTypes && !this.defaultAcType.length ) {
|
if ( this.templateDefinedAcTypes && !this.defaultAcType.length ) {
|
||||||
this.defaultAcType = this.acTypes[acTypeKey];
|
this.defaultAcType = this.acTypes[acTypeKey];
|
||||||
}
|
}
|
||||||
if (selectedType.val().length) {
|
var selectedTypeLength = selectedType.val().length;
|
||||||
|
if ( selectedTypeLength !== 'undefined') {
|
||||||
this.acTypes[acTypeKey] = selectedType.val();
|
this.acTypes[acTypeKey] = selectedType.val();
|
||||||
this.typeName = selectedType.html();
|
this.typeName = selectedType.html();
|
||||||
if ( this.editMode == 'edit' ) {
|
if ( this.editMode == 'edit' ) {
|
||||||
|
@ -744,5 +745,9 @@ var customForm = {
|
||||||
};
|
};
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
try{
|
||||||
customForm.onLoad();
|
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}">
|
<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>
|
<img class="add-individual" data-domain="${domainUri}" data-range="${rangeUri}" src="${urls.images}/individual/manage-icon.png" alt="${i18n().manage}" /></a>
|
||||||
<#else>
|
<#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>
|
<img class="add-individual" data-domain="${domainUri}" data-range="${rangeUri}" src="${urls.images}/individual/addIcon.gif" alt="${i18n().add}" /></a>
|
||||||
</#if>
|
</#if>
|
||||||
</#macro>
|
</#macro>
|
||||||
|
@ -353,5 +353,5 @@ name will be used as the label. -->
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
<#function capitalizeGroupName propertyGroupName>
|
<#function capitalizeGroupName propertyGroupName>
|
||||||
<#return propertyGroupName?capitalize>
|
<#return propertyGroupName?cap_first>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
Loading…
Add table
Reference in a new issue