Internationalisation & Multi-watch support

Copied two methods from GarminThermoNest to translate languages and manage different sized icons for the various sizes of watch. Also copied ErrorView for smaller wrapped text for error messages.
This commit is contained in:
Philip Abbey
2023-11-02 21:32:42 +00:00
parent 694f312075
commit 816b0dc890
80 changed files with 1784 additions and 19 deletions

View File

@ -0,0 +1,20 @@
<!--
Distributed under MIT Licence
See https://github.com/house-of-abbey/GarminHomeAssistant/blob/main/LICENSE.
GarminHomeAssistant is a Garmin IQ application written in Monkey C and routinely
tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant.
J D Abbey & P A Abbey, 28 December 2022
References:
* https://fonts.google.com/icons
-->
<drawables>
<bitmap id="ErrorIcon" filename="error.svg"/>
</drawables>

View File

@ -0,0 +1 @@
<svg height="42" viewBox="0 0 48 48" width="42" xmlns="http://www.w3.org/2000/svg"><path d="M24 34q.7 0 1.175-.475.475-.475.475-1.175 0-.7-.475-1.175Q24.7 30.7 24 30.7q-.7 0-1.175.475-.475.475-.475 1.175 0 .7.475 1.175Q23.3 34 24 34Zm-1.35-7.65h3V13.7h-3ZM24 44q-4.1 0-7.75-1.575-3.65-1.575-6.375-4.3-2.725-2.725-4.3-6.375Q4 28.1 4 23.95q0-4.1 1.575-7.75 1.575-3.65 4.3-6.35 2.725-2.7 6.375-4.275Q19.9 4 24.05 4q4.1 0 7.75 1.575 3.65 1.575 6.35 4.275 2.7 2.7 4.275 6.35Q44 19.85 44 24q0 4.1-1.575 7.75-1.575 3.65-4.275 6.375t-6.35 4.3Q28.15 44 24 44Zm.05-3q7.05 0 12-4.975T41 23.95q0-7.05-4.95-12T24 7q-7.05 0-12.025 4.95Q7 16.9 7 24q0 7.05 4.975 12.025Q16.95 41 24.05 41ZM24 24Z" fill="red" stroke="red"/></svg>

After

Width:  |  Height:  |  Size: 712 B