[TW5] Question: Transclusion with emoji (unicode)

53 views
Skip to first unread message

Matabele

unread,
Jan 30, 2016, 10:56:00 PM1/30/16
to TiddlyWikiDev
Hi

This is best explained in the form of sample tiddlers -- I have attached a json package containing 3 tiddlers with my question.

??

regards
testing languages.json

Tobias Beer

unread,
Jan 31, 2016, 3:12:15 AM1/31/16
to TiddlyWikiDev
Hi Matabele,

This doesn't work:

<<language Introduction {{!!current-language}}>>

It would at least require a macrocall widget.

As for languages, possibly a template could be a good approach:

{{||local}}

This makes me think that a tiddler button may be of need / useful
that removes the modifier as well as the created fields from a tiddler:
so such templates don't show up in too many lists, e.g. the Recent tab.

Anyhow, the way I would possibly go about it
is to define the current language in a (global) variable, e.g.

<<tv-current-language>>

This language should then be taken in your language macro.

You could surely save a "language state" for each tiddler individually
setting the same context variable, but I don't think that's a good idea
as it only over-complicates things.

Also, while you may chose to use emoji's in the title,
I would not use those in the text... they are simply too difficult to retrieve.
I'd rather use plain text, e.g. "en", "fr", "de"... and a dictionary to map things.

Best wishes,

Tobias.

Matabele

unread,
Jan 31, 2016, 3:27:12 AM1/31/16
to TiddlyWikiDev
Hi Tobias


On Sunday, 31 January 2016 10:12:15 UTC+2, Tobias Beer wrote:

It would at least require a macrocall widget.

Tried that -- makes no difference
 
As for languages, possibly a template could be a good approach:

I started out writing a 'quick' macro as part of a suggestion in answering a question -- and came across this inconsistency. I'm exploring the use of emoji in general, and am interested in the general case: 

Why does transclusion of a field containing unicode succeed in the the first case (into the text field), but fail as a parameter to a macrocall?
 
This makes me think that a tiddler button may be of need / useful
that removes the modifier as well as the created fields from a tiddler:
so such templates don't show up in too many lists, e.g. the Recent tab.

I use a button like this here -- after creating emoji tiddlers to hide them away from the Recent tab (part of the 'Make Emoji' button.) Removes the modifier, modified and creator fields, but leaves the created field. Would require an extra parameter in the $action-delete field widget to remove that.

Anyhow, the way I would possibly go about it
is to define the current language in a (global) variable ...
I'd rather use plain text, e.g. "en", "fr", "de"... and a dictionary to map things.

That appear to be the way to go for this particular usage case; but I'm still interested in the answer to my question

regards 

Tobias Beer

unread,
Jan 31, 2016, 6:16:38 AM1/31/16
to TiddlyWikiDev
Hi Matabele,
 
Why does transclusion of a field containing unicode succeed in the the first case (into the text field), but fail as a parameter to a macrocall?

You "current-language" field value ends in a space. :-)

Best wishes,

Tobias. 
Message has been deleted

Matabele

unread,
Jan 31, 2016, 6:37:40 AM1/31/16
to TiddlyWikiDev
Hi Tobias

Still doesn't work -- I even changed from a simple match to a filter: "[regexp[$language$ ]regexp[$title$]]"

No luck :-(

regards

Matabele

unread,
Jan 31, 2016, 6:50:15 AM1/31/16
to TiddlyWikiDev
Hi Tobias

Really weird -- must still be a syntax error -- because all of these transclusions work as they should

regards

On Sunday, 31 January 2016 13:16:38 UTC+2, Tobias Beer wrote:
test transclusion.json

Matabele

unread,
Jan 31, 2016, 6:58:00 AM1/31/16
to TiddlyWikiDev
Hi

Perhaps its the double transclusion?


On Sunday, 31 January 2016 13:16:38 UTC+2, Tobias Beer wrote:

Tobias Beer

unread,
Jan 31, 2016, 3:06:09 PM1/31/16
to tiddly...@googlegroups.com
Hi Matabele,

What of those cases 1..5 are you having trouble with?
Your cases 4 and 5 only work because you have no white space in your titles.
Other than that, they are not valid wikitext, i.e. highly fragile constructs.

Best wishes,

Tobias.
Reply all
Reply to author
Forward
0 new messages