Skip to content
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

reports error when robot case section headers use other languages #585

Open
heyinling opened this issue Jun 5, 2024 · 1 comment
Open

Comments

@heyinling
Copy link

since RF 6.0 it supports localization of section headers. For example, I'm writing my case file in Chinese:

*** 设置 ***    # Settings
资源文件    aa.resource


*** 用例 ***    # Test Cases
CASE_00001
    Sleep    5s

I'm using pabot to execute the suite, with arg --language zh-CN. It still reports error invalid section headers:

[ ERROR ] Error in file 'example.robot' on line 1: Unrecognized section header '*** 设置 ***'. Valid sections: 'Settings', 'Variables', 'Test Cases', 'Tasks', 'Keywords' and 'Comments'.

In pabot.py function generate_suite_names_with_builder, when calling TestSuiteBuilder, it didn't pass arg lang even language arg is set in command line. After passing language to TestSuiteBuilder it works as expected:

builder = TestSuiteBuilder(
    included_extensions=settings.extension, rpa=settings.rpa, lang=opts["language"]
)

Hope it can be fixed in next release.

@heyinling
Copy link
Author

Have created a PR: #586

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant