If there is any message that is marked for translation with
_("
...")
, there must be a textdomain
statement.
The YaST2 translator module needs to know where to take the messages to be
translated from. This is what the textdomain
specification does.
Technically one textdomain
statement somewhere in the YCP program
would be sufficient, i.e. include files or modules called with
CallFunction()
don't really require an
additional textdomain
specification.
However, it is highy recommended all YCP files with translatable messages
include their own textdomain
statement so each YCP file is
self-sufficient in that regard, thus more easily reusable for other
purposes. This policy is enforced with this check.
After being stripped of all comments, the entire YCP code is scanned for the
translation marker sequence: An underscore immediately followed by an opening
parenthesis: _(
If this sequence is found, presence of translatable messages is assumed. If no
textdomain
statment is found there will be an error.
On the other hand, if there is no text to translate, a textdomain
statement is not necessary (but it can't hurt).
![]() | Note |
---|---|
Theoretically the " |