feat(web): rewrite site copy in plain language and split i18n dictionaries
Move RU/EN strings to src/i18n/{ru,en}.ts, add og/meta tags that follow the
selected language, remove the long dash from all text, add copy guidelines and
tests for key parity, HTML fallback text and dash-free sources and bundle.
This commit is contained in:
parent
0d80ca9433
commit
d3a6dd316b
11 changed files with 397 additions and 295 deletions
|
|
@ -44,7 +44,11 @@ with sync_playwright() as p:
|
|||
page.locator('[data-theme="light"]').click()
|
||||
assert page.locator('.product-diagram').get_attribute('data-preview-theme') == 'light'
|
||||
page.locator('[data-language="en"]').click()
|
||||
assert page.locator('h1').inner_text() == 'Your people.\nYour connection.'
|
||||
assert page.locator('h1').inner_text() == 'Voice and text chat\non your own server.'
|
||||
assert page.evaluate('document.documentElement.lang') == 'en'
|
||||
assert page.title() == 'VNOX: voice and text chat on your own server'
|
||||
assert page.locator('meta[property="og:title"]').get_attribute('content') == page.title()
|
||||
assert '\u2014' not in page.content()
|
||||
assert page.locator('[data-tab="theme"]').get_attribute('aria-selected') == 'true'
|
||||
assert page.locator('[data-theme="light"]').get_attribute('aria-pressed') == 'true'
|
||||
for locale in ['en', 'ru']:
|
||||
|
|
@ -60,7 +64,7 @@ with sync_playwright() as p:
|
|||
page.screenshot(path=str(artifacts / 'account-login-mobile.png'), full_page=True)
|
||||
state['info'] = {'capabilities': {'github_auth': 'not_enabled'}}
|
||||
page.reload()
|
||||
page.locator('#login-availability').filter(has_text='не включён').wait_for()
|
||||
page.locator('#login-availability').filter(has_text='выключен').wait_for()
|
||||
assert page.locator('.github-login').get_attribute('href') is None
|
||||
state['info_status'] = 503
|
||||
page.reload()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue