Closed aulemahal closed 1 year ago
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
@juliettelavoie I added more details in the documentation!
hmmm, @Zeitsperre I might need help here, I don't see why the RTD build is failing... Is it the warning in the linkcheck ? If so, I can't seem to find the warning!
hmmm, @Zeitsperre I might need help here, I don't see why the RTD build is failing... Is it the warning in the linkcheck ? If so, I can't seem to find the warning!
Looks like it's a reference to a non-existing target:
WARNING: undefined label: 'translating xscen`
This is a pretty annoying sphinx convention, but thankfully someone on StackExchange has some advice: https://stackoverflow.com/questions/15394347/adding-a-cross-reference-to-a-subheading-or-anchor-in-another-page
Thanks!
Pull Request Checklist:
number
) and pull request (:pull:number
) has been added.What kind of change does this PR introduce?
utils.add_attr
andutils.update_attr
that enable internationalization of xclim. Both function, will add an attribute in english, but also try to add attributes for each of the activated languages, if a translation is found.add_attr
will add translation according to the value of xclim's option "metadata_locales".update_attr
is used to build an attribute from a previous version. It will do it's thing for all locales present on the dataset. For example, it can be used to go fromlong_name="Mean temperature"
tolong_name="Variability of Mean temperature"
.xscen/data/{LOC}/LC_MESSAGES/xscen.po
, this uses the gettext system. OnlyLOC='fr'
currently implemented.make findfrench
to detect translatable-strings and update the translation catalogs (xscen.po
).make translate
to compile the catalogs into thexscen.mo
format that python needs.setup.py
hook so that the catalogs are automatically compiled uponpip install xscen
(NOT withpip install -e
).CONTRIBUTING.rst
.locales
which is a simple list of locales (2 letter names). If this section is updated throughxs.load_config
, it also updates xclim'smetadata_locales
option. Xscen actually uses xclim's option to control it's i18n.Does this PR introduce a breaking change?
No