Skip to content

Commit

Permalink
Merge pull request #7 from rddill-IBM/multilingual
Browse files Browse the repository at this point in the history
Multilingual integration into master branch
  • Loading branch information
Bob Dill authored Nov 14, 2017
2 parents bbe80b5 + 1eb8742 commit daf1b9c
Show file tree
Hide file tree
Showing 59 changed files with 1,979 additions and 278 deletions.
Binary file not shown.
Binary file not shown.
Binary file added Chapter02/Documentation/Chinese/Z2B_Chapter02.pdf
Binary file not shown.
Binary file added Chapter02/Documentation/Espanol/Z2B_Chapter02.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
39 changes: 20 additions & 19 deletions Chapter05/Documentation/answers/composer/hlcAdmin_complete.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ exports.deleteProfile = function(req, res, next) {
* @function
*/
exports.deploy = function(req, res, next) {

let archiveFile = fs.readFileSync(path.join(path.dirname(require.main.filename),'network/dist',req.body.myArchive));

let adminConnection = new composerAdmin.AdminConnection();

return BusinessNetworkDefinition.fromArchive(archiveFile)
.then(function(archive) {
adminConnection.connect(config.composer.connectionProfile, config.composer.adminID, config.composer.adminPW)
Expand Down Expand Up @@ -171,7 +171,7 @@ exports.deploy = function(req, res, next) {
* @function
*/
exports.networkInstall = function(req, res, next) {

let archiveFile = fs.readFileSync(path.join(path.dirname(require.main.filename),'network/dist',req.body.myArchive));

let adminConnection = new composerAdmin.AdminConnection();
Expand Down Expand Up @@ -208,7 +208,7 @@ exports.networkInstall = function(req, res, next) {
* @function
*/
exports.networkStart = function(req, res, next) {

let adminConnection = new composerAdmin.AdminConnection();

return BusinessNetworkDefinition.fromArchive(archiveFile)
Expand Down Expand Up @@ -308,7 +308,8 @@ exports.getProfile = function(req, res, next) {
exports.listAsAdmin = function(req, res, next) {
let adminConnection = new composerAdmin.AdminConnection();
util.displayObjectValuesRecursive(adminConnection);
adminConnection.connect(config.composer.connectionProfile, config.composer.adminID, config.composer.adminPW)
// updated to use PeerAdmin, PeerPW to work with V0.14
adminConnection.connect(config.composer.connectionProfile, config.composer.PeerAdmin, config.composer.PeerPW)
.then(function(){
adminConnection.list()
.then((businessNetworks) => {
Expand Down Expand Up @@ -461,7 +462,7 @@ exports.getRegistries = function(req, res, next)
for (let each in participantRegistries)
{ (function (_idx, _arr)
{ let r_type = _arr[_idx].name.split('.');
allRegistries.push([r_type[r_type.length-1]]);
allRegistries.push([r_type[r_type.length-1]]);
})(each, participantRegistries)
}
res.send({'result': 'success', 'registries': allRegistries});
Expand Down Expand Up @@ -508,19 +509,19 @@ exports.getMembers = function(req, res, next) {
_jsn.id = _arr[_idx].buyerID;
break;
case 'Seller':
_jsn.id = _arr[_idx].sellerID;
_jsn.id = _arr[_idx].sellerID;
break;
case 'Provider':
_jsn.id = _arr[_idx].providerID;
break;
case 'Shipper':
_jsn.id = _arr[_idx].shipperID;
_jsn.id = _arr[_idx].shipperID;
break;
case 'FinanceCo':
_jsn.id = _arr[_idx].financeCoID;
_jsn.id = _arr[_idx].financeCoID;
break;
default:
_jsn.id = _arr[_idx].id;
_jsn.id = _arr[_idx].id;
}
allMembers.push(_jsn); })(each, members)
}
Expand All @@ -537,7 +538,7 @@ exports.getMembers = function(req, res, next) {
})
.catch((error) => {console.log('error with admin network Connect', error);
res.send({'result': 'failed '+error.message, 'members': []});});

}

/**
Expand Down Expand Up @@ -573,7 +574,7 @@ exports.getAssets = function(req, res, next) {
console.log('there are '+members.length+' entries in the '+req.body.registry+' Registry with id: '+members[0].$namespace);
for (let each in members)
{ (function (_idx, _arr)
{
{
switch(req.body.type)
{
case 'Buyer':
Expand All @@ -587,7 +588,7 @@ exports.getAssets = function(req, res, next) {
_jsn.id = _arr[_idx].orderNumber;
break;
default:
_jsn.id = _arr[_idx].id;
_jsn.id = _arr[_idx].id;
}
allOrders.push(_jsn);
}
Expand All @@ -601,7 +602,7 @@ exports.getAssets = function(req, res, next) {
_jsn.id = _arr[_idx].orderNumber;
break;
default:
_jsn.id = _arr[_idx].id;
_jsn.id = _arr[_idx].id;
}
allOrders.push(_jsn);
break;
Expand Down Expand Up @@ -661,7 +662,7 @@ exports.addMember = function(req, res, next) {
participantRegistry.add(participant)
.then(() => {console.log(req.body.companyName+" successfully added"); res.send(req.body.companyName+" successfully added");})
.catch((error) => {console.log(req.body.companyName+" add failed",error); res.send(error);});
});
});
})
.catch((error) => {console.log('error with getParticipantRegistry', error); res.send(error);});
})
Expand Down Expand Up @@ -693,9 +694,9 @@ exports.removeMember = function(req, res, next) {
return businessNetworkConnection.getParticipantRegistry(NS+'.'+req.body.registry)
.then(function(participantRegistry){
return participantRegistry.get(req.body.id)
.then((_res) => {
.then((_res) => {
return participantRegistry.remove(req.body.id)
.then((_res) => {
.then((_res) => {
res.send('member id '+req.body.id+' successfully removed from the '+req.body.registry+' member registry.');
})
.catch((_res) => { res.send('member id '+req.body.id+' does not exist in the '+req.body.registry+' member registry.');});
Expand Down Expand Up @@ -741,7 +742,7 @@ exports.getHistory = function(req, res, next) {
for (let each in history)
{ (function (_idx, _arr)
{ let _jsn = _arr[_idx];
allHistory.push(ser.toJSON(_jsn));
allHistory.push(ser.toJSON(_jsn));
})(each, history)
}
res.send({'result': 'success', 'history': allHistory});
Expand Down
224 changes: 218 additions & 6 deletions Chapter05/controller/restapi/features/text/es-LA/prompts.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,219 @@
{
"index": {"language": "Español (latinoamericano)",
"title": "Aprender Bluemix ahora!",
"header": "Capítulo 3: (Versión en Español) La creación de su primera APP Watson",
"titleBar": "Tutorial cognitivo a cero",
"speech": "Salida hablada va aquí"}
}
"index": {"language":"LA Español",
"title":"Z2B Capítulo 5",
"header":"Capítulo 5: Construyendo la experiencia del usuario administrativa",
"titleBar":"Cero al tutorial de Blockchain",
"idx_unified":"Cargar experiencia de usuario unificada",
"idx_buyer":"Cargar la experiencia del usuario del comprador",
"idx_seller":"Cargar experiencia de usuario del vendedor",
"idx_provider":"Cargar experiencia de usuario del proveedor",
"idx_shipper":"Cargar experiencia de usuario del transportista",
"idx_financeco":"Cargar experiencia de usuario de la compañía financiera",
"idx_roles":"Roles",
"idx_admin":"Administrador",
"idx_adminUX":"Cargar experiencia de usuario del administrador",
"idx_preload":"Precardar red"
},
"admin": {
"title":"Cero al tutorial de Blockchain Capítulo 05",
"npm":"Administración del perfil de redes",
"npm_API":"API",
"npm_param":"Parámetros",
"npm_dp_api":"borrar perfil",
"npm_dp_param":"nombre del perfil ",
"npm_cp_api":"crear perfil",
"npm_cp_param":"objeto de perfil",
"npm_ga_api":"obtener todos los perfiles de conexión",
"npm_ga_param":"(ninguno)",
"npm_g1_api":"conseguor un perfil de red de conexión espécífico",
"npm_g1_param":"nombre del perfil ",
"bnm":"Administrador de red de negocios",
"bnm_param":"Parámetros",
"bnm_api":"API",
"bnm_nd_api":"desplegar una red",
"bnm_nd_param":"archivo de red, opciones",
"bnm_ni_api":"instalar una nueva red",
"bnm_ni_param":"archivo de red, opciones",
"bnm_ns_api":"iniciar una red instalada",
"bnm_ns_param":"nombre de la red, opciones",
"bnm_nl_api":"enumerar las redes empresariales desplegadas",
"bnm_nl_param":"(ninguna)",
"bnm_np_api":"toca una red, comprueba la compatibilidad",
"bnm_np_param":"nombre de la red comercial",
"bnm_nu_api":"tomar una red de negocios fuera de línea",
"bnm_nu_param":"nombre de la red comercial <",
"bnm_nuu_api":"actualizar una red comercial existente",
"bnm_nuu_param":"nombre de la red comercial, archivo de almacenamiento",
"rm":"Administracion de recursos",
"rm_api":"API",
"rm_param":"Parámetros",
"rm_lr_api":"listar miembros de un registro",
"rm_la_api":"Lista de activos en el registro",
"rm_la_param":"(ninguna)",
"rm_am_api":"Añadir miembro",
"rm_am_param":"Co Nombre, id, Tipo",
"rm_rm_api":"Eliminar miembro",
"rm_gs_api":"obtenerMiembroSecreto",
"bc":"BlockChain",
"bc_api":"API",
"bc_param":"Parámetros",
"bc_gi_api":"iniciar la conexión a blockchain",
"bc_gi_param":"(ninguna)",
"bc_ge_api":"registrarse para eventos blockchain",
"bc_ge_param":"(ninguna)",
"bc_gh_api":"obtener un historiador",
"bc_gh_param":"(ninguna)"
},
"buyer": {
"title":"Comprador Capítulo 06. Seleccione Comprador para ver su vista:",
"newOrder":"Crear nuevo orden",
"orderStatus":"Mostrar estado del pedido"
},
"createConnectionProfile": {
"title":"tipo de nombre para un nuevo perfil aquí:",
"cp_type":"tipo",
"cp_orderers":"solicitantes",
"cp_orderers_url":"Localizador Uniforme de Recursos (url)",
"cp_ca":"ca",
"cp_ca_url":"Localizador Uniforme de Recursos (url)",
"cp_ca_name":"nombre",
"cp_peers":"semejantes",
"cp_peers_event_url":"eventoURL",
"cp_peers_request_url":"requerirURL",
"cp_keyValStore":"keyValStore",
"cp_channel":"canal",
"cp_mspID":"mspID",
"cp_timeout":"tiempofuera",
"cancel":"Cancelar",
"submit":"Someter"
},
"createMember": {
"cd_type":"Tipo",
"cd_buyer":"Comprador",
"cd_seller":"Vendedor",
"cd_shipper":"Expedidor",
"cd_provider":"Proveedor",
"cd_financeco":"Compañía financiera",
"cd_cn":"nombre de empresa",
"cd_e":"dirección de correo electrónico",
"cancelNewOrder":"Cancelar",
"submitNewOrder":"Enviar"
},
"createOrder": {
"title":"Crear nueva orden",
"selectVendor":"Seleccionar proveedor:",
"cn_on":"Número de orden",
"cn_status":"Estado",
"cn_date":"Fecha",
"cn_total":"Total",
"cn_selectItem":"Seleccione un artículo",
"addItem":"Añadir artículo",
"cancelNewOrder":"Cancelar",
"submitNewOrder":"Enviar"
},
"deleteConnectionProfile": {
"title":"Seleccionar perfil para eliminar:",
"cancel":"Cancelar",
"submit":"Enviar"
},
"financeCo": {
"title":"Cero a Blockchain Capítulo 10: El financiero global",
"financeCOclear":"Ventana limpia",
"financeCOorderStatus":"Mostrar estado del pedido"
},
"getMemberSecret": {
"gs_type":"Tipo",
"gs_members":"Miembros",
"gs_company":"nombre de empresa",
"gs_email":"dirección de correo electrónico",
"gs_userID":"identidad de usuario",
"gs_secret":"secreto",
"cancel":"Cancelar",
"submit":"Enviar"
},
"provider": {
"title":"Proveedor Capítulo 08, Seleccione Proveedor para ver su vista:",
"provider_clear":"Ventana limpia",
"providerOrderStatus":"Mostrar estado del pedido"
},
"removeMember": {
"rm_type":"Tipo",
"rm_members":"Miembros",
"rm_company":"nombre de empresa",
"rm_email":"dirección de correo electrónico",
"rm_userID":"identidad de usuario",
"rm_secret":"secreto",
"cancel":"Cancelar",
"submit":"Enviar"
},
"seller": {
"title":"Vendedor Capítulo 07, Seleccione Vendedor para ver su vista:",
"seller_clear":"Ventana limpia",
"sellerOrderStatus":"Mostrar estado del pedido"
},
"shipper": {
"title":"Remitente Capítulo 09, seleccione Transportista para ver su vista:",
"shipper_clear":"Ventana limpia",
"shipperOrderStatus":"Mostrar estado del pedido"
},
"singleUX": {},
"orderProcess": {
"AuthorizePayment": {"select": "Autorizar pago","message":"Autorizar el pago"},
"Dispute": {"select": "Disputa","message":"Disputa"},
"Resolve": {"select": "Resolver","message":"Resolver"},
"Purchase": {"select": "Compra","message":"Compra"},
"Cancel": {"select": "Cancelar","message":"Cancelar"},
"Pay": {"select": "Paga","message":"Paga"},
"RequestShipping": {"select": "Solicitud de envío","message":"Solicitud de envío"},
"BackOrder": {"select": "OrdenAtrasada","message":"Orden atrasada"},
"PayRequest": {"select": "Requerimiento de pago","message":"Solicitar pago"},
"Refund": {"select": "Reembolso","message":"Reembolso"},
"Delivered": {"select": "Entregado","message":"Entregado"},
"Delivering": {"select": "Entregando","message":"Actualizar el estado de entrega"},
"Order": {"select": "Orden","message":"Ordene del proveedor"},
"NoAction": {"select": "NoAcción","message":"No tomar ninguna medida"},
"ex_button":"Ejecutar",
"ca_button":"Cancelar",
"orderno":"Orden #",
"status":"Estado",
"total":"Total",
"seller":"Vendedor:",
"itemno":"Número de artículo",
"description":"Descripción",
"qty":"Cantidad",
"price":"Precio",
"processing_msg":"Procesando {0} solicitud de número de pedido: {1}",
"b_no_order_msg":"No hay pedidos para este comprador:",
"s_no_order_msg":"No hay pedidos para este vendedor:",
"p_no_order_msg":"No hay pedidos para este proveedor:",
"sh_no_order_msg":"No hay pedidos para este remitente:",
"create_msg":"Procesando Crear solicitud de pedido",
"buyer":"Comprador:"
},
"financeCoOrder": {
"status":"Estatus actual",
"action":"Acción",
"by":"Por",
"date":"Fecha",
"comments":"Comentarios",
"created":"Creado",
"cancelled":"Cancelado",
"notCancel":"(no cancelado)",
"purchased":"Comprado",
"noPurchase":"(no hay orden de compra)",
"thirdParty":"Orden de un tercero",
"nothirdParty":"(no se ha enviado a un tercero)",
"backordered":"¿Atrasado?",
"notBackordered":"(no atrasado)",
"shippingRequested":"Embarque requerido",
"noRequestShip":"(No hay requerimiento al transportista)",
"shippingStarted":"Embarque iniciado",
"noDeliveryStart":"(No ha comenzado la entrega)",
"delivered":"Entregado",
"notDelivered":"(no ha sido entregado)",
"payRequested":"Pago requerido",
"noRequest":"(no se ha solicitado el pago)",
"disputed":"Disputa planteada",
"noDispute":"(no en disputa)"
}
}
10 changes: 0 additions & 10 deletions Chapter05/controller/restapi/features/text/languages copy.json

This file was deleted.

Loading

0 comments on commit daf1b9c

Please sign in to comment.