Just to inspire true developers: I'm playing with the code of a new tool, that replaces/adds diacritical marks of the character preceding the cursor into edit textarea. The trick is to decompose the character with .normalize("NFD"), to change what needs to be changed, and to recompose it with .normalize("NFC").
Much faster and comfortable than the usual, painful search for the needed exotic character into Special characters or into a Unicode table.
The code is primitive and undocumented, styling is horrible, but it runs and it seems to be a stand-alone code running into any project ( NOT into Visual Editor, I presume) , to test it simply mw.loader.load() it in edit mode from
https://it.wikisource.org/wiki/Utente:Alex_brollo/Unicode_combining_diacriti...
and feel free to use/change/ignore it as you like: it's simply a "running idea".
Alex
At enWS I cheat and mostly substitute templates for the characters. <We have templates for the set.> Where people just use templates and not subst:, we just run a bot through regularly/occasionally to replace. Low tech, though highly effective, I believe.
To note that we still have the full set in edit tools analogue too.
Billinghurst.
On Tue, 28 Jul 2015 17:00 Alex Brollo alex.brollo@gmail.com wrote:
Just to inspire true developers: I'm playing with the code of a new tool, that replaces/adds diacritical marks of the character preceding the cursor into edit textarea. The trick is to decompose the character with .normalize("NFD"), to change what needs to be changed, and to recompose it with .normalize("NFC").
Much faster and comfortable than the usual, painful search for the needed exotic character into Special characters or into a Unicode table.
The code is primitive and undocumented, styling is horrible, but it runs and it seems to be a stand-alone code running into any project ( NOT into Visual Editor, I presume) , to test it simply mw.loader.load() it in edit mode from
https://it.wikisource.org/wiki/Utente:Alex_brollo/Unicode_combining_diacriti...
and feel free to use/change/ignore it as you like: it's simply a "running idea".
Alex
Wikisource-l mailing list Wikisource-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikisource-l
Alex Brollo, 28/07/2015 09:00:
Much faster and comfortable than the usual, painful search for the needed exotic character into Special characters or into a Unicode table.
abcTajpu often saved me: https://addons.mozilla.org/firefox/addon/abctajpu/
Nemo
Don't waste your time reviewing my code, please consider the goal only: 1. to replace any diacritical mark into any Unicode character with any other Unicode diacritical mark and 2. to add any Unicode diacritical mark to any Unicode character (with or without pre-existing diacritical marks) with *one click only*.
To lower editing time is the very first goal that a busy wikisource user would like, IMHO. So, I'll save my poor tool since I feel it very useful ; presently the tool is being used into a very complex and ancient glottology text covering Italian ladin dialects; I presume, it will be useful too dealing with difficult Latin and polyphonic Greek too.
Alex
2015-07-28 10:10 GMT+02:00 Federico Leva (Nemo) nemowiki@gmail.com:
Alex Brollo, 28/07/2015 09:00:
Much faster and comfortable than the usual, painful search for the needed exotic character into Special characters or into a Unicode table.
abcTajpu often saved me: https://addons.mozilla.org/firefox/addon/abctajpu/
Nemo
Wikisource-l mailing list Wikisource-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikisource-l
wikisource-l@lists.wikimedia.org