Fix consistency of code blocks

Use the appropriate code blocks for strings, file names,
and extensions.
This commit is contained in:
Philip Withnall 2024-05-15 11:24:42 +00:00 committed by Philip Withnall
parent 91a08c01f3
commit 3807fae17e

View File

@ -122,20 +122,20 @@ application. These macros are defined when including `<glib/gi18n.h>` or
This macro is available since GLib 2.18
`Q_(String)`
: `Like _()`, but handles context inside translatable string. This has
: Like `_()`, but handles context inside the translatable string. This has
the advantage that the string can be adorned with a prefix to guarantee
uniqueness and provide context to the translator.
The `String` is made of two parts, separated by `|` character. The
The `String` is made of two parts, separated by the `|` character. The
leading part is the prefix, which must not be translated; the trailing
part is the translatable message.
One use case given in the gettext manual is GUI translation, where one
could e.g. disambiguate two "Open" menu entries as "File|Open" and
"Printer|Open". Another use case is the string "Russian" which may
have to be translated differently depending on whether it's the name
could e.g. disambiguate two Open menu entries as `"File|Open"` and
`"Printer|Open"`. Another use case is the string Russian which may
have to be translated differently depending on whether its the name
of a character set or a language. This could be solved by using
"charset|Russian" and "language|Russian".
`"charset|Russian"` and `"language|Russian"`.
See also the `C_()` macro for a different way to mark up translatable
strings with context.
@ -144,6 +144,6 @@ application. These macros are defined when including `<glib/gi18n.h>` or
`--keyword=Q_` to `xgettext` when extracting messages. If you are using
a version of GNU gettext newer than 0.15, you can also use `--keyword=Q_:1g`
to let xgettext split the context string off into a `msgctxt` line in
the po file.
the `.po` file.
This macro is available since GLib 2.4