If you have a look at the slices handling, you'll see that they end up
as something similar to the following.
var x={};
x["Имя"] = "Иван";
console.log(x)
So as long as the browsers javascript can access russian object
elements, it should be possible.
var x={};
x['абвгдеёжзийклмнопрстуфхцчшщъыьэюяабвгдеёжзийклмнопрстуфхцчшщъыьэюя']
=
"абвгдеёжзийклмнопрстуфхцчшщъыьэюяабвгдеёжзийклмнопрстуфхцчшщъыьэюя";
console.log(x)
Both tests seem to work. So the browser may digest it. I'm not so sure
about TW :)
> (the а-яё part is russian alphabet). The other question is -- is it
> safe to add \- and \s to this part (as they can be parts of "data
> names", like in "long-term plans")?
If you add "spaces" and "minus" to object elements, i bet you'll have
big troubles.
> ... In fact, it seems that if someone
> remembers what are the limitations here, [\.\w] can be substituted
> with [^something] where "something" is those symbols that shouldn't be
> in the slicename. In this case, this can go to the core.. (if the
> RegExp is the *only* problem here).
If this will be core, I'd expect someone has to make ultra havy
testing firs ;)
-m
абвгдеёжзийклмнопрстуфхцчшщъыьэюяАБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ
(a space in the end) to each of the ([\.\w]+) parts let me get this
working:
==== Tiddler: [[Сегменты с русскими именами: тесты]] ====
|Slicename|slice content|
|Slice name|slice content 2|
|Имясегмента|содержимое сегмента 3|
|Имя сегмента|содержимое сегмента 4|
{{{<<tiddler [[Сегменты с русскими именами: тесты::Slicename]]>>}}}
<<tiddler [[Сегменты с русскими именами: тесты::Slicename]]>>
{{{<<tiddler [[Сегменты с русскими именами: тесты::Slice name]]>>}}}
<<tiddler [[Сегменты с русскими именами: тесты::Slice name]]>>
{{{<<tiddler [[Сегменты с русскими именами: тесты::Имясегмента]]>>}}}
<<tiddler [[Сегменты с русскими именами: тесты::Имясегмента]]>>
{{{<<tiddler [[Сегменты с русскими именами: тесты::Имя сегмента]]>>}}}
<<tiddler [[Сегменты с русскими именами: тесты::Имя сегмента]]>>
(each of the four tiddler macro shows the content).
But the thing is -- I got this working when I changed the core. First,
I wrote a plugin:
TiddlyWiki.prototype.slicesRE = /(?:^([\'\/]{0,2})~?([\.
\wабвгдеёжзийклмнопрстуфхцчшщъыьэюяАБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ ]
+)\:\1[\t\x20]*([^\n]*)[\t\x20]*$)|(?:^\|([\'\/]{0,2})~?([\.
\wабвгдеёжзийклмнопрстуфхцчшщъыьэюяАБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ ]
+)\:?\4\|[\t\x20]*([^\|\n]*)[\t\x20]*\|$)/gm;
which didn't work. I guess it's because the definition of the slicesRE
is changed after slices hashmap is built. Is anybody aware of fast
method of rebuilding the slices? Of'course, I can copy the store, than
purge the main one, than copy tiddlers back to the main store, but
this is bulky for each-startup procedure.
On the other hand, I'm going to analyse the syntax and do some tests
and then discuss this for the core update, so perhaps the first
question is not of that importance.