Renamed the "testsite" application to "test_site".

This commit is contained in:
依瑪貓 2023-02-02 00:39:03 +08:00
parent 6876fdf75e
commit 4aed2f6ba7
11 changed files with 14 additions and 12 deletions

View File

@ -28,7 +28,7 @@ from babel.messages.frontend import CommandLineInterface
from opencc import OpenCC from opencc import OpenCC
root_dir: Path = Path(__file__).parent.parent root_dir: Path = Path(__file__).parent.parent
translation_dir: Path = root_dir / "tests" / "testsite" / "translations" translation_dir: Path = root_dir / "tests" / "test_site" / "translations"
domain: str = "messages" domain: str = "messages"
@ -49,7 +49,7 @@ def babel_extract() -> None:
/ f"{domain}.po" / f"{domain}.po"
CommandLineInterface().run([ CommandLineInterface().run([
"pybabel", "extract", "-F", str(cfg), "-k", "lazy_gettext", "-k", "A_", "pybabel", "extract", "-F", str(cfg), "-k", "lazy_gettext", "-k", "A_",
"-o", str(pot), str(Path("tests") / "testsite")]) "-o", str(pot), str(Path("tests") / "test_site")])
if not zh_hant.exists(): if not zh_hant.exists():
zh_hant.touch() zh_hant.touch()
if not zh_hans.exists(): if not zh_hans.exists():

View File

@ -27,7 +27,7 @@ from flask import Flask
from flask.testing import FlaskCliRunner from flask.testing import FlaskCliRunner
from testlib import UserClient, get_user_client from testlib import UserClient, get_user_client
from testsite import create_app from test_site import create_app
class AccountCommandTestCase(unittest.TestCase): class AccountCommandTestCase(unittest.TestCase):

View File

@ -26,7 +26,7 @@ from flask import Flask
from flask.testing import FlaskCliRunner from flask.testing import FlaskCliRunner
from testlib import UserClient, get_user_client from testlib import UserClient, get_user_client
from testsite import create_app from test_site import create_app
class BaseAccountCommandTestCase(unittest.TestCase): class BaseAccountCommandTestCase(unittest.TestCase):

View File

@ -20,35 +20,37 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.11.0\n" "Generated-By: Babel 2.11.0\n"
#: tests/testsite/templates/base.html:23 #: tests/test_site/templates/base.html:23
msgid "en" msgid "en"
msgstr "zh-Hant" msgstr "zh-Hant"
#: tests/testsite/templates/base.html:43 tests/testsite/templates/home.html:24 #: tests/test_site/templates/base.html:43
#: tests/test_site/templates/home.html:24
msgid "Home" msgid "Home"
msgstr "首頁" msgstr "首頁"
#: tests/testsite/templates/base.html:68 #: tests/test_site/templates/base.html:68
msgid "Log Out" msgid "Log Out"
msgstr "" msgstr ""
#: tests/testsite/templates/base.html:78 tests/testsite/templates/login.html:24 #: tests/test_site/templates/base.html:78
#: tests/test_site/templates/login.html:24
msgid "Log In" msgid "Log In"
msgstr "登入" msgstr "登入"
#: tests/testsite/templates/base.html:119 #: tests/test_site/templates/base.html:119
msgid "Error:" msgid "Error:"
msgstr "錯誤:" msgstr "錯誤:"
#: tests/testsite/templates/login.html:30 #: tests/test_site/templates/login.html:30
msgid "Viewer" msgid "Viewer"
msgstr "讀報表者" msgstr "讀報表者"
#: tests/testsite/templates/login.html:31 #: tests/test_site/templates/login.html:31
msgid "Editor" msgid "Editor"
msgstr "記帳者" msgstr "記帳者"
#: tests/testsite/templates/login.html:32 #: tests/test_site/templates/login.html:32
msgid "Nobody" msgid "Nobody"
msgstr "沒有權限者" msgstr "沒有權限者"