Skip to content

Feature/typo2 #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Browser/entry/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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.
"""
Expand Down Expand Up @@ -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
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion Browser/entry/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion Browser/entry/translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
18 changes: 9 additions & 9 deletions atest/test/12_rfbrowser/translation.robot
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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 |
Original file line number Diff line number Diff line change
@@ -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 |
Original file line number Diff line number Diff line change
@@ -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) | ------------ | --------------------------------------- |
Loading