Files
pywebview/tests/test_localization.py
Roman 22de1e0f9c evaluate_js, thread safety improvements
- Uniform cross-platform JS type conversion to Python types in evalulate_js
- Thread safety improvements 
- New test runner
2018-03-10 09:23:01 +02:00

32 lines
1.0 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# -*- coding: utf-8 -*-
import webview
from .util import run_test
def test_localization():
run_test(webview, localization)
def localization():
strings = {
"cocoa.menu.about": u"О программе",
"cocoa.menu.services": u"Cлужбы",
"cocoa.menu.view": u"Вид",
"cocoa.menu.hide": u"Скрыть",
"cocoa.menu.hideOthers": u"Скрыть остальные",
"cocoa.menu.showAll": u"Показать все",
"cocoa.menu.quit": u"Завершить",
"cocoa.menu.fullscreen": u"Перейти ",
"windows.fileFilter.allFiles": u"Все файлы",
"windows.fileFilter.otherFiles": u"Остальлные файльы",
"linux.openFile": u"Открыть файл",
"linux.openFiles": u"Открыть файлы",
"linux.openFolder": u"Открыть папку",
"linux.saveFile": u"Сохранить файл",
}
webview.create_window('Localization test', 'https://www.example.org', strings=strings)