Skip to content

Commit

Permalink
Merge pull request #21 from infoneershalin/master
Browse files Browse the repository at this point in the history
Updating default locale for test level through Configuration Change Listener
  • Loading branch information
cjayswal authored Sep 19, 2016
2 parents 4b76eac + 9b8fc4e commit a391509
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/maven
/build/
/repository/
/.settings
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 a391509

Please sign in to comment.