Skip to content

Commit

Permalink
adding locale change in property change listener
Browse files Browse the repository at this point in the history
  • Loading branch information
Shalin committed Sep 19, 2016
1 parent bd4fd86 commit 9b8fc4e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/com/qmetry/qaf/automation/core/ConfigurationManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@ public void configurationChanged(ConfigurationEvent event) {
TestBaseProvider.instance().get().tearDown();
}
String[] bundles = null;
// Resource loading

// Resource loading
if (key.equalsIgnoreCase("env.resources")) {
Expand All @@ -360,7 +359,14 @@ public void configurationChanged(ConfigurationEvent event) {
}
}
}

// Locale loading
if (key.equalsIgnoreCase(ApplicationProperties.DEFAULT_LOCALE.key)) {
String[] resources = getBundle().getStringArray("env.resources", "resources");
for (String resource : resources) {
String fileOrDir = getBundle().getSubstitutor().replace(resource);
addLocal(getBundle(), (String) event.getPropertyValue(), fileOrDir);
}
}
// step provider package re-load
if (key.equalsIgnoreCase(ApplicationProperties.STEP_PROVIDER_PKG.key)) {

Expand Down

0 comments on commit 9b8fc4e

Please sign in to comment.