• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

lost in translation

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

i've successfully translated JForum in italian, everything works fine except for following line:

Most users ever online was 2 on 09/10/2007 13:17:20

in english is correct but in italian appears as

Il massimo numero di utenti online e stato {0} il {1}

Any other variable accessed as {n} is set correctly

any helps would be appreciated...
[originally posted on jforum.net by Sienda]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
not a single clue??

:/
[originally posted on jforum.net by Sienda]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Therefore you have to use the above method, and have to provide the attribute values for replacement

This code was to be found within class "I18n", which is used for reading the files.

You can try to have a look at the template that shows the wrong message and try to dig in it to see where the replacement goes wrong.


[originally posted on jforum.net by Sid]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i found this piece of code in the template (forum_list.htm)

${mostUsersEverOnline}

but i would expect: ${I18n.getMessage("ForumListing.mostUsersEverOnline")}
so I tried replacing with it, but the result does not change. it seems it haven't done substitution.
The text has been written in italian but variables aren't read.
is it, it_IT.properties, the only file used or should I look for something else?
[originally posted on jforum.net by Sienda]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mostUsersEverOnline in the template means that it's a template variable.

YOu can have a look at the top of the page if there's some assign statement with that variable, and see what context object it is derived from - or - it may be the context object itself

In this case you should find a "context.put("mostUsersEverOnline" ..." statement within the forumaction class, where the context parameters for the forum action is being filled. Those context parameters are the template variables later on.

One thing about the substitution testing may be issues with "cache" so that changes may not be visible right away. I have to admit, I didnt write substitutions on myself yet in jforum.
[originally posted on jforum.net by Sid]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!