litesoft
@ 939
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
// This Source Code is in the Public Domain per: http://litesoft.org/License.txt package org.litesoft.ui_1_5; import org.litesoft.commonfoundation.typeutils.*; import org.litesoft.core.util.*; public interface ExternalizationInterface extends ExternalizationSupport { public ExternalizationInterface addContext( String pRootType ); public String resolveLabel( String pLabelID ); public String resolveAction( String pActionID ); public String resolveActionTooltip( String pActionID ); public String resolveInputTooltip( String pInputID ); public String resolveError( String pErrorID ); public class Helper { public static final String NO_AUTO_ADD_PARAMS = "" + SimpleMessage.START_SUB + SimpleMessage.END_SUB; public static String injectParameters( String pResolved, Object... pParameters ) { pResolved = Strings.deNull( pResolved ); if ( -1 == pResolved.indexOf( SimpleMessage.START_SUB ) ) { if ( Objects.isNotNullOrEmpty( pParameters ) ) { pResolved += ": " + pParameters[0]; for ( int i = 1; i < pParameters.length; i++ ) { pResolved += ", " + pParameters[i]; } } } else { int at = pResolved.indexOf( NO_AUTO_ADD_PARAMS ); if ( at != -1 ) { pResolved = pResolved.substring( 0, at ) + pResolved.substring( at + NO_AUTO_ADD_PARAMS.length() ); } if ( -1 != pResolved.indexOf( SimpleMessage.START_SUB ) ) { pResolved = SimpleMessage.format( pResolved, pParameters ); } } return pResolved; } } } |
Commits for litesoft/trunk/Java/core/jvm1.5/src/org/litesoft/ui_1_5/ExternalizationInterface.java
Revision | Author | Commited | Message |
---|---|---|---|
939 Diff | GeorgeS | Mon 02 Jun, 2014 21:30:31 +0000 | Extracting commonfoundation |
809 Diff | GeorgeS | Thu 16 Aug, 2012 04:10:46 +0000 | |
802 Diff | GeorgeS | Wed 15 Aug, 2012 04:04:47 +0000 | |
49 Diff | GeorgeS | Mon 12 Apr, 2010 02:59:10 +0000 | License Text |
2 | GeorgeS | Sun 07 Feb, 2010 12:50:58 +0000 |