Release v1.12
weewx-skyfield 1.12
This release makes the Sky page speak your language: every string it
renders is now translatable through WeeWX's own lang-file mechanisms, a
complete German translation ships with the skin (Beta), and a new
$almanac.<body>.label tag gives every body a translatable display name.
It also fixes the analemma's month labels, which silently vanished on
stations running a non-English OS locale. Drop-in upgrade from any 1.x —
install over it, no config changes; English pages render exactly as
before.
What's new
-
The Sky page is translatable — entirely through WeeWX's own
mechanisms; nothing new to learn if you have translated a WeeWX skin
before. Every string the page renders (captions, panel labels,
tooltips, chips, table headers, the footer) is a gettext-style
[Texts]key: the English string is the key, and a report falls
back to English one string at a time, so a partial translation is
fine and can never blank a panel. Body names follow the[Almanac]
section, compass cardinals the report's[Units][[Ordinates]]
directions, hemisphere letters[Labels]— the core-standard
sources. The skin ships its reference dictionary atlang/en.conf,
and a test keeps it exact in both directions: a rendered string
missing from the dictionary fails, and so does a dictionary entry
nothing renders. Details, including how skins that embed the panels
pick up translations, in the manual:
Translating the Sky page. -
German included (Beta).
lang/de.confis a complete translation,
kept complete by a test, so new strings cannot ship untranslated. Turn
it on per report inweewx.conf:[StdReport] [[SkyfieldReport]] lang = deBeta means the words, not the machinery: the translation awaits
native-speaker review, and a clumsy phrase is the worst it can do.
Corrections from German speakers are very welcome — as are further
languages: a lang file is a self-contained, no-code contribution. -
New tag
$almanac.<body>.label— the body's display name,
translated by the skin. Add the tag name to the report's[Almanac]
section (the same section that holdsmoon_phases), e.g.moon = Mond, and the tag renders "Mond"; untranslated bodies fall back to
the English name. Works for every body and named star, follows each
report's own language, and needs no PyEphem. weewx-loopdata almanac
fields (e.g.almanac.moon.label) render in the language of
loopdata's target report. -
FIX: analemma month labels on non-English locales. The months to
label (Jan, Mar, Jun, Sep, Nov) were picked by comparing
strftime('%b')output against the English abbreviations, so on a
station running a German, French, ... OS locale every label silently
vanished. Months are now picked by number, and the labels render in
the station's own locale — as the panel's dates always did. -
Skins embedding the panels: nothing changes for English skins. A
non-English skin brings the translations along the same way it brings
the CSS — the panels read[Texts]and[Almanac]from your
report, not from the bundled skin. The copy/merge recipe is in the
manual's
embedding section;
an out-of-date copied dictionary degrades gracefully (new strings
render in English), unlike out-of-date CSS.
Requirements
- Python 3.9 or later
- WeeWX 5.2 or later
- Skyfield (1.47 or later) and NumPy in WeeWX's Python environment (see the
README); PyEphem is NOT required
Installing/upgrading
Download weewx-skyfield.zip from this release, then:
weectl extension install weewx-skyfield.zip
Restart WeeWX. No weewx.conf changes are needed when upgrading from 1.x;
to put the bundled Sky page in German, add lang = de to the
[[SkyfieldReport]] section of weewx.conf — or put it under
[StdReport] [[Defaults]] to switch every skin that ships German
(Seasons included) in one line. Note that upgrading
replaces the bundled skin (skins/Skyfield/, now including its lang/
files) — if you customized it, save a copy first; local additions such as
extra star names survive upgrades best as [[[Almanac]]] entries in
weewx.conf (see the manual).