Auto-capitalisation

Since version 1.4, I have been getting frustrated with this function taking capitals out of acronym like FIV (changing it to Fiv) when editing product names or adding few products or fees. Can it be turned off in some areas (it doesn't exist when writing client histories for example).
Glen
Greenvale

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Auto-capitalisation

You can, but not in a straightforward manner.

Propercasing is turned on by adding:

            <assertion name="propercase"/>

to an archetype node. E.g for product.medication ensures that the product name is propercased using:

<node name="name" path="/name" type="java.lang.String" minCardinality="1">
    <assertion name="propercase"/>
</node>

You can edit the archetype to remove this assertion.

Alternatively, If you have a few acronyms you use all the time, you can edit propercase.properties and add exceptions for each one.

This file is located in <TOMCAT_HOME>/webapps/openvpms/WEB-INF/classes/org/openvpms/web/resource/localisation/propercase.properties

Replace <TOMCAT_HOME> with the root directory of your tomcat installation.

By default it contains:

space.1 = &
spaceBefore.1 = (
spaceAfter.1 = )
spaceAfter.2 = .
startsWith.1 = Mac
startsWith.2 = Mc
startsWith.3 = d'
startsWith.4 = (
startsWith.5 = `
startsWith.6 = "
contains.1 = -
contains.2 = '
endsWith.1 = 's
exceptions.1 = von
exceptions.2 = van
exceptions.3 = de
exceptions.4 = la
exceptions.5 = da
exceptions.6 = di
exceptions.7 = PO Box
exceptions.8 = La Trobe
exceptions.9 = Macquarie

You need to add more exceptions:

exceptions.10 = FIV
exceptions.11 = THIS TEXT SHOULD ALWAYS BE UPPERCASE
exceptions.12 = ETC

If you change propercase.properties or reload your archetypes, you need to restart tomcat for the changes to be picked up.

In both cases, you will need to re-apply your changes when you move to a new version of OpenVPMS.

 

-Tim

Auto-capitalisation

Should also point out that this configuration could be moved into the Administration -> Lookups workspace, if there was enough interest.

Lookups are held in the database so don't get lost when upgrading OpenVPMS.

 

-Tim

 

Re: Auto-capitalisation

Would be handy everyone. Otherwise every upgrade needs to have these config files renewed.

Matt C

On Tue, 15 Jun 2010 01:47:56 +0000 (UTC), tma@netspace.net.au wrote:

> Should also point out that this configuration could be moved into the > Administration -> Lookups workspace, if there was enough interest. > Lookups are held in the database so don't get lost when upgrading OpenVPMS.

>   > -Tim >   > _______________________________________________ > OpenVPMS User Mailing List > users@lists.openvpms.org > To unsubscribe or change your subscription visit: > http://lists.openvpms.org/listinfo/users > Posts from this mailing list can be viewed online and replied to in the > OpenVPMS User's forum- http://tinyurl.com/openvfu >

_______________________________________________ OpenVPMS User Mailing List users@lists.openvpms.org To unsubscribe or change your subscription visit: http://lists.openvpms.org/listinfo/users Posts from this mailing list can be viewed online and replied to in the OpenVPMS User's forum- http://tinyurl.com/openvfu

Syndicate content