This is starting to look a lot like my day job. :-(

On Sat, Feb 8, 2020 at 10:38 AM Thomas Keffer <[email protected]> wrote:

> A translation "lookup" strategy, using something like gettext()
> <https://docs.python.org/3/library/i18n.html>, has been discussed from
> time-to-time.
>
> I actually wrote an implementation of a C++ version of gettext() many
> years ago for Sun Microsystems, and hated it. You are presented with a long
> list of text strings like "Temperature", "The temperature is", "The outside
> temperature is", "The temperature outside is", *etc.*, with no context,
> and you must supply a translation. Plus, because the text itself must be
> used as a key, but Cheetah has no mechanism for allowing text to be
> extracted, you must call a function to identify the text. Your template
> ends up looking like
>
> <p>$_("The outside temperature is") $current.outTemp</p>
>
>
> which I do not find appealing, nor easy to teach to a beginner.
>
> In the end, the idea has been rejected as being the worst of two evils.
>
> -tk
>
> On Sat, Feb 8, 2020 at 9:56 AM Vetti52 <[email protected]> wrote:
>
>> Nice to see!
>> Thanks
>>
>> After that I am wondering, if there are attempts to prepare a common
>> solution for internationalisation. It was not that easy to find all places,
>> where english expressions had to be replaced. Well, in the Weewx wiki I
>> found at least three solutions, a french standard skin, niculskin and
>> Weewx-Weather34, which provide translations, each at its own way.
>> I think, it is a hard way to translate once, but harder to maintain a
>> standard Weewx skin for each language, as I just finished the translation
>> into German, similar to the french version. The WeeWx-Weather34 solution is
>> written in PHP, which I am not familiar with. The closest approach to the
>> actual Weewx skin is IMHO that of niculskin, which uses variables for each
>> label and a set of language specific tranlation files. Wouldn't it be
>> another good idea, to modify the actual Weewx.conf and all skin layouts, so
>> that we only need to choose the language in weewx.conf  and the correct
>> labels show up everywhere. If this has been discussed already, I'm sorry,
>> that I have missed it. Otherwise, entering the UTF-8 directive into all
>> files would be a good trigger to complete sophisticated i18n of Weewx.
>>
>> Am Mittwoch, 5. Februar 2020 16:16:51 UTC+1 schrieb Thomas Keffer:
>>>
>>> Yes, good idea. Done in commit 5d14e61
>>> <https://github.com/weewx/weewx/commit/5d14e61e79aaca5f0916f90c6b1bdceaf94669b4>
>>>
>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "weewx-user" 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-user/d4f8caa0-ea4d-4db3-ba53-8a7d4133b30b%40googlegroups.com
>> <https://groups.google.com/d/msgid/weewx-user/d4f8caa0-ea4d-4db3-ba53-8a7d4133b30b%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" 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-user/CAPq0zEC3CseLyPtSTqNphv5_xwkb7Mhr8K8sPuFPGJiML8KoRw%40mail.gmail.com
> <https://groups.google.com/d/msgid/weewx-user/CAPq0zEC3CseLyPtSTqNphv5_xwkb7Mhr8K8sPuFPGJiML8KoRw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Peter Quinn
(415)794-2264

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" 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-user/CAA1SM226usn7CzG7d71NMbZsqrCGR2arz3oCbMn3TrzMEY0sxA%40mail.gmail.com.

Reply via email to