Forum OpenACS Q&A: Need help for german translation of lars-blogger

I need help for the translation of the lars-blogger package into the german language. I am running openacs 5.0.4 final on aolserver 4 and postgresql 7.3.4 and use lars-blogger 1.0.2 My problem is to translate the date output defined in
  • blog.posted_time_pretty
  • blog.entry_date_pretty and
  • months.date_pretty
Is there an easy way to solve this problem.

p.s.
Feel free to visit my website www.com4biz.de (currently still in beta testing)
Collapse
Posted by Joel Aufrecht on
Look at item 7 in https://openacs.org/doc/openacs-HEAD/i18n-convert.html.
If you end up internationalizing the date-handling in lars-blogger, which would be a nice first step, please submit patches.
Collapse
Posted by Thomas Rathjen on
thank you for the help!

all works fine, except the translation of the months.date_pretty output.

I don´t know what goes wrong, but if I change the code as described in the documentation I get an error message.

what I have done:

add to blog-months.tcl
set months(date_pretty) [lc_time_fmt $months(date_ansi)]

change in blog-months-postgresql.xql
to_char(date_trunc('month', entry_date), 'fmMonthfm YYYY') as date_pretty,

to

to_char(date_trunc('month', entry_date), 'YYYY-MM-DD HH24:MI:SS') as date_ansi,

I get this error message

"Error in include template "/var/lib/aolserver/com4biz/packages/lars-blogger/www/blog-months": can't read "months(date_ansi)": no such variable"

Collapse
Posted by Dirk Gomez on
Do you pass down the variable to blog-months? And did you look at blog-months as well whether you need to change things there as well?
Collapse
Posted by Lars Pind on
Did you reload

blog-months-postgresql.xql

?

Collapse
Posted by Thomas Rathjen on
Yes, after changing the xql file I restartet the server.

what I have done since my last post:

updated to lars-blogger 2.0d3

add to blog-months.tcl
set date_pretty [lc_time_fmt $date_ansi "%B"]

change in blog-months.adp
@months.date_pretty@ to @date_pretty@

the result is, that all archiv month are displayed with the same month name (the first month with an entry)

???

Collapse
Posted by Thomas Rathjen on
nobody with an idea about my translation problem?
Collapse
Posted by Malte Sussdorff on
I think you problem is that you are dealing with a multirow (months) but only query a one dimensional variable for setting and getting the pretty_name. If you work on it next time, hang out on IRC and people might give you better explanation and help than this....