An open API service indexing awesome lists of open source software.

https://github.com/marketsquare/robotframework-seleniumlibrary-translation

Provides translation for robotframework-seleniumlibrary
https://github.com/marketsquare/robotframework-seleniumlibrary-translation

robotframework testing translation

Last synced: 7 months ago
JSON representation

Provides translation for robotframework-seleniumlibrary

Awesome Lists containing this project

README

          

# SeleniumLibrary localisation project
This project contains all localizations for the Robot Framework SeleniumLibrary. Currently project contains only one translation,
[Finnish](https://github.com/MarketSquare/robotframework-seleniumlibrary-translation/blob/main/robotframework_seleniumlibrary_translation/translation_fi.json)
, but new languages can be added by creating translation_xx.json file and adding the definition to
[init.py](https://github.com/MarketSquare/robotframework-seleniumlibrary-translation/blob/main/robotframework_seleniumlibrary_translation/__init__.py)
file. The xx should be replaced with correct language code.

This project uses SeleniumLibrary Python plugin API to provide translation_xx.json file for the
Seleniumlibrary. SeleniumLibrary searches Python plugins by using naming convention: `robotframework_seleniumlibrary_translation`. This module fulfils the SeleniumLibrary
translation API and provides `get_language` method. The method return a list of dictionaries:

[{"language": "fi", "path": "/path/to/translation_fi.json"}]

Which SeleniumLibrary will use to match correct translation from all the found Python plugins.
Language search is enabled when SeleniumLibrary is imported with:

```robotframework
*** Settings ***
Library SeleniumLibrary language=fi
```

# Detect changes in documentation
The translation_xx.json contains sha256 sum, which is generated by the SeleniumLibrary. The sha256
is the checksum of the original documentation of the SeleniumLibrary documentation. The checksum
is used by `sellib translation --compare robotframework_seleniumlibrary_translation/translation.json`
command to compare translation between the library and translation file. Command will display a list
of keywords which needs updating or are missing from the translation.json file.