Tom, thanks for the confirmation. I had come to essentially the same 
conclusion. 
Currently I have pages for 'time periods' such as day, week, month, year, 
etc. Because most of the page is common 'boilerplate', I am using include 
files to 'generate' the pages. So I am using things like $gettext[$page + 
'_title']. 
As I have been developing, I also have found it helpful to use a 
descriptive variable name such as an entry of, 'forecast_title = Forecast'. 
This way when I run report and I see forecast_title in the display I know I 
need to add an entry to the 'language' file. I try to make the variable 
provide the context of where the text is.. Hopefully if someone wants to 
translate the skin, this won't make it too difficult.
But I think the complexity and indirection I have added to make it highly 
configurable might doom this experiment. 
But its been a blast diving in and learning how to create WeeWX reports! 
rich

On Tuesday, 24 August 2021 at 20:16:38 UTC-4 Tom Keffer wrote:

> That's right: the locale files are all flat now. However, the code is 
> still there to make use of subsections, and occasionally they can be 
> useful. An example is "altitude". While in English the same word is used to 
> mean "height above sea level" and "angle to the horizon," apparently that's 
> not so in all languages. So, we use subsections to differentiate. But, 
> subsections for different pages should be avoided, as it makes maintenance 
> much more difficult. Levels of indirection should also be avoided. For 
> example, don't just use "Title" as the key. Use the full English 
> description. This way, if a translator forgets a translation, at least a 
> readable English phrase will be substituted.
>
> -tk
>
> On Tue, Aug 24, 2021 at 2:01 PM [email protected] <[email protected]> 
> wrote:
>
>>
>> I've upgraded my development environment from 4.6 a4 to 4.6 b1 and had to 
>> make no changes to get it to work. Comparing the releases I see the 
>> elimination of 'page' sections in the 'lang' files and other restructuring. 
>> I see no code changes that would require any update to my skin.
>> Net all good from my perspective.
>> rich
>> On Monday, 23 August 2021 at 20:02:01 UTC-4 Tom Keffer wrote:
>>
>>> It is this sort of experimentation that I was hoping to encourage by 
>>> writing these extensions! Glad they are working for you.
>>>
>>> Make sure you are using the 4.6 beta, and not the alpha versions. The 
>>> structure of the locale files has changed.
>>>
>>> On Mon, Aug 23, 2021 at 4:25 PM [email protected] <[email protected]> 
>>> wrote:
>>>
>>>> I've been experimenting with using ApexCharts to create charts and 
>>>> Bootstrap to manage the responsive layout. I am using the series support 
>>>> that is introduced in 4.5 and the internationalization support in 4.6. One 
>>>> pretty cool thing, the html that is generated needs no AJAX calls, so it 
>>>> can be loaded directly from the filesystem into a browser.
>>>>
>>>> It's modeled after the Seasons skin and inspired by the neowx-material 
>>>> skin. I've been focused on making it 'highly configurable' and less on the 
>>>> aesthetics. It can be seen here, http://bellrichm.great-site.net. 
>>>> That's a free hosting site, so I have no idea what the 
>>>> reliabilty/availability will be.
>>>>
>>>> Like everthing WeeWX, the series and internationalizatio support is, 
>>>> intuitive, easy to use, and 'just works'. Again my thanks to everyone that 
>>>> has contributed.
>>>> rich
>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "weewx-development" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to [email protected].
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/weewx-development/21fa8969-d56c-4e5c-beb4-630e232cef87n%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/weewx-development/21fa8969-d56c-4e5c-beb4-630e232cef87n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "weewx-development" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-development/dc21055e-8462-4495-a7e5-7154e1648671n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-development/dc21055e-8462-4495-a7e5-7154e1648671n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/ef5db990-fb55-43cd-bd7b-ddf74fa42aean%40googlegroups.com.

Reply via email to