| Message ID | 20251016-release-note-5-3-second-hunk-v1-10-20f21db1f93c@bootlin.com |
|---|---|
| State | Superseded |
| Headers | show |
| Series | Updates for 5.3 | expand |
Hi Antonin, On 10/16/25 10:54 AM, Antonin Godard via lists.yoctoproject.org wrote: > Part of bitbake.conf, this variable allowing to enable or disable > translation was undocumented. Add a entry to the glossary. > > Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> > --- > documentation/ref-manual/variables.rst | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst > index bb24f2583..f16ef9aae 100644 > --- a/documentation/ref-manual/variables.rst > +++ b/documentation/ref-manual/variables.rst > @@ -11117,6 +11117,19 @@ system and gives an overview of their function and contents. > the Yocto Project Development Tasks Manual for information on how to > use this variable. > > + :term:`USE_NLS` > + Determines if translations should be built for recipes that can build > + language translations. This variable can be equal to: Suggesting: Determine if language translations should be built for recipes that can build them. > + > + - ``yes``: translations are enabled. > + - ``no``: translation are disabled. > + > + The :ref:`ref-classes-gettext` class uses this variable to enable > + :wikipedia:`Gettext <Gettext>` in recipes that use this class. Recipes can Suggesting: It is used to enable :wikipedia:`Gettext <Gettext>` in recipes inheriting the :ref:`ref-classes-gettext`. > + also use the :term:`USE_NLS` variable directly to override the default > + value of the variable, and configure themselves according to the value of > + the variable. I mean.... the same can be said about any variable? But the "magic" documented stuff that happens when setting USE_NLS only happens if you inherit the class, so I would simply not document using this variable "manually"? Cheers, Quentin
On Thu Oct 16, 2025 at 12:25 PM CEST, Quentin Schulz via lists.yoctoproject.org wrote: > Hi Antonin, > > On 10/16/25 10:54 AM, Antonin Godard via lists.yoctoproject.org wrote: >> Part of bitbake.conf, this variable allowing to enable or disable >> translation was undocumented. Add a entry to the glossary. >> >> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> >> --- >> documentation/ref-manual/variables.rst | 13 +++++++++++++ >> 1 file changed, 13 insertions(+) >> >> diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst >> index bb24f2583..f16ef9aae 100644 >> --- a/documentation/ref-manual/variables.rst >> +++ b/documentation/ref-manual/variables.rst >> @@ -11117,6 +11117,19 @@ system and gives an overview of their function and contents. >> the Yocto Project Development Tasks Manual for information on how to >> use this variable. >> >> + :term:`USE_NLS` >> + Determines if translations should be built for recipes that can build >> + language translations. This variable can be equal to: > > Suggesting: > > Determine if language translations should be built for recipes that can > build them. > >> + >> + - ``yes``: translations are enabled. >> + - ``no``: translation are disabled. >> + >> + The :ref:`ref-classes-gettext` class uses this variable to enable >> + :wikipedia:`Gettext <Gettext>` in recipes that use this class. Recipes can > > Suggesting: > > It is used to enable :wikipedia:`Gettext <Gettext>` in recipes > inheriting the :ref:`ref-classes-gettext`. > >> + also use the :term:`USE_NLS` variable directly to override the default >> + value of the variable, and configure themselves according to the value of >> + the variable. > > I mean.... the same can be said about any variable? But the "magic" > documented stuff that happens when setting USE_NLS only happens if you > inherit the class, so I would simply not document using this variable > "manually"? You're right, initially I had in mind that some recipes explicitely set this to "no" to skip this feature unconditionally, but it doesn't seem to be the case. Misunderstanding on my part. I will correct this to say that this is not supposed to be set from a recipe. Thanks, Antonin
Hi Antonin, On 10/20/25 10:52 AM, Antonin Godard wrote: > On Thu Oct 16, 2025 at 12:25 PM CEST, Quentin Schulz via lists.yoctoproject.org wrote: >> Hi Antonin, >> >> On 10/16/25 10:54 AM, Antonin Godard via lists.yoctoproject.org wrote: >>> Part of bitbake.conf, this variable allowing to enable or disable >>> translation was undocumented. Add a entry to the glossary. >>> >>> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> >>> --- >>> documentation/ref-manual/variables.rst | 13 +++++++++++++ >>> 1 file changed, 13 insertions(+) >>> >>> diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst >>> index bb24f2583..f16ef9aae 100644 >>> --- a/documentation/ref-manual/variables.rst >>> +++ b/documentation/ref-manual/variables.rst >>> @@ -11117,6 +11117,19 @@ system and gives an overview of their function and contents. >>> the Yocto Project Development Tasks Manual for information on how to >>> use this variable. >>> >>> + :term:`USE_NLS` >>> + Determines if translations should be built for recipes that can build >>> + language translations. This variable can be equal to: >> >> Suggesting: >> >> Determine if language translations should be built for recipes that can >> build them. >> >>> + >>> + - ``yes``: translations are enabled. >>> + - ``no``: translation are disabled. >>> + >>> + The :ref:`ref-classes-gettext` class uses this variable to enable >>> + :wikipedia:`Gettext <Gettext>` in recipes that use this class. Recipes can >> >> Suggesting: >> >> It is used to enable :wikipedia:`Gettext <Gettext>` in recipes >> inheriting the :ref:`ref-classes-gettext`. >> >>> + also use the :term:`USE_NLS` variable directly to override the default >>> + value of the variable, and configure themselves according to the value of >>> + the variable. >> >> I mean.... the same can be said about any variable? But the "magic" >> documented stuff that happens when setting USE_NLS only happens if you >> inherit the class, so I would simply not document using this variable >> "manually"? > > You're right, initially I had in mind that some recipes explicitely set this to > "no" to skip this feature unconditionally, but it doesn't seem to be the case. > Misunderstanding on my part. I will correct this to say that this is not > supposed to be set from a recipe. > I actually understood the sentence as "you can use this variable even if not inheriting gettext to do stuff related to translations" which is of course not something we should encourage (that is, using the same variable name for different things). But re-reading it with a fresh mind I now understand it like "recipes can override USE_NLS" + "recipes can use USE_NLS to configure themselves". Not sure what would be the usecase for the first one, but for the second I think the point is "please use USE_NLS to automatically select building/supporting translations", e.g. with meson build system. gettext bbclass only sets --enable-nls or --disable-nls to EXTRA_OECONF, so I guess you need to do a similar dance for recipes that expect a different option than --enable-nls/--disable-nls or other build systems (such as meson for example, c.f. meta/recipes-support/p11-kit/p11-kit_0.25.5.bb). Can you tell us a bit more about what you meant with the last sentence? Maybe we can reword it to avoid confusion. Cheers, Quentin
On Mon Oct 20, 2025 at 11:34 AM CEST, Quentin Schulz wrote: > Hi Antonin, > > On 10/20/25 10:52 AM, Antonin Godard wrote: >> On Thu Oct 16, 2025 at 12:25 PM CEST, Quentin Schulz via lists.yoctoproject.org wrote: >>> Hi Antonin, >>> >>> On 10/16/25 10:54 AM, Antonin Godard via lists.yoctoproject.org wrote: >>>> Part of bitbake.conf, this variable allowing to enable or disable >>>> translation was undocumented. Add a entry to the glossary. >>>> >>>> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> >>>> --- >>>> documentation/ref-manual/variables.rst | 13 +++++++++++++ >>>> 1 file changed, 13 insertions(+) >>>> >>>> diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst >>>> index bb24f2583..f16ef9aae 100644 >>>> --- a/documentation/ref-manual/variables.rst >>>> +++ b/documentation/ref-manual/variables.rst >>>> @@ -11117,6 +11117,19 @@ system and gives an overview of their function and contents. >>>> the Yocto Project Development Tasks Manual for information on how to >>>> use this variable. >>>> >>>> + :term:`USE_NLS` >>>> + Determines if translations should be built for recipes that can build >>>> + language translations. This variable can be equal to: >>> >>> Suggesting: >>> >>> Determine if language translations should be built for recipes that can >>> build them. >>> >>>> + >>>> + - ``yes``: translations are enabled. >>>> + - ``no``: translation are disabled. >>>> + >>>> + The :ref:`ref-classes-gettext` class uses this variable to enable >>>> + :wikipedia:`Gettext <Gettext>` in recipes that use this class. Recipes can >>> >>> Suggesting: >>> >>> It is used to enable :wikipedia:`Gettext <Gettext>` in recipes >>> inheriting the :ref:`ref-classes-gettext`. >>> >>>> + also use the :term:`USE_NLS` variable directly to override the default >>>> + value of the variable, and configure themselves according to the value of >>>> + the variable. >>> >>> I mean.... the same can be said about any variable? But the "magic" >>> documented stuff that happens when setting USE_NLS only happens if you >>> inherit the class, so I would simply not document using this variable >>> "manually"? >> >> You're right, initially I had in mind that some recipes explicitely set this to >> "no" to skip this feature unconditionally, but it doesn't seem to be the case. >> Misunderstanding on my part. I will correct this to say that this is not >> supposed to be set from a recipe. >> > > I actually understood the sentence as "you can use this variable even if > not inheriting gettext to do stuff related to translations" which is of > course not something we should encourage (that is, using the same > variable name for different things). But re-reading it with a fresh mind > I now understand it like "recipes can override USE_NLS" + "recipes can > use USE_NLS to configure themselves". Not sure what would be the usecase > for the first one, but for the second I think the point is "please use > USE_NLS to automatically select building/supporting translations", e.g. > with meson build system. gettext bbclass only sets --enable-nls or > --disable-nls to EXTRA_OECONF, so I guess you need to do a similar dance > for recipes that expect a different option than > --enable-nls/--disable-nls or other build systems (such as meson for > example, c.f. meta/recipes-support/p11-kit/p11-kit_0.25.5.bb). > > Can you tell us a bit more about what you meant with the last sentence? > Maybe we can reword it to avoid confusion. Maybe that is more clear: """ Recipes can use the value of this variable to enable language translations in their build, however classes such as :ref:`ref-classes-gettext` already use the value of this variable. Direct usage of this variable can be avoided by using such classes when possible. """ Antonin
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index bb24f2583..f16ef9aae 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst @@ -11117,6 +11117,19 @@ system and gives an overview of their function and contents. the Yocto Project Development Tasks Manual for information on how to use this variable. + :term:`USE_NLS` + Determines if translations should be built for recipes that can build + language translations. This variable can be equal to: + + - ``yes``: translations are enabled. + - ``no``: translation are disabled. + + The :ref:`ref-classes-gettext` class uses this variable to enable + :wikipedia:`Gettext <Gettext>` in recipes that use this class. Recipes can + also use the :term:`USE_NLS` variable directly to override the default + value of the variable, and configure themselves according to the value of + the variable. + :term:`USE_VT` When using :ref:`SysVinit <dev-manual/new-recipe:enabling system services>`,
Part of bitbake.conf, this variable allowing to enable or disable translation was undocumented. Add a entry to the glossary. Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> --- documentation/ref-manual/variables.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+)