toLocalizeTime

12 messages Options
Embed this post
Permalink
besja

toLocalizeTime

Reply Threaded More More options
Print post
Permalink
Всем привет,
Подскажите, пожалуйста, как правильно кастомизировать форматы даты?
Я меняла здесь eggs/plone.app.locales-3.1.4-py2.egg/plone/app/layout/locales/locales/ru/LC_MESSAGES/plonelocales.po
Но это не помогло(
Ирина

--~--~---------~--~----~------------~-------~--~----~
Russian Plone Group http://plone.org.ru/
Для отправки сообщений [hidden email]
Новые участники контролируются
Архив и настройки подписки http://groups.google.com/group/plone-ru
-~----------~----~----~----~------~----~------~--~---

Denys Mishunov

Re: toLocalizeTime

Reply Threaded More More options
Print post
Permalink

On Mar 25, 2009, at 4:38 PM, Бессарабова Ирина wrote:

> Подскажите, пожалуйста, как правильно  
> кастомизировать форматы даты?

В ZMI вашего сайта

        /portal_properties/site_properties

два свойства:
        localTimeFormat
        localLongTimeFormat

Тут формат дат и меняется для обоиз  
случаев - коротих и длинных дат.

Удачи
--
Best regards,
Denys Mishunov
PLONE Design-Skinning-Development

mailto:[hidden email]
IRC: spliter(#plone)






--~--~---------~--~----~------------~-------~--~----~
Russian Plone Group http://plone.org.ru/
Для отправки сообщений [hidden email]
Новые участники контролируются
Архив и настройки подписки http://groups.google.com/group/plone-ru
-~----------~----~----~----~------~----~------~--~---

besja

Re: toLocalizeTime

Reply Threaded More More options
Print post
Permalink

Не, не правда (
Я использую функцию toLocalizedTime(item_start,long_format=0). Как я поняла, она возвращает дату в формате, определенном в модуле app.locales... B нем формат даты такой ${Y}-${m}-${d}, в site_properties такой: %b %d, %Y. Функция возвращает результат в первом формате. Выход: либо кастомизировать первый формат (как?), либо использовать другую функцию (какую? ) =)

Ира
25.03.09, 18:42, "Denys Mishunov" <[hidden email]>:

> On Mar 25, 2009, at 4:38 PM, Бессарабова Ирина wrote:
> > Подскажите, пожалуйста, как правильно  
> > кастомизировать форматы даты?
> В ZMI вашего сайта
> /portal_properties/site_properties
> два свойства:
> localTimeFormat
> localLongTimeFormat
> Тут формат дат и меняется для обоиз  
> случаев - коротих и длинных дат.
> Удачи
> --
> Best regards,
> Denys Mishunov
> PLONE Design-Skinning-Development
> mailto:[hidden email]
> IRC: spliter(#plone)
>
--~--~---------~--~----~------------~-------~--~----~
Russian Plone Group http://plone.org.ru/
Для отправки сообщений [hidden email]
Новые участники контролируются
Архив и настройки подписки http://groups.google.com/group/plone-ru
-~----------~----~----~----~------~----~------~--~---

Юрий Поляков

Re: toLocalizeTime

Reply Threaded More More options
Print post
Permalink
\Products\PloneTranslations\i18n\plone-ru.po :


#. The variables used here are the same as used in the strftime formating.
#. Supported are ${A}, ${a}, ${B}, ${b}, ${H}, ${I}, ${m}, ${d}, ${M}, ${p},
#. ${S}, ${Y}, ${y}, ${Z}, each used as variable in the msgstr.
#. For example: "${A} ${d}. ${B} ${Y}, ${H}:${M} ${Z}"
#. In english speaking countries default is:
#. ${Y}-${m}-${d} ${H}:${M}
#: ./TranslationServiceTool.py
msgid "date_format_long"
msgstr "${d}-${m}-${Y} ${H}:${M}"

#. The variables used here are the same as used in the strftime formating.
#. Supported are ${A}, ${a}, ${B}, ${b}, ${H}, ${I}, ${m}, ${d}, ${M}, ${p},
#. ${S}, ${Y}, ${y}, ${Z}, each used as variable in the msgstr.
#. For example: "${A} ${d}. ${B} ${Y}, ${H}:${M} ${Z}"
#. In english speaking countries default is:
#. ${Y}-${m}-${d}
#: ./TranslationServiceTool.py
msgid "date_format_short"
msgstr "${d}-${m}-${Y}"






2009/3/25 Бессарабова Ирина <[hidden email]>:

>
> Не, не правда (
> Я использую функцию toLocalizedTime(item_start,long_format=0). Как я поняла, она возвращает дату в формате, определенном в модуле app.locales... B нем формат даты такой ${Y}-${m}-${d}, в site_properties такой: %b %d, %Y. Функция возвращает результат в первом формате. Выход: либо кастомизировать первый формат (как?), либо использовать другую функцию (какую? ) =)
>
> Ира
> 25.03.09, 18:42, "Denys Mishunov" <[hidden email]>:
>
>> On Mar 25, 2009, at 4:38 PM, Бессарабова Ирина wrote:
>> > Подскажите, пожалуйста, как правильно
>> > кастомизировать форматы даты?
>> В ZMI вашего сайта
>>       /portal_properties/site_properties
>> два свойства:
>>       localTimeFormat
>>       localLongTimeFormat
>> Тут формат дат и меняется для обоиз
>> случаев - коротих и длинных дат.
>> Удачи
>> --
>> Best regards,
>> Denys Mishunov
>> PLONE Design-Skinning-Development
>> mailto:[hidden email]
>> IRC: spliter(#plone)
>>
> >
>



--
  Юрий Поляков
    +7 (916) 806-00-55
    [hidden email]

--~--~---------~--~----~------------~-------~--~----~
Russian Plone Group http://plone.org.ru/
Для отправки сообщений [hidden email]
Новые участники контролируются
Архив и настройки подписки http://groups.google.com/group/plone-ru
-~----------~----~----~----~------~----~------~--~---

besja

Re: toLocalizeTime

Reply Threaded More More options
Print post
Permalink
Тоже не подходит(
В моем plone-ru.po написано тоже самое, однако, дата возвращается в виде YYYY-DD-MM, а не DD-MM-YYYY.


25.03.09, 18:50, "Юрий Поляков" <[hidden email]>:

> \Products\PloneTranslations\i18n\plone-ru.po :


#. The variables used here are the same as used in the strftime formating.
#. Supported are ${A}, ${a}, ${B}, ${b}, ${H}, ${I}, ${m}, ${d}, ${M}, ${p},
#. ${S}, ${Y}, ${y}, ${Z}, each used as variable in the msgstr.
#. For example: "${A} ${d}. ${B} ${Y}, ${H}:${M} ${Z}"
#. In english speaking countries default is:
#. ${Y}-${m}-${d} ${H}:${M}
#: ./TranslationServiceTool.py
msgid "date_format_long"
msgstr "${d}-${m}-${Y} ${H}:${M}"

#. The variables used here are the same as used in the strftime formating.
#. Supported are ${A}, ${a}, ${B}, ${b}, ${H}, ${I}, ${m}, ${d}, ${M}, ${p},
#. ${S}, ${Y}, ${y}, ${Z}, each used as variable in the msgstr.
#. For example: "${A} ${d}. ${B} ${Y}, ${H}:${M} ${Z}"
#. In english speaking countries default is:
#. ${Y}-${m}-${d}
#: ./TranslationServiceTool.py
msgid "date_format_short"
msgstr "${d}-${m}-${Y}"






2009/3/25 Бессарабова Ирина <[hidden email]>:

>
> Не, не правда (
> Я использую функцию toLocalizedTime(item_start,long_format=0). Как я поняла, она возвращает дату в формате, определенном в модуле app.locales... B нем формат даты такой ${Y}-${m}-${d}, в site_properties такой: %b %d, %Y. Функция возвращает результат в первом формате. Выход: либо кастомизировать первый формат (как?), либо использовать другую функцию (какую? ) =)
>
> Ира
> 25.03.09, 18:42, "Denys Mishunov" <[hidden email]>:
>
>> On Mar 25, 2009, at 4:38 PM, Бессарабова Ирина wrote:
>> > Подскажите, пожалуйста, как правильно
>> > кастомизировать форматы даты?
>> В ZMI вашего сайта
>>       /portal_properties/site_properties
>> два свойства:
>>       localTimeFormat
>>       localLongTimeFormat
>> Тут формат дат и меняется для обоиз
>> случаев - коротих и длинных дат.
>> Удачи
>> --
>> Best regards,
>> Denys Mishunov
>> PLONE Design-Skinning-Development
>> mailto:[hidden email]
>> IRC: spliter(#plone)
>>
> >
>



--
  Юрий Поляков
    +7 (916) 806-00-55
    [hidden email]



--~--~---------~--~----~------------~-------~--~----~
Russian Plone Group http://plone.org.ru/
Для отправки сообщений [hidden email]
Новые участники контролируются
Архив и настройки подписки http://groups.google.com/group/plone-ru
-~----------~----~----~----~------~----~------~--~---

Mikhail Kashkin-2

Re: toLocalizeTime

Reply Threaded More More options
Print post
Permalink
А какие настройки локали серверного окружения? 

Еще можно в zope.conf смотреть.

P.S. С каждой новой идеей поиск проблемы превращается в фарс :)

2009/3/25 Бессарабова Ирина <[hidden email]>
Тоже не подходит(
В моем plone-ru.po написано тоже самое, однако, дата возвращается в виде YYYY-DD-MM, а не DD-MM-YYYY.




--
Mikhail Kashkin
Devcult.ru


--~--~---------~--~----~------------~-------~--~----~
Russian Plone Group http://plone.org.ru/
Для отправки сообщений [hidden email]
Новые участники контролируются
Архив и настройки подписки http://groups.google.com/group/plone-ru
-~----------~----~----~----~------~----~------~--~---

besja

Re: toLocalizeTime

Reply Threaded More More options
Print post
Permalink

Истина где-то рядом)))

25.03.09, 19:52, "Mikhail Kashkin" <[hidden email]>:
> А какие настройки локали серверного окружения?  
>
Были буржуйские. Сказала: export LANG=ru_RU.utf8. Стали такие:
LANG=ru_RU.utf8
LC_CTYPE="ru_RU.utf8"
LC_NUMERIC="ru_RU.utf8"
LC_TIME="ru_RU.utf8"
LC_COLLATE="ru_RU.utf8"
LC_MONETARY="ru_RU.utf8"
LC_MESSAGES="ru_RU.utf8"
LC_PAPER="ru_RU.utf8"
LC_NAME="ru_RU.utf8"
LC_ADDRESS="ru_RU.utf8"
LC_TELEPHONE="ru_RU.utf8"
LC_MEASUREMENT="ru_RU.utf8"
LC_IDENTIFICATION="ru_RU.utf8"
LC_ALL=

Перезапустила Zope с новой переменной - результат все тот же.


> Еще можно в zope.conf смотреть.
>
Посмотрела. Ничего по теме не нашла. Вот мой zope.conf:

%define INSTANCEHOME /opt/Plone/zinstance/parts/instance
instancehome $INSTANCEHOME
%define CLIENTHOME /opt/Plone/zinstance/var/instance
clienthome $CLIENTHOME

products /opt/Plone/zinstance/products
products /opt/Plone/zinstance/parts/productdistros
debug-mode off
security-policy-implementation C
verbose-security off
default-zpublisher-encoding utf-8

effective-user plone




<environment>

PYTHON_EGG_CACHE /opt/Plone/zinstance/var/.python-eggs
</environment>

<warnfilter>
  action ignore
  category exceptions.DeprecationWarning
</warnfilter>

<eventlog>
  level INFO
  <logfile>
    path /opt/Plone/zinstance/var/log/instance.log
    level INFO
  </logfile>
</eventlog>

<logger access>
  level WARN
  <logfile>
    path /opt/Plone/zinstance/var/log/instance-Z2.log
    format %(message)s
  </logfile>
</logger>

<http-server>
  # valid keys are "address" and "force-connection-close"
  address 8080
  # force-connection-close on
  # You can also use the WSGI interface between ZServer and ZPublisher:
  # use-wsgi on

</http-server>




<zodb_db main>
    # Main database
    cache-size 5000

# FileStorage database
    <filestorage>
      path /opt/Plone/zinstance/var/filestorage/Data.fs
    </filestorage>
    mount-point /
</zodb_db>

<zodb_db temporary>
    # Temporary storage database (for sessions)
    <temporarystorage>
      name temporary storage for sessioning
    </temporarystorage>
    mount-point /temp_folder
    container-class Products.TemporaryFolder.TemporaryContainer
</zodb_db>

pid-filename /opt/Plone/zinstance/var/instance.pid
lock-filename /opt/Plone/zinstance/var/instance.lock

> P.S. С каждой новой идеей поиск проблемы превращается в фарс :)
>
> 2009/3/25 Бессарабова Ирина <[hidden email]>
> > Тоже не подходит(
> >  В моем plone-ru.po написано тоже самое, однако, дата возвращается в виде YYYY-DD-MM, а не DD-MM-YYYY.
> >
>
>
>
> --
> Mikhail Kashkin
> Devcult.ru
>
>
>  >  

--~--~---------~--~----~------------~-------~--~----~
Russian Plone Group http://plone.org.ru/
Для отправки сообщений [hidden email]
Новые участники контролируются
Архив и настройки подписки http://groups.google.com/group/plone-ru
-~----------~----~----~----~------~----~------~--~---

Юрий Поляков

Re: toLocalizeTime

Reply Threaded More More options
Print post
Permalink
Так вы проследите концы по исходникам и решите свою проблему.

2009/3/26 Бессарабова Ирина <[hidden email]>:

>
> Истина где-то рядом)))
>
> 25.03.09, 19:52, "Mikhail Kashkin" <[hidden email]>:
>> А какие настройки локали серверного окружения?
>>
> Были буржуйские. Сказала: export LANG=ru_RU.utf8. Стали такие:
> LANG=ru_RU.utf8
> LC_CTYPE="ru_RU.utf8"
> LC_NUMERIC="ru_RU.utf8"
> LC_TIME="ru_RU.utf8"
> LC_COLLATE="ru_RU.utf8"
> LC_MONETARY="ru_RU.utf8"
> LC_MESSAGES="ru_RU.utf8"
> LC_PAPER="ru_RU.utf8"
> LC_NAME="ru_RU.utf8"
> LC_ADDRESS="ru_RU.utf8"
> LC_TELEPHONE="ru_RU.utf8"
> LC_MEASUREMENT="ru_RU.utf8"
> LC_IDENTIFICATION="ru_RU.utf8"
> LC_ALL=
>
> Перезапустила Zope с новой переменной - результат все тот же.
>
>
>> Еще можно в zope.conf смотреть.
>>
> Посмотрела. Ничего по теме не нашла. Вот мой zope.conf:
>
> %define INSTANCEHOME /opt/Plone/zinstance/parts/instance
> instancehome $INSTANCEHOME
> %define CLIENTHOME /opt/Plone/zinstance/var/instance
> clienthome $CLIENTHOME
>
> products /opt/Plone/zinstance/products
> products /opt/Plone/zinstance/parts/productdistros
> debug-mode off
> security-policy-implementation C
> verbose-security off
> default-zpublisher-encoding utf-8
>
> effective-user plone
>
>
>
>
> <environment>
>
> PYTHON_EGG_CACHE /opt/Plone/zinstance/var/.python-eggs
> </environment>
>
> <warnfilter>
>  action ignore
>  category exceptions.DeprecationWarning
> </warnfilter>
>
> <eventlog>
>  level INFO
>  <logfile>
>    path /opt/Plone/zinstance/var/log/instance.log
>    level INFO
>  </logfile>
> </eventlog>
>
> <logger access>
>  level WARN
>  <logfile>
>    path /opt/Plone/zinstance/var/log/instance-Z2.log
>    format %(message)s
>  </logfile>
> </logger>
>
> <http-server>
>  # valid keys are "address" and "force-connection-close"
>  address 8080
>  # force-connection-close on
>  # You can also use the WSGI interface between ZServer and ZPublisher:
>  # use-wsgi on
>
> </http-server>
>
>
>
>
> <zodb_db main>
>    # Main database
>    cache-size 5000
>
> # FileStorage database
>    <filestorage>
>      path /opt/Plone/zinstance/var/filestorage/Data.fs
>    </filestorage>
>    mount-point /
> </zodb_db>
>
> <zodb_db temporary>
>    # Temporary storage database (for sessions)
>    <temporarystorage>
>      name temporary storage for sessioning
>    </temporarystorage>
>    mount-point /temp_folder
>    container-class Products.TemporaryFolder.TemporaryContainer
> </zodb_db>
>
> pid-filename /opt/Plone/zinstance/var/instance.pid
> lock-filename /opt/Plone/zinstance/var/instance.lock
>
>> P.S. С каждой новой идеей поиск проблемы превращается в фарс :)
>>
>> 2009/3/25 Бессарабова Ирина <[hidden email]>
>> > Тоже не подходит(
>> >  В моем plone-ru.po написано тоже самое, однако, дата возвращается в виде YYYY-DD-MM, а не DD-MM-YYYY.
>> >
>>
>>
>>
>> --
>> Mikhail Kashkin
>> Devcult.ru
>>
>>
>>  >
>
> >
>



--
  Юрий Поляков
    +7 (916) 806-00-55
    [hidden email]

--~--~---------~--~----~------------~-------~--~----~
Russian Plone Group http://plone.org.ru/
Для отправки сообщений [hidden email]
Новые участники контролируются
Архив и настройки подписки http://groups.google.com/group/plone-ru
-~----------~----~----~----~------~----~------~--~---

besja

Re: toLocalizeTime

Reply Threaded More More options
Print post
Permalink

Вообще-то это не совсем моя проблема... Если вы заметили, то во многих стандартных местах русского плон сайта (например, листинг событий) выводится дата в дефолтном формате (${Y}-${d}-${m}),  хотя в файлах перевода локализованы форматы даты.
Судя по коду, функция берет нужный формат даты из po файла. Только из какого - непонятно... Что-то явно неправильно работает, только что - непонятно.

PS. Что такое файлы с расширением .mo?

26.03.09, 13:41, "Юрий Поляков" <[hidden email]>:

> Так вы проследите концы по исходникам и решите свою проблему.

2009/3/26 Бессарабова Ирина <[hidden email]>:

>
> Истина где-то рядом)))
>
> 25.03.09, 19:52, "Mikhail Kashkin" <[hidden email]>:
>> А какие настройки локали серверного окружения?
>>
> Были буржуйские. Сказала: export LANG=ru_RU.utf8. Стали такие:
> LANG=ru_RU.utf8
> LC_CTYPE="ru_RU.utf8"
> LC_NUMERIC="ru_RU.utf8"
> LC_TIME="ru_RU.utf8"
> LC_COLLATE="ru_RU.utf8"
> LC_MONETARY="ru_RU.utf8"
> LC_MESSAGES="ru_RU.utf8"
> LC_PAPER="ru_RU.utf8"
> LC_NAME="ru_RU.utf8"
> LC_ADDRESS="ru_RU.utf8"
> LC_TELEPHONE="ru_RU.utf8"
> LC_MEASUREMENT="ru_RU.utf8"
> LC_IDENTIFICATION="ru_RU.utf8"
> LC_ALL=
>
> Перезапустила Zope с новой переменной - результат все тот же.
>
>
>> Еще можно в zope.conf смотреть.
>>
> Посмотрела. Ничего по теме не нашла. Вот мой zope.conf:
>
> %define INSTANCEHOME /opt/Plone/zinstance/parts/instance
> instancehome $INSTANCEHOME
> %define CLIENTHOME /opt/Plone/zinstance/var/instance
> clienthome $CLIENTHOME
>
> products /opt/Plone/zinstance/products
> products /opt/Plone/zinstance/parts/productdistros
> debug-mode off
> security-policy-implementation C
> verbose-security off
> default-zpublisher-encoding utf-8
>
> effective-user plone
>
>
>
>
> <environment>
>
> PYTHON_EGG_CACHE /opt/Plone/zinstance/var/.python-eggs
> </environment>
>
> <warnfilter>
>  action ignore
>  category exceptions.DeprecationWarning
> </warnfilter>
>
> <eventlog>
>  level INFO
>  <logfile>
>    path /opt/Plone/zinstance/var/log/instance.log
>    level INFO
>  </logfile>
> </eventlog>
>
> <logger access>
>  level WARN
>  <logfile>
>    path /opt/Plone/zinstance/var/log/instance-Z2.log
>    format %(message)s
>  </logfile>
> </logger>
>
> <http-server>
>  # valid keys are "address" and "force-connection-close"
>  address 8080
>  # force-connection-close on
>  # You can also use the WSGI interface between ZServer and ZPublisher:
>  # use-wsgi on
>
> </http-server>
>
>
>
>
> <zodb_db main>
>    # Main database
>    cache-size 5000
>
> # FileStorage database
>    <filestorage>
>      path /opt/Plone/zinstance/var/filestorage/Data.fs
>    </filestorage>
>    mount-point /
> </zodb_db>
>
> <zodb_db temporary>
>    # Temporary storage database (for sessions)
>    <temporarystorage>
>      name temporary storage for sessioning
>    </temporarystorage>
>    mount-point /temp_folder
>    container-class Products.TemporaryFolder.TemporaryContainer
> </zodb_db>
>
> pid-filename /opt/Plone/zinstance/var/instance.pid
> lock-filename /opt/Plone/zinstance/var/instance.lock
>
>> P.S. С каждой новой идеей поиск проблемы превращается в фарс :)
>>
>> 2009/3/25 Бессарабова Ирина <[hidden email]>
>> > Тоже не подходит(
>> >  В моем plone-ru.po написано тоже самое, однако, дата возвращается в виде YYYY-DD-MM, а не DD-MM-YYYY.
>> >
>>
>>
>>
>> --
>> Mikhail Kashkin
>> Devcult.ru
>>
>>
>>  >
>
> >
>



--
  Юрий Поляков
    +7 (916) 806-00-55
    [hidden email]



--~--~---------~--~----~------------~-------~--~----~
Russian Plone Group http://plone.org.ru/
Для отправки сообщений [hidden email]
Новые участники контролируются
Архив и настройки подписки http://groups.google.com/group/plone-ru
-~----------~----~----~----~------~----~------~--~---

Mikhail Kashkin-2

Re: toLocalizeTime

Reply Threaded More More options
Print post
Permalink
mo - это компилированные po, чтобы ими можно было быстро пользоваться, а не сканировать каждый раз po на предмет подстроки

2009/3/26 Бессарабова Ирина <[hidden email]>

PS. Что такое файлы с расширением .mo?



--
Mikhail Kashkin
Devcult.ru


--~--~---------~--~----~------------~-------~--~----~
Russian Plone Group http://plone.org.ru/
Для отправки сообщений [hidden email]
Новые участники контролируются
Архив и настройки подписки http://groups.google.com/group/plone-ru
-~----------~----~----~----~------~----~------~--~---

Michael Krishtopa-2

Re: toLocalizeTime

Reply Threaded More More options
Print post
Permalink
In reply to this post by Юрий Поляков
Юрий Поляков wrote:

> \Products\PloneTranslations\i18n\plone-ru.po :
> #. The variables used here are the same as used in the strftime formating.
> #. Supported are ${A}, ${a}, ${B}, ${b}, ${H}, ${I}, ${m}, ${d}, ${M}, ${p},
> #. ${S}, ${Y}, ${y}, ${Z}, each used as variable in the msgstr.
> #. For example: "${A} ${d}. ${B} ${Y}, ${H}:${M} ${Z}"
> #. In english speaking countries default is:
> #. ${Y}-${m}-${d} ${H}:${M}
> #: ./TranslationServiceTool.py
> msgid "date_format_long"
> msgstr "${d}-${m}-${Y} ${H}:${M}"
>
> #. The variables used here are the same as used in the strftime formating.
> #. Supported are ${A}, ${a}, ${B}, ${b}, ${H}, ${I}, ${m}, ${d}, ${M}, ${p},
> #. ${S}, ${Y}, ${y}, ${Z}, each used as variable in the msgstr.
> #. For example: "${A} ${d}. ${B} ${Y}, ${H}:${M} ${Z}"
> #. In english speaking countries default is:
> #. ${Y}-${m}-${d}
> #: ./TranslationServiceTool.py
> msgid "date_format_short"
> msgstr "${d}-${m}-${Y}"
>  
Вот только что столкнулся с этой бедой.

eggs/plone.app.locales-3.2.0-py2.4.egg/plone/app/locales/locales/ru/LC_MESSAGES/plonelocales.po

#. The variables used here are the same as used in the strftime formating.
#. Supported are ${A}, ${a}, ${B}, ${b}, ${H}, ${I}, ${m}, ${d}, ${M}, ${p},
#. ${S}, ${Y}, ${y}, ${Z}, each used as variable in the msgstr.
#. For example: "${A} ${d}. ${B} ${Y}, ${H}:${M} ${Z}"
#. In english speaking countries default is:
#. ${Y}-${m}-${d}
#. ${b} ${d}, ${Y}
#: ./TranslationServiceTool.py
msgid "date_format_short"
msgstr "${d} ${b} ${Y}"


Правка этого файла помогла, правда везде в настройках до этого поставил
русский язык, и поставил LinguaPlone, тоже его настроив. Уж не знаю,
обязательны ли эти процедуры, но помогло.
В версии 2.х Плона нужна была правка локали в конфиге, сейчас оттуда (из
конфига) практически всё убрали.

msgid "date_format_short"
msgstr "${d}-${m}-${Y}"

поменял на

msgid "date_format_short"
msgstr "${d}-${b}-${Y}"

и сейчас показывает дату в формате 30-Мар-2009

А вот что не нравится - так это что прийдётся с каждым выходом продукта править строки. Да и повлияет на все сайты инстанса. Как можно сделать это цивилизованно?



--~--~---------~--~----~------------~-------~--~----~
Russian Plone Group http://plone.org.ru/
Для отправки сообщений [hidden email]
Новые участники контролируются
Архив и настройки подписки http://groups.google.com/group/plone-ru
-~----------~----~----~----~------~----~------~--~---

besja

Re: toLocalizeTime

Reply Threaded More More options
Print post
Permalink
Спасибо вам. Мне помогло))). А почему интересно ${m} нельзя использовать? Потому что не такой строки?


30.03.09, 04:51, "Michael Krishtopa" <[hidden email]>:

> Юрий Поляков wrote:
> \Products\PloneTranslations\i18n\plone-ru.po :
> #. The variables used here are the same as used in the strftime formating.
> #. Supported are ${A}, ${a}, ${B}, ${b}, ${H}, ${I}, ${m}, ${d}, ${M}, ${p},
> #. ${S}, ${Y}, ${y}, ${Z}, each used as variable in the msgstr.
> #. For example: "${A} ${d}. ${B} ${Y}, ${H}:${M} ${Z}"
> #. In english speaking countries default is:
> #. ${Y}-${m}-${d} ${H}:${M}
> #: ./TranslationServiceTool.py
> msgid "date_format_long"
> msgstr "${d}-${m}-${Y} ${H}:${M}"
>
> #. The variables used here are the same as used in the strftime formating.
> #. Supported are ${A}, ${a}, ${B}, ${b}, ${H}, ${I}, ${m}, ${d}, ${M}, ${p},
> #. ${S}, ${Y}, ${y}, ${Z}, each used as variable in the msgstr.
> #. For example: "${A} ${d}. ${B} ${Y}, ${H}:${M} ${Z}"
> #. In english speaking countries default is:
> #. ${Y}-${m}-${d}
> #: ./TranslationServiceTool.py
> msgid "date_format_short"
> msgstr "${d}-${m}-${Y}"
>  
Вот только что столкнулся с этой бедой.

eggs/plone.app.locales-3.2.0-py2.4.egg/plone/app/locales/locales/ru/LC_MESSAGES/plonelocales.po

#. The variables used here are the same as used in the strftime formating.
#. Supported are ${A}, ${a}, ${B}, ${b}, ${H}, ${I}, ${m}, ${d}, ${M}, ${p},
#. ${S}, ${Y}, ${y}, ${Z}, each used as variable in the msgstr.
#. For example: "${A} ${d}. ${B} ${Y}, ${H}:${M} ${Z}"
#. In english speaking countries default is:
#. ${Y}-${m}-${d}
#. ${b} ${d}, ${Y}
#: ./TranslationServiceTool.py
msgid "date_format_short"
msgstr "${d} ${b} ${Y}"


Правка этого файла помогла, правда везде в настройках до этого поставил
русский язык, и поставил LinguaPlone, тоже его настроив. Уж не знаю,
обязательны ли эти процедуры, но помогло.
В версии 2.х Плона нужна была правка локали в конфиге, сейчас оттуда (из
конфига) практически всё убрали.

msgid "date_format_short"
msgstr "${d}-${m}-${Y}"

поменял на

msgid "date_format_short"
msgstr "${d}-${b}-${Y}"

и сейчас показывает дату в формате 30-Мар-2009

А вот что не нравится - так это что прийдётся с каждым выходом продукта править строки. Да и повлияет на все сайты инстанса. Как можно сделать это цивилизованно?





--~--~---------~--~----~------------~-------~--~----~
Russian Plone Group http://plone.org.ru/
Для отправки сообщений [hidden email]
Новые участники контролируются
Архив и настройки подписки http://groups.google.com/group/plone-ru
-~----------~----~----~----~------~----~------~--~---