mirror of
https://github.com/allankoechke/pywebview.git
synced 2026-12-02 01:33:02 +00:00
* Add preliminary tests * Tests experimentations * Cosmetic changes * Add preliminary tests * Tests experimentations * Cosmetic changes * Make tests work on GTK/QT * Fix confirm_quit on QT * Add possibility to use env variables in config * Add destroy event on event close in GTK * Add queue to test_url_load * Refine OSX tests
33 lines
1.1 KiB
Python
33 lines
1.1 KiB
Python
# -*- coding: utf-8 -*-
|
||
import pytest
|
||
import threading
|
||
from .util import run_test, destroy_window
|
||
|
||
|
||
def localization():
|
||
import webview
|
||
|
||
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"Сохранить файл",
|
||
}
|
||
|
||
destroy_window(webview)
|
||
webview.create_window('Localization test', 'https://www.example.org', strings=strings)
|
||
|
||
|
||
def test_localization():
|
||
run_test(localization)
|