Looks like our contractor wanted this fix anyways so I made a small
change on the ReadMorePlugin to get the text from a properties file. I
also edited the url a bit.
Do you guys want me to submit this back to you? Or since this will be
deprecated anyways, there is no need? Just let me know, and I will
submit it back.
Shervin Asgari - System Consultant
M: +47 918 64 148, @: [EMAIL PROTECTED]
Linpro AS - Leading on Linux Tel: +47 21 54 41 00/02
Vitaminveien 1A Fax: +47 21 54 41 01
PB 4 Grefsen, 0409 Oslo WWW: http://www.linpro.no/
Anil Gangolli wrote:
Some caveats regarding the use of the ReadMore plugin: the plugin's
logic for content/tag separation and truncation has always been a bit
shaky, and it is error-prone. Roller 2.3 provides an explicit summary
field; this field provides short forms of the entry for feeds and
multi-entry displayed pages. We plan to deprecate the plugin.
That said, if you are just trying to replace the "Read More ..."
string with an internationalized string, here is how. Plugins aren't
passed a reference to the bundle, so you have to fetch it yourself
(ResourceBundle caches, and this should just hit the cache). The
simplest code fragment would be something like:
...
ResourceBundle bundle = ResourceBundle.getBundle("ApplicationResources");
String localizedReadMoreString =
bundle.getString("readMorePlugin.readMoreString");
...
You would have to add a key-value pair with key
"readMorePlugin.readMoreString" to the default
ApplicationResources.properties as well as the Norwegian one.
--a.
----- Original Message ----- From: "Shervin Asgari" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, May 29, 2006 8:13 AM
Subject: ReadMorePlugin
Hello. Why haven't anybody considered making the Read More plug in
text into a properties file so that we can change the language easily
without messing around in the source code?
I am in the process of doing this, but I cannot find where to change
the value so that it can read from the
ApplicationResources.properties file instead. Can somebody that knows
this please guide me to the correct files I can take a look at? I
will submit my work back to the community.
--
Shervin Asgari - System Consultant
@: [EMAIL PROTECTED]
Linpro AS - Leading on Linux Tel: +47 21 54 41 00/02
Vitaminveien 1A Fax: +47 21 54 41 01
PB 4 Grefsen, 0409 Oslo WWW: http://www.linpro.no/