close others:sluit anderen
\define lingo-base() $:/language/Buttons/<<lingo CloseOthers/Caption>>
the tiddlers will then contain a query on a datatiddler $:\trnslt and contains the query key of the text
{{$:/trnslt##close others}}
this then tranlates to
sluit anderen- reduce the number of tiddlers (core plugin was getting very long list of tiddlers) (partial done, language tiddlers are still present but not used, a few for long texts will remain).
- immediate language translation switching without reload (partial done, not yet for already present buttons)
- make code more readable by including original english text in the code instead of lingo-base and lingo macro (done)
- easier to translate, checking for missing entries (one file per language), switch back to English to find the search key, for the translation)
This is WORK IN PROGRESS there is still a lot to do do not use this TW for storing imported data
Is this the way to go? pull request?
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/6a9e4ee7-67b8-4ef4-9945-9e025e889044%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I haven't looked through the code so I am going by your description for this.
For anything like this my two concerns would be that languages need to be able to be updated independently and that plugins should be able to be translated also.
It sounds like you have the first one without any trouble, but if each language is in a single data tiddler can we still have optional additions for plugins using this system?
I also agree with Jeremy that using the english translation of a string as the key isn't necessarily a good idea. Problems with changing the english translation are only one part of that though.
Currently english is the common language for the core development, this isn't a problem because it is one of the most common languages in the world, but I would rather avoid anything that would make it a requirement or discourage non-english speakers from thinking they could contribute.
I am not certain that using english as the key would be a problem in either of those cases, but that was my first reaction to the idea.
That’s an ambitious and interesting piece of work, thank you for undertaking it!
That's alright, most of the work was done by curl, regular expressions using gvim and tiddlywiki to create the new translation tiddlers.
- reduce the number of tiddlers (core plugin was getting very long list of tiddlers) (partial done, language tiddlers are still present but not used, a few for long texts will remain).I’m not sure that I see the number of shadow tiddlers as a great disadvantage. Are you concerned with performance or something else?- immediate language translation switching without reload (partial done, not yet for already present buttons)Doesn’t that already work? As far as I know a restart is needed after installing a new language plugin, but not to switch between them.
this is just a feature that should still exist, adding a new language would now not require a reload anymore- make code more readable by including original English text in the code instead of lingo-base and lingo macro (done)
I would need persuading that this is an improvement.
My main concern was the indirection, I tried to add a translation of a diff view plugin (using jsdiff.js) when editing tiddlers, and came to this solution.
When I search for a system tiddler I normally use the span title (it is hard to search for an icon) in the current implementation you first find the translation tiddler, then you have to select ''part'' of the translation tiddler path, to find the tiddler you were looking for.
Using the new trnslt tiddlers, you will find the tiddler (plus the trnslt tiddlers), if you only find trnslt tiddlers the text was modified in the En-En translation, in this tiddler you can find the original key to search again. .
It leads to much longer identification strings,
That is true, but it will result in a smaller TW file (trnslt json's for 8 languages are 215k)
and will surely lead to complexity if we want to change the *English* translation of a string?
English translation strings can be modified in the English to English translation tiddler. Other translations still work if you do not change the key. If you modify the text a lot, then you maybe should opt for a new entry, so everybody knows that their translations probably also need updating..
- easier to translate, checking for missing entries (one file per language), switch back to English to find the search key, for the translation)My thinking was that we could build tools to make it easier to translate, hence http://tiddlywiki.com/editions/translators/
I tried the translator GUI, but when importing all translations, I noticed many translations are missing.
Is this the way to go? pull request?It’s very interesting; I hope my comments don’t put you off. I’d certainly find it easier to review your changes if you could make a fork on GitHub.
It's just a proof of concept, it is one of many local forks, There are only a few new tiddlers : choose language, translations data tiddlers, small flags.svg, the remainder is a "global replace" of the lingo macros..(I'm not a fan of github yet).
Best wishesJeremyThanks for your reply
Regarding transl: it is frustrating to search some string and not find the tid because string was in lingo thing.
can the technique seen in aliases.tiddlyspot.com be used to hide inline strings, targetedr via span IDs, i.e hide the english and display the translation? It relies on css pseudo elements if wanting to do it purely css.
<:-)
The current implementation for interface language rquires 600+ separate tiddlers for each piece of text for each language.
my goal
- reduce the number of tiddlers (core plugin was getting very long list of tiddlers) (partial done, language tiddlers are still present but not used, a few for long texts will remain).
- immediate language translation switching without reload (partial done, not yet for already present buttons)
- make code more readable by including original english text in the code instead of lingo-base and lingo macro (done)
{{$:/trnslt##close others}} imo removes the namespace concept, which influences a lot of filter operators and a core concept.- easier to translate, checking for missing entries (one file per language), switch back to English to find the search key, for the translation)
maybe just to clarify,
All above changes were made to a single tiddlywiki.html file using some smart vi regular expressions and the internal editor of tw.
The last time I used nodes.js for tw was at least two and a half years ago. That might explain why I don't use github ;-)
long keys:
if the keys get too long, you can easily abbreviate them as long they contain the start of the sentence. please note the translation can contain wikitext including transclusions for e.g. short sentences in the same or other trnslt file.
sv source code (for educational purposes, school..):
@mat if you want the strings in the html source to be translated . you could use for instance a vim command file (generated by a simple tiddler) to replace all english key texts by Svenska/Swedish(?) an additional sv 2 sv trnslt is required, it would then show the texts. (append the sv mutids and tid files, see tw use en2 and the file to create english to sv translation. use that translation to create sv to sv like the belgium replace nl and fr by sv)
replace the macro for the Belgium nl fr trnslt -from previous post - in something like (not tested I'm om my phone now)
:%s/trnslt##{{trnslt##\$:\/trnslt-en2##\$(currentTiddler)\$/trnslt##{{trsnlt-sv##$(currentTiddler)/g
because all translations for one language are together in one tiddler(strong cohesion) a 4 line tiddler can generate the vim command to do a full translation into svenska. copy command to a file called sv.vim
gvim -s sv.vim mytiddlywiki.html will creare the file you created . use gvim file menu to save and open new html file in browser
kr WiM