HTML translations
For translating HTML use these forms:
<span translate>Ready</span>
= Ready
<span translate translate-context="verb">Ready</span>
= Ready
<span translate="yes">Not ready</span>
= Not ready
<span translate="title" title="Unavailable">Cancel</span>
= Cancel
<span translate="yes title" title="Unavailable">Cancel</span>
= Cancel
Note that we do not support:
- Interpolation of variables.
- Pluralization
- The
<translate>
element
Old Glade style
The old Glade style is not recommended:
<span translate="yes">Empty</span>
= Empty
<span translate="yes" context="verb">Empty</span>
= Empty
Note that we do not support:
- Interpolation of variables.
- Translatable attributes.
- Pluralization
- The
<translate>
element
Code Translations
For translating in javascript code, use these forms:
_("Empty")
=
_("verb", "Empty")
=
C_("verb", "Empty")
=
cockpit.gettext("Control")
=
cockpit.gettext("key", "Control")
=
cockpit.ngettext("$0 disk is missing", "$0 disks are missing", 1)
=
cockpit.ngettext("$0 disk is missing", "$0 disks are missing", 2)
=
cockpit.ngettext("disk-non-rotational", "$0 disk is missing", "$0 disks are missing", 1)
=
cockpit.ngettext("disk-non-rotational", "$0 disk is missing", "$0 disks are missing", 2)
=
Note that we do not support:
- Extraction of single quoted strings.