From cadcdb85f361e01404ca7214166073cb34fd39f5 Mon Sep 17 00:00:00 2001 From: "Mr.Black" Date: Mon, 7 Jun 2021 15:37:51 +0800 Subject: [PATCH] feat: add internationalization support --- resources/i18n/panel.properties | 31 ++++++++ resources/i18n/panel_en.properties | 31 ++++++++ resources/i18n/panel_zh.properties | 31 ++++++++ src/com/leroymerlin/commit/ChangeType.java | 53 ++++++++----- src/com/leroymerlin/commit/CommitMessage.java | 14 +++- src/com/leroymerlin/commit/CommitPanel.form | 79 +++++++++++-------- src/com/leroymerlin/commit/CommitPanel.java | 5 +- .../commit/CreateCommitAction.java | 12 ++- src/com/leroymerlin/commit/GitLogQuery.java | 2 +- .../leroymerlin/commit/CommitMessageTest.java | 70 ++++++++-------- tests/i18n/I18NTest.java | 44 +++++++++++ 11 files changed, 275 insertions(+), 97 deletions(-) create mode 100644 resources/i18n/panel.properties create mode 100644 resources/i18n/panel_en.properties create mode 100644 resources/i18n/panel_zh.properties create mode 100644 tests/i18n/I18NTest.java diff --git a/resources/i18n/panel.properties b/resources/i18n/panel.properties new file mode 100644 index 0000000..ebb147f --- /dev/null +++ b/resources/i18n/panel.properties @@ -0,0 +1,31 @@ +type.of.change = Type of change +scope.of.this.change = Scope of this change +short.description = Short description +long.description = Long description +closed.issues = Closed issues +closed.issues.description = Comma-separated list of issues which are closed by this commit +breaking.changes = Breaking changes +FEAT = feat +feat.description = feat - A new feature +FIX = fix +fix.description = fix - A bug fix +DOCS = docs +docs.description = docs - Documentation only changes +STYLE = style +style.description = style - Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) +REFACTOR = refactor +refactor.description = refactor - A code change that neither fixes a bug nor adds a feature +PERF = perf +perf.description = perf - A code change that improves performance +TEST = test +test.description = test - Adding missing tests or correcting existing tests +BUILD = build +build.description = build - Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) +CI = ci +ci.description = ci - Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs) +CHORE = chore +chore.description = chore - Other changes that don't modify src or test files +REVERT = revert +revert.description = revert - Reverts a previous commit +wrap.at.72.characters = Wrap at 72 characters? +skip.ci = &Skip CI? \ No newline at end of file diff --git a/resources/i18n/panel_en.properties b/resources/i18n/panel_en.properties new file mode 100644 index 0000000..3394b58 --- /dev/null +++ b/resources/i18n/panel_en.properties @@ -0,0 +1,31 @@ +type.of.change = Type of change +scope.of.this.change = Scope of this change +short.description = Short description +long.description = Long description +closed.issues = Closed issues +closed.issues.description = Comma-separated list of issues which are closed by this commit +breaking.changes = Breaking changes +FEAT = feat +feat.description = feat - A new feature +FIX = fix +fix.description = fix - A bug fix +DOCS = docs +docs.description = docs - Documentation only changes +STYLE = style +style.description = style - Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) +REFACTOR = refactor +refactor.description = refactor - A code change that neither fixes a bug nor adds a feature +PERF = perf +perf.description = perf - A code change that improves performance +TEST = test +test.description = test - Adding missing tests or correcting existing tests +BUILD = build +build.description = build - Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) +CI = ci +ci.description = ci - Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs) +CHORE = chore +chore.description = chore - Other changes that don't modify src or test files +REVERT = revert +revert.description = revert - Reverts a previous commit +wrap.at.72.characters = Wrap at 72 characters? +skip.ci = Skip CI? \ No newline at end of file diff --git a/resources/i18n/panel_zh.properties b/resources/i18n/panel_zh.properties new file mode 100644 index 0000000..8d730e3 --- /dev/null +++ b/resources/i18n/panel_zh.properties @@ -0,0 +1,31 @@ +type.of.change = 提交类别 +scope.of.this.change = 变更范围 +short.description = 简短描述 +long.description = 详细描述 +closed.issues = 关闭问题 +closed.issues.description = 此次提交关闭的问题列表,以逗号分隔 +breaking.changes = 不兼容变动 +FEAT = 功能 +feat.description = 功能 - 新功能 +FIX = 修复 +fix.description = 修复 - Bug 修复 +DOCS = 文档 +docs.description = 文档 - 仅文档更改 +STYLE = 样式 +style.description = 样式 - 不会影响代码含义的更改(空格,格式,缺少分号等) +REFACTOR = 重构 +refactor.description = 重构 - 既无修正错误也未增加功能的代码更改 +PERF = 性能 +perf.description = 性能 - 改进性能的代码更改 +TEST = 测试 +test.description = 测试 - 添加缺失的测试或更正现有的测试 +BUILD = 构建 +build.description = 构建 - 影响构建系统或外部依赖项的更改 (示例范围: maven, gradle, npm) +CI = 持续集成 +ci.description = 持续集成 - 对 CI 配置文件和脚本的更改 (示例范围: Travis, Circle, BrowserStack, SauceLabs) +CHORE = 其他 +chore.description = 其他 - 其他非 src 或 test 文件的更改 +REVERT = 回滚 +revert.description = 回滚 - 回滚先前的提交 +wrap.at.72.characters = 72 个字符后换行? +skip.ci = 跳过持续集成? diff --git a/src/com/leroymerlin/commit/ChangeType.java b/src/com/leroymerlin/commit/ChangeType.java index 1271b25..11896d4 100644 --- a/src/com/leroymerlin/commit/ChangeType.java +++ b/src/com/leroymerlin/commit/ChangeType.java @@ -7,32 +7,45 @@ */ public enum ChangeType { - FEAT("Features", "A new feature"), - FIX("Bug Fixes", "A bug fix"), - DOCS("Documentation", "Documentation only changes"), - STYLE("Styles", "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)"), - REFACTOR("Code Refactoring", "A code change that neither fixes a bug nor adds a feature"), - PERF("Performance Improvements", "A code change that improves performance"), - TEST("Tests", "Adding missing tests or correcting existing tests"), - BUILD("Builds", "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)"), - CI("Continuous Integrations", "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)"), - CHORE("Chores", "Other changes that don't modify src or test files"), - REVERT("Reverts", "Reverts a previous commit"); - - public final String title; - public final String description; - - ChangeType(String title, String description) { + FEAT("feat", ""), + FIX("fix", ""), + DOCS("docs", ""), + STYLE("style", ""), + REFACTOR("refactor", ""), + PERF("perf", ""), + TEST("test", ""), + BUILD("build", ""), + CI("ci", ""), + CHORE("chore", ""), + REVERT("revert", ""); + + private final String title; + private String i18n; + + ChangeType(String title, String i18n) { this.title = title; - this.description = description; + this.i18n = i18n; + } + + public void setI18n(String i18n) { + this.i18n = i18n; + } + + public String label(boolean english) { + return english ? title : i18n; } - public String label() { - return this.name().toLowerCase(); + public static ChangeType lookup(String value) { + for (ChangeType type : ChangeType.values()) { + if (type.title.equalsIgnoreCase(value) || type.i18n.equals(value)) { + return type; + } + } + throw new IllegalArgumentException("ChangeType not found: " + value); } @Override public String toString() { - return String.format("%s - %s", this.label(), this.description); + return String.format("%s - %s", this.name(), this.title); } } diff --git a/src/com/leroymerlin/commit/CommitMessage.java b/src/com/leroymerlin/commit/CommitMessage.java index c5ec119..4bdb7fd 100644 --- a/src/com/leroymerlin/commit/CommitMessage.java +++ b/src/com/leroymerlin/commit/CommitMessage.java @@ -14,10 +14,11 @@ class CommitMessage { private static final int MAX_LINE_LENGTH = 72; // https://stackoverflow.com/a/2120040/5138796 - public static final Pattern COMMIT_FIRST_LINE_FORMAT = Pattern.compile("^([a-z]+)(\\((.+)\\))?: (.+)"); + public static final Pattern COMMIT_FIRST_LINE_FORMAT = Pattern.compile("^(.+?)(\\((.+)\\))?: (.+)"); public static final Pattern COMMIT_CLOSES_FORMAT = Pattern.compile("Closes (.+)"); private ChangeType changeType; + private boolean english = true; private String changeScope, shortDescription, longDescription, breakingChanges, closedIssues; private boolean wrapText = true; private boolean skipCI = false; @@ -28,9 +29,10 @@ private CommitMessage() { this.closedIssues = ""; } - public CommitMessage(ChangeType changeType, String changeScope, String shortDescription, String longDescription, + public CommitMessage(ChangeType changeType, boolean english, String changeScope, String shortDescription, String longDescription, String breakingChanges, String closedIssues, boolean wrapText, boolean skipCI) { this.changeType = changeType; + this.english = english; this.changeScope = changeScope; this.shortDescription = shortDescription; this.longDescription = longDescription; @@ -43,7 +45,7 @@ public CommitMessage(ChangeType changeType, String changeScope, String shortDesc @Override public String toString() { StringBuilder builder = new StringBuilder(); - builder.append(changeType.label()); + builder.append(changeType.label(english)); if (isNotBlank(changeScope)) { builder .append('(') @@ -101,7 +103,7 @@ public static CommitMessage parse(String message) { Matcher matcher = COMMIT_FIRST_LINE_FORMAT.matcher(message); if (!matcher.find()) return commitMessage; - commitMessage.changeType = ChangeType.valueOf(matcher.group(1).toUpperCase()); + commitMessage.changeType = ChangeType.lookup(matcher.group(1)); commitMessage.changeScope = matcher.group(3); commitMessage.shortDescription = matcher.group(4); @@ -168,4 +170,8 @@ public String getClosedIssues() { public boolean isSkipCI() { return skipCI; } + + public boolean isEnglish() { + return english; + } } \ No newline at end of file diff --git a/src/com/leroymerlin/commit/CommitPanel.form b/src/com/leroymerlin/commit/CommitPanel.form index dc4a59d..d240b19 100644 --- a/src/com/leroymerlin/commit/CommitPanel.form +++ b/src/com/leroymerlin/commit/CommitPanel.form @@ -1,9 +1,9 @@
- + - + @@ -13,20 +13,20 @@ - + - + - + - + @@ -36,16 +36,16 @@ - + - + - + @@ -53,15 +53,15 @@ - + - + - + @@ -71,16 +71,16 @@ - + - - + + - + @@ -88,15 +88,15 @@ - + - + - + @@ -106,21 +106,21 @@ - + - + - + - + - + @@ -138,7 +138,7 @@ - + @@ -153,7 +153,7 @@ - + @@ -162,7 +162,7 @@ - + @@ -171,7 +171,7 @@ - + @@ -180,7 +180,7 @@ - + @@ -190,7 +190,7 @@ - + @@ -199,7 +199,7 @@ - + @@ -208,7 +208,7 @@ - + @@ -217,7 +217,7 @@ - + @@ -226,7 +226,7 @@ - + @@ -235,11 +235,20 @@ - + + + + + + + + + + diff --git a/src/com/leroymerlin/commit/CommitPanel.java b/src/com/leroymerlin/commit/CommitPanel.java index 813ea9e..a034a8c 100644 --- a/src/com/leroymerlin/commit/CommitPanel.java +++ b/src/com/leroymerlin/commit/CommitPanel.java @@ -30,6 +30,7 @@ public class CommitPanel { private JRadioButton choreRadioButton; private JRadioButton revertRadioButton; private ButtonGroup changeTypeGroup; + private JCheckBox english; CommitPanel(Project project, CommitMessage commitMessage) { File workingDirectory = new File(project.getBasePath()); @@ -51,6 +52,7 @@ JPanel getMainPanel() { CommitMessage getCommitMessage() { return new CommitMessage( getSelectedChangeType(), + english.isSelected(), (String) changeScope.getSelectedItem(), shortDescription.getText().trim(), longDescription.getText().trim(), @@ -77,7 +79,7 @@ private void restoreValuesFromParsedCommitMessage(CommitMessage commitMessage) { for (Enumeration buttons = changeTypeGroup.getElements(); buttons.hasMoreElements();) { AbstractButton button = buttons.nextElement(); - if (button.getActionCommand().equalsIgnoreCase(commitMessage.getChangeType().label())) { + if (button.getActionCommand().equalsIgnoreCase(commitMessage.getChangeType().name())) { button.setSelected(true); } } @@ -88,5 +90,6 @@ private void restoreValuesFromParsedCommitMessage(CommitMessage commitMessage) { breakingChanges.setText(commitMessage.getBreakingChanges()); closedIssues.setText(commitMessage.getClosedIssues()); skipCICheckBox.setSelected(commitMessage.isSkipCI()); + english.setSelected(commitMessage.isEnglish()); } } diff --git a/src/com/leroymerlin/commit/CreateCommitAction.java b/src/com/leroymerlin/commit/CreateCommitAction.java index a3ee224..56ba971 100644 --- a/src/com/leroymerlin/commit/CreateCommitAction.java +++ b/src/com/leroymerlin/commit/CreateCommitAction.java @@ -8,15 +8,25 @@ import com.intellij.openapi.vcs.CommitMessageI; import com.intellij.openapi.vcs.VcsDataKeys; import com.intellij.openapi.vcs.ui.Refreshable; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import java.util.ResourceBundle; + /** * @author Damien Arrachequesne */ public class CreateCommitAction extends AnAction implements DumbAware { + static { + ResourceBundle bundle = ResourceBundle.getBundle("i18n/panel"); + for (ChangeType type : ChangeType.values()) { + type.setI18n(bundle.getString(type.name())); + } + } + @Override - public void actionPerformed(AnActionEvent actionEvent) { + public void actionPerformed(@NotNull AnActionEvent actionEvent) { CommitMessageI commitPanel = getCommitPanel(actionEvent); if (commitPanel == null) return; diff --git a/src/com/leroymerlin/commit/GitLogQuery.java b/src/com/leroymerlin/commit/GitLogQuery.java index 141fb96..624d880 100644 --- a/src/com/leroymerlin/commit/GitLogQuery.java +++ b/src/com/leroymerlin/commit/GitLogQuery.java @@ -15,7 +15,7 @@ class GitLogQuery { private static final String GIT_LOG_COMMAND = "git log --all --format=%s"; - private static final Pattern COMMIT_FIRST_LINE_FORMAT = Pattern.compile("^[a-z]+\\((.+)\\):.*"); + private static final Pattern COMMIT_FIRST_LINE_FORMAT = Pattern.compile("^.+\\((.+)\\):.*"); private final File workingDirectory; diff --git a/tests/com/leroymerlin/commit/CommitMessageTest.java b/tests/com/leroymerlin/commit/CommitMessageTest.java index 91f2e5d..972fd37 100644 --- a/tests/com/leroymerlin/commit/CommitMessageTest.java +++ b/tests/com/leroymerlin/commit/CommitMessageTest.java @@ -8,23 +8,23 @@ public class CommitMessageTest { @Test public void testFormatCommit() { - CommitMessage commitMessage = new CommitMessage(ChangeType.FIX, "ngStyle", + CommitMessage commitMessage = new CommitMessage(ChangeType.FIX, true, "ngStyle", "skip setting empty value when new style has the property", "Previously, all the properties in oldStyles are set to empty value once. Using AngularJS with jQuery 3.3.1, this disables the CSS transition as reported in jquery/jquery#4185.", null, "#16709", true, false); - String expected = "fix(ngStyle): skip setting empty value when new style has the property\n" + - "\n" + - "Previously, all the properties in oldStyles are set to empty value once.\n" + - "Using AngularJS with jQuery 3.3.1, this disables the CSS transition as\n" + - "reported in jquery/jquery#4185.\n" + - "\n" + + String expected = "fix(ngStyle): skip setting empty value when new style has the property" + System.lineSeparator() + + System.lineSeparator() + + "Previously, all the properties in oldStyles are set to empty value once." + System.lineSeparator() + + "Using AngularJS with jQuery 3.3.1, this disables the CSS transition as" + System.lineSeparator() + + "reported in jquery/jquery#4185." + System.lineSeparator() + + System.lineSeparator() + "Closes #16709"; check(commitMessage, expected); } @Test public void testFormatCommit_withoutScope() { - CommitMessage commitMessage = new CommitMessage(ChangeType.STYLE, null, + CommitMessage commitMessage = new CommitMessage(ChangeType.STYLE, true, null, "fix eslint error", null, null, "", true, false); String expected = "style: fix eslint error"; check(commitMessage, expected); @@ -32,32 +32,32 @@ public void testFormatCommit_withoutScope() { @Test public void testFormatCommit_withMultipleClosedIssues() { - CommitMessage commitMessage = new CommitMessage(ChangeType.FEAT, "$route", + CommitMessage commitMessage = new CommitMessage(ChangeType.FEAT, true, "$route", "add support for the `reloadOnUrl` configuration option", "Enables users to specify that a particular route should not be reloaded after a URL change.", "", "#7925,#15002", true, false); - String expected = "feat($route): add support for the `reloadOnUrl` configuration option\n" + - "\n" + - "Enables users to specify that a particular route should not be reloaded\n" + - "after a URL change.\n" + - "\n" + - "Closes #7925\n" + + String expected = "feat($route): add support for the `reloadOnUrl` configuration option" + System.lineSeparator() + + System.lineSeparator() + + "Enables users to specify that a particular route should not be reloaded" + System.lineSeparator() + + "after a URL change." + System.lineSeparator() + + System.lineSeparator() + + "Closes #7925" + System.lineSeparator() + "Closes #15002"; check(commitMessage, expected); } @Test public void testFormatCommit_withLongBreakingChange() { - CommitMessage commitMessage = new CommitMessage(ChangeType.FEAT, null, "break everything", null, + CommitMessage commitMessage = new CommitMessage(ChangeType.FEAT, true, null, "break everything", null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", "", true, false); - String expected = "feat: break everything\n" + - "\n" + - "BREAKING CHANGE: Lorem ipsum dolor sit amet, consectetur adipiscing\n" + - "elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n" + - "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi\n" + - "ut aliquip ex ea commodo consequat. Duis aute irure dolor in\n" + - "reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla\n" + - "pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa\n" + + String expected = "feat: break everything" + System.lineSeparator() + + System.lineSeparator() + + "BREAKING CHANGE: Lorem ipsum dolor sit amet, consectetur adipiscing" + System.lineSeparator() + + "elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." + System.lineSeparator() + + "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi" + System.lineSeparator() + + "ut aliquip ex ea commodo consequat. Duis aute irure dolor in" + System.lineSeparator() + + "reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla" + System.lineSeparator() + + "pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa" + System.lineSeparator() + "qui officia deserunt mollit anim id est laborum."; check(commitMessage, expected); } @@ -70,34 +70,34 @@ public void testParseCommit_invalidFormat() { @Test public void testFormatCommit_addNumberSignIfMissing() { - CommitMessage commitMessage = new CommitMessage(ChangeType.FEAT, "$route", + CommitMessage commitMessage = new CommitMessage(ChangeType.FEAT, true, "$route", "add support for the `reloadOnUrl` configuration option", "", "", "7925, #15002 , https://github.com/o/r/issues/15003 ", true, false); - String expected = "feat($route): add support for the `reloadOnUrl` configuration option\n" + - "\n" + - "Closes #7925\n" + - "Closes #15002\n" + + String expected = "feat($route): add support for the `reloadOnUrl` configuration option" + System.lineSeparator() + + System.lineSeparator() + + "Closes #7925" + System.lineSeparator() + + "Closes #15002" + System.lineSeparator() + "Closes https://github.com/o/r/issues/15003"; assertEquals(expected, commitMessage.toString()); } @Test public void testFormatCommit_noWrap() { - CommitMessage commitMessage = new CommitMessage(ChangeType.FEAT, null, "break everything", null, + CommitMessage commitMessage = new CommitMessage(ChangeType.FEAT, true, null, "break everything", null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", "", false, false); - String expected = "feat: break everything\n" + - "\n" + + String expected = "feat: break everything" + System.lineSeparator() + + System.lineSeparator() + "BREAKING CHANGE: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."; check(commitMessage, expected); } @Test public void testFormatCommit_skipCI() { - CommitMessage commitMessage = new CommitMessage(ChangeType.DOCS, null, "edit README", null, + CommitMessage commitMessage = new CommitMessage(ChangeType.DOCS, true, null, "edit README", null, "", "", false, true); - String expected = "docs: edit README\n" + - "\n" + + String expected = "docs: edit README" + System.lineSeparator() + + System.lineSeparator() + "[skip ci]"; check(commitMessage, expected); } diff --git a/tests/i18n/I18NTest.java b/tests/i18n/I18NTest.java new file mode 100644 index 0000000..8895c11 --- /dev/null +++ b/tests/i18n/I18NTest.java @@ -0,0 +1,44 @@ +package i18n; + +import org.junit.Assert; +import org.junit.Test; + +import java.util.Locale; +import java.util.ResourceBundle; + +public class I18NTest { + + @Test + public void testDefault() { + getResourceBundleString(Locale.getDefault(), "type.of.change"); + getResourceBundleString(Locale.getDefault(), "fix.description"); + } + + @Test + public void testGiven() { + Locale.setDefault(Locale.FRENCH); + + getResourceBundleString(Locale.JAPAN, "type.of.change"); + getResourceBundleString(Locale.JAPANESE, "fix.description"); + + getResourceBundleString(Locale.US, "type.of.change"); + getResourceBundleString(Locale.ENGLISH, "fix.description"); + + getResourceBundleString(Locale.SIMPLIFIED_CHINESE, "type.of.change"); + getResourceBundleString(Locale.CHINESE, "fix.description"); + + Locale.setDefault(Locale.CHINESE); + + + getResourceBundleString(Locale.SIMPLIFIED_CHINESE, "type.of.change"); + getResourceBundleString(Locale.CHINESE, "fix.description"); + } + + private void getResourceBundleString(Locale locale, String key) { + ResourceBundle rb = ResourceBundle.getBundle("i18n/panel", locale); + String typeOfChange = rb.getString(key); + System.out.println(typeOfChange); + Assert.assertNotNull(typeOfChange); + } + +}