Twilio Internationalization - plugins

Is someone using Internationalization in Twilio flex plugins? I am having some issues to translate Flex.SideLink. It throws undefined in DownloadCallRecordings string, see below:
flex.SideNav.Content.add(
<Flex.SideLink
showLabel={true}
icon="VoiceBold"
isActive={true}
key="DownloadCallRecordings"
>
{Flex.Manager.getInstance().strings.DownloadCallRecordings}
</Flex.SideLink>
);

Related

How to Return an Error Message to ImportData()

I'm building a REST API, which is used mostly from Google Sheets at this point.
In Google Sheets I call my API using =ImportData(). I would like to return error messages that could be handled by =IFERROR() calls in Google Sheets, but I can't find any documentation / suggestions on how to do that.
I can return a string such as "#N/A - bad date in REST call", but IFERROR() would not know that this string is actually an error string.
Thanks!
Xavier
try:
=IF(A15="#N/A - bad date in REST call", ISNA(), A15)
where A15 is your IMPORTDATA()

How to restrict returned Wordpress REST-API fields when using WP-API Node Module

If I call this Wordpress blog url in a browser
<root...>wp-json/wp/v2/posts?per_page=5&fields=id,link,title
I get back JSON and the result is restricted to 3 fields
So how can I do this when using the node js wp-api module?
I would like something similar to .fields([]) but there is nothing in the docs, can find nothing in the module code.
TypeError: wpapi.posts(...).perPage(...).fields is not a function
Or something like .filter({})
TypeError: wpapi.posts(...).perPage(...).filter is not a function
But I think this might be connected with another Wordpress plugin that's required.
wpapi.posts()
.perPage(5)
.fields(['id','link','title'])
.search( 'search-term' ) //= (search in title or content)
.filter({
category_name: 'islands',
fields: [ 'id','link','title' ]
})
.get(function (err, data) {
..... etc.
TypeError: wpapi.posts(...).perPage(...).fields is not a function
Can anyone point me in the right direction? Thanks
It appears wp-api node module does not allow this.
So I uninstalled it and am now using axios along with standard text urls.
This worked for me:
wpapi.posts().param('_fields', 'id,title,content').get()
The node-wpapi documentation seems to suggest say that perPage() and functions like it are convenience functions that call param(props, value).
wpapi.posts().param('_fields', ['id','title','content']).get()
also seems to work but the first option gives a resulting request url that looks more like the format the Wordpress REST API Handbook uses

jQuery.sap.includeScript().then() not working in SCP SAPUI5 app

I'm trying to include googlemaps in sapui5
jQuery.sap.includeScript({
url: "https://maps.googleapis.com/maps/api/js?key=XXXX",
promisify: true
}).then(function() { ... } )
This Promise works fine when I run in SAP Web-IDE Trial, but when I deploy it to hana cloud platform it is not working:
InterceptService.js:1 Uncaught (in promise) TypeError: u.indexOf is not a function(…)
sap.ushell.cloudServices.interceptor.InterceptService._invokeFilters # InterceptService.js:1
jQuery.sap.includeScript # InterceptService.js:1
onAfterRendering # Worklist.controller.js:37
InterceptService.js code fragment that produced this error is
{if(u.indexOf('/sap/fiori/../../')>0){u=u.replace('/sap/fiori/../../','/');}
I do use HCP Portal Service to produce HCP Fiori Launchpad Platform.
How to fix this? What I did wrong?
Thanks a lot!
It is indeed issue of InterceptorService, which does not support the syntax of includeScript with object as first argument.
I've forwarded a code of the solution to implementation team of HCP Portal Service and it will be fixed in the next release.
So far, you can achieve the same functionality with the following workaround:
new Promise(function(fnResolve, fnReject) {
jQuery.sap.includeScript(
"https://maps.googleapis.com/maps/api/js?key=XXXX",
"mapsScriptId", fnResolve, fnReject
);
}).then(function() { ... } )
See how UI5 implements it: https://github.com/SAP/openui5/blob/rel-1.38/src/sap.ui.core/src/jquery.sap.global.js#L4387-L4389
Looks like the InterceptService doesn't support the newest signature of jQuery.sap.includeScript (where parameters are provided in a configuration object instead of as individual arguments) yet.
Midterm, the InterceptService needs to be enhanced / fixed. Short-term, you might fall back to the old signature jQuery.sap.includeScript(url, id, onload, onerror). There is unfortunately no way to get a Promise with the old signature.

Got an error in the IBM Bluemix Weather Insights API used. Kindly help me out

I am referencing the documentation page here:
https://developer.ibm.com/bluemix/2015/10/23/ibm-insights-weather-available-in-bluemix/
But I'm getting the following error :
{"metadata":{"version":"1","transaction_id":"1:677162605","status_code":404},"success":
false,"errors":[{"error":{"code":"AGW-0114","message":"Failed to parse apiname"}}]}
My Constructed URL is :
https://****:*****#twcservice.mybluemix.net/api/weather/v2/forecast/&format=JSON&geocode=11.9310,%2079.7852&language=en-US&units=e
Kindly help me with this issue .
The constructed url needs to be like this:
https://twcservice.mybluemix.net/api/weather/v2/forecast/hourly/24hour?format=JSON&geocode=11.9310%2C79.7852&language=en-US&units=e
The differences are:
call the REST API /forecast/hourly/24hour rather than just /forecast
Add the ? at the end of the API so you pass the parameters
Add the %2C in the geocode to represent the ,
See swagger doc here

Unable to generate a temporary class (result=1). error CS0030:

I am trying to paypal express checkout i used https://www.sandbox.paypal.com/wsdl/PayPalSvc.wsdl.
when i call use
PayPalAPIAASoapBinding paypal = new PayPalAPIAASoapBinding();
i am getting error
Unable to generate a temporary class (result=1). error CS0030:
Cannot convert type
'exprtesscheckoutdemo.com.paypal.sandbox.TupleType[]' to
'paypal.sandbox.TupleType' error CS0029: Cannot implicitly convert
type 'paypal.sandbox.TupleType' to
how to over come this
Just hit this myself when updating to version 119. In your generated Web service file, do a find for [][] and replace all occurrences with []. The bad guy seems to be the merchantDataField in the PaymentDetailsType.
It seems to be a bug in the Microsoft WSDL tools when interacting with services that have "nested nodes with the maxOccurs attribute set to unbounded"; I've encountered it before when interacting with FedEx SOAP APIs as well.