Skip to content
This repository has been archived by the owner on Jun 11, 2023. It is now read-only.

Commit

Permalink
#15 [Properties] Move own properties files in package i18n.
Browse files Browse the repository at this point in the history
  • Loading branch information
Naoghuman committed Mar 7, 2017
1 parent 506119e commit df2d331
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 36 deletions.
1 change: 1 addition & 0 deletions release/Release_v0.3.1_2017-02-dd_HH-mm.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ topic through `key terms`.


#### Enhancement
#15 [Properties] Move own properties files in package i18n.
#14 [JUnit] Add UnitTests for the implementations from the interface IPresentationConverter.
#13 [JUnit] Create UnitTests for the class DataConverter.
#11 [Performance] Loading more then 3000 testdata entities slows very Navigation Terms.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import com.airhacks.afterburner.injection.Injector;
import com.github.naoghuman.abclist.view.application.ApplicationView;
import com.github.naoghuman.abclist.configuration.IApplicationConfiguration;
import com.github.naoghuman.abclist.configuration.IConverterConfiguration;
import com.github.naoghuman.abclist.configuration.IPropertiesConfiguration;
import com.github.naoghuman.lib.database.api.DatabaseFacade;
import com.github.naoghuman.lib.logger.api.LoggerFacade;
import com.github.naoghuman.lib.preferences.api.PreferencesFacade;
Expand Down Expand Up @@ -49,7 +49,7 @@ public void init() throws Exception {
super.init();

PropertiesFacade.getDefault().register(KEY__APPLICATION__RESOURCE_BUNDLE);
PropertiesFacade.getDefault().register(IConverterConfiguration.KEY__CONVERTER__RESOURCE_BUNDLE);
PropertiesFacade.getDefault().register(IPropertiesConfiguration.KEY__CONVERTER__RESOURCE_BUNDLE);

final char borderSign = this.getProperty(KEY__APPLICATION__BORDER_SIGN).charAt(0);
final String message = this.getProperty(KEY__APPLICATION__MESSAGE_START);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@ public interface IPropertiesConfiguration {

public static final String STRING_DEFAULT_REGEX = "%s"; // NOI18N

public static final String INFO__FOUNDED_TERMS = "converter.info.founded.terms"; // NOI18N

public static final String KEY__CONVERTER__RESOURCE_BUNDLE = "/com/github/naoghuman/abclist/i18n/converter.properties"; // NOI18N
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
*/
package com.github.naoghuman.abclist.i18n;

import com.github.naoghuman.abclist.configuration.IConverterConfiguration;
import com.github.naoghuman.abclist.configuration.IPropertiesConfiguration;
import com.github.naoghuman.lib.properties.api.PropertiesFacade;

/**
*
* @author Naoghuman
*/
public final class Properties {
public final class Properties implements IPropertiesConfiguration {

public static String getPropertyForConverter(String propertyKey) {
return PropertiesFacade.getDefault().getProperty(IConverterConfiguration.KEY__CONVERTER__RESOURCE_BUNDLE, propertyKey);
return PropertiesFacade.getDefault().getProperty(KEY__CONVERTER__RESOURCE_BUNDLE, propertyKey);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@
*/
package com.github.naoghuman.abclist.view.application.converter;

import com.github.naoghuman.abclist.configuration.IConverterConfiguration;
import com.github.naoghuman.abclist.configuration.IPropertiesConfiguration;
import com.github.naoghuman.abclist.i18n.Properties;

/**
*
* @author Naoghuman
*/
public class TermPresentationConverter implements IConverterConfiguration, IPresentationConverter, IPropertiesConfiguration {
public class TermPresentationConverter implements IPresentationConverter, IPropertiesConfiguration {

public static String getI18nMsgFoundedTerms(int countFoundedTerms) {
final String text = Properties.getPropertyForConverter(INFO__FOUNDED_TERMS);
Expand Down

0 comments on commit df2d331

Please sign in to comment.