Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

French translation for Vanilla 1.0

2»

Comments

  • Options
    Okay jakob_r I have begun testing of the Vanilla interface in french on a new Vanilla 1.0 instance. Errors are arising yet with parse error on strings as french language contains many \' . How can i replace them automatically ? Is it possible at all ?
  • Options
    edited May 2006
    contains many whats? ' ? Just escaping them with a \ should work fine shouldnt it? Unless you need a \ in which case you can escape it with a \ first i think?

    If it still doesnt work just find the html equivalent

    As for replacing automatically, that should be a function of your text editor. Notepad and wordpad do it so i assume whatever you're using should.
  • Options
    Yes, i was mentioning the ' , I managed to escape them by using the replace function of Bluefish. Thanks. At first i couldn't see how to spot the ' in the string as they could be hardly anywhere between words, so I decided to replace the ' ' wraping the string by " ". That way it was easy.
  • Options
    edited May 2006
    ah, I see you got it.
  • Options
    Easy but technically slower because now php will evaluate the entire string. What you should do now is swap all " for something completely wierd (like ^ perhaps?), then swap all ' for \' then swap all ^ for '. If you get me.
  • Options
    edited May 2006
    I am missing something, what do yo mean by "evaluate the entire string", why would this be slower to execute in PHP ? Anyway I will trust you :) and make the required changes. I am finished with the language files, except for definitions.hist, can I copy/paste in the contents of definitions.php, as both files look like clones ? Is there something else i should double-check before sending you the package ? Well, I have let definitions.hist unchanged as I don't see the use for french, end users. Today I have been readjusting my phrases and I've begun translation of a few basic extensions like Styles, however I don't know where to put these definitions so that they are recognized ?
  • Options
    Well if you use something like:
    $cool = 'awesome';
    $whatever = "this is $cool"; // $whatever now equals 'this is awesome'
    $whatever = 'this is $cool'; // $whatever now equals 'this is $cool'

    So whenever php comes across " 's it puts more work into evaluating them which slows the parse down. Only a tiny bit mind. And probably pretty unnoticable. But enough that on someones suggestion a few months ago mark went through the *entire* codebase replacing all his " with ' to speed things up a little bit :)

    I'm not sure what definitions.hist is so i'm afraid i cant help you there. I suspect maybe you're on the nail so users can compare the translation to the 'historic' english version but I dont really see the point to it so unless there's a method in marks madness there's probably a much more important use for it. I'm sure someone will tell you anyway.

    As for translating extensions, i forget now where the translated strings are kept. I think some extension authors have put their definitions at the top of the extension file. We could do with an official protocol for this if there isnt one already.
  • Options
    You can resolve variables in the middle of strings?
  • Options
    Bergamot: Yes, it is all right now. I just had to mask [' and '] before actually proceeding with interspersed ' in the middle of strings. minisweeper: I know it should pop in my mind, i see that there is some point with this, but by now I can't realize because I assume the variable must be evaluated at some stage, so it remains 'foggy'(as we say in french :). Do you mean the definition is evaluated too early while parsing ? I will finish translating main extensions and place their definitions in the archive to be uploaded to Lussumo. Wait, one more thing, can I let my files encoded in UTF-8 ? and is it best-practice to replace é è ô by their html code ?
  • Options
    Ghotcom, take a look at this thread about encoding in UTF-8.
  • Options
    Eh Bergie? I think what i said is correct? Otherwise I've waaay missed the gun sometime.

    Ghotcom the variable doesnt have to be evaluated at some stage, if you put it in ' 's it will assume it's not a variable just a string. i.e. the price $25.

    I really hope i'm talking sense or i'm gonna look like a right idiot when someone with half a brain comes along.
  • Options
    minisweeper: Okay i think i am missing someting..maybe a brain or I am not practical at all _.._ Let's give another try :) , $whatever = 'this is $cool' if it is not evaluated how will $cool be replaced by its string to give the complete phrase !?! For the extensions language definitions, when I place them in conf/language.php or french.php nothing happens in the interface, I think it lakes (or I missed :) the method to call them, ain't it ? Anyway as everything else is working I will now archive the language folder and upload it.
  • Options
    I think what min is trying to say is that writing the $-sign in the 'text string itself' will show up as that sign. If you want to include a variable mid-string it should be 'this is my string with '.$myvar.' included in the middle.' That said, I don't think $variables actually occur in the middle of the text itself in the definitions.php. Where mark wanted a value to be inserted he used //1, //2 and //3.

    * * *

    To get the strings for the extensions to show, you have to comment out the english definitions in the extension itself (put // or # in front of the line), or else they are used.

    I found in some cases where the string from the extension needs a variable to be processed (for example the link in GuestWelcome), it wouldn't work with the extension string in the language/definitions.php file.

    BTW: to avoid any misunderstandings, the file should be called definitions.php (french.php was the old way) and be put in the French folder, i.e. French/definitions.php. Also in that folder: readme.txt and the email texts. I don't have the .hist file in there at all.
  • Options
    Voila !! French language has been released. Enjoy !
This discussion has been closed.