Bilingual pages swapper - new simple plugin

156 views
Skip to first unread message

oleghbond

unread,
Mar 21, 2020, 3:46:52 PM3/21/20
to TiddlyWiki

Plugin is:

The plugin sets an additional button at the top right of a tiddler intended for switching between identical pages in Ukrainian and English. The name of the translated matching tiddler is written in the tiddler field swap.


Definitely, the plugin can be easily rewritten for any other pair of languages!


For example, we have two matching tiddlers titled Стаття and Article, respectively in Ukrainian and English. In order to ensure correct transition from tiddler Стаття in its field swap the value Article must be specified, and in tiddler Article in the same field swap – the value Стаття, respectively. Also, each of the two tiddlers must be tagged with their language,  Ukr or  Eng, respectively.


Additionally, the plugin creates two tag tiddlers Ukr and Eng, each of which stores an ordered list of all the tiddlers tagged with the Ukr  or Eng, respectively. Moreover, the order of the tiddlers in these lists can be rearranged using drag-and-drop by pre-clicking on the tag icon Ukr or Eng. And that's not all - there are a couple of navigation buttons previous | next in the bottom of each tiddler from the list. The functionality specified here is provided with a simple-navigation macros, which is part of the plugin $:/plugins/kookma/utility.


Also, the plugin creates two plane content tables Зміст and Content based on the Ukr and Eng tags, respectively. These two tables of content are placed in the sidebar under Content-Зміст tab.

A Gloom

unread,
Mar 21, 2020, 11:33:11 PM3/21/20
to TiddlyWiki
Nice, I see this being useful in the US were bilingual is becoming more commonplace.

I like how it uses your work combined with Mohammad's -- combining the skills of both of you.

Mohammad

unread,
Mar 22, 2020, 12:50:18 AM3/22/20
to TiddlyWiki
Hi Olegh,
 Really great stuff. Love them!

One question: Do you prepare both tiddlers in Uk/En or this is done by code?

--Mohammad

Olegh Bondarenko

unread,
Mar 22, 2020, 4:31:39 AM3/22/20
to tiddl...@googlegroups.com
Thanks for your comments. It's true, Mohammad's framework (Shiraz & Utility) makes user's life much easier.
Olegh Bondarenko
https://bit.ly/oleghbond





нд, 22 бер. 2020 о 05:33 A Gloom <barro...@gmail.com> пише:
Nice, I see this being useful in the US were bilingual is becoming more commonplace.

I like how it uses your work combined with Mohammad's -- combining the skills of both of you.

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/mWh7HOFtEzk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/8d9ca3ce-5a76-42e4-881d-e8ca1738db1a%40googlegroups.com.

Olegh Bondarenko

unread,
Mar 22, 2020, 5:03:31 AM3/22/20
to tiddl...@googlegroups.com
Dear, Mohammad, please have a detailed description of the plugin components:
ComponentDescription
$:/plugins/boa/langswap/ЗмістA plane TOC of tiddlers tagged with Ukr, the list of tiddlers is sortable (draggable) one
$:/plugins/boa/langswap/ContentA plane TOC of tiddlers tagged with Eng, the list of tiddlers is sortable (draggable) one
$:/plugins/boa/langswap/Content-ЗмістCombination of two TOCs for Ukr and Eng under macros <<tabs>>, this tiddler is placed to the sidebar>>
$:/plugins/boa/langswap/img/GBR.svgGreat Britain's flag
$:/plugins/boa/langswap/img/swap.svgTiddler swap button image, placed the top right of a tiddler
$:/plugins/boa/langswap/img/UKR.svgUkrainian flag
$:/plugins/boa/langswap/readmeReadme
$:/plugins/boa/langswap/swapbuttonThe swap button macro code
EngTag Eng tiddler, contains previous | next navigation macros <<simple-navigation tag:Eng>>
UkrTag Ukr tiddler, contains previous | next navigation macros <<simple-navigation tag:Ukr>>
 Olegh Bondarenko

нд, 22 бер. 2020 о 06:50 Mohammad <mohammad...@gmail.com> пише:
--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/mWh7HOFtEzk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.

Mohammad

unread,
Mar 22, 2020, 5:10:14 AM3/22/20
to TiddlyWiki
Thanks for clarification Olegh!

I understood both tiddlers (one in Ukranian and one in English) are manually prepared and they are existed in the wiki!

--Mohammad
нд, 22 бер. 2020 о 06:50 Mohammad <mohamma...@gmail.com> пише:
Hi Olegh,
 Really great stuff. Love them!

One question: Do you prepare both tiddlers in Uk/En or this is done by code?

--Mohammad

On Sunday, March 22, 2020 at 12:16:52 AM UTC+4:30, oleghbond wrote:

Plugin is:

The plugin sets an additional button at the top right of a tiddler intended for switching between identical pages in Ukrainian and English. The name of the translated matching tiddler is written in the tiddler field swap.


Definitely, the plugin can be easily rewritten for any other pair of languages!


For example, we have two matching tiddlers titled Стаття and Article, respectively in Ukrainian and English. In order to ensure correct transition from tiddler Стаття in its field swap the value Article must be specified, and in tiddler Article in the same field swap – the value Стаття, respectively. Also, each of the two tiddlers must be tagged with their language,  Ukr or  Eng, respectively.


Additionally, the plugin creates two tag tiddlers Ukr and Eng, each of which stores an ordered list of all the tiddlers tagged with the Ukr  or Eng, respectively. Moreover, the order of the tiddlers in these lists can be rearranged using drag-and-drop by pre-clicking on the tag icon Ukr or Eng. And that's not all - there are a couple of navigation buttons previous | next in the bottom of each tiddler from the list. The functionality specified here is provided with a simple-navigation macros, which is part of the plugin $:/plugins/kookma/utility.


Also, the plugin creates two plane content tables Зміст and Content based on the Ukr and Eng tags, respectively. These two tables of content are placed in the sidebar under Content-Зміст tab.

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/mWh7HOFtEzk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddl...@googlegroups.com.

Olegh Bondarenko

unread,
Mar 22, 2020, 6:01:43 AM3/22/20
to tiddl...@googlegroups.com
Mohammad, 

I've caught your question - you were asking about the wiki content, consisting of pairs of Ukr/Eng tiddlers. Yes, both tiddlers in each pair are prepared manually, then they are tagged with Ukr and Eng, respectively, and, finally, the field swap is created in both of tiddlers for cross-referencing. That is the whole technology for a wiki writer.

Olegh Bondarenko
https://bit.ly/oleghbond





нд, 22 бер. 2020 о 11:10 Mohammad <mohammad...@gmail.com> пише:
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/c3572837-67c2-4c59-8483-305f2500bd31%40googlegroups.com.

Mohammad

unread,
Mar 22, 2020, 6:44:48 AM3/22/20
to TiddlyWiki
Got it!

Thank you Olegh!

--Mohammad


On Sunday, March 22, 2020 at 2:31:43 PM UTC+4:30, oleghbond wrote:
Mohammad, 

I've caught your question - you were asking about the wiki content, consisting of pairs of Ukr/Eng tiddlers. Yes, both tiddlers in each pair are prepared manually, then they are tagged with Ukr and Eng, respectively, and, finally, the field swap is created in both of tiddlers for cross-referencing. That is the whole technology for a wiki writer.

Olegh Bondarenko
https://bit.ly/oleghbond





нд, 22 бер. 2020 о 11:10 Mohammad <mohamma...@gmail.com> пише:

oleghbond

unread,
Mar 22, 2020, 7:32:21 AM3/22/20
to TiddlyWiki
Mohammad, 

I wanted to optimize the plugin moving the TOC code from the tiddler Content into the tag tiddler Eng. However, I encountered a strange "double displaying" effect:

simple-navigation.png


Could you hint how to sort out this effect?

неділя, 22 березня 2020 р. 12:44:48 UTC+2 користувач Mohammad написав:

Mohammad

unread,
Mar 22, 2020, 7:42:14 AM3/22/20
to TiddlyWiki
The tiddler you sent the snapshot is tagged with $:/tags/ViewTemplate so it shows the result one time
but then the result is displayed on this tiddler and every other tiddler through this tiddler as it is a view template tiddler!
The filter you have used should be modified to act on certain tiddler! 

For example
<$list filter="[all[current]tag[Filter Operators]]"> ...

Then ViewTemplate only works on tiddler tagged with Filter Operators

--Mohammad

A Gloom

unread,
Mar 22, 2020, 7:55:50 AM3/22/20
to TiddlyWiki

Thanks for your comments. It's true, Mohammad's framework (Shiraz & Utility) makes user's life much easier.

I haven't incorporated plugin's yet but i often incorporate others code snippets along with mine in a mad construct-- see the tiddler I post in the Covid contination thread-- combines Tobias', Mohammad's, Jed Carty's code along with mine-- if the code wasn't chained down I borrowed it >> <<

hopefully someone will get it added to the Toolmap, perhaps submit it to the Community section at tiddlywik.com

oleghbond

unread,
May 21, 2020, 10:07:47 AM5/21/20
to TiddlyWiki
Dear all,

please find an updated version of my plugin langswap for organizing and managing the bilingual wiki content:
The embedded readme description includes an exhausted yet simple procedure of plugin's readjustment into an alternative arbitrary pair of languages.

Enjoy...
Olegh

субота, 21 березня 2020 р. 21:46:52 UTC+2 користувач oleghbond написав:
Reply all
Reply to author
Forward
0 new messages