mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Support translation contexts
This commit is contained in:
parent
b0a8f3e2f5
commit
0e33ce190d
6 changed files with 55 additions and 31 deletions
|
@ -91,7 +91,7 @@ Translations
|
|||
~~~~~~~~~~~~
|
||||
|
||||
Use ``_("...")`` to mark strings as translatable. You can put a comment for
|
||||
translators on the line above.
|
||||
translators on the line above if needed.
|
||||
|
||||
.. code-block::
|
||||
|
||||
|
@ -100,6 +100,18 @@ translators on the line above.
|
|||
label: _("Hello, world!");
|
||||
}
|
||||
|
||||
Use ``C_("context", "...")`` to add a *message context* to a string to
|
||||
disambiguate it, in case the same string appears in different places. Remember,
|
||||
two strings might be the same in one language but different in another depending
|
||||
on context.
|
||||
|
||||
.. code-block::
|
||||
|
||||
Gtk.Label label {
|
||||
/* Translators: This is a section in the preferences window */
|
||||
label: C_("preferences window", "Hello, world!");
|
||||
}
|
||||
|
||||
Referencing objects by ID
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue