diff --git a/Browser/entry/__main__.py b/Browser/entry/__main__.py index 677ec8c6a..4e82bebb0 100644 --- a/Browser/entry/__main__.py +++ b/Browser/entry/__main__.py @@ -38,7 +38,7 @@ SHELL, ) from .coverage_combine import combine -from .transform import trasform +from .transform import transform as tidy_transform from .translation import compare_translation, get_library_translation if TYPE_CHECKING: @@ -408,7 +408,7 @@ def cli(ctx, silent): transform will run Robotidy with Browser library transformer and handle keyword deprecations. - translation will generate detaul tranlsation json file from library keywords. + translation will generate default translation json file from library keywords. See each command argument help for more details what (optional) arguments that command supports. """ @@ -653,7 +653,7 @@ def convert_options_types(options: list[str], browser_lib: "Browser"): default=False, ) def transform(path: Path, wait_until_network_is_idle: bool): - """Runs Robotidy with Browser library transofrormer. + """Runs Robotidy with Browser library transformer. This will help users to convert automatically deprecated to new ones. Conversion is not allways possible and to perform automatically and always reguires human @@ -669,7 +669,7 @@ def transform(path: Path, wait_until_network_is_idle: bool): if not wait_until_network_is_idle: _log("No transformer defined, exiting.") return - trasform(path, wait_until_network_is_idle) + tidy_transform(path, wait_until_network_is_idle) @cli.command() diff --git a/Browser/entry/transform.py b/Browser/entry/transform.py index 1b378351a..23d4904ef 100644 --- a/Browser/entry/transform.py +++ b/Browser/entry/transform.py @@ -18,7 +18,7 @@ TIDY_TRANSFORMER_DIR = Path(__file__).parent.parent / "tidy_transformer" -def trasform( +def transform( path: Path, wait_until_network_is_idle: bool, ) -> None: diff --git a/Browser/entry/translation.py b/Browser/entry/translation.py index 487af055c..e7a961a41 100644 --- a/Browser/entry/translation.py +++ b/Browser/entry/translation.py @@ -22,7 +22,7 @@ DOC_CHANGED = "Documentation update needed" NO_LIB_KEYWORD = "Keyword not found from library" MISSING_TRANSLATION = "Keyword is missing translation" -MISSING_CHECKSUM = "Keyword tranlsaton is missing checksum" +MISSING_CHECKSUM = "Keyword translation is missing checksum" MAX_REASON_LEN = max( len(DOC_CHANGED), len(NO_LIB_KEYWORD), diff --git a/atest/test/12_rfbrowser/translation.robot b/atest/test/12_rfbrowser/translation.robot index 7edb0de52..e38912785 100644 --- a/atest/test/12_rfbrowser/translation.robot +++ b/atest/test/12_rfbrowser/translation.robot @@ -67,31 +67,31 @@ Compare Translation Files Should Match Regexp ... ${lines}[0] ... Found differences between translation and library, see below for details\. - Should Match Regexp ${lines}[1] \\| Keyword name${SPACE * 23}\\| Reason${SPACE * 33}\\| + Should Match Regexp ${lines}[1] \\| Keyword name${SPACE * 23}\\| Reason${SPACE * 34}\\| Should Match Regexp ... ${lines}[2] - ... \\| ---------------------------------- \\| -------------------------------------- \\| + ... \\| ---------------------------------- \\| --------------------------------------- \\| Should Match Regexp ... ${lines}[3] - ... \\| cancel_download${SPACE * 20}\\| Documentation update needed${SPACE * 12}\\| + ... \\| cancel_download${SPACE * 20}\\| Documentation update needed${SPACE * 13}\\| Should Match Regexp ... ${lines}[4] - ... \\| close_page${SPACE * 25}\\| Keyword is missing translation${SPACE * 9}\\| + ... \\| close_page${SPACE * 25}\\| Keyword is missing translation${SPACE * 10}\\| Should Match Regexp ... ${lines}[5] - ... \\| grant_permissions${SPACE * 18}\\| Keyword is missing translation${SPACE * 9}\\| + ... \\| grant_permissions${SPACE * 18}\\| Keyword is missing translation${SPACE * 10}\\| Should Match Regexp ... ${lines}[6] - ... \\| focus${SPACE * 30}\\| Documentation update needed${SPACE * 12}\\| + ... \\| focus${SPACE * 30}\\| Documentation update needed${SPACE * 13}\\| Should Match Regexp ... ${lines}[7] - ... \\| get_style${SPACE * 26}\\| Keyword tranlsaton is missing checksum \\| + ... \\| get_style${SPACE * 26}\\| Keyword translation is missing checksum \\| Should Match Regexp ... ${lines}[8] - ... \\| __intro__${SPACE * 26}\\| Documentation update needed${SPACE * 12}\\| + ... \\| __intro__${SPACE * 26}\\| Documentation update needed${SPACE * 13}\\| Should Match Regexp ... ${lines}[9] - ... \\| not_there${SPACE * 26}\\| Keyword not found from library${SPACE * 9}\\| + ... \\| not_there${SPACE * 26}\\| Keyword not found from library${SPACE * 10}\\| [Teardown] Remove Files ${OUTPUT_DIR}/translation_new.json Translation Files Does Not Require Updates diff --git a/utest/approved_files/test_rfbrowser_translate.test_body_line.approved.txt b/utest/approved_files/test_rfbrowser_translate.test_body_line.approved.txt index 1dbb1704a..61533f10d 100644 --- a/utest/approved_files/test_rfbrowser_translate.test_body_line.approved.txt +++ b/utest/approved_files/test_rfbrowser_translate.test_body_line.approved.txt @@ -1,8 +1,8 @@ body -0) | new_page | Keyword is missing translation | -1) | this_is_long_keyword_which_is_42_chars_len | Keyword is missing translation | -2) | close | Documentation update needed | -3) | new_page | Keyword is missing translation | -4) | click | Keyword not found from library | -5) | click | Documentation update needed | +0) | new_page | Keyword is missing translation | +1) | this_is_long_keyword_which_is_42_chars_len | Keyword is missing translation | +2) | close | Documentation update needed | +3) | new_page | Keyword is missing translation | +4) | click | Keyword not found from library | +5) | click | Documentation update needed | diff --git a/utest/approved_files/test_rfbrowser_translate.test_full_long_kw_table.approved.txt b/utest/approved_files/test_rfbrowser_translate.test_full_long_kw_table.approved.txt index 04582b6d5..ee915a7b5 100644 --- a/utest/approved_files/test_rfbrowser_translate.test_full_long_kw_table.approved.txt +++ b/utest/approved_files/test_rfbrowser_translate.test_full_long_kw_table.approved.txt @@ -1,7 +1,7 @@ all with long kw name -0) | Keyword name | Reason | -1) | ------------------------------------------ | -------------------------------------- | -2) | new_page | Keyword tranlsaton is missing checksum | -3) | this_is_long_keyword_which_is_42_chars_len | Keyword is missing translation | -4) | close | Documentation update needed | +0) | Keyword name | Reason | +1) | ------------------------------------------ | --------------------------------------- | +2) | new_page | Keyword translation is missing checksum | +3) | this_is_long_keyword_which_is_42_chars_len | Keyword is missing translation | +4) | close | Documentation update needed | diff --git a/utest/approved_files/test_rfbrowser_translate.test_heading.approved.txt b/utest/approved_files/test_rfbrowser_translate.test_heading.approved.txt index 5d55c19c6..73126ee28 100644 --- a/utest/approved_files/test_rfbrowser_translate.test_heading.approved.txt +++ b/utest/approved_files/test_rfbrowser_translate.test_heading.approved.txt @@ -1,6 +1,6 @@ header -0) | Keyword name | Reason | -1) | ------------------------------------------ | -------------------------------------- | -2) | Keyword name | Reason | -3) | ------------ | -------------------------------------- | +0) | Keyword name | Reason | +1) | ------------------------------------------ | --------------------------------------- | +2) | Keyword name | Reason | +3) | ------------ | --------------------------------------- |