The editor's mockup writes like the screens, and speaks its own language around them
- Numbers in the mockup follow what the app sends the screens (style, grouping from five digits, the space before %), a state without a unit stays as it is, and built-in cards carry the screens' names (Instellingen, not the editor's Einstellungen). - Automatic in Language & region is labelled with what it means now (Home Assistant's language decides). - A screen's status (Synced, Loading tiles, ...) shows in the editor's language; the screens keep reporting it in English, which the app reads. - The doorbell example uses the alert examples of the editor's language; control labels keep their capitals. - Editor bundle rebuilt with every language's texts. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -251,6 +251,9 @@ class ClockPinTests(unittest.IsolatedAsyncioTestCase):
|
||||
view = (await answer.json())['language']
|
||||
self.assertEqual((view['effective'], view['numbers_effective'], view['group_min'], view['percent_space']),
|
||||
('de', 'point', 1, True))
|
||||
# What the screen reports stays English (the app reads it); the editor shows it in its own language.
|
||||
dutch = await (await client.get('/api/inventory?light=1', headers={'X-ESP-Screens-Language': 'nl'})).json()
|
||||
self.assertEqual((m.screens()[0]['status'], dutch['screens'][0]['status']), ('Synced', 'Gesynchroniseerd'))
|
||||
refused = await client.put('/api/language', json={'clock': '13'}, headers={'X-Screen-CSRF': csrf, 'X-ESP-Screens-Language': 'nl'})
|
||||
self.assertEqual(refused.status, 400)
|
||||
self.assertEqual((await refused.json())['error'], i18n.TRANSLATIONS.text('addon.errors.region_choice', 'nl'))
|
||||
|
||||
Reference in New Issue
Block a user