mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-21 06:39:17 +02:00
Fix consistency of code blocks
Use the appropriate code blocks for strings, file names, and extensions.
This commit is contained in:
parent
91a08c01f3
commit
3807fae17e
@ -122,20 +122,20 @@ application. These macros are defined when including `<glib/gi18n.h>` or
|
|||||||
This macro is available since GLib 2.18
|
This macro is available since GLib 2.18
|
||||||
|
|
||||||
`Q_(String)`
|
`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
|
the advantage that the string can be adorned with a prefix to guarantee
|
||||||
uniqueness and provide context to the translator.
|
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
|
leading part is the prefix, which must not be translated; the trailing
|
||||||
part is the translatable message.
|
part is the translatable message.
|
||||||
|
|
||||||
One use case given in the gettext manual is GUI translation, where one
|
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
|
could e.g. disambiguate two ‘Open’ menu entries as `"File|Open"` and
|
||||||
"Printer|Open". Another use case is the string "Russian" which may
|
`"Printer|Open"`. Another use case is the string ‘Russian’ which may
|
||||||
have to be translated differently depending on whether it's the name
|
have to be translated differently depending on whether it’s the name
|
||||||
of a character set or a language. This could be solved by using
|
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
|
See also the `C_()` macro for a different way to mark up translatable
|
||||||
strings with context.
|
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
|
`--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`
|
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
|
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
|
This macro is available since GLib 2.4
|
||||||
|
Loading…
x
Reference in New Issue
Block a user