From 042e4d1421edb503dec548e52b2268bf154f3d53 Mon Sep 17 00:00:00 2001 From: lin onetwo Date: Thu, 21 Mar 2024 16:07:45 +0800 Subject: [PATCH] TODO: remove after https://github.com/Jermolene/TiddlyWiki5/pull/7821 is merged --- wiki/tiddlers/patches/lingo.tid | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 wiki/tiddlers/patches/lingo.tid diff --git a/wiki/tiddlers/patches/lingo.tid b/wiki/tiddlers/patches/lingo.tid new file mode 100644 index 0000000..6f5b067 --- /dev/null +++ b/wiki/tiddlers/patches/lingo.tid @@ -0,0 +1,25 @@ +title: $:/core/macros/lingo +tags: $:/tags/Global + + + +\procedure lingo-base() +$:/language/ +\end lingo-base + +\procedure lingo(title,override-lingo-base) + + +<$parameters $parseMode="parseMode"> + + <$let active-lingo-base={{{ [!match[]else] }}}> + + <$transclude $tiddler={{{ [addsuffix] }}} $mode=<<parseMode>>> + <!-- If that didn't work, try the new <lingo-base><langcode>/<title> format --> + <$let language-code={{{ [[$:/language]get[text]get[name]else[en-GB]] }}}> + <$transclude $tiddler={{{ [<active-lingo-base>addsuffix<language-code>addsuffix[/]addsuffix<title>] }}} $mode=<<parseMode>>/> + </$let> + </$transclude> + </$let> +</$parameters> +\end lingo \ No newline at end of file