Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Wrong localized dates display

estest New
edited May 2012 in Vanilla 2.0 - 2.8

Hi, recently I've posted the bugreport for About Me plugin.

Thanks for your suggestion, I've tried you plugin. It's fine, but has few issues.

First, it incorrectly displays localized date (this is Russian locale), see screen shot:

Also, it takes <img src="image.png"> tag and returns as <img src="src" alt="image"> (taken from page source)

Best Answer

  • x00x00 MVP
    edited May 2012 Answer ✓

    The date follows

    Date.DefaultFormat

    locale make sure it is set correctly. the defautl is %B %e, %Y so it must be set differently.

    Note there is two different date format function for php and they can easily be confused

    vanilla uses strftime

    I don't know what is goign on with img, it works for me. Note it follow whatever the default formatter you are using, so if it isn't Html then you have to use the applicable format.

    if you have changed mymeta.yml and if so can you post it?

    grep is your friend.

Answers

  • x00x00 MVP
    edited May 2012 Answer ✓

    The date follows

    Date.DefaultFormat

    locale make sure it is set correctly. the defautl is %B %e, %Y so it must be set differently.

    Note there is two different date format function for php and they can easily be confused

    vanilla uses strftime

    I don't know what is goign on with img, it works for me. Note it follow whatever the default formatter you are using, so if it isn't Html then you have to use the applicable format.

    if you have changed mymeta.yml and if so can you post it?

    grep is your friend.

  • Sorry for delay with answer - had hard time.

    You're right about date format - I'm using localized version with date format set incorrectly.

    As for img - could you please tell which format is applicable? And no, I have not changed mymeta.yml

    BTW, can you tell me how to translate field in .yml file?

  • x00x00 MVP
    edited May 2012

    what have you got for $Configuration['Garden']['InputFormatter']?

    To Localise field names you do it like so two ways either add to your locale the field name, or in mymeta.yml carefully edit each after name: (note the space after the colon this is important)

    E.g:

     Title: 
      name: название
      type: text 
    

    Note I wouldn't copy and paste an the above, in case the indentation is wrong, instead just enter whatever after name, save the file as UTF-8 (without BOM)

    I'm not sure if I got the Russian right but title in that context in English means Dr/Mr/Mrs/Miss, etc

    It is also sometimes called 'style', if you are really posh. Like 'Her Majesty'

    grep is your friend.

  • estest New
    edited May 2012

    what have you got for $Configuration['Garden']['InputFormatter']?

    Got it, I use Markdown and ![](http://path/to/image.png) works for me.

    To Localise field names you do it like so two ways either add to your locale the field name, or in mymeta.yml carefully edit each after name: (note the space after the colon this is important)

    Thanks for helping me! I'm new to Vanilla and have too much questions :)

    I added the field from mymeta.yaml to locale, I think this is more proper way to localize vanilla.

    I'm not sure if I got the Russian right but title in that context in English means Dr/Mr/Mrs/Miss, etc

    It is also sometimes called 'style', if you are really posh. Like 'Her Majesty'

    Ah, got it. In linguistics it is called honorific. We say Обращение in Russian :)

    This is because of ambiguousness of the word Title. It can be the name of an article which is Название in Russian, or it can be honorific which is Обращение.

  • x00x00 MVP
    edited May 2012

    I agree honorific is a better term, however if I used it, many people wouldn't know what it meant.

    $Definition['Field Name'] = 'Some Translation';

    Where you want to make a distinction from some other context then you would have to change the name in mymeta.yml. Then

    $Definition['Field Name Distinct'] = 'Some Translation';

    There isn't a locale context facility. But an emerging convention is ContextPrefix.LocaleText, or ContextPrefix.LocaleLabel.

    If you wanted to sponsor the change I could add a text format param to text fields, i.e. Auto,Html,Markdown,BBCode. You could even you different ones for different fields, I could throw in a context prefix for local so it is clearer.

    grep is your friend.

  • Thanks for the answer, I have corrected my comment already. Now I see that I can use markdown and this is quiet sufficient for me.

Sign In or Register to comment.