GmailAdd on universalActions Text Internationalization - internationalization

I have been developing a GmailAddon. It has a universalAction and it implemented in appscript.json from https://developers.google.com/gmail/add-ons/how-tos/universal-actions. My universalaction block is
"universalActions": [{
"text": "Settings",
"runFunction": "createSettingsResponse"
}]
Problem is my Addon should be supports multi language. How I change the text of universalActions with current language?
Cheers.
UPDATE
I solved the problem with Card Actions and remove universalActions block. Creatting any action per Cards you can reach more details from https://developers.google.com/apps-script/reference/card-service/card-action.

Related

Possible bug in Power Automate when publishing an Adaptive Card with wait for answer

I'm facing a rather strange problem in Power Automate and I think, it is a bug.
What I am trying to do:
initialize a variable named "Room" with "Testroom".
Using this variable inside a Adaptive Card".
Display a new message that the user "xyz" clicked the previously created Adaptive Card.
My Adaptive Card with wait for answer looks like this:
{
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"text": "Test",
"color": "warning",
"size": "Medium",
"weight": "Bolder",
"wrap": "true"
}
]
}
I can then see the available fields (for example "Body") of the "Adaptive Card" in the "Dynamic Content" popup.
So far, everything is fine. But very strange things happen, as soon as I am using a variable within the Adaptive Card. If I put the variable name in the Adaptive Card content, I loose all the options from the Adaptive Card in the "Dynamic Content" popup.
Adaptive Card
Without using a variable within the Adaptive Card content
when using a variable within the Adaptive Card content
Any advice very welcome!
It definitely is a code defect. (So, I contacted Microsoft about it and they are sorting it out)

Use custom types (Substrate FRAME pallet + Polkadot/Substrate frontend)

Scenario: You are developing a FRAME pallet for a custom Substrate node that uses custom types within Storage or Events. To interact with your custom Substrate node, you use the Polkadot/Substrate frontend
Problem:
When you query the storage that contains your custom type, the frontend returns "unknown" as the value
When you submit an extrinsic to be included in a block that should lead to the emission of an event using the custom type, the Polkadot/Substrate frontend seems to get stuck while stating that the extrinsic is "ready" for inclusion in a block. This is not the case though, if you inspect the block the extrinsic should be included in, you can see the following error message:
Unable to retrieve the specified block details. createType(Vec):: Struct: failed on 'data':: Cannot construct unknown type YOUR_CUSTOM_TYPE
Solution: You have to specify your custom types in the Polkadot/Substrate frontend. To do so, select "Settings" -> "Developer" in the top menu bar:
Below you can see a text field titled "Additional types as a JSON file". In this text field you have to enter your custom types for the frontend to be able to interpret those correctly. In the top right corner, right below the version numbers, a big white question mark in a gray circle should be visible. By clicking on this question mark, an help dialog slides in.
Example configuration: Let's take the pallet I learned this lesson with as an example. In the highlighted lines, you see the custom enum "States":
pub enum States {
Propose,
VotePropose,
Concern,
VoteConcern,
VoteCouncil,
}
Using the help dialog (the white question mark), it turns out that the correct configuration JSON snippet looks like this:
"States": {
"_enum": [
"Propose",
"VotePropose",
"Concern",
"VoteConcern",
"VoteCouncil"
]
}
Now that metadata can be read from on chain this problem can't occur.

Kendo ui Multi nested listview

I java a similar nested json arrayobj, It may be from 1..X (not limited)
[{"id":"25","son": [
{"id":"26", "son": [
{"id":"28","son":[],"message":"my message 1","creationDate":"2016-05-26"},
{"id":"27","son":[],"message":"my message 2","creationDate":"2016-05-26"}
],
"message":"my message 3","creationDate":"2016-05-26"}
],"message":"my message 4","creationDate":"2016-05-26"}
]
I nedd to display it using Kendo, I am using listviewm but it just list the firt item, not the son tag items.
I am trying to implement a forum control. Can you suggest a way to do it?. Thank you in advance.
As far as I know, you won't be able to achieve what you want using a kendo listview because it wasn't designed to display hierarchical data (or nested data).
However, kendo do have other widgets that you can use to what you want to do. I think the TreeList is probably the one you are looking for. In order to use that widget, you will have to modify the data from a nested format to a id / parendId format. Using the sample data you provided, you should reformat the data like this:
var data = [
{ id:25,parentId: null, message:"my message 4",creationDate:"2016-05-26" },
{ id:26, parentId:25, message: "my message 3", creationDate:"2016-05-26"},
{ id:28, parentId:26, message":"my message 1",creationDate:"2016-05-26"},
{ id:27, parentId:26, message:"my message 2", creationDate:"2016-05-26"}
]
Depending on your need, you may also use a TreeView but this widget isn't designed to display multiple fields by default. You can also use a grid with a custom detail template but that required extra code to handle the detail grid template initialization.

How to customize individual buttons (not the overall toolbar) in CKEditor

I'm using CKEditor in my Rails app (via the 'ckeditor' gem).
I've customized the toolbar as below. As you can see, I only want the minimum amount of features.
[
{ name: 'basicstyles', items : [ 'Bold','Underline' ] },
{ name: 'paragraph', items : [ 'NumberedList','BulletedList' ] },
{ name: 'links', items : [ 'Link' ] },
{ name: 'insert', items : [ 'Smiley','SpecialChar' ] },
{ name: 'colors', items : [ 'TextColor' ] },
];
This works fine, but the buttons provide much more functionality than I need.
For example, the Link button triggers a popup that allows the user to choose details like link type and target. I want to restrict my users to exactly one kind of link. (ie. when they click the link button, all they need to do is enter the link, and they see no options and have no decisions to make.)
For Text Color, I just want two or three colors, instead of the 50+ that are provided.
How can I make these changes?
Would appreciate it if you could provide input, or point me to some resources. Thanks!
To make these changes, you'll need to rewrite the desired plugins in order to customize their funcionality.
You can find further info about it here: http://docs.ckeditor.com/#!/guide/plugin_sdk_intro
In order not to break compatibility with newer versions, I suggest you to create new plugins based in the ones you want to modify instead of doing that directly in their source code.
You can try the Advanced Content Filter that we introduced in CKEditor 4.1. Based on content rules which you can define editor data is filtered and the same happens to UI - only "allowed" buttons and fields in dialogs are displayed. It all happens automatically, so the result may not be perfect, but we have really positive feedback about this feature.
Check the ACF sample and release note.

Why are Facebook Likes insisting on using the wrong product image...?

My website, http://www.joaniesgifts.co.uk, includes the like button on the product pages. However, I've found that certain product pages are using the incorrect image when a user likes the page. This page is an example.
I think this may have been down to an original incorrect setup which is now corrected. However, the problem remains...
The only thing I have to go on is if I use the Facebook URL linter on the above product page I receive the following error.
Object at URL 'http://www.joaniesgifts.co.uk/terramundi-money-pot-holiday-fund' of type '213689662010141:product' is invalid because the domain 'www.joaniesgifts.co.uk' is not allowed for the application id '213689662010141' which owns the specified object type. If you are the owner of this application, you can verify your configured 'Site Domain' at developers.facebook.com/apps/213689662010141.
(I have verified my site's domain)
Everything else appears fine except it is also showing the wrong image! However, under Raw Open Graph Document Information it has the correct link!
If I then click Graph API - http://graph.facebook.com/10150450766583352 - it again shows the wrong image was linked!
What else could I do?
Also: The Graph API shows the incorrect image after a scrape only minutes ago.
{
"url": "http://www.joaniesgifts.co.uk/terramundi-money-pot-holiday-fund",
"type": "website",
"title": "Terramundi Money Pot - Holiday Fund",
"image": [
{
"url": "http://www.joaniesgifts.co.uk/index.php?route=product\u00252Fproduct\u00252Fcaptcha"
}
],
"updated_time": "2011-11-11T18:54:38+0000",
"id": "10150450766583352"
}
As this is an apparent bug in Facebook, I have gotten around this by removing the Open Graph type: product from the Facebook meta tags. At least the page works now and links the right images!

Resources