Author Topic: Diff Template (=alternative template) Proposal  (Read 34479 times)

0 Members and 1 Guest are viewing this topic.

Offline bacter

  • Operator
  • Insane poster
  • *****
  • Posts: 682
    • View Profile
Re: Diff Template (=alternative template) Proposal
« Reply #15 on: September 16, 2007, 02:18:13 PM »
Very good idea the %lang% symbol !

I've tried to use java to get the language of the browser/system, but it will produce much overhead having different languages in the same template.

But the %lang% poses some problems. Supose than %lang% can be something like 'de','en','es','fr','it' and so on. Could we then use something like [sym-tblde],[sym-tblit] with %symtbl%lang%% ??
In all case, y think %lang% will need in the hfs.ini a list of our supported languages, and in the case that the language isn't in this list, %lang% should be empty, in order to use our default language.

Many thanks, rejetto, for your great work!
Molte grazie per il tuo lavoro eccellente !
your computer has no brain - use your own !

Offline rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12832
  • Country: it
    • View Profile
Re: Diff Template (=alternative template) Proposal
« Reply #16 on: September 21, 2007, 02:12:59 PM »
i get the idea.
such thing is possible, but i'm not sure it will be done, i have to consider how this will affect the rest of the code.

Offline Foggy

  • Insane poster
  • *****
  • Posts: 806
    • View Profile
Re: Diff Template (=alternative template) Proposal
« Reply #17 on: September 22, 2007, 02:48:03 AM »
how about you create a new template file for each language and have them called <language>.diff.tpl and then when you first connect to hfs, hfs requests the client lnguage and if a templae matching the language is found it is then used otherwise use the one set in the editor.

Offline rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12832
  • Country: it
    • View Profile
Re: Diff Template (=alternative template) Proposal
« Reply #18 on: September 22, 2007, 04:48:35 AM »
this was already accepted few posts before

Offline TCube

  • Insane poster
  • *****
  • Posts: 439
    • View Profile
Re: Diff Template (=alternative template) Proposal
« Reply #19 on: November 29, 2007, 05:41:27 AM »
So now, U all talked about AlOnso's crap comment about %lang%

Back to diff. temp. please  ... rejetto, times are tough ... how are things going for diff. temp ?
Merci
Tcube
Make it idiot-proof and I will make a better idiot

Offline rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12832
  • Country: it
    • View Profile
Re: Diff Template (=alternative template) Proposal
« Reply #20 on: November 29, 2007, 06:50:52 AM »
how about you create a new template file for each language and have them called <language>.diff.tpl and then when you first connect to hfs, hfs requests the client lnguage and if a templae matching the language is found it is then used otherwise use the one set in the editor.

re-reading your proposal, i misread, it is different than others.
but now that we have macros, i think it is possible to make it by putting this at the end of the template
{{load|%lang%.diff.tpl}}

Offline rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12832
  • Country: it
    • View Profile
Re: Diff Template (=alternative template) Proposal
« Reply #21 on: November 29, 2007, 06:52:14 AM »
Back to diff. temp. please  ... rejetto, times are tough ... how are things going for diff. temp ?

what are you referring to?

Offline rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12832
  • Country: it
    • View Profile
Re: Diff Template (=alternative template) Proposal
« Reply #22 on: November 29, 2007, 08:57:24 AM »
Mars, I hope there was nothing I was supposed to answer to in your post, because i didn't get any point.

Anyway, consider that starting with "sym-" is no more mandatory.

Offline TCube

  • Insane poster
  • *****
  • Posts: 439
    • View Profile
Re: Diff Template (=alternative template) Proposal
« Reply #23 on: November 29, 2007, 10:13:24 AM »
Not sure which side is getting silly  ;)  anyway, I 'm refering to this 1st post 1 page :

Quote
Proposal:
Is it possible to implement, instead of copy/pasting code to the popup window, entering the file name for the alternative code, like hfs_jpg.tpl, hfs_clean.tpl, hfs_1 ... etc. These alternative tpl files would reside in the same directory as the default hfs.tpl and applied instead of hfs_default. This would increase usability a lot.
Make it idiot-proof and I will make a better idiot

Offline rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12832
  • Country: it
    • View Profile
Re: Diff Template (=alternative template) Proposal
« Reply #24 on: November 29, 2007, 10:25:49 AM »
sorry, i probably considered implicit:
in the popup dialog just type {{load|hfs_jpg.tpl}}
or any other file name
you could even BUILD the file name (by other commands) instead of typing it ;D

Offline TCube

  • Insane poster
  • *****
  • Posts: 439
    • View Profile
Re: Diff Template (=alternative template) Proposal
« Reply #25 on: November 29, 2007, 11:19:01 AM »
No harm done : I moved to built 146 couple of days ago ... don't know shit yet about macros I'll read the wiki  ;D  merci Rejetto
« Last Edit: November 29, 2007, 02:12:05 PM by TCube »
Make it idiot-proof and I will make a better idiot