-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i18n prep: wrap translatable strings in _(...).
Having made each message translatable in principle, now we go through and use the magic '_' macro to mark each string so that the gettext lookup function can be called at run time, and so that 'xgettext' can identify the messages to put into a template file for translators. Mostly this is a routine exercise. Some points of interest: I had to exclude the 'samples' directory, since the C and C++ source files in there are not conceptually the same code base as the rest of the repo, and their messages shouldn't be mixed in with the rest. (In fact their messages aren't going to be translatable at all, because they couldn't load the translations anyway.) I had to decide where to stop. For purely internal tools intended for TTU development, like binaries used in the automated tests or intended to expose an internal function for manual test access - things like parsertest and exprtest - I didn't mark the messages as translatable. But tarmac-indextool was a borderline case, and I did mark the messages in that. Some text mustn't be translated, such as option names. The option names themselves can't change, or command-line compatibility would break every time you changed your language configuration. This will also mean that option names inside the translated messages need to be left alone (but one assumes that any experienced translator would already know that). But right next to the option names are 'meta-variable' names that indicate the nature of the option value or positional argument, such as 'TRACEFILE' or '--image IMAGEFILE'. _Those_, I decided, should be translated, because they're part of the explanation to the user of how the option works. So each metavar is a tiny message of its own, and will have to match the message next to it that says what the value is used for.
- Loading branch information
1 parent
13619ff
commit db766c5
Showing
16 changed files
with
379 additions
and
360 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.