Commit f581ff1d authored by Adrien PARROT's avatar Adrien PARROT
Browse files

Internationalization (en, fr)

parent e29615dc
......@@ -57,30 +57,29 @@ sap.ui.jsview("conceptmapper.conceptDetailPage", {
numberUnit : "{conceptDetailModel>/invalid_reason}",
attributes : [
new sap.m.ObjectAttribute({
title : "concept_id",
title : "{i18n>concept_id}",
text : "{conceptDetailModel>/concept_id}",
// active : true,
// press : function() {
// alert("you press me");
// }
}), new sap.m.ObjectAttribute({
title : "concept_code",
title : "{i18n>concept_code}",
text : "{conceptDetailModel>/concept_code}",
}), new sap.m.ObjectAttribute({
title : "concept_class_id",
title : "{i18n>concept_class_id}",
text : "{conceptDetailModel>/concept_class_id}",
// active : true,
}), new sap.m.ObjectAttribute({
title : "vocabulary_id",
title : "{i18n>vocabulary_id}",
text : "{conceptDetailModel>/vocabulary_id}",
}), new sap.m.ObjectAttribute({
title : "domain_id",
title : "{i18n>domain_id}",
text : "{conceptDetailModel>/domain_id}",
}), new sap.m.ObjectAttribute({
title : "synonyms",
title : "{i18n>synonyms}",
text: "{conceptDetailModel>/synonyms}",
wrapping : true
}),
......@@ -153,50 +152,50 @@ sap.ui.jsview("conceptmapper.conceptDetailPage", {
var aColumns = [
new sap.m.Column({
header : new sap.m.Label({
text : "Relationship_id"
text : "{i18n>relationship_id}"
}),
mergeDuplicates: true
}),
new sap.m.Column({
header : new sap.m.Label({
text : "Relates to domain"
text : "{i18n>domain_id}"
}),
// width : '60%',
}),
new sap.m.Column({
header : new sap.m.Label({
text : "Relates to vocabulary"
text : "{i18n>vocabulary_id}"
})
}),
new sap.m.Column({
header : new sap.m.Label({
text : "Concept_id"
text : "{i18n>concept_id}"
})
}),
new sap.m.Column({
header : new sap.m.Label({
text : "Concept_name"
text : "{i18n>standard_concept}"
}),
}),
new sap.m.Column({
header : new sap.m.Label({
text : "Standard"
text : "{i18n>standard_concept}"
}),
}),
new sap.m.Column({
header : new sap.m.Label({
text : "Valid"
text : "{i18n>validity}"
}),
}),
new sap.m.Column({
header : new sap.m.Label({
text : "More infos"
text : "{i18n>more_infos}"
}),
}),
new sap.m.Column({
header : new sap.m.Label({
text : "Delete"
text : "{i18n>deletion}"
}),
}),
......@@ -266,19 +265,19 @@ sap.ui.jsview("conceptmapper.conceptDetailPage", {
var oTableHeader = new sap.m.Toolbar({
content : [
new sap.m.Title({
text : "Choose a relation concept and click on the concept to map"
}),
new sap.m.ToolbarSpacer(),
new sap.m.Label({
text:"Choose the relation"
}),
//oRelationMapperMCB,
]
});
// var oTableHeader = new sap.m.Toolbar({
// content : [
// new sap.m.Title({
// text : "Choose a relation concept and click on the concept to map"
// }),
// new sap.m.ToolbarSpacer(),
// new sap.m.Label({
// text:"Choose the relation"
// }),
//
// //oRelationMapperMCB,
// ]
// });
var oTable = new sap.m.Table({
fixedLayout:false,
......@@ -371,38 +370,46 @@ sap.ui.jsview("conceptmapper.conceptDetailPage", {
});
var oRelationToolBar = new sap.m.Toolbar({
var oConceptDetailHeader = new sap.m.Toolbar({
content : [
new sap.m.Title({
text : "Relationships table"
text : "{i18n>concept_detail}"
}),
// new sap.m.ToolbarSpacer(),
// oValidMCB.addStyleClass(''), oStandardMCB,
]
});
});
var oHeaderPanel = new sap.m.Panel("oHeaderPanel", {
var oHeaderPanel = new sap.m.Panel({
expandable : true,
expanded : false,
//headerText : "Concept details",
// headerText : "Concept details",
headerToolbar: oConceptDetailHeader,
content : [ oConceptPanelHeader
]
});
// var oCommentPanel = new sap.m.Panel("oCommentPanel", {
// expandable : true,
// expanded : false,
// headerText : "Add comment",
// content : [ oConceptPanelComment
//
// ]
// });
var oRelationToolBar = new sap.m.Toolbar({
content : [
new sap.m.Title({
text : "{i18n>relationship_table}"
}),
// new sap.m.ToolbarSpacer(),
// oValidMCB.addStyleClass(''), oStandardMCB,
]
});
var oContentPanel = new sap.m.Panel("oContentPanel", {
expandable : false,
expanded : true,
headerText : "Relationships table",
//headerText : "Relationships table",
headerToolbar: oRelationToolBar,
content : [ oTable, ]
......
......@@ -91,7 +91,7 @@ sap.ui.jsview("conceptmapper.mapperPage", {
new sap.m.IconTabFilter({
text : "selected concepts",
text: "{i18n>selected_concepts}",
showAll : true,
count : "{conceptsDetailModel>/to_map_number}",
enabled:false,
......@@ -117,7 +117,7 @@ sap.ui.jsview("conceptmapper.mapperPage", {
new sap.m.IconTabFilter({
iconColor: sap.ui.core.IconColor.Critical,
text: "Research",
text: "{i18n>research}",
icon: "sap-icon://search",
......@@ -139,7 +139,7 @@ sap.ui.jsview("conceptmapper.mapperPage", {
new sap.m.IconTabFilter({
iconColor: sap.ui.core.IconColor.Critical,
text: "Algorithms",
text: "{i18n>algos}",
icon: "sap-icon://developer-settings",
enabled:false,
......@@ -269,29 +269,30 @@ sap.ui.jsview("conceptmapper.mapperPage", {
var aColumns = [
new sap.m.Column({
header : new sap.m.Label({
text : "concept_id"
text: "{i18n>concept_id}",
})
}),
new sap.m.Column({
header : new sap.m.Label({
text : "concept_name"
text: "{i18n>concept_name}",
}),
width : '60%',
}),
new sap.m.Column({
header : new sap.m.Label({
text : "Concept_code"
text: "{i18n>concept_code}",
})
}),
new sap.m.Column({
header : new sap.m.Label({
text : "Vocabulary_id"
text: "{i18n>vocabulary_id}",
})
}),
new sap.m.Column({
header : new sap.m.Text({
text : "Domain_id"
text: "{i18n>domain_id}",
}),
}),
];
......@@ -385,39 +386,39 @@ sap.ui.jsview("conceptmapper.mapperPage", {
var aColumns = [
new sap.m.Column({
header : new sap.m.Label({
text : "concept_id"
text: "{i18n>concept_id}",
})
}),
new sap.m.Column({
header : new sap.m.Label({
text : "concept_name"
text: "{i18n>concept_name}",
}),
width : '60%',
}),
new sap.m.Column({
header : new sap.m.Label({
text : "Concept_code"
text: "{i18n>concept_code}",
})
}),
new sap.m.Column({
header : new sap.m.Label({
text : "Vocabulary_id"
text: "{i18n>vocabulary_id}",
})
}),
new sap.m.Column({
header : new sap.m.Text({
text : "Domain_id"
text: "{i18n>domain_id}",
}),
}),
new sap.m.Column({
header : new sap.m.Label({
text : "Standard"
text: "{i18n>standard_concept}",
}),
}),
new sap.m.Column({
header : new sap.m.Label({
text : "Score"
text: "{i18n>score}",
}),
}),
......@@ -569,7 +570,7 @@ sap.ui.jsview("conceptmapper.mapperPage", {
var oConceptDetailHeader = new sap.m.Toolbar({
content : [
new sap.m.Title({
text : "Concept details"
text : "{i18n>concepts_detail}"
}),
]
......@@ -599,12 +600,12 @@ sap.ui.jsview("conceptmapper.mapperPage", {
var oTableHeader = new sap.m.Toolbar({
content : [
new sap.m.Title({
text : "Choose a relation concept and click on the concept to map"
text : "{i18n>choose_relation}"
}),
new sap.m.ToolbarSpacer(),
new sap.m.ToggleButton({
id:"expertMode",
text:"Expert mode",
text:"{i18n>quick_mode}",
press : function(e) {
if (e.getSource().getPressed()) {
sap.ui.getCore().getModel('conceptsDetailModel').oData.expert_mode = true;
......@@ -614,7 +615,7 @@ sap.ui.jsview("conceptmapper.mapperPage", {
},
}),
new sap.m.ToggleButton({
text:"Add rate/comment",
text:"{i18n>rate_comment}",
pressed: true,
press: function(e) {
if (e.getSource().getPressed()) {
......@@ -650,7 +651,7 @@ sap.ui.jsview("conceptmapper.mapperPage", {
}),
new sap.m.TextArea("oConceptMappingComment",
{
placeholder: "your mapping comment!",
placeholder: "{i18n>mapping_comments}",
width: "100%",
}),
......
......@@ -32,32 +32,32 @@ sap.ui.jsview("conceptmapper.registrationPage", {
new sap.m.Input({
id: "firstname",
placeholder: "Fistname",
placeholder: "{i18n>firstname}",
type:"Text",
}).addStyleClass('vBox2'),
new sap.m.Input({
id: "lastname",
placeholder: "Lastname",
placeholder: "{i18n>lastname}",
type:"Text",
}).addStyleClass('vBox2'),
new sap.m.Input({
id: "address",
placeholder: "Address",
placeholder: "{i18n>address}",
type:"Text",
}).addStyleClass('vBox2'),
new sap.m.Input({
id: "email",
placeholder: "Email",
placeholder: "{i18n>email}",
type:"Email",
}).addStyleClass('vBox2'),
new sap.m.Input({
id: "username",
placeholder: "Username",
placeholder: "{i18n>username}",
type:"Text",
}).addStyleClass('vBox2'),
new sap.m.Input({
id: "password",
placeholder: "Password",
placeholder: "{i18n>password}",
type:"Password",
}).addStyleClass('vBox2'),
......@@ -68,7 +68,7 @@ sap.ui.jsview("conceptmapper.registrationPage", {
var oSubHeader = new sap.m.Bar({
contentMiddle : [ new sap.m.Label({
text : "Registration Page"
text : "{i18n>registration_page}"
}) ]
});
......@@ -89,7 +89,7 @@ sap.ui.jsview("conceptmapper.registrationPage", {
footer : new sap.m.Bar({
contentMiddle: [new sap.m.Button({
text: "Submit",
text: "{i18n>submit}",
icon: "sap-icon://accept",
type: sap.m.ButtonType.Accept,
press: [ oController.registration, oController ]
......
......@@ -231,19 +231,19 @@ function getConceptDetailAjax(sVal) {
// DELETE actions
if (relation.m_user_id && relation.invalid_reason !== 'Deleted') {
relation.erasableIcon = "sap-icon://delete";
relation.notErasableText = "Delete relation";
relation.notErasableText = sap.ui.getCore().getModel('i18n').getProperty('delete_relation');
relation.typeErasableButton = "Reject";
relation.action = "delete";
} else if (relation.m_user_id) {
relation.erasableIcon = "sap-icon://undo";
relation.notErasableText = "Enable relation";
relation.notErasableText = sap.ui.getCore().getModel('i18n').getProperty('enable_relation');
relation.typeErasableButton = "Accept";
relation.action = "undo";
} else {
relation.notErasableText = "You can't delete it";
relation.notErasableText = sap.ui.getCore().getModel('i18n').getProperty('no_deletion');
relation.typeErasableButton = "Transparent";
relation.enabledErasable = false;
}
......@@ -254,7 +254,7 @@ function getConceptDetailAjax(sVal) {
relation.moreInfoText = "";
} else {
relation.moreInfoText = "No more info";
relation.moreInfoText = sap.ui.getCore().getModel('i18n').getProperty('no_info');
relation.typeMoreInfoButton = "Transparent";
relation.enabledMoreInfo = false;
......@@ -322,8 +322,8 @@ sap.ui.controller("conceptmapper.searchPage", {
sap.ui.getCore().byId('oButtonNext').setEnabled(true);
}
buttonTextShown = 'Current page : ' + ++aPageShown;
buttonTextFound = 'Total page(s) : ' + aPageFound;
buttonTextShown = sap.ui.getCore().getModel('i18n').getProperty('current_page') + ' : ' + ++aPageShown;
buttonTextFound = sap.ui.getCore().getModel('i18n').getProperty('total_pages') + ' : ' + aPageFound;
sap.ui.getCore().byId('oButtonCurrentPage').setText(buttonTextShown);
sap.ui.getCore().byId('oButtonTotalPages').setText(buttonTextFound);
......@@ -354,7 +354,7 @@ sap.ui.controller("conceptmapper.searchPage", {
getConceptsAjax(oData, oTable_ref);
buttonTextShown = 'Current page : ' + oData.page;
buttonTextShown = sap.ui.getCore().getModel('i18n').getProperty('current_page') + ' : ' + oData.page;
//buttonTextFound = 'Total page(s) : ' + aPageFound;
sap.ui.getCore().byId('oButtonCurrentPage').setText(buttonTextShown);
......@@ -387,7 +387,7 @@ sap.ui.controller("conceptmapper.searchPage", {
getConceptsAjax(oData, oTable_ref);
buttonTextShown = 'Current page : ' + oData.page;
buttonTextShown = sap.ui.getCore().getModel('i18n').getProperty('current_page') + ' : ' + oData.page;
//buttonTextFound = 'Total page(s) : ' + aPageFound;
sap.ui.getCore().byId('oButtonCurrentPage').setText(buttonTextShown);
......@@ -435,8 +435,8 @@ sap.ui.controller("conceptmapper.searchPage", {
}
buttonTextShown = 'Current page : ' + ++aPageShown;
buttonTextFound = 'Total page(s) : ' + aPageFound;
buttonTextShown = sap.ui.getCore().getModel('i18n').getProperty('current_page') + ' : ' + ++aPageShown;
buttonTextFound = sap.ui.getCore().getModel('i18n').getProperty('total_pages') + ' : ' + aPageFound;
sap.ui.getCore().byId('oButtonCurrentPage').setText(buttonTextShown);
sap.ui.getCore().byId('oButtonTotalPages').setText(buttonTextFound);
......@@ -597,8 +597,8 @@ sap.ui.controller("conceptmapper.searchPage", {
// var URL_login = "http://omop-mapper.fgh.ovh/login/";
var oAuthDialog = new sap.m.Dialog({
title : "User authentification",
icon : "sap-icon://account"
title : "{i18n>connexion}",
icon : "sap-icon://employee"
});
......@@ -610,7 +610,7 @@ sap.ui.controller("conceptmapper.searchPage", {
new sap.m.ToolbarSpacer(),
new sap.m.Button({
text:"First time Here ?",
text:"{i18n>first_time}",
type: sap.m.ButtonType.Reject,
press: function(){
oAuthDialog.close();
......@@ -628,12 +628,13 @@ sap.ui.controller("conceptmapper.searchPage", {
content : new sap.m.FlexBox({
direction:"Column",
items : [
new sap.m.Text({
text : "Connexion"
// new sap.m.Text({
// text : "Connexion"
// }),
new sap.m.Input({
placeholder: "{i18n>username}",
}), new sap.m.Input({
placeholder: "Username",
}), new sap.m.Input({
placeholder: "Password",
placeholder: "{i18n>password}",
type:"Password",
}),
// new sap.m.Link({
......@@ -660,8 +661,8 @@ sap.ui.controller("conceptmapper.searchPage", {
var content = oSimpleForm.getContent()[0];
var oData = {};
oData.m_username = content.getAggregation('items')[1].getProperty('value');
oData.m_password = content.getAggregation('items')[2].getProperty('value');
oData.m_username = content.getAggregation('items')[0].getProperty('value');
oData.m_password = content.getAggregation('items')[1].getProperty('value');
if (oData.m_username !== "" && oData.m_password !== "" ) {
......
......@@ -136,7 +136,7 @@ sap.ui.jsview("conceptmapper.searchPage", {
});
var oMapMCB = new sap.m.MultiComboBox({
id : "oMapMCB",
placeholder : "Filter items by mapping",
placeholder : "{i18n>mapping_label}",
items : {
path : "mapToModel>/items",
template : oItemTemplateMap
......@@ -157,7 +157,7 @@ sap.ui.jsview("conceptmapper.searchPage", {
content : [ oMiniIB, oMaxiIB, oDomainMCB, oVocMCB, oStandardMCB, oValidMCB,
oLangMCB, oMapMCB ],
mode:"SingleSelectMaster",
//mode:"SingleSelectMaster",
});
......@@ -175,134 +175,134 @@ sap.ui.jsview("conceptmapper.searchPage", {
// Detail Page
var oTable = new sap.ui.table.Table({
// id : "oTable",
//visibleRowCount: 15,
cellClick : [ oController.goToConceptDetail, oController ],
rowSettingsTemplate: new sap.ui.table.RowSettings({
highlight:"{conceptsModel>status}"
})
});
oTable.addColumn(new sap.ui.table.Column({
label : new sap.ui.commons.Label({
text : "{i18n>concept_id}"
}),
template : new sap.m.Text({
text : "{conceptsModel>concept_id}"
}),
editable : false,
sortProperty : "concept_id",
width : '7%',
}));
oTable.addColumn(new sap.ui.table.Column({
label : new sap.ui.commons.Label({
text : "{i18n>concept_name}"
}),
template : new sap.m.FormattedText({
htmlText : "{conceptsModel>concept_name}"
}),
editable : false,
sortProperty : "concept_id",
}));
oTable.addColumn(new sap.ui.table.Column({
label : new sap.ui.commons.Label({
text : "{i18n>concept_code}"
}),
template : new sap.m.Text({
text : "{conceptsModel>concept_code}"
}),
sortProperty : "concept_code",
editable : false,
width : '8%',
}));
oTable.addColumn(new sap.ui.table.Column({
label : new sap.ui.commons.Label({
text : "{i18n>concept_class_id}"
}),